Crash when modifying commercial CS bonuses

fodazd

Chieftain
Joined
Mar 5, 2013
Messages
75
Hello.

I have written a small mod that is supposed to nerf the bonuses from commercial Citystates. When I start a game with this mod enabled, it always crashes while loading, even when all other mods are disabled. When this mod is disabled, it does not crash.

Here are the files:

Commercial Citystate Nerf.modinfo:
Code:
<?xml version="1.0" encoding="utf-8"?>
<Mod id="4aa2cb52-dc34-4df1-84ca-1e07cd47a312" version="1">
  <Properties>
    <Name>Commercial Citystate Nerf</Name>
    <Description>Commercial Citystates give +2 gold instead of +4 gold.</Description>
    <Teaser>Commercial Citystates give +2 gold instead of +4 gold.</Teaser>
    <Authors>fodazd</Authors>
  </Properties>
  <InGameActions>
    <UpdateDatabase id="NewAction">
      <File>CCSN.sql</File>
    </UpdateDatabase>
  </InGameActions>
  <Files>
    <File>CCSN.sql</File>
  </Files>
</Mod>

CCSN.sql:
Code:
-- CCSN
-- Author: fodazd
-- DateCreated: 4/2/2017 3:42:31 PM
--------------------------------------------------------------

UPDATE ModifierArguments SET Value = '2' WHERE ModifierId = 'MINOR_CIV_TRADE_YIELD_FOR_CAPITAL';
UPDATE ModifierArguments SET Value = '2' WHERE ModifierId = 'MINOR_CIV_TRADE_YIELD_FOR_COMMERCIAL_HUB';
UPDATE ModifierArguments SET Value = '1' WHERE ModifierId = 'MINOR_CIV_TRADE_YIELD_FOR_CAPITAL_PAPAL_PRIMACY';
UPDATE ModifierArguments SET Value = '1' WHERE ModifierId = 'MINOR_CIV_TRADE_YIELD_FOR_COMMERCIAL_HUB_PAPAL_PRIMACY';

I don't understand why this would lead to a crash. Do you have any ideas?
 
You need to define what value is being changed. Add this at the end of each line:

AND Name = 'Amount'

If that doesn't help, I need your log files. Modding and Database logs.
 
Back
Top Bottom