1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

PSA WTF Order Matters?!

Discussion in 'Civ6 - Creation & Customization' started by sresk, Oct 24, 2016.

  1. sresk

    sresk Chieftain

    Joined:
    Sep 23, 2010
    Messages:
    98
    Ok so I've posted this question in a couple of in a couple of other posts but I'm putting this here as a public service announcement. I've got a mod I'm working on that for the most part is working as designed but I'm trying to edit a couple of values in GlobalParameters and the .xml looks like this:

    <GameInfo>
    <GlobalParameters>


    <Update>
    <Where Name="SCIENCE_PERCENTAGE_YIELD_PER_POP"/> <Set Value="50"/> <!-- Original 70 -->
    </Update>

    <Update>
    <Where Name="CULTURE_COST_FIRST_PLOT" /> <Set Value="7" /> <!-- Original 10 -->
    </Update>

    <Update>
    <Where Name="CULTURE_COST_LATER_PLOT_EXPONENT" /> <Set Value="1.2" /> <!-- Used to be 1.3 -->
    </Update>

    <Update>
    <Where Name="CULTURE_COST_LATER_PLOT_MULTIPLIER" /> <Set Value="3" /> <!-- Used to be 6 -->
    </Update>

    ............ continues

    here is the weird thing if I put :

    <Update>
    <Where Name="SCIENCE_PERCENTAGE_YIELD_PER_POP"/> <Set Value="50"/> <!-- Original 70 -->
    </Update>
    At the top of the list of changes every thing works the way I expect it to. If I put that line ANYWHERE else it doesn't work. I've tried putting it at the bottom, I've tried putting it in the exact same order as it appears in the GlobalParameters.xml file in game data, I've put it as the last item on my list. I have been over this backwards and forwards and it's not a spelling or typo thing I'm literally just cutting and pasting those 3 lines and if I paste them anywhere but at the top of the list then it breaks... can anyone shed a little light on why this might be happening?

    I've been testing this with no other mods installed just this.

    Here's where it gets weirder, I'm working with another mod :
    8 Ages of Pace by Lord Olleus
    If I paste those 3 lines into his .xml (which incedentally looks identical to mine I just have a few extra lines that I'm editing, it doesn't seem like the order matters. I am SO confused.
     
  2. ThisNameIsTooLo

    ThisNameIsTooLo Emotion Lord

    Joined:
    Sep 14, 2012
    Messages:
    213
  3. sresk

    sresk Chieftain

    Joined:
    Sep 23, 2010
    Messages:
    98
    Ooops! thanks
     
  4. Browd

    Browd Dilettante Administrator

    Joined:
    Aug 5, 2012
    Messages:
    11,909
    Gender:
    Male
    Location:
    Rural Vermont
    Moderator Action: Thread moved.
     
  5. Siesta Guru

    Siesta Guru Prince

    Joined:
    Dec 2, 2007
    Messages:
    498
    Location:
    The Netherlands
    Check database.log, you may have an error somewhere causing everything after to no longer be executed.
     
  6. Denver

    Denver Chieftain

    Joined:
    Oct 19, 2019
    Messages:
    4
    Sorry to necro this thread, but after much frustration and googling I cannot believe I stumbled upon this thread. I'm having a very similar issue, except I cannot get any adjustment for the science per population to work whatsoever.

    I have a fresh install, with a single mod, with 2 lines of code:

    Code:
    UPDATE GlobalParameters SET Value= 0 WHERE Name='SCIENCE_PERCENTAGE_YIELD_PER_POP';
    UPDATE GlobalParameters SET Value= 0 WHERE Name='CULTURE_PERCENTAGE_YIELD_PER_POP';
    The line for Culture always works, and the first city in any game doesn't get any Culture from population. The value can be changed and that's correctly reflected in game. It behaves as expected.

    The line for Science will never work regardless of the value, and regardless of the existence of the other line of code for Culture. Cities always get 0.5 science per population, which is the default value of 50 for the parameter (because I have Rise and Fall installed).

    The Database (and mod) log doesn't give any errors or notices of any kind that seem to be related.

    I think it's worth posting because I haven't seen any other discussion about this, and it does seem to be a genuine bug.
     
  7. Infixo

    Infixo Deity

    Joined:
    Jan 9, 2016
    Messages:
    3,785
    Gender:
    Male
    Location:
    Warsaw
    @Denver
    Science per pop was changed in Rise and Fall to 0.5 (down from 0.7).
    So, there is un update basically exactly the same as yours (only in .xml) that runs with expansion files.
    And if you don’t set a load order in your .modinfo, then the expansion will overwrite your changes.
    It is easy to fix - set LoadOrder to anything >0 (even 1 I think should work), but to be safe 100.
     
    Denver likes this.

Share This Page