New Modder Basic Help

notadummy

Emperor
Joined
May 22, 2011
Messages
245
Hi, I'm trying to learn how to mod...I'm completly new to modding though
so I've been reading kael's modders guide lately, and today I came up with this update to the xml files, but I really can not figure out why it does not show up in the game.

<GameData>
<Buildings>
<Update>
<Set Happiness="8"/>
<Where Type="BUILDING_COLOSSEUM"/>
</Update>
</Buildings>
</GameData>

EDIT:its weird how in civfanatics it just reads straight down and no tabs.....would putting it into a spoiler help?
its to make the colosseum have 8 happiness instead of 2.
there were no errors, and I really can not figure out what went wrong after trying to do fix it for an hour now...
Thank you for your time!
 
EDIT:its weird how in civfanatics it just reads straight down and no tabs.....would putting it into a spoiler help?

No, but there's a (CODE) environment (except with brackets instead of parentheses) for exactly this sort of thing. Like so:
Code:
<GameData>
    <Buildings>
        <Update>
            <Set Happiness="8"/>
            <Where Type="BUILDING_COLOSSEUM"/>
        </Update>
    </Buildings>
</GameData>

As to your original question: did you remember to do the OnModActivated/UpdateDatabase command?

Also, turn on your logfiles and see what they say. The xml.log and Database.log files will usually tell you what you did wrong.
 
yes, I have the OnModActivated/UpdateDatabase command
in properties->actions it says
On Mon Activated
UpdateDatabase - XML.FightColosseum.xml (FightColosseum is the name of mod)

So I am looking at the logs right now.
xml log- everything is good - validation success all around
database log:
constraint failed
while executing - 'INSERT INTO ArtDefine_StrategicViewType, TileType, Asset) VALUES (?,?,?)
Invalid reference on UnitGameplay2DScripts.UnitType - "Unit_Privateer" does not exist in units
(this repeats for the units Spanish Galleon, Spanish Treasure Cart, Danish Longboat, and Saxon Huscarl)
then it says failed validation
I can't make out what this is telling me.....my mod is about changing the happiness of a building, nothing to do with units or art/tiles

Thanks!
 
I can't make out what this is telling me.....my mod is about changing the happiness of a building, nothing to do with units or art/tiles

First of all, did you actually turn on mod logging? It's off by default, you have to enable it yourself by editing your config.ini file (look for the "LoggingEnabled = 0" line, and change it to a 1). Those errors you quoted are the errors in the core game and your DLCs, and have nothing to do with your mod, but if you haven't enabled that logging then it'll never show any errors in your mod's XML.

Second, assuming you find no errors in the logs after you go turn them on, you need to post your mod here so that we can look at it. Without having the files in front of us, we have no way to know if you screwed up something subtle.
 
well I enabled logging, started up a game with my mod enabled, and opened up xml and database logs again.
Again, the same text appeared as last time.
Should I enable logging message?
Trying to figure out how to upload my mod now.
 
Back
Top Bottom