Unable to update table value

_Zee

Chieftain
Joined
Nov 6, 2019
Messages
3
Hello all. I am the creator of all the Zee's "X" Mod's, and I'm currently attempting to get my mods updated (which I haven't been able to do since April).

Right now I'm working on my Properly Timed Era's mod and I'm having trouble with getting a few lines that worked perfectly before to work again. These are the lines specifically:


Code:
-- Era Gates -- default 20/-20
UPDATE GlobalParameters SET Value = 120 WHERE Name = 'TECH_COST_PERCENT_CHANGE_AFTER_GAME_ERA';
UPDATE GlobalParameters SET Value = -60 WHERE Name = 'TECH_COST_PERCENT_CHANGE_BEFORE_GAME_ERA';
UPDATE GlobalParameters SET Value = 120 WHERE Name = 'CIVIC_COST_PERCENT_CHANGE_AFTER_GAME_ERA';
UPDATE GlobalParameters SET Value = -60 WHERE Name = 'CIVIC_COST_PERCENT_CHANGE_BEFORE_GAME_ERA';

At first I thought it might be something to do with the new <ActionCriteria> entries I've been seeing in the .modinfo files of a few other updated mods. The code lines above DO NOT appear in the vanilla GlobalParameters table, but they DO show up in the XP1 and XP2 GlobalParameters tables. So I tried breaking the mod up into 3 sql files from 1, with the XP1 parts and XP2 parts separated in their own sql files and updating the .modinfo file accordingly, but that isn't working.

All other parts of my mod appear to be working, but I can't figure out why these lines aren't.

Help is appreciated.
 
Update:

I've discovered that switching the ruleset on game start from GS to RF will result in all my changes taking effect as they are supposed to. Did they hardcode these parameters out for GS??? Is there a workaround?
 
What LoadOrder setting do you have in the Properties of the UpdateDatabase Action that implements your code ?

Gathering Storm executes a <Replace> statement on these Global Parameters so if your code is loading into the game before Gathering Storm makes its changes, then your code is simply being re-written by the UpdateDatabase actions of Gathering Storm. If you are not using a LoadOrder setting, then your code is almost certainly being re-written when Gathering Storm loads.
 
Update:

I've discovered that switching the ruleset on game start from GS to RF will result in all my changes taking effect as they are supposed to. Did they hardcode these parameters out for GS??? Is there a workaround?
As far as I'm aware the era percent changes are not working at all in GS, even in an unmodded game. Something broke in the June Update. Although, I found it interesting that you discovered that the R&F ruleset is working in, I assume, both modded and unmodded games.
 
What LoadOrder setting do you have in the Properties of the UpdateDatabase Action that implements your code ?

Gathering Storm executes a <Replace> statement on these Global Parameters so if your code is loading into the game before Gathering Storm makes its changes, then your code is simply being re-written by the UpdateDatabase actions of Gathering Storm. If you are not using a LoadOrder setting, then your code is almost certainly being re-written when Gathering Storm loads.

I was using load order 602. I dropped it down to 2 and still no luck.

The thing is, if you look at the tech costs when you first start a new ancient era game you can see that the baseline vanilla amounts of +20% and -20% aren't even working in the GS ruleset. Even with 0 mods installed. Do the same test, but switching the ruleset to RF, and you can see the modifiers taking effect. Something about the GS ruleset broke these modifiers even though they are right there in the vanilla XP2 GlobalParameters table.
 
Last edited:
Higher LoadOrder settings always load later, for general reference. But from what @Laurana Kanan mentioned and what you are reporting there would seem to be a largish "whupps" from the June Patch when running Gathering Storm.

Given that, I don't know that there's really any practical work-around to be applied in the interim until Firaxis manages to fix whatever it is they broke.
 
Last edited:
I have a question relating to this as i am trying to change the value for INFLUENCE_TOKENS_MINIMUM_FOR_SUZERAIN
I could not get it working, but noticed that in SQlite DataType for Value is TEXT - Is this correct or a mistake?

I barely know any of this coding stuff, but if it is true what was mentioned here previously and all i see are numbers as Values

Thx in advance!

Edit:

It turns out INFLUENCE_TOKENS_MINIMUM_FOR_SUZERAIN does work under GlobalP, however the CS sidepanel number is not updating the value, instead there is a lua for CS UI file with a comment it is yet in a TODO priority list to bind it better than nothing i suppose :))

Edit2: Now it only brings me the question. How do i update this? Added CSlua picture on line 25
 

Attachments

  • GLOBALP.png
    GLOBALP.png
    211.6 KB · Views: 10
  • CSlua.png
    CSlua.png
    232.6 KB · Views: 9
Last edited:
Edit3: Ok i figured it out and all works now did not need to mess with lua at all. Just a few LOC_TEXT files, but the sheer amount of stuff i read about lua locals :lol:
 
Back
Top Bottom