Upgradeable Buildings

platyping

Sleeping Dragon
Joined
Oct 22, 2010
Messages
4,626
Location
Emerald Dreams
Upgradeable Buildings

A pure python version of Upgradeable Buildings by TheLopez.
For Mac Lovers

Features
Allows Buildings to "Upgrade" to higher order of same type of buildings.
Spoiler :





Barracks for instance can upgrade to Advanced Barracks and then to Modern Barracks.
When Advanced Barracks is built, Barracks is removed from city, and when Modern Barracks is built, Advanced Barracks is removed.
Spoiler :





This is pretty much a modification from "Hidden Promotions" codes.
All you need to do is ensure that <Type> goes in logical numeric order.
The first building however does not need a number, so you do not have to change all other XML files like CivilizationInfos.xml

In other words, examples would be:
<Type>BUILDING_BARRACKS</Type>
<Type>BUILDING_BARRACKS2</Type>
<Type>BUILDING_BARRACKS3</Type>

or
<Type>BUILDING_GRANARY</Type>
<Type>BUILDING_GRANARY2</Type>
<Type>BUILDING_GRANARY3</Type>

So long as it follows this order, you do not have to touch the python files.
They have been coded for all cases.

P.S.
Can handle up to 9 upgrades for each Building. (Up to BUILDING_XXX9)
Note that only the <Type> has to be in order, you can name the buildings whatever you want, like what I did, or simply Barracks I, II and III

Edit:
The moment I post, I noticed the Heroic Epic...
Will not be able to build that after you upgrade... Hmm, look into it later.
 
Edit:
The moment I post, I noticed the Heroic Epic...
Will not be able to build that after you upgrade... Hmm, look into it later.


I was wondering about other buildings that require the base building not being available to build after you upgrade. Glad you noticed it yourself:).
 
The sad thing is probably have to activate canConstruct as well, but activating 2 python callbacks for a minor mod component sounds unappealing...
 
I have also noticed that when you upgrade a building, you can then build the previous upgrade again. For example upon upgrading a Barracks to Advanced Barracks, the normal Barracks can be built again in the city. Would there be a way to stop any previous upgrades from being built again?
 
Nothing wrong with it, unless you did not activate python callback.

The main issue is with those pre-requisites mentioned above, which cannot be fixed, without activating canConstruct as well + tedious coding there.

Thus, I rather abandon this feature since it is not worth activating 2 callbacks for this.
 
Top Bottom