Resource icon

Game Config Manager 2

LastSword

Prince
Joined
Feb 24, 2013
Messages
1,064
Game Config Manager - Managing game configs for mod users.

This is a tool to keep game configurations through an excessive usage of different mod configurations.

Mod is replacing in-game files for:
  • AdvancedSetup.lua
  • AdvancedSetup.xml
1. Saving the game configuration
Prepare your desired game configuration.
Click Save GameConfig button.

Serialized data can be accessed with Firaxis Live Tuner:
HImage1.PNG

Or through a Lua.Log (...\Documents\My Games\Sid Meier's Civilization VI\Logs):
hImage2.PNG

Lua.log can be opened with notepad or other text editors. Make sure you copy all the serialized data.

Now you have to find this mod folder, there are two plausible locations:
...\Documents\My Games\Sid Meier's Civilization VI\Mods (you should manually unzip mod there)
...\Program Files (x86)\Steam\steamapps\workshop\content\... (location for mods downloaded through workshop)

Once you find AdvancedSetup.lua file from this mod (AdvSetup/UI folder) you can open it with any text editor (ex Notepad) and go to the bottom of it:
1671472310167.png

Paste a copied text into prepared space.
1671472393033.png

Delete "AdvancedSetup: " part.
1671472440865.png

Change a default name to whatever you like. Save a file.

NOTE: Some heavily modded game configs may exceed 2048 characters and be printed in TWO or more lines in lua.log. The entire config must be copied and all [AdvancedSetup:] text removed. This ONLY works with v2+ available on Civfanatics.

AFTER you turn on a game next time a configuration should be available in advanced setup.

2. Loading the game configuration
Click on desired pre-saved configuration:
1671472624234.png



3. What is affected
It does not save game and map seeds.
It does not save leaders for players (always random).
I don't know how it works with Leader/Natural Wonders/City-States pools. It probably does not work.
It does not save mod configuration (if for example a map script was selected from a mod and this mod was unchecked
then a map type will be unaffected on loading game configuration).
Other than that all other game configuration options should work.


Mod works for a single player.

4. Unrelated changes
Displays amount of major players.
Add AI Player button is now locked at the bottom.
 
Last edited:
Mister LastSword, if I am understanding correctly, this effectively allows us to save Game Settings to play with different mod combinations?

For example, I try to load in a game, there is a mod conflict, I disable possible suspect mods, and then I can just select a setting config so I don't have to select map types, game-modes, sea level, and all of that?
 
Yes, in opposite to in-game Load/Save Configuration it does not care about mods in-use.

You can even set a setting with (example) Leugi's Wildlife mode and then disable a mod, game configuration will still be loaded correctly (parameters that do not exist when configuration is loaded are ignored) - it will not require any mod to function.

For example, my personal usage, I click Small Lakes and config is instantly adapted to map type, map size, my difficulty, game modes I selected, number of City-States and number of major players. I basically can start game instantly after clicking it instead doing a lot of clicks (playing on Lakes requires more players etc. etc.).
 
i am the one from steamworshop.
the code i have copied is
QQ截图20230216190018.png

from you reply, i notice the end of the code didn't have " , NumPlayers = #}, ", so i delete"{"GA_" and add " , NumPlayers = #}, ". but it didn't make any change. the screen just became:
QQ截图20230216190152.png

so pity.
 
Based on your example, try to end it with:
Code:
{"GA_MEGALOPOLIS", true}}, NumPlayers = 7},
Note double }} and obviously 7 is a number of major players you want.

I think the issue is 2048 character limit for a lua print, I haven't encounter that because I am not using so many custom game options.
I will develop new version and upload it at civfanatics at weekend.
 
Last edited:
1676629273916.png

this is what it had become when i follow your method. maybe i add to much mods. so thanks for your kind work to make a new version!
 
I have updated mod with a support for very long game configs.

However, since you managed to get config button visible in game and your UI is still messed up I assume there is another problem with it I cannot fix. Either game version or another mod that messes up with advanced setup or something else is interfering with it. Indeed, pity.
 
yes, i am trying to find the mods that couldn't work with it(i think is gold age, the mod add to much selection in gamestart screen.even the new game config manager you have updated couldn't save all the selection). all in all, i am so grateful to your kind and patience. you are a very great modder.
that is the error when the mod worked i find in the lua.log. i think maybe it could be a reference


Syntax Error: D:\Steam\steamapps\workshop\content\289070\2903993299\UI\AdvancedSetup.lua:1877: } expected (to close { at line 1844) near 'Initialize'
Error loading file where=, file=D:\Steam\steamapps\workshop\content\289070\2903993299\UI\AdvancedSetup.lua
Syntax Error: D:\Steam\steamapps\workshop\content\289070\2903993299\UI\AdvancedSetup.lua:1877: } expected (to close { at line 1844) near 'Initialize'
Error loading file where=, file=D:\Steam\steamapps\workshop\content\289070\2903993299\UI\AdvancedSetup.lua
Syntax Error: D:\Steam\steamapps\workshop\content\289070\2903993299\UI\AdvancedSetup.lua:1877: } expected (to close { at line 1844) near 'Initialize'
Error loading file where=, file=D:\Steam\steamapps\workshop\content\289070\2903993299\UI\AdvancedSetup.lua
AdvancedSetup: Hiding Game Setup
JoiningRoom: OnFinishedGameplayContentConfigure() g_waitingForContentConfigure=true
AdvancedSetup: There are 6 participating players.
AdvancedSetup: Building Game Setup
AdvancedSetup: Player Count Changed
AdvancedSetup: There are 6 participating players.
AdvancedSetup: Player Count Changed
AdvancedSetup: There are 6 participating players.
JoiningRoom: OnFinishedGameplayContentConfigure() g_waitingForContentConfigure=true
Syntax Error: D:\Steam\steamapps\workshop\content\289070\2903993299\UI\AdvancedSetup.lua:1878: } expected (to close { at line 1844) near 'Initialize'
Error loading file where=, file=D:\Steam\steamapps\workshop\content\289070\2903993299\UI\AdvancedSetup.lua
AdvancedSetup: Hiding Game Setup
JoiningRoom: OnFinishedGameplayContentConfigure() g_waitingForContentConfigure=true
AdvancedSetup: There are 6 participating players.
AdvancedSetup: Building Game Setup
AdvancedSetup: Player Count Changed
AdvancedSetup: There are 6 participating players.
AdvancedSetup: Player Count Changed
AdvancedSetup: There are 6 participating players.
JoiningRoom: OnFinishedGameplayContentConfigure() g_waitingForContentConfigure=true
 
First of all, you have to remove a mod from steam workshop then download v2 available here at civfanatics. Then follow instructions carefully.
From your lua.log it is obvious that you messed up { } brackets, but I don't know where.
1676904197137.png

Either you deleted something here
or you ignored double bracket there:
1676904260762.png

You can also attach your AdvancedSetup.lua and Lua.log (both!) after your next try.

Good luck.
 
I haven't delete any thing. that is the AdvancedSetup.lua and Lua.log, i do hope it could help you.
 

Attachments

  • Desktop.zip
    15.2 KB · Views: 15
I can't help you. You have correctly copied config and issue is much likely in interaction with other mod messing with game setup.

You can try changing (around line 1773) in AdvancedSetup.lua from:
Code:
function MyLoadCustomGameConfig(id)
    local kParameters= g_GameParameters["Parameters"];
to
Code:
function MyLoadCustomGameConfig(id)
    if not g_GameParameters then return end
local kParameters= g_GameParameters["Parameters"];
 
yes, i find i could work greatly when i close all the other mods. and i could be compatible with many mods. i do thank you for your great mods and patience!
 
Top Bottom