Question on Custom Promotions

evanbgood

Chieftain
Joined
Sep 26, 2010
Messages
77
I did a little searching to see if I could find the answer to this, but no luck!

What I'm trying to do today is make a new promotion type to be applied to a unit. Not just tweaking an existing promotion or applying one to a unit, but making a new promotion entirely. Logic (or whatever you call what happens in my brain :confused:) would indicate that all I should need to do is this:

Code:
<GameData>
  <UnitPromotions>
		<Row>
			<Type>PROMOTION_BETTER_CITY_ASSAULT</Type>
			<Description>TXT_KEY_PROMOTION_CITY_ASSUALT</Description>
			<Help>TXT_KEY_PROMOTION_CITY_ASSUALT_HELP</Help>
			<Sound>AS2D_IF_LEVELUP</Sound>
			<CityAttack>50</CityAttack>
			<PortraitIndex>59</PortraitIndex>
			<IconAtlas>ABILITY_ATLAS</IconAtlas>
			<PediaType>PEDIA_ATTRIBUTES</PediaType>
			 <PediaEntry>TXT_KEY_PEDIA_PROMOTION_CITY_ASSUALT</PediaEntry>
		</Row>
  </UnitPromotions>
<Gamedata>

But I seem to be missing something since that method didn't seem to want to work in any of my tests. Is there another file that promotions rely on that I'm not referencing? Do I need to add unique tags for TXT entries to make it work? Any advice would be much appreciated! This is an important part of the new mod I'm working on!

EDIT: So uh... no one replied. Good! It seems the above example DOES work, if you avoid making typos in your references. Please ignore my silly frustrations!
 
I added a Promotion like this to my Unit and it work, maybe you can find out anything
Spoiler :

<UnitPromotions>
<Row>
<Type>PROMOTION_DUKICH</Type>
<Description>TXT_KEY_PROMOTION_DUKICH</Description>
<Help>TXT_KEY_PROMOTION_DUKICH_HELP</Help>
<Sound>AS2D_IF_LEVELUP</Sound>
<OrderPriority>1</OrderPriority>
<OpenAttack>-20</OpenAttack>
<OpenDefense>-20</OpenDefense>
<RoughAttack>25</RoughAttack>
<RoughDefense>25</RoughDefense>
<IgnoreTerrainCost>true</IgnoreTerrainCost>
<PortraitIndex>44</PortraitIndex>
<IconAtlas>PROMOTION_ATLAS</IconAtlas>
<PediaType>PEDIA_MELEE</PediaType>
<PediaEntry>TXT_KEY_PROMOTION_SHOCK_1</PediaEntry>
</Row>
</UnitPromotions>
 
Back
Top Bottom