Help with Very Simple Mod

Gregoire

Chieftain
Joined
Apr 26, 2002
Messages
5
I'm at my wit's end. I've been trying to write a very simple mod that halves the production costs of units, buildings, wonders, and districts. I downloaded a mod that is known to work (I even tested it on my own system) and adapted/reverse-engineered the code from there. I placed my two mod files (an SQL and a MODINFO file) in their own folder in the same directory as the original working mod that I used as a model. Still, no matter what I do, my mod seems to have no effect.

My SQL file consists of just three lines:

UPDATE Buildings SET Cost = Cost*0.5;
UPDATE Districts SET Cost = Cost*0.5;
UPDATE Units SET Cost = Cost*0.5;

And the info file just looks like this:

<?xml version="1.0" encoding="utf-8"?>
<Mod id="81z17add-b666-56a5-zd45-6332b2265e11">
<Properties>
<Name>Half-Cost Production</Name>
<Stability>Beta</Stability>
<Teaser>Build buildings, districts, wonders, and units twice as fast!</Teaser>
<Description>This fairly simple mod halves the production cost of buildings, districts, wonders, and units!</Description>
<Authors>Gregory H. Bontrager</Authors>
<SpecialThanks>Xaviarlol</SpecialThanks>
</Properties>
<Files>
<File>2xProd.sql</File>
</Files>
</Mod>

I'm suspicious that the problem is my SQL file somehow not being read. That is because, to test it, I tried altering the cost only of Scouts and altering the base movement of settlers (so that the syntax would be more directly analogous to what I saw in the sample mod that I used as a template), and neither experiment really changed anything in the game. Does anyone know what I'm doing wrong? Thanks in advance for any advice!
 
Try adding an action to update the database on mod activated?

Code:
  <Actions>
    <OnModActivated>
      <UpdateDatabase>2xProd.sql</UpdateDatabase>
    </OnModActivated>
  </Actions>
 
Top Bottom