Promotion depending on building in city

dewell

Warlord
Joined
Jun 29, 2007
Messages
171
Hi,

I created some new promotions for the adepts in FfH2. For example "Knowledge about history" ... it can be gained by upgrading like FireI, Strength and other Promotions but should require that the unit is in a city with the building "library".

Any idea how to implement that?
 
If you are already a C++ programmer, or interested to learn, it is certainly possible to make the change you requested in the sdk. This would involve modifying the check to see if a promotion is legal, to add one more condition. Then you would also modify the xml reader to understand a new field in the promotion xml file. There are three levels of modding, generally: xml changes (easiest), python changes (medium) and sdk changes (harder). Have you done any of these types before? Do you know python or C++ already?

One key problem with this change, or many proposed changes, is getting the AI to understand this. Adding the new condition will prevent the human or AI player from getting the promotion unless they are in a city with the proper building. But, the AI would not understand that for a unit to get this promotion, it must move to this type of city. That requires a much more difficult change to a part of the sdk which is much harder to understand. Units have many reasons to move from one place to another; right now they do not have to consider moving to a city in order to get a promotion.
 
great explanation ... I always forget the AI ... so I have to change my plans, dealing with the KI is something I will try later ;) thanks a lot
 
Back
Top Bottom