Keeping the correct language when loading game?

  • #1, by dionousWednesday, 28. February 2018, 22:10 6 years ago
    Hi all,

    Trying to achieve the following:

    Let's say you have made a savegame in English.

    Then you change language to French and you load the savegame. The game will switch back to English because this info is saved in the savegame.

    So, what would be the best way to preserve the language selected when loading savegames? I think the only option is to read from the config.ini for the correct language at the beginning of each scene, but maybe there is a better way? It's definitely possible as Deponia achieves that, i'm just not sure how exactly.

    Forum Fan

    246 Posts


  • #2, by afrlmeWednesday, 28. February 2018, 22:29 6 years ago
    could use Lua variable also. Store it when you read the config.ini script. Change it to that at begin of scene or read the config.ini at begin of scene, you could use a mainLoop to detect scene change to auto-read the config.ini / set the language.

    Imperator

    7278 Posts

  • #3, by dionousWednesday, 28. February 2018, 22:33 6 years ago
    thanks for the reply; i guess the lua variable will eventually get saved also and will be proved worthless, that is my concern, making the config.ini the only failsafe option i guess. nice tip for the mainLoop!

    Forum Fan

    246 Posts

  • #4, by sebastianFriday, 02. March 2018, 02:11 6 years ago
    reading the config.ini on scene change (beginn of scene) would be the best solution here. Theoretiocally it should also trigger when the scene gets loaded from a savegame.

    Thread Captain

    2346 Posts