Adding a building issue

AggPed

Chieftain
Joined
Feb 10, 2005
Messages
30
Location
Rochester, NY
Has anyone tried adding a new building? I followed Kael's guide exactly and it doesn't seem to show. I noticed that even on his Queen of the Iceni mod that he took out the building he describes adding in his guide. Just wondering if there is either an issue, or some additional trick that needs to be done.
 
Kael's guide example, aswell as my own try, work fine. probably a typo somewhere, you could post your files here, so we can help you :)
 
Hmmm.... Didn't seem to like the files to upload (kept saying they weren't valid)... Luckily it's all pretty simple data so here's what I have:

CIV5BuildingClasses.xml:
<GameData>
<BuildingClasses>
<Row>
<Type>BUILDINGCLASS_MEMORIAL</Type>
<DefaultBuilding>BUILDING_MEMORIAL</DefaultBuilding>
<Description>TXT_KEY_BUILDING_MEMORIAL</Description>
</Row>
</BuildingClasses>
</GameData>

CIV5Buildings.xml:
<GameData>
<Row>
<Type>BUILDING_MEMORIAL</Type>
<BuildingClass>BUILDINGCLASS_MEMORIAL</BuildingClass>
<FreeStartEra>ERA_MEDIEVAL</FreeStartEra>
<Cost>20</Cost>
<GoldMaintenance>0</GoldMaintenance>
<Help>TXT_KEY_BUILDING_MEMORIAL_STRATEGY</Help>
<Description>TXT_KEY_BUILDING_MEMORIAL_DESC</Description>
<Civilopedia>TXT_KEY_BUILDING_MEMORIAL_PEDIA</Civilopedia>
<Strategy>TXT_KEY_BUILDING_MEMORIAL_STRATEGY</Strategy>
<ArtDefineTag>MONUMENT</ArtDefineTag>
<MinAreaSize>-1</MinAreaSize>
<Culture>1</Culture>
<HurryCostModifier>10</HurryCostModifier>
<IconAtlas>BW_ATLAS_1</IconAtlas>
<NeverCapture>true</NeverCapture>
<PortraitIndex>21</PortraitIndex>
</Row>
</GameData>

GameText.xml:
</Row>
<Row Tag="TXT_KEY_BUILDING_MEMORIAL">
<Text>Memorial</Text>
</Row>
<Row Tag="TXT_KEY_BUILDING_MEMORIAL_STRATEGY">
<Text>Memorial's were the precursors to the later Monuments, as such while they are cheaper no maintenance, they provide only half the culture bonus.</Text>
</Row>
<Row Tag="TXT_KEY_CIV5_BUILDINGS_MEMORIAL_TEXT">
<Text>As a way to remember events and people of the civilization, Memorials were a way to begin the early spread of culture.</Text>
</Row>


It's basically just a mini-Monument, so I used that as the start point for entries. I also tried to make it a free-building and it wouldn't show, but when I took it out and put in a Monument as a freebie it did. Let me know if you see what I did wrong.

Thanks!
 
GameText.xml:
</Row> ( assume this is not the complete file, and just a close of an above entry?)

your buildings.xml is missing the
<Buildings></buildings>

this would probably be the issue

<Description>TXT_KEY_BUILDING_MEMORIAL_DESC</Description>
<Civilopedia>TXT_KEY_BUILDING_MEMORIAL_PEDIA</Civilopedia>

these 2 are missing from the part of the GameText you provided, but that shouldn't really be an issue.

hope i helped :)
 
I think I'm having the same or a similar issue, so I'll ask too.

I'm going to give a way too detailed account of what I did, because Kael's guide--though very detailed--just skips over too many basic things.

1. Launch ModBuddy.
2. Select "New mod", "Empty Mod", give it a name, insert info.
3. Create a file structure, including "XML" folder.
4. Look in Kael's guide for how to add a building, and discover that although there is a lot of text about tags and attributes, he never actually says whether this stuff goes all by itself into a new XML document or whether you need to copy over existing documents into the mod and add these bits to those copies.
5. Decide "Play it safe" and FIND AND COPY OVER "CIV5BuildingClasses.xml" and "CIV5Buildings.xml".
6. Wonder whether you've done the right thing, because he's got these special GameData tags, even though those and the Buildings tags are already included in the CIV5Buildings xml document. Decide he's just being complete without being clear, and add the Palisades data just above the Walls data:

<Row>
<Type>BUILDING_PALISADE</Type>
<BuildingClass>BUILDINGCLASS_PALISADE</BuildingClass>
<Cost>60</Cost>
<GoldMaintenance>1</GoldMaintenance>
<Help>TXT_KEY_BUILDING_PALISADE_STRATEGY</Help>
<Description>TXT_KEY_BUIDING_PALISADE</Description>
<Civilopedia>TXT_KEY_CIV5_BUILDINGS_PALISADE_TEXT</Civilopedia>
<Strategy>TXT_KEY_BUILDING_PALISADE_STRATEGY</Strategy>
<ArtDefineTag>ART_DEF_BUILDING_WALLS</ArtDefineTag>
<MaxStartEra>ERA_ANCIENT</MaxStartEra>
<MinAreaSize>-1</MinAreaSize>
<AllowsRangeStrike>true</AllowsRangeStrike>
<Defense>250</Defense>
<CityWall>true</CityWall>
<HurryCostModifier>25></HurryCostModifier>
<IconAtlas>BW_ATLAS_1</IconAtlas>
<NeverCapture>true</NeverCapture>
<PortraitIndex>32</PortraitIndex>
</Row>

7. Similarly, add entry to BuildingClasses document:

<Row>
<Type>BUILDINGCLASS_PALISADE</Type>
<DefaultBuilding>BUILDING_PALISADE</DefaultBuilding>
<Description>TXT_KEY_BUILDING_PALISADE</Description>
</Row>

8. Now get really confused, because the guide says nothing about whether the third stuff that is supposed to go into a "GameText" document is going into a modified document or a brand new one. Look for something called "CIV5GameText" in the regular game files; find nothing; decide to make a new document containing the following:

<GameData>
<Language_en_US>
<Row Tag="TXT_KEY_BUILDING_PALISADE">
<Text>Palisade</Text>
</Row>
<Row Tag="TXT_KEY_BUILDING_PALISADE_STRATEGY">
<Text>yadayadayada.</Text>
</Row>
<Row Tag="TXT_KEY_CIV5_BUILDINGS_PALISADE_TEXT">
<Text>yadayadayada.</Text>
</Row>
</Language_en_US>
</GameData>

9. Go to the mod's "Actions" tab and set them:
OnModActivated UpdateDatabase XML/Buildings/CIV5BuildingClasses.xml
OnModActivated UpdateDatabase XML/Buildings/CIV5Buildings.xml
OnModActivated UpdateDatabase XML/NewText/CIV5GameText.xml

10. Hunt thru 73 pages because you have a vague memory that you saw something about "build"; find it (for some reason) right after the WorldBuilder section. For lack of any further direction, hit "Build" in the menu bar. Quit.

11. Launch CiV. Go to the "Mods" section. The mod (hallelujah!) is there. Hit "enable."

12. Launch the simplest game you can set up. When it starts, discover ... that the tech-less "Palisade" is not in your build queue, and it is not in the Civilopedia either. It just doesn't seem to exist.

Help?
 
Between <Row> and <Type>BUILDING_PALISADE</Type> you are missing the <Buildings> tag.
Don't forget to close that tag also after your </Row> Tag.
The <Buildings> (or other<tablename>) tag should enclose all Rows related to that table; it doesn't go between <Row> and fields.
 
Here is the code you need:

CIV5Buildings.xml:
<GameData>
<Buildings>
<Row>
<Type>BUILDING_MEMORIAL</Type>
<BuildingClass>BUILDINGCLASS_MEMORIAL</BuildingClass>
<FreeStartEra>ERA_MEDIEVAL</FreeStartEra>
<Cost>20</Cost>
<GoldMaintenance>0</GoldMaintenance>
<Help>TXT_KEY_BUILDING_MEMORIAL_STRATEGY</Help>
<Description>TXT_KEY_BUILDING_MEMORIAL_DESC</Description>
<Civilopedia>TXT_KEY_BUILDING_MEMORIAL_PEDIA</Civilopedia>
<Strategy>TXT_KEY_BUILDING_MEMORIAL_STRATEGY</Strategy>
<ArtDefineTag>MONUMENT</ArtDefineTag>
<MinAreaSize>-1</MinAreaSize>
<Culture>1</Culture>
<HurryCostModifier>10</HurryCostModifier>
<IconAtlas>BW_ATLAS_1</IconAtlas>
<NeverCapture>true</NeverCapture>
<PortraitIndex>21</PortraitIndex>
</Row>
</Buildings>
</GameData>
 
Between <GameData> and <Row> you are missing the <Buildings> tag.
Don't forget to close that tag also after your </Row> Tag.

As I said in the original post, <Buildings> tags are already included within the CIV5Buildings document I copied over, just as <Game Data> tags are already there. That is why I didn't copy them when I copied the code into my post. Those tags are hundreds and hundreds of lines away from the Palisades data, with dozens of other Buildings table entries between them and the <Row> tag that encloses my Palisades data.

Or are you saying that when you add a new building that there has to be a second and unique <Building> tag that goes just around that new building, like this:

<Game Data>
<Building>
<Row>
<Type>BUILDING_GRANARY</Type>
.
.
.
</Row>
<Row>
<Type>BUILDING_MARKETPLACE</Type>
.
.
.
</Row>
<Row>
<Type>BUILDING_SEAPORT</Type>
.
.
.
</Row>
<Building>
<Row>
<Type>BUILDING_PALISADE</Type>
<BuildingClass>BUILDINGCLASS_PALISADE</BuildingClass>
<Cost>60</Cost>
<GoldMaintenance>1</GoldMaintenance>
<Help>TXT_KEY_BUILDING_PALISADE_STRATEGY</Help>
<Description>TXT_KEY_BUIDING_PALISADE</Description>
<Civilopedia>TXT_KEY_CIV5_BUILDINGS_PALISADE_TEX T</Civilopedia>
<Strategy>TXT_KEY_BUILDING_PALISADE_STRATEGY</Strategy>
<ArtDefineTag>ART_DEF_BUILDING_WALLS</ArtDefineTag>
<MaxStartEra>ERA_ANCIENT</MaxStartEra>
<MinAreaSize>-1</MinAreaSize>
<AllowsRangeStrike>true</AllowsRangeStrike>
<Defense>250</Defense>
<CityWall>true</CityWall>
<HurryCostModifier>25></HurryCostModifier>
<IconAtlas>BW_ATLAS_1</IconAtlas>
<NeverCapture>true</NeverCapture>
<PortraitIndex>32</PortraitIndex>
</Row>
</Building>
<Row>
<Type>BUILDING_WALLS</Type>
.
.
.
</Building>
</Game Data>

If so, why? Why does there have to be a nested <Building> tag inside the<Building> tags that enclose all the buildings in the xml document? :confused:
 
Top Bottom