Jean Elcard
The Flavournator
Obsolete Buildings
This is more or less a spin-off of an other mod of mine, but I release it as a stand-alone mod component, because it's a really nice and easy to use mechanism. In some way it is similar to TheLopez "Upgradeable Buildings" mod, but there are significant differences in functionality and especially in the way it's coded.
Short Description:
This mod component allows you to specify buildings, which, if built, obsolete other buildings in the same city. "Obsoletes" in this context means, that they will replace their predecessors in the same city and prevent them from being built there again as long as the successor exists in the city. This works also with complex multiple levels of obsoletenesses.
The Facts:
I've included a rather academical example with no real practical relevance but it demonstrates very well, what the mod does. See the first figure in the attached graph below. The letters stand for different buildings and an arrow from one building to another means, that the first building obsoletes the latter. Blue arrwos are declared in XML and orange arrows are automatically generated transitive connections. You may play around with this example ingame to get a feeling for it.
How to use:
Very easy. Just add a XML tag like this to the building you want to obsolete another building class in CIV4BuildingInfos.xml.
That's it, but be careful not to create circles like in figure 2 of the attached graph. Your game will crash because of eternal recursion.
Modder who would like to integrate my mod component might be interested in knowing, that I marked all modifications made by me in C++ and XML by comments starting with "OB:".
Download:
Obsolete Buildings v0.1.0 for Civilization IV (Vanilla) v1.74: Link
Obsolete Buildings v0.1.1 for Civilization IV (Beyond the Sword) v3.17: Link (06/20/08)
If you find any bugs please tell me. Otherwise have fun.
Jean Elcard (aka Elgor)
This is more or less a spin-off of an other mod of mine, but I release it as a stand-alone mod component, because it's a really nice and easy to use mechanism. In some way it is similar to TheLopez "Upgradeable Buildings" mod, but there are significant differences in functionality and especially in the way it's coded.
Short Description:
This mod component allows you to specify buildings, which, if built, obsolete other buildings in the same city. "Obsoletes" in this context means, that they will replace their predecessors in the same city and prevent them from being built there again as long as the successor exists in the city. This works also with complex multiple levels of obsoletenesses.
The Facts:
- One building may obsolete an arbitrary number of other building classes.
- Any number of different buildings are allowed to obsolete the same building classes.
- Transitivity: If Building B obsoletes A and C obsoletes B, then C also obsoletes A automatically.
- Only in the city buildable buildings show up in the building menue.
- Civilopedia shows all buildings which become obsolete by building a certain building and all buildings which obsolete in turn this one.
- In the city screen only buildings, you've built in the city already, will show up as becoming obsolete in the help text of a building you are allowed to construct. (see the attached screenshot)
I've included a rather academical example with no real practical relevance but it demonstrates very well, what the mod does. See the first figure in the attached graph below. The letters stand for different buildings and an arrow from one building to another means, that the first building obsoletes the latter. Blue arrwos are declared in XML and orange arrows are automatically generated transitive connections. You may play around with this example ingame to get a feeling for it.
How to use:
Very easy. Just add a XML tag like this to the building you want to obsolete another building class in CIV4BuildingInfos.xml.
Code:
<ObsoleteBuildingClasses>
<ObsoleteBuildingClass>
<BuildingClassType>BUILDINGCLASS_B</BuildingClassType>
<bObsolete>1</bObsolete>
</ObsoleteBuildingClass>
</ObsoleteBuildingClasses>
That's it, but be careful not to create circles like in figure 2 of the attached graph. Your game will crash because of eternal recursion.
Modder who would like to integrate my mod component might be interested in knowing, that I marked all modifications made by me in C++ and XML by comments starting with "OB:".
Download:
Obsolete Buildings v0.1.0 for Civilization IV (Vanilla) v1.74: Link
Obsolete Buildings v0.1.1 for Civilization IV (Beyond the Sword) v3.17: Link (06/20/08)
If you find any bugs please tell me. Otherwise have fun.
Jean Elcard (aka Elgor)