Upgrade question

The Great Apple

Big Cheese
Joined
Mar 24, 2002
Messages
3,361
Location
Oxford, England
I've been trying to get something to work for a while now.

I'd like for a unit to be able to be upgradable to, but not be buildable. Now unfortunetly it seems that these two events are quite strongly linked. For example, if I remove the ability of a city (in GameUtils) to train a unit, it also removes the ability to upgrade it. Also, if I set iCost in the xml to -1 (so it can't be build), it can't be upgraded to. Really quite annoying.

Any suggestions?
 
The Great Apple said:
I've been trying to get something to work for a while now.

I'd like for a unit to be able to be upgradable to, but not be buildable. Now unfortunetly it seems that these two events are quite strongly linked. For example, if I remove the ability of a city (in GameUtils) to train a unit, it also removes the ability to upgrade it. Also, if I set iCost in the xml to -1 (so it can't be build), it can't be upgraded to. Really quite annoying.

Any suggestions?

I have this same desire. I think I will be setting the cost to -1 and upgrading as part of the promotion event. So the unit will have to level to recieve the upgrade. It will require a few checks:

1. In the promotion event it will check to make sure the unit meets the minimum level (my upgrades require a certain level) and that the required tech is known), if so it upgrades the unit.

2. After learning a new tech a check is done to upgrade all the units who meet the minimum level.

These upgrades are free and can occur anywhere. The more qualification you put on them the more places you will need to recertify to see if new units are ready for upgrade.

Of course you could just have a check cycle at the begining of each players turn looking for units that meet all the requirements for upgrade and upgrading them or poping up a dialog asking about it.
 
Back
Top Bottom