[BNW] Custom Civ trait not working properly

aspec100

Chieftain
Joined
Dec 12, 2010
Messages
8
Location
Canada
Hi everyone

So this mod I'm making the trait is +2 Happiness in every city. I made a dummy building that's supposed to give 2 happiness and it's supposed to automatically appear in every city. However when I go in game and place the first city, I get a free Pagoda, which gives me culture and faith too. I have no idea why this is happening.

Thanks
 

Attachments

In your trait file, you state this:
Code:
<Row>
            <Type>TRAIT_TAYLORS_POWER</Type>
            <Description>TXT_KEY_TRAIT_TAYLORS_POWER</Description>
            <ShortDescription>TXT_KEY_TRAIT_TAYLORS_POWER_SHORT</ShortDescription>
            <FreeBuilding>BUILDINGCLASS_SWIFT_POWERHIDDEN</FreeBuilding>
</Row>

Whereas looking in the game's base files (Carthage's free harbour in every city), we see this:
Code:
<Row>
            <Type>TRAIT_PHOENICIAN_HERITAGE</Type>
            <Description>TXT_KEY_TRAIT_PHOENICIAN_HERITAGE</Description>
            <ShortDescription>TXT_KEY_TRAIT_PHOENICIAN_HERITAGE_SHORT</ShortDescription>
            <CrossesMountainsAfterGreatGeneral>true</CrossesMountainsAfterGreatGeneral>
            <FreeBuilding>BUILDING_HARBOR</FreeBuilding>
</Row>
You stated a Buildingclass for FreeBuilding, while it should be a Building! Weird stuff will happen when you insert 'unexpected' things as you may have already noticed.

NOTE: Because of Firaxis's consistency, the <FreeBuilding>-tag used in the Buildings table does in fact use BuildingClasses and not Buildings. An example of this is the CN Tower, which provides a free broadcast tower in every city.
Spoiler :

Code:
<Row>
            <Type>BUILDING_CN_TOWER</Type>
            <BuildingClass>BUILDINGCLASS_CN_TOWER</BuildingClass>
            [...]snip
            <FreeBuilding>BUILDINGCLASS_BROADCAST_TOWER</FreeBuilding>
            [...]snip
        </Row>
 
Back
Top Bottom