[george] How to specify manufacturer tag on items

Freeform discussion about anything related to modding Transcendence.
Post Reply
User avatar
Aury
Fleet Admiral
Fleet Admiral
Posts: 5526
Joined: Tue Feb 05, 2008 1:10 am
Location: At the VSS Shipyards in the frontier, designing new ships.

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)

<New tutorials, modding resources, and official extension stuff coming to this space soon!>
Amilir
Militia Lieutenant
Militia Lieutenant
Posts: 151
Joined: Fri Feb 12, 2010 4:56 pm
Location: With the stRong.

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
Aury
Fleet Admiral
Fleet Admiral
Posts: 5526
Joined: Tue Feb 05, 2008 1:10 am
Location: At the VSS Shipyards in the frontier, designing new ships.

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

<New tutorials, modding resources, and official extension stuff coming to this space soon!>
User avatar
digdug
Fleet Admiral
Fleet Admiral
Posts: 2620
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

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: 2570
Joined: Wed Sep 01, 2010 12:54 am

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.9 beta 1...
Drake Technologies (Alpha): More hardware for combat in parts 1 and 2!
Star Castle Arcade: Play a classic arcade game adventure, with or without more features (like powerups)!
Playership Drones: Buy or restore exotic ships to command!

Other playable mods from 1.8 and 1.7, waiting to be updated...
Godmode v3 (WIP): Dev/cheat tool compatible with D&O parts 1 or 2.
george moromisato
Developer
Developer
Posts: 2998
Joined: Thu Jul 24, 2003 9:53 pm
Contact:

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
Aury
Fleet Admiral
Fleet Admiral
Posts: 5526
Joined: Tue Feb 05, 2008 1:10 am
Location: At the VSS Shipyards in the frontier, designing new ships.

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)

<New tutorials, modding resources, and official extension stuff coming to this space soon!>
george moromisato
Developer
Developer
Posts: 2998
Joined: Thu Jul 24, 2003 9:53 pm
Contact:

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
Aury
Fleet Admiral
Fleet Admiral
Posts: 5526
Joined: Tue Feb 05, 2008 1:10 am
Location: At the VSS Shipyards in the frontier, designing new ships.

Thanks george, that works!
(shpOrder gPlayership 'barrelRoll)

<New tutorials, modding resources, and official extension stuff coming to this space soon!>
User avatar
digdug
Fleet Admiral
Fleet Admiral
Posts: 2620
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

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