XML question regarding promotions

Tom Sawyer

Chieftain
Joined
Jun 29, 2004
Messages
15
I'm interested in giving the marine unit access to the city raider promotions. I thought this would be easy, but it looks like I'm stuck with:

1) Giving all gunpowder units access to CR
or
2) Giving marines a bonus CRI, similar to how samurai start with a drill promotion.

Am I missing a way to modify the XML so I can give only one unit among the gunpowder units access (not a bonus promotion) to the CR line?

I'm not a programmer, so anything beyond editing text files isn't going to happen.

Thanks
 
To allow a promotion for a existing type of units ("Unitcombat"-type) you need to add that type to <UnitCombats> list in Civ4PromotionInfos.XML. Gunpowder is UNITCOMBAT_GUN, iirc. To add a free promotion to a unit you need to add it to <FreePromotions> list of that unit.

Just take a look at any existing promotion / a unit that already have one free.
 
The easiest way to do this is option 2: give marines CR1 and let UNITCOMBAT_GUN get the rest. Since only the Marine has the prereq, only the marine will be able to get CR2+.

The much more complicated and time-consuming way is to mod in an entirely new line of promos with the same effect as CR (CR marine or something) and give the marine the first one (as in before CR1). This basically lets you start a marine with nothing, unlike the above, which gives him a free CR1.
 
Top Bottom