How can I add civ-specific building?

You need to change 3 files.

1) The first is CIV4BuildingClassInfos.xml. In here you define the different building classses - the best example of an entity class is a unit class - both the Tank and the German Panzer belong to the same unit class - UNITCLASS_TANK. Building classes work the same way. So you add whatever building class you want; you can have multiple buildings attached to a single class - so you can make "GERMAN_HOUSE" and "FRENCH_HOUSE" and "ENGLISH_HOUSE" all attached to the same buildingclass and a civ will only be able to build one of them.

In this file you define what is the DEFAULT building for this class. If you only want ONE civ to be able to build it then you set the default to NONE rather than BUILDING_GERMAN_HOUSE or whatever. If you set it to NONE then nobody will be able to build this buildingclass by default.

2) The second file you need to change is CIV4BuildingInfos.xml. This is the actual data about the individual buildings, so this is the place where you would put "GERMAN_HOUSE" and "FRENCH_HOUSE" and so on. You don't need to do anything special here to prevent a civ from building it.

3) The third file to change is CIV4CivilizationInfos.xml. This is where you actually define who can use the buildings. If you set the default building to NONE in BuildingClass then you find the civ you want to be able to use the building and look for the <Buildings/> line. Change that line to what follows:
Code:
			<Buildings>
				<Building>
					<BuildingClassType>BUILDINGCLASS_HOUSE</BuildingClassType>
					<BuildingType>BUILDING_GERMAN_HOUSE</BuildingType>
				</Building>
			</Buildings>
With "BUILDINGCLASS_HOUSE" being the BUILDINGCLASS entry you added and "BUILDING_GERMAN_HOUSE" the (or one of the) BUILDING entries you added. If you want an example of this look at the Barbarian civ - they have their buildingclasses changed to NONE so that they can't build certain things in their cities.

If you DIDN'T set the default to NONE in CIV4BuildingClassInfos.xml you'll need to add the BuildingType NONE entry to each civ you don't want to be able to build anything of that BUILDINGCLASS - though if you only want one civ to be able to build it it's easier to set the DEFAULT to none and just specify the indivdual civs you want TO be able to build it, rather than the other way around.

If you have any questions let me know.

Edit: Fixed typo in code
 
...If you have any questions let me know.


All that is fine but what about all the subsequent mechanics ? The graphics (non existant unless you re-use existing ones) - the sounds - the animations and so on. The graphics positioning on the map, etc.

I think instead of answering peacemeal here you guys should get busy writing a comprehensive editing guide.



G.
 
I would love to do so... assuming I actually had time to do such a thing. ;) Answering questions like this takes very little time and can be done between different tasks while writing guides is a lot of work. Plus writing a guide doesn't help the people who have specific questions about things right now.
 
Trip said:
I would love to do so... assuming I actually had time to do such a thing. ;) Answering questions like this takes very little time and can be done between different tasks while writing guides is a lot of work. Plus writing a guide doesn't help the people who have specific questions about things right now.



So what you're saying is *we* who *paid* for the game have to finish Firaxis' team's job...

I don't know how many hundreds of variables there might be between the dozens of XLM files - and that's not counting the possible relationships between them. I don't want to spend weeks or even months getting educated enough so that I can 'easily mod' a game badly in need of it. And I add that this product was sold in part on the promise that it would indeed *be* easily modable.

Anyhow no doubt *you*, an employee, don't have time for this - but the damned company who markets this product should make it a point to deliver on its promises - which means spending the money necessary to produce the relevant documentation.

I'll stop before getting angrier. :rolleyes:



G.
 
grallon said:
So what you're saying is *we* who *paid* for the game have to finish Firaxis' team's job...
Gah, leave the poor guy alone.

He takes time out of what he is doing to come here, and answer questions for people, and all you do is whine at him? The best way to learn is through a series of examples. Once people work out the basics, it becomes alot easier to work out for themselves how to do the more advanced things - I personnaly think it's part of the fun.

Anyway the game *is* easily moddable. Just looking at the units listings it's quite easy to see how to change just about all the units stats, give them different promotions, make them dependant on a religion, and all sorts of clever things.

Sure there are some .xml tags we don't understand yet, but most of them are pretty obvious, and a guide would have to be comprehensive and cover all of them, and all their possablilities for use. While I agree it would be quite nice to have such a guide, I don't see one is strictly neccessary if there are occasionally people popping in here telling us what we need to know. If people like you are rude to him he may well decide it's not worth his time, and never come back, and how does that help?

For now, I think most of us are happy going along slowly, working it out as we go, and asking if we get stuck at any point. It's great that Trip comes in here and helps us out, otherwise we'd get pretty angry pretty quick trying to work it all through ourselves.

Thanks trip for posting this example, it is something I had been wondering too - I presume the same sort of procedure works with units?
 
Wow man I thought it would be easier to just add abuilding to a civ.
Thnx Trip for the answer :goodjob:
 
Back
Top Bottom