Mod isn't taking effect

Pinktiger4

Chieftain
Joined
Jan 30, 2014
Messages
2
Just trying to get started but a very simple test mod isn't doing anything. This is all the XML:

Code:
<GameData>
 <Buildings>
  <update>
   <set happiness="5"/>
   <where Type="BUILDING_COLOSSEUM"/>
  </update>
 </Buildings>
</GameData>

This is the modinfo:

Code:
<?xml version="1.0" encoding="utf-8"?>
<Mod id="cbe296f8-fdfe-40cf-a72c-895223bcaaa2" version="1">
  <Properties>
    <Name>testtest</Name>
    <Stability>Alpha</Stability>
    <Teaser>testtest</Teaser>
    <Description>testtest</Description>
    <Authors>Richard</Authors>
    <HideSetupGame>0</HideSetupGame>
    <AffectsSavedGames>1</AffectsSavedGames>
    <MinCompatibleSaveVersion>0</MinCompatibleSaveVersion>
    <SupportsSinglePlayer>1</SupportsSinglePlayer>
    <SupportsMultiplayer>1</SupportsMultiplayer>
    <SupportsHotSeat>1</SupportsHotSeat>
    <SupportsMac>1</SupportsMac>
    <ReloadAudioSystem>0</ReloadAudioSystem>
    <ReloadLandmarkSystem>0</ReloadLandmarkSystem>
    <ReloadStrategicViewSystem>0</ReloadStrategicViewSystem>
    <ReloadUnitSystem>0</ReloadUnitSystem>
  </Properties>
  <Dependencies />
  <References />
  <Blocks />
  <Files>
    <File md5="904DE854BF410ACF2B922AE492005D5B" import="0">XML/Game Rules1321213.xml</File>
  </Files>
  <Actions>
    <OnModActivated>
      <UpdateDatabase>XML/Game Rules1321213.xml</UpdateDatabase>
    </OnModActivated>
  </Actions>
</Mod>

I'm sure I must be missing something really simple but I just can't see it. Any help would be appreciated.
 
First of all: Capitalization. It's important. As in, without proper capitalization, anything and everything in your xml could be wrong.
Your code:
Code:
<GameData>
 <Buildings>
  <[B][COLOR="red"]u[/COLOR][/B]pdate>
   <[COLOR="red"][B]s[/B][/COLOR]et [COLOR="red"][B]h[/B][/COLOR]appiness="5"/>
   <[COLOR="red"][B]w[/B][/COLOR]here Type="BUILDING_COLOSSEUM"/>
  </[B][COLOR="Red"]u[/COLOR][/B]pdate>
 </Buildings>
</GameData>
Correct code:
Code:
<GameData>
 <Buildings>
  <Update>
   <[B][COLOR="green"]W[/COLOR][/B]here Type="BUILDING_COLOSSEUM"/>
   <[B][COLOR="green"]S[/COLOR][/B]et [COLOR="green"][B]H[/B][/COLOR]appiness="5"/>
  </[B][COLOR="Green"]U[/COLOR][/B]pdate>
 </Buildings>
</GameData>
And I switched around the <Where> and <Set> since I think it works better that way.
If that doesn't work, try enabling logging, playing another game with the mod (for at least 1 turn) and then see what the database.log has to say.

I'm impressed though - most beginner modders (or at least first-time-posting-in-the-modding-forums-modders) have never seen the
Code:
 blocks and post a big incomprehensible wall of coding instead. ;)
 
Thank you AW, that was it. Didn't realise it was case sensitive. I knew it would turn out to be something really simple!

I did try to activate logging but nothing is being logged for some reason. Will have to look into that further.
 
Top Bottom