[george] How to specify manufacturer tag on items

Freeform discussion about anything related to modding Transcendence.
Post Reply
User avatar
Wolfy
Fleet Admiral
Fleet Admiral
Posts: 5359
Joined: Tue Feb 05, 2008 1:10 am
Location: Somewhere in the Frontier on a Hycrotan station, working on new ships.

Tue Oct 22, 2013 4:42 pm

Vanilla weapons got tags specifying the manufacturer (if corporate) but I looked at the xml and it did not have any new things specifying that as far as I could tell

How is this done?
(shpOrder gPlayership 'barrelRoll)
(plySetGenome gPlayer (list 'hycrotan 'nonBinary))
Image

Amilir
Militia Lieutenant
Militia Lieutenant
Posts: 151
Joined: Fri Feb 12, 2010 4:56 pm
Location: With the stRong.

Tue Oct 22, 2013 5:12 pm

Look at the code in CorporateHierarchy.xml to define your own labels (see <DisplayAttributes>).

Code: Select all

<DisplayAttributes>
	<!-- Define item attributes so that the player can see which Corporation 
		created the item. -->

	<ItemAttribute label="Bushido"			criteria="* +bushido;"/>
	<ItemAttribute label="EI"				criteria="* +ei;"/>
	<ItemAttribute label="Makayev"			criteria="* +makayev;"/>
	<ItemAttribute label="NAMI"			criteria="* +nami;"/>
	<ItemAttribute label="Rasiermesser"		criteria="* +rasiermesser;"/>
	<ItemAttribute label="Taikon"			criteria="* +taikon;"/>
</DisplayAttributes>
EDIT: The DisplayAttributes block goes in <Sovereign> for whatever reason.
EDIT2: Probably just because it has to go somewhere, and under the corporate sovereign makes sense for displaying corporate manufacturer. :oops:

User avatar
Wolfy
Fleet Admiral
Fleet Admiral
Posts: 5359
Joined: Tue Feb 05, 2008 1:10 am
Location: Somewhere in the Frontier on a Hycrotan station, working on new ships.

Tue Oct 22, 2013 5:58 pm

Ah, alright, thanks for finding that! I had only been searching through the items themselves. >.<
(shpOrder gPlayership 'barrelRoll)
(plySetGenome gPlayer (list 'hycrotan 'nonBinary))
Image

User avatar
digdug
Fleet Admiral
Fleet Admiral
Posts: 2610
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

Tue Oct 22, 2013 5:59 pm

Wolfy, since your mods have sovereigns, just place the <DisplayAttributes> in one of those.

I just tried a virtual sovereign, and that works well too:
http://forums.kronosaur.com/viewtopic.php?f=5&t=6106

PM
Fleet Admiral
Fleet Admiral
Posts: 2308
Joined: Wed Sep 01, 2010 12:54 am

Tue Oct 22, 2013 6:29 pm

A virtual sovereign entity is not necessary. I placed it within one of my non-virtual station entities and it works. It may work with any entity (but I have not tested that).
Download and Play in 1.8 Beta...
Drake Technologies (Alpha): More hardware for combat in parts 1 and 2!
Godmode v3 (WIP): Dev/cheat tool compatible with D&O parts 1 or 2.
Download and Play in 1.7...
Star Castle Arcade: Relive classic arcade gaming in a new Transcendence adventure!
Playership Drones v7 (Beta): (OUTDATED!) Acquire and command almost any ship in Stars of the Pilgrim or Eternity Port.
Work in progress... Playership Drones v8: Work just started! Details to come later...

george moromisato
Developer
Developer
Posts: 2898
Joined: Thu Jul 24, 2003 9:53 pm
Contact:

Tue Oct 22, 2013 9:53 pm

PM wrote:A virtual sovereign entity is not necessary. I placed it within one of my non-virtual station entities and it works. It may work with any entity (but I have not tested that).
Yes, it should work with any top-level design type (basically, anything with an UNID).

User avatar
Wolfy
Fleet Admiral
Fleet Admiral
Posts: 5359
Joined: Tue Feb 05, 2008 1:10 am
Location: Somewhere in the Frontier on a Hycrotan station, working on new ships.

Wed Oct 23, 2013 2:13 am

Is there any way to have colored attribute tags? (such as Illegal, Military, etc, or even arbitrary tag colors as digdug was suggesting on irc)

(BTW for any other modders using this, using a <Type UNID="unidType"><DisplayAttributes> ... </DisplayAttributes></Type> works just fine)
(shpOrder gPlayership 'barrelRoll)
(plySetGenome gPlayer (list 'hycrotan 'nonBinary))
Image

george moromisato
Developer
Developer
Posts: 2898
Joined: Thu Jul 24, 2003 9:53 pm
Contact:

Wed Oct 23, 2013 4:59 am

Wolfy wrote:Is there any way to have colored attribute tags? (such as Illegal, Military, etc, or even arbitrary tag colors as digdug was suggesting on irc)

(BTW for any other modders using this, using a <Type UNID="unidType"><DisplayAttributes> ... </DisplayAttributes></Type> works just fine)
Try:

Code: Select all

...
<ItemAttribute ... labelType="advantage"/>
<ItemAttribute ... labelType="disadvantage"/>
...

User avatar
Wolfy
Fleet Admiral
Fleet Admiral
Posts: 5359
Joined: Tue Feb 05, 2008 1:10 am
Location: Somewhere in the Frontier on a Hycrotan station, working on new ships.

Wed Oct 23, 2013 6:09 am

Thanks george, that works!
(shpOrder gPlayership 'barrelRoll)
(plySetGenome gPlayer (list 'hycrotan 'nonBinary))
Image

User avatar
digdug
Fleet Admiral
Fleet Admiral
Posts: 2610
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

Wed Oct 23, 2013 9:38 am

george moromisato wrote:
PM wrote:A virtual sovereign entity is not necessary. I placed it within one of my non-virtual station entities and it works. It may work with any entity (but I have not tested that).
Yes, it should work with any top-level design type (basically, anything with an UNID).
Ah, I totally assumed that it's a child of sovereign only :P
Good :)

Post Reply