Civ-Specific Buildings?

ApisCanis

Chieftain
Joined
Dec 26, 2010
Messages
7
Anyone know if there is a mod out there which adds an xml tag for a civilization prereq? I would like to make civ-specific buildings etc without having to make a dummy tech prereq.

Similar to this one which adds a city size tag:
What it does: This mod allows you to set a city size prerequisite for a building so that your cities cannot construct those buildings unless you've reached the minimum population required. It's unrealistic for a city of size 3 to have its own airport, for example. With this mod component you just use the new tag I created, <iCitySizePrereq>, and set its value to 14, so only cities of size 14 or larger can construct airports. Public transportation system? Not for a village. Now only cities with a population to support it can construct such a building based on whatever city size you determine it requires.

Any help would be apreciated.
Apis.
 
Eh, what version of Civ4 are you modding? Because I believe that there are already Unique Buildings in Beyond the Sword... As in Civ specific buildings.
 
Sorry, guess I didn't make myself clear. I am running BTS 3.17 or whatever the newest version is. I know there are civ-specific buildings, but I couldn't find anything in the xml where they are designated civ-specific. They have the tech, and religion prereqs.

<BuildingInfo>
<BuildingClass>BUILDINGCLASS_WALLS</BuildingClass>
<Type>BUILDING_CELTIC_DUN</Type>
<SpecialBuildingType>NONE</SpecialBuildingType>
<Description>TXT_KEY_BUILDING_CELTIC_DUN</Description>
<Civilopedia>TXT_KEY_BUILDING_CELTIC_DUN_PEDIA</Civilopedia>
<Strategy>TXT_KEY_BUILDING_CELTIC_DUN_STRATEGY</Strategy>
<Advisor>ADVISOR_MILITARY</Advisor>
<ArtDefineTag>ART_DEF_BUILDING_CELTIC_DUN</ArtDefineTag>
<MovieDefineTag>NONE</MovieDefineTag>
<HolyCity>NONE</HolyCity>
<ReligionType>NONE</ReligionType>
<StateReligion>NONE</StateReligion>
<bStateReligion>0</bStateReligion>
<PrereqReligion>NONE</PrereqReligion>
<PrereqCorporation>NONE</PrereqCorporation>
<FoundsCorporation>NONE</FoundsCorporation>
<GlobalReligionCommerce>NONE</GlobalReligionCommerce>
<GlobalCorporationCommerce>NONE</GlobalCorporationCommerce>
<VictoryPrereq>NONE</VictoryPrereq>
<FreeStartEra>NONE</FreeStartEra>
<MaxStartEra>NONE</MaxStartEra>
<ObsoleteTech>TECH_RIFLING</ObsoleteTech>
<PrereqTech>TECH_MASONRY</PrereqTech>

I'd just like to be able to add new civ-specific buildings, or make existing buildings civ-specific. Is there already a way to do that? or would I need a new tag?

Edit: or does the "Celtic" in CELTIC_DUN make it Celt only?
 
Yeah, makes sense. Also should be noted that there are building classes and building types. All the unique buildings replace the default building type for that building class. So if you wanna make a new building you need to figure out whether or not it belongs to a pre-existing class or if you need to make a new one.
 
Ahh.. I got it now. Was looking in the wrong place. Thanks guys, it should be easy from here. :)
 
Well, I thought it would be easy, but I must be messing something up.

I have a Fort Knox wonder, which I've added to all the necessary xml files. (wonder works fine in-game) I'd like to make this wonder American-only.

I added this right beneath the American mall entry in CivilizationsInfo.xml
<Building>
<BuildingClassType>BUILDINGCLASS_FORTKNOX</BuildingClassType>
<BuildingType>BUILDING_FORTKNOX</BuildingType>
</Building>

But, I tested it in-game, and wonder can still be built by any civ. Is there anything else I need to do?
 
For each of the other civs add this:
Code:
<Building>
	<BuildingClassType>BUILDINGCLASS_FORTKNOX</BuildingClassType>
	<BuildingType>NONE</BuildingType>
</Building>
This is the same way that barbarians are prevented from building buildings of a lot of building classes.
 
or just change the defaultbuilding of BUILDINGCLASS_FORTKNOX in buildingclassinfos to NONE. (which is much easier if you want to allow only 1/few civs to be able to construct the building).
 
Sephi, good to see that someone is thinking. ;)
 
yeah, but because there is a bug for units does not mean there is one for buildings. they are two completly different things ;)
 
Top Bottom