[SOLVED] A doubt with Autosave system

  • #1, by juansirlinkSaturday, 30. July 2016, 19:06 4 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...

    Newbie

    46 Posts


  • #2, by sebastianSaturday, 30. July 2016, 20:17 4 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.

    Thread Captain

    2337 Posts

  • #3, by afrlmeSaturday, 30. July 2016, 21:00 4 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.

    Imperator

    6845 Posts

  • #4, by sebastianSaturday, 30. July 2016, 22:50 4 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?

    Thread Captain

    2337 Posts

  • #5, by juansirlinkSaturday, 30. July 2016, 23:37 4 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!

    Newbie

    46 Posts

  • #6, by afrlmeSunday, 31. July 2016, 01:24 4 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.

    Imperator

    6845 Posts

  • #7, by juansirlinkWednesday, 03. August 2016, 00:45 4 years ago
    Finally, l made it!

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

    Newbie

    46 Posts

Write post