[SOLVED] A doubt with Autosave system

  • #1, z juansirlinkSaturday, 30. July 2016, 19:06 hodinky 8 years ago
    Hi there, guys!

    My name is Juan, I'm new in this forum.

    Last week I bought an indie license from VS and now I'm finishing a demo of my proyect. I have a little doubt with the autosave system to restart all conditionals. I explain... the autosave works perfectly and I can play the game from the beginning but I saw I have to create one autosave for each language. My doubt is... There is any way to autosave without considering the user language?

    I'm not sure if I explained well ... razz

    PD. I'm sorry for my bad english...

    Bažant

    46 Posts


  • #2, z sebastianSaturday, 30. July 2016, 20:17 hodinky 8 years ago
    you have to create a configfile where you save the selected language as a string. then when starting the game load the string from a file.

    Kapitán

    2346 Posts

  • #3, z afrlmeSaturday, 30. July 2016, 21:00 hodinky 8 years ago
    https://wiki.visionaire-tracker.net/wiki/Ini_File -- official explanation of the config.ini file.

    Here is a template / tutorial I provided on the wiki for the config.ini file. Please note that it is meant as a reference & that you can't simply copy & paste the script I have provided as it contains custom options, conditions & values, etc that I provided as an example.

    P.S: welcome to the Visionaire Studio forums & happy developing!
    P.P.S: I understood what you were trying to say without any issues.

    Imperátor

    7285 Posts

  • #4, z sebastianSaturday, 30. July 2016, 22:50 hodinky 8 years ago
    what i came in my mind now is that... if I use the config.ini stuff, start a game and read my settings, THEN load a savegame where these settings like language was set different.... the .ini file settings get overwritten, right?

    Kapitán

    2346 Posts

  • #5, z juansirlinkSaturday, 30. July 2016, 23:37 hodinky 8 years ago
    Thank you to both for answering!

    I'm going to learn about the ini file and see your tutorial. I understand you say and I think that could be the solution I'm looking for. Tomorrow I'll try and I'll writte in here.

    P.S: Thanks a lot! I have read some forum's post and I love this community!

    Bažant

    46 Posts

  • #6, z afrlmeSunday, 31. July 2016, 01:24 hodinky 8 years ago
    what i came in my mind now is that... if I use the config.ini stuff, start a game and read my settings, THEN load a savegame where these settings like language was set different.... the .ini file settings get overwritten, right?



    You can always read the ini file again, or store the language in another external file (it doesn't really matter). It only takes a fraction of a second to read an external file with Lua script, so it's not exactly hard to read that & update the language accordingly. Yes it's possible that the language might change if the player was playing in another language in a particular save & then changes the language in the menu prior to loading said language, however it's highly unlikely the player will bother changing the language after the first time they select it, so I wouldn't worry about it.

    Imperátor

    7285 Posts

  • #7, z juansirlinkWednesday, 03. August 2016, 00:45 hodinky 8 years ago
    Finally, l made it!

    Really thanks, guys, for your help!! Shortly, I will have finished the demo!

    Bažant

    46 Posts