Translating Civ Trait to Unit Promotion: EmbarkedNotCivilian

jaldaen

Prince
Joined
Feb 19, 2006
Messages
467
Hello All,

I've been working on a revision to my Portuguese Civ mod and was wondering if it was possible to translate a Civilization trait (such as EmbarkedNotCivilian) into a Unit Promotion that I can give to the Portuguese unique unit. I've tried a few variations on the following code (without the table stuff, with tech requirement and priority), but nothing seems to work:

Code:
<GameData>
	<Table name="UnitPromotions">
		<Column name="EmbarkedNotCivilian" type="boolean" default="false"/>
	</Table>
	<Unit_FreePromotions>
		<Row>
			<UnitType>UNIT_EXPLORADOR</UnitType>
			<PromotionType>PROMOTION_EXPLORADOR</PromotionType>
		</Row>
	</Unit_FreePromotions>
	<UnitPromotions>
		<Row>
			<Type>PROMOTION_EXPLORADOR</Type>
			<Description>TXT_KEY_PROMOTION_EXPLORADOR</Description>
			<Help>TXT_KEY_PROMOTION_EXPLORADOR</Help>
			<Sound>AS2D_IF_LEVELUP</Sound>
			<EmbarkedNotCivilian>true</EmbarkedNotCivilian>
			<PortraitIndex>48</PortraitIndex>
			<IconAtlas>ABILITY_ATLAS</IconAtlas>
			<PediaType>PEDIA_ATTRIBUTES</PediaType>
			<PediaEntry>TXT_KEY_PEDIA_PROMOTION_EXPLORADOR</PediaEntry>
		</Row>
	</UnitPromotions>
</GameData>

Any ideas? Is this something that will have to wait for the source code?

Thanks,
Joseph

PS: I know I'm doing the free promotion stuff right b/c I tried it first with Drill 1 and it works.
 
Are you adding a new column to an existing table? Regardless of whether or not that works (check the database to see if it does), how would the game know how to use it?
 
JeBuS27,

My hope was that elements would be translatable between tables (especially for simple true/false traits), but I think you're right that they aren't so I'd have to wait until the source code is available to make this type of change.

And like I said, I tried both with and without adding the column to the UnitPromotions table, but neither worked.
 
Yeah, you can't just arbitrarily enter a new element into an XML table. Sure, you can put it in the file, but the software won't know to look for it, so there's no point.

It's too bad, because I wanted something similar: the Japanese "Bushido" ability as a promotion that I could give to certain units to represent that they're one gigantic unit that doesn't suffer an attritional effect to their combat effectiveness. And once we have better access to the software's logic this might be trivial to do, but for now you're out of luck.
 
Spatzimaus,

That's a cool idea... and hopefully we won't have to wait too long to see our ideas turn into realities. ;)
 
Top Bottom