• We need to know your opinion about our social media accounts! Tell us here if you follow us on social media and what we could improve.

How to use config variables to modify the in-game sql database


Oct 28, 2023
I want to add a setting to the options menu when a user is creating a game that will be then used to affect something in the game.

I was getting a lot of help from this tutorial thread but unfortunately it only talks about conditionally executing files based on values, so this would work with booleans or dropdowns.

But lets say I want to include an int (or uint) as an option and I want to pass that through? For example, let's say I wanted to let users choose how many movement points a settler had in the game setup. I could create a FrontEnd Action to add a Parameter to the Configuration db that's a uint for this value, and this works, but how do I then use that uint value to change the values in the Gameplay db? And how do I make sure this value gets saved with the savefile so that when it gets reloaded it will have the saved value still?

I can't figure out how to either pass values as arguments to executed scripts or how to take values from the configuration database and send it to the gameplay database. Or alternatively how to manipulate what is saved in the savefile and store it there.

Does anyone know how to do this? It seems like it should be such a basic feature but I can't seem to find information about it anywhere
Not sure if I can help but downloading a mod that does (I think there is one for screens or barbarians) is where I would start
Thank you, I didn't realize you could look at the source code for existing mods. How does one do that?

I'm getting very confused through this process because it seems like some things were changed somewhat recently and all the old documentation people made is no longer accurate. For example, the cache folder with the debug dbs moved directories and is in appdata now instead of my documents. Also, the mod buddy program no longer seems to output a .modinfo file at all so I'm struggling to figure out how you upload to the workshop without a modinfo file lmao.

Any help on these basics is much appreciated. I know the coding aspect of this stuff but these structural fundamentals are a bit opaque
you got to find where your steam files are. Mine has a path like: D:\SteamLibrary\steamapps\workshop\content\

then there are a bunch of folders with numbers but you can search on a work from the name or something close to it to get to the files. sql and xml files will be there but not art (most likely)
Top Bottom