Promotions allowing upgrades

The Great Apple

Big Cheese
Joined
Mar 24, 2002
Messages
3,361
Location
Oxford, England
Righto, here is my situation.

I'm working on idea, where once a unit recieved a promotion, he would be able to upgrade to another unit, having gone back to a city to upgrade (you still have to do that, right?). This would to represent the unit getting new kit to use with it's new found skill. Now, the trickier part, is working out how to do it.

Poking around in the promotions and units xml files, I notice that they both run off the same schema. Now, does that mean that I can add tags in the promotions file, which are in the units file. Specifically, if I were to add:
Code:
<UnitClassUpgrades>
	<UnitClassUpgrade>
		<UnitClassUpgradeType>UNITCLASS_NEW UNIT</UnitClassUpgradeType>
		<bUnitClassUpgrade>1</bUnitClassUpgrade>
	</UnitClassUpgrade>
</UnitClassUpgrades>
to a specific promotion, would it allow me to upgrade a unit with that promotion to NEWUNIT, or do I need a phython script to do this?

EDIT: Oh, and does anybody know what <bUnitClassUpgrade>1</bUnitClassUpgrade> does? Does it just enable the promotion? Maybe I could do something using this?

On a similar vein, if I wanted to get rid of the amphibious promotion, but still wanted amphibious guys, could I just stick
Code:
 <bAmphib>1</bAmphib>
into the unit file, rather than mucking around creating a promotion nobody could get?

I would test it myself, but I can't run Civ on this PC...
 
>having gone back to a city to upgrade (you still have to do that, right?).

nope. move your unit back into the culture zone is enough to allow for upgrading..even if it is many tiles away from a city. though only "issue" with it seems that once you move that unit into the zone, the ability to upgrade doesnt seem to become available until the next turn. but in short, no you dont have to return all the way to the cities to upgrade.
 
I *think* the UnitClassUpgradeType tells the game what kind of unit is, and hence, which upgrades are available for that class... ie. Archers get the City Defense and Hill Defense, while Melee units get Shock and Cover and Mounted Units get Flanking. There should be a list of UnitClassUpgradeTypes somewhere in the XML to tell you which class is for which type of unit.

or...maybe not. :blush:
 
Back
Top Bottom