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

Changing Tech/Civic cost for running game possible?

Discussion in 'Mod Creation Help' started by Estelyen, Aug 4, 2020.

  1. Estelyen

    Estelyen Chieftain

    Joined:
    Jan 21, 2010
    Messages:
    6
    Gender:
    Male
    Location:
    Soltau, Germany
    Good day CivFanatics!

    I'm using p0kiehls Historic Speed (Extended Eras) mod and would like to modify some of the values for my own gameplay experience. Specifically, the total amount of turns, the length of the individual eras and the Tech and Civic costs. I want my game to last 1500 turns (true marathon-like) and adjust eras and tech/civic costs to match that.

    I did achieve what I wanted, but when I got to the medieval era after 220 or so turns, I realized that the tech/civic cost I changed the mod values to is still far too low for my taste, so I tried adjusting them some more. But this only seems to apply if I start a new game, while changing some other values, like the era lengths takes effect even in the running game once I reload it.

    I fiddled around with SQL commands for ages now and I just can't seem to change the existing tech/civic costs of my running game. Is there a way to do that at all or do I have to keep restarting my game and hope that I get the numbers somewhat close to where I want them to be? I really don't want to play-test for hundreds of turns only to realize that I have to start over again and again :p
     
  2. Infixo

    Infixo Deity

    Joined:
    Jan 9, 2016
    Messages:
    3,684
    Gender:
    Male
    Location:
    Warsaw
    Hm... Isn't it like a normal situation? Imho you can change the costs during the game but NOT while in-game. Whatever mod you are using that adjusts the costs, then leave the game, make changes in the mod and reload the game. It should adjust the costs of all not-completed techs and civics.
     
  3. Estelyen

    Estelyen Chieftain

    Joined:
    Jan 21, 2010
    Messages:
    6
    Gender:
    Male
    Location:
    Soltau, Germany
    That's exactly what I do and the values won't change when I reload. I even tried disabling all other mods to see if any of them interfered, but I just get the same result.

    The SQL command in question is
    UPDATE Technologies SET Cost=Cost*6;
    Come to think of it, that command would probably not be executed every time I load the game, as it would multiply the cost of all techs again and again...
    I also tried adding a command like
    UPDATE Technologies SET Cost= '12345' WHERE TechnologyType='TECH_BUTTRESS';
    but still this line only gets executed once when starting a new game.
    My problem probably is that I never created any mods of my own, just edited what other people had already written. So while I do know some things about lua and SQL, I admit that I'm not really a pro at it :( Is there any other SQL command than the one p0kiehls mod is using?
     
  4. Infixo

    Infixo Deity

    Joined:
    Jan 9, 2016
    Messages:
    3,684
    Gender:
    Male
    Location:
    Warsaw
    Maybe post a mod and database.log. A single SQL statement doesn't say anything.
     
  5. Laurana Kanan

    Laurana Kanan Don’t underestimate who I am.

    Joined:
    Apr 10, 2014
    Messages:
    2,682
    Gender:
    Female
    Location:
    Near the Greatest Snow on Earth
    @Estelyen - This is an important point and applies if any Civ has completed it. But, are you saying that no costs are changed at all, even ones that no Civ has completed?
     
  6. Estelyen

    Estelyen Chieftain

    Joined:
    Jan 21, 2010
    Messages:
    6
    Gender:
    Male
    Location:
    Soltau, Germany
    My Database.log: https://pastebin.com/raw/jDfEtycH
    My Modding.log: https://pastebin.com/raw/fPs1s7Yd
    The Historic Speed mod uses 3 core SQL files for database updates called 'HistoricSpeed_Gameplay.sql', 'HistoricSpeed_GameplayXP.sql' and 'HistoricSpeed_GameplayXP2.sql'. All of them seem to be loading just fine according to the Modding.log.

    @Laurana Kanan - Correct, I even started a new game for testing purposes (on a duel map so it loads much faster), where no civ has completed any techs yet.
    - I check the costs
    - I do a save
    - I shut the game down completely
    - I open the mod files and do my adjustments
    - I save and close the mod files
    - I start up Civ6 and load the save
    - Cost values are exactly the same
     
  7. Infixo

    Infixo Deity

    Joined:
    Jan 9, 2016
    Messages:
    3,684
    Gender:
    Male
    Location:
    Warsaw
    1. You have errors in the database.log ( actually one error, twice). Seems like something with game installation? Maps.xml is a game file, I think.
    2. When in game, check the loaded content. Pause Menu, the list at the bottom. If the mod is there both times, then perhaps you are correct and one cannot change costs in already started game. Because the mod seems to loading fine.
     
  8. Laurana Kanan

    Laurana Kanan Don’t underestimate who I am.

    Joined:
    Apr 10, 2014
    Messages:
    2,682
    Gender:
    Female
    Location:
    Near the Greatest Snow on Earth
    Just ran a test with my own mod and it looks like you can't change the costs anymore for uncompleted techs/civics once the game is in progress. I distinctly remember that not being the case previously as I tweaked them constantly when I did my own pacing mod a couple years ago. So @Estelyen looks like you might just have to do it the hard way.
     
    Infixo likes this.
  9. Infixo

    Infixo Deity

    Joined:
    Jan 9, 2016
    Messages:
    3,684
    Gender:
    Male
    Location:
    Warsaw
    Could be related to the fact that not long ago Firaxis fixed the issue with 20% bonus/malus on cost depending on era. Maybe they decided that to do that properly the game needs to store costs in the save file, so mods no longer change them once the game starts.
     
    Laurana Kanan likes this.
  10. Estelyen

    Estelyen Chieftain

    Joined:
    Jan 21, 2010
    Messages:
    6
    Gender:
    Male
    Location:
    Soltau, Germany
    Ok then. That's a shame. Perhaps some day Firaxis will release the dll and then someone can piece together a save file editor or something like that... But thanks anyways for the help guys/gals, I really appreciate it!:thumbsup:
     
    Last edited: Aug 5, 2020

Share This Page