Need pointers for updating my mod

Falconiano

Prince
Joined
Jun 6, 2013
Messages
433
Location
Italy
I want to update my Diplomacy mod (no denouncement, no warmonger penalty for warring non-friend civs) for BNW but the system changed; basically now leaders have "warmongerhate" and "denouncewillingness" parameters, if you set them to 0 they won't hate/denounce.
Of course it's a long job! There are many leaders out there.

I thought of doing this through SQL, something like:

UPDATE Leaders SET 'WarmongerHate' = '0' WHERE Type <> 'LEADER_AHMAD_ALMANSUR';
UPDATE Leaders SET 'DenounceWillingness' = '0' WHERE Type <> 'LEADER_AHMAD_ALMANSUR';

This for all leaders should work in theory, and should be a lot faster than doing a whole <update> XML work.

But would it work?
 
WarmongerHate and DenounceWillingness are column names and 0 is a number not a string so none of them should be quoted - but other than that, that should work. You can also do it with just one UPDATE stmt

Code:
UPDATE Leaders SET WarmongerHate=0, DenounceWillingness=0 WHERE Type <> 'LEADER_AHMAD_ALMANSUR';

A DB tool such as SQLiteSpy or the FireFox plugin helps here as you can write and test the SQL in it and then just plug the stmts into your mod
 
Top Bottom