simple mod simply not working

I never did manage to get the insert command working properly through SQL, so I ended up using SQL purely for updating the existing scout data, like this:

UPDATE Units SET Moves="3", Cost="35" WHERE Type="UNIT_SCOUT";

That's it. That's the entirety of the sql file in the mod :)

I then had to use an xml file to add new rows into the free promotions section, like this:

Code:
<GameData>
    <Unit_FreePromotions>
        <Row>
            <UnitType>UNIT_SCOUT</UnitType>
            <PromotionType>PROMOTION_EXTRA_SIGHT_I</PromotionType>
        </Row>
    </Unit_FreePromotions>
</GameData>

I have no idea why the insert sql command wasn't working. I checked, double checked, and triple checked the code. Then I went online to make sure I was using the syntax properly (I hate it when a bug makes me doubt what I already know). I can only assume that civ5 is not using a proper sql engine, and instead is using something they cobbled together themselves. So if the insert token is supported in civ5's sql, there may be a different syntax or something.
 
The SQL statement is "INSERT INTO table_name", not "INSERT table_name" as you have on the earlier page. It's working fine for me (unless I try to use an IF statement, but that's a separate thread).
 
Back
Top Bottom