Multiple Buildings in A Mod

magikarcher

Chieftain
Joined
Jul 4, 2008
Messages
46
I have successfully modded in a building, but whenever I try to mod in two buildings with the same mod, I can't. Even if I copy the building exactly but change the name, it just doesn't work! Do I have to make a new buildings.xml, buildingclasses.xml for each new building, or is there some trick to modding in more than one building with out tons of extra files?

EDIT: I don't know how but when I started a new mod and rebuilt everything from the bottom up, it works fine. Must have been some typo I didn't catch...
 
Sorry for the triple post, but I can't resolve this even after tons of fiddling. No matter what I try to do I can only mod one building per buildings.xml, this cannot be right!
 
Here's what I do for one of my mods to change existing buildings, though that isn't exactly what you're doing:

Spoiler :
Code:
<?xml version="1.0" encoding="utf-8"?>
<!-- Created by ModBuddy on 9/28/2010 8:45:41 PM -->
<GameData>
    <Buildings>
        <Update>
            <Where Type="BUILDING_STABLE" />
            <Set Cost="50" />
        </Update>
        <Update>
            <Where Type="BUILDING_GRANARY" />
            <Set GoldMaintenance="0" />
        </Update>
        <Update>
            <Where Type="BUILDING_WATERMILL" />
            <Set GoldMaintenance="1" />
        </Update>
        <Update>
            <Where Type="BUILDING_WINDMILL" />
            <Set Cost="100" />
        </Update>
        <Update>
            <Where Type="BUILDING_CASTLE" />
            <Set GoldMaintenance="1" />
        </Update>
        <Update>
            <Where Type="BUILDING_MUGHAL_FORT" />
            <Set GoldMaintenance="1" />
        </Update>
        <Update>
            <Where Type="BUILDING_MILITARY_BASE" />
            <Set GoldMaintenance="1" />
        </Update>
        <Update>
            <Where Type="BUILDING_MUSEUM" />
            <Set GoldMaintenance="2" />
        </Update>
        <Update>
            <Where Type="BUILDING_OPERA_HOUSE" />
            <Set GoldMaintenance="2" />
        </Update>
        <Update>
            <Where Type="BUILDING_BROADCAST_TOWER" />
            <Set GoldMaintenance="2" />
        </Update>
        <Update>
            <Where Type="BUILDING_HOSPITAL" />
            <Set GoldMaintenance="1" />
        </Update>
        <Update>
            <Where Type="BUILDING_MEDICAL_LAB" />
            <Set GoldMaintenance="1" />
        </Update>
        <Update>
            <Where Type="BUILDING_UNIVERSITY" />
            <Set GoldMaintenance="2" />
        </Update>
        <Update>
            <Where Type="BUILDING_PUBLIC_SCHOOL" />
            <Set GoldMaintenance="2" />
        </Update>
        <Update>
            <Where Type="BUILDING_LABORATORY" />
            <Set GoldMaintenance="2" />
        </Update>
    </Buildings>
</GameData>

You do not need a separate file for each building, and the files don't have to be named anything in particular. Something like this should work:

Spoiler :
Code:
<?xml version="1.0" encoding="utf-8"?>
<!-- Created by ModBuddy on 9/28/2010 8:45:41 PM -->
<GameData>
    <Buildings>
        <Row>
            <Type>BUILDING_MYNEWBUILDING1</Type>
            <BuildingClass>BUILDINGCLASS_WORKSHOP</BuildingClass>
            <Cost>100</Cost>
            ...
        </Row>
        <Row>
            <Type>BUILDING_MYNEWBUILDING2</Type>
            <BuildingClass>BUILDINGCLASS_MARKET</BuildingClass>
            <Cost>150</Cost>
            ...
        </Row>
    </Buildings>
</GameData>
 
That is what I do... You are saying that I should be able to make all of my modifications in one file, correct?
 
Okay, thats cool, but still it doesn't solve why I can't add more than one building... Let me go into more detail about the problem.

Lets say I make a 'cafe' building that requires computers, so it is a modern era building. When I start the game the cafe shows up in the civilopedia, and is in the correct spot. Now lets say I add a 'restaurant' building it requires plastics, it too is a modern building. Now when I start the game, the cafe shows up in the civilopedia and the restaurant does NOT, but all of the buildings are randomly jumbled in eras and the '+' and '-' buttons don't minimize eras. Also when I have a second building, the prereq tech I pick is COMPLETELY blank in the civilopedia, except it shows what tech is required for it, but no description.

Even when I mix up the order I put the buildings in, or create entirely new buildings, or use preexisting buildings with changed names, only one building every gets modded in properly. Also, the more buildings I try to mod in, the more screwed up the civilopedia gets.

EDIT: Typo
 
Back
Top Bottom