Saving changes to settings

  • #1, by morgana-a-tSunday, 08. August, 21:42 A month ago
    Hello everyone smile
    I hope my question will be very easy.

    I made a language change in the menu, but when I re-enter the game, the language is reset to the default one. How can I make the settings saved?

    Newbie

    8 Posts


  • #2, by afrlmeSunday, 08. August, 22:37 A month ago
    Unfortunately this requires scripting. I wrote a tutorial & shared a general template script on the wiki a few years back. You can find it here.

    If it's only the language you are wanting to save then it can be simplified down, but if you want to store multiple options, then you will need to write to & read from a config.ini file.

    Imperator

    7005 Posts

  • #3, by morgana-a-tMonday, 09. August, 14:21 A month ago
    Unfortunately this requires scripting. I wrote a tutorial & shared a general template script on the wiki a few years back. You can find it here.

    If it's only the language you are wanting to save then it can be simplified down, but if you want to store multiple options, then you will need to write to & read from a config.ini file.
    Oh, I've seen this before and tried to figure it out, but I didn't succeed. The second time I think I did itsmile

    Thank you so much for writing this script and sharing it for everyone!

    I am interested in one question. When I was building the game, I noticed that the config file in the game folder looks like... standard? An unmodified script. And the changed config is stored on disk C in the AppData folder. The game takes it from there and everything works well, but I want to know - is it supposed to be like this or is it a mistake? I would prefer that the correct config is in the game folder.

    Newbie

    8 Posts

  • #4, by afrlmeMonday, 09. August, 16:14 A month ago
    The one generated when you compile/export your game is meant to be used as the initial config.ini for the first time the game is launched. The engine will use the one in localAppDir if it exists. The reason it's saved into localAppDir is because that folder can be saved in cloud  storage (along with the savegame files & so on) if the platform the game is being played through supports it.

    Imperator

    7005 Posts

  • #5, by morgana-a-tMonday, 09. August, 17:26 A month ago
    The one generated when you compile/export your game is meant to be used as the initial config.ini for the first time the game is launched. The engine will use the one in localAppDir if it exists. The reason it's saved into localAppDir is because that folder can be saved in cloud  storage (along with the savegame files & so on) if the platform the game is being played through supports it.
    I see, thanks for the explanation smile

    Newbie

    8 Posts

Write post