User Tag List

Results 1 to 9 of 9

Thread: Using one INI for save slots

  1. #1
    Clicker Fusion 2.5 (Steam)

    Join Date
    Jan 2017
    Location
    Poland or I think it's France
    Posts
    117
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Using one INI for save slots

    I may ask, is this possible to use one INI extension to make multiple save slots for the game to save? INI++ May also count probably. I've tried to look for some examples like these ones:
    https://community.clickteam.com/threads/73756-Best-way-to-do-multiple-Save-Slots
    https://community.clickteam.com/threads/96902-Saving-Global-Values-(Multiple-Save-files)?highlight=Multiple+files

    I don't think that (file to use) = "SAVE" + Str$(fileselected) + ".ini" is making sense to me, idk what to start with.

  2. #2
    Clicker Fusion 2.5 (Steam)

    Join Date
    Jan 2017
    Location
    Poland or I think it's France
    Posts
    117
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Bumping this, hopefully anyone knows to answer the solution.

  3. #3
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Volnaiskra's Avatar
    Join Date
    Jan 2014
    Location
    www.sprykegame.com
    Posts
    3,090
    Mentioned
    133 Post(s)
    Tagged
    0 Thread(s)
    I'm not very familiar with the INI object. But with the INI++ object, you could do something like this:







    Quote Originally Posted by ARS View Post
    I don't think that (file to use) = "SAVE" + Str$(fileselected) + ".ini" is making sense to me, idk what to start with.

    The example I showed above hard-codes the filenames (savegame1.ini, savegame2.ini, savegame3.ini). But you could also select the filename dynamically, which is what the code you've quoted is suggesting. For example, you could do something like this (it would save to the exact same filenames as my above example):




  4. #4
    Clicker Fusion 2.5 (Steam)

    Join Date
    Jan 2017
    Location
    Poland or I think it's France
    Posts
    117
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've tried to do that but there's one problem, if I select the other slot with empty data, it would load the same data from the first slot. Also the counter sets to zero for some reason when I restart the app.

    SaveLoad++.mfa

  5. #5
    Clicker Fusion 2.5 (Steam)

    Join Date
    Jan 2017
    Location
    Poland or I think it's France
    Posts
    117
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nevermind, I just had to use the regular Ini extension and worked for me!

    But the save file strangely highlights at the one selected slot, idk how am I going to do with it. Also is there's a way to make simply Right click at the slot to erase its saved data?

    Working Slots.mfa

  6. #6
    Clicker Fusion 2.5 (Steam)

    Join Date
    Jan 2017
    Location
    Poland or I think it's France
    Posts
    117
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Bump, I'm still waiting for the INI++ solution, cuz the google search only refers to the regular INI extension and I've tried to find any working examples.
    Quote Originally Posted by ARS View Post
    I've tried to do that but there's one problem, if I select the other slot with empty data, it would load the same data from the first slot. Also the counter sets to zero for some reason when I restart the app.

    SaveLoad++.mfa

  7. #7
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export Module
    VBEinc's Avatar
    Join Date
    Oct 2015
    Posts
    742
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ARS View Post
    I may ask, is this possible to use one INI extension to make multiple save slots for the game to save? INI++ May also count probably. I've tried to look for some examples like these ones:
    https://community.clickteam.com/threads/73756-Best-way-to-do-multiple-Save-Slots
    https://community.clickteam.com/threads/96902-Saving-Global-Values-(Multiple-Save-files)?highlight=Multiple+files

    I don't think that (file to use) = "SAVE" + Str$(fileselected) + ".ini" is making sense to me, idk what to start with.

    I use List Object. So much easier and is visual in one location within the Environment you are working on.
    Not to mention works in ANDROID and Windows with ease.

    Super Mario Example
    I.E. File Name = MarioSaveInfo.ABC < List Object understands this is a List File regardless of the Extension end. Which makes it even better as typical users don't understand how to open it.

    AUTO SAVE = MarioSaveinfo.ABC is the Same as all Variables. Run this event once when loops. Save List File MarioSaveinfo.ABC
    Auto Repair Save = MarioSaveinfo.ABC is Different then all Variables. Change line ?
    List File itself

    1) Player Lives
    2) Player Power
    3) PLAYER X Position
    4) PLAYER Y Position
    5) Player Inventory Mushroom 0-999999999
    6) Player Inventory Fire Flower 0-999999999
    7) Player Inventory Tail 0-999999999
    etc

    Then you can link these all to the Environment Variables at the Start, During and End of any Game.
    Say the Player picks up a Fire Flower. This would trigger the Variable for the game to change on line 6 and auto save.

    1) 3
    2) 100
    3) 98
    4) 102
    5) 0
    6) 1
    7) 0
    etc

    Player picks up a Mushroom in the same location.

    1) 3
    2) 100
    3) 98
    4) 102
    5) 1
    6) 1
    7) 0
    etc

    Player picks up a Tail in the same Location.

    1) 3
    2) 100
    3) 98
    4) 102
    5) 1
    6) 1
    7) 1
    etc

    Player move and picks up another Mushroom.

    1) 3
    2) 100
    3) 250
    4) 102
    5) 2
    6) 1
    7) 1
    etc

    Last, Player gets Hurt. Lost one life and has inventory change / picked up a mushroom.

    1) 2
    2) 25
    3) 100
    4) 102
    5) 3
    6) 1
    7) 1
    etc

    Thus, when the player Continues this game in the future. They have exactly what they had when they left and are in the Exact Same spot they left off at.
    Obviously, you'd need to have a Continue function the user can click to load the savegame MarioSaveinfo.ABC

    You could even make numerous Saves by allowing the user to name their Saves. Editbox +".ABC"

    You can also add Enemy Positions and Enemies remaining to the save files. This way if the user killed 5 out of 10 enemies. When they continue the game. 5 Specific Enemies would remain in their exact locations.

    Not to mention in app Updates you can simply add a line for Player only Specific Data. ( Plan this ahead of time to make it easier / I.E. Make a Player Only Save file and a Default Enemy Save File "EDITBOX"+_ENEMIES.ABC"
    This way the Enemies Save info is linked to the Player's Save Info File. Two Files that the user Creates. One for themselves and one hidden for the Enemies.

    Just an Idea. I personally never use INI for any saves. I Tried it a few times, but didn't like having to look through the code in order to add or remove something for saving. I also didn't like the layers of Labeling to get to specific Values or Strings.

    I also Use this to rewind games during play. However, that is another topic and requires multiple list files.

    Hope this gives you another option.

  8. #8
    Clicker Fusion 2.5 (Steam)

    Join Date
    Jan 2017
    Location
    Poland or I think it's France
    Posts
    117
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by VBEinc View Post
    I use List Object. So much easier and is visual in one location within the Environment you are working on.
    Not to mention works in ANDROID and Windows with ease.

    Super Mario Example
    I.E. File Name = MarioSaveInfo.ABC < List Object understands this is a List File regardless of the Extension end. Which makes it even better as typical users don't understand how to open it.

    AUTO SAVE = MarioSaveinfo.ABC is the Same as all Variables. Run this event once when loops. Save List File MarioSaveinfo.ABC
    Auto Repair Save = MarioSaveinfo.ABC is Different then all Variables. Change line ?
    List File itself

    1) Player Lives
    2) Player Power
    3) PLAYER X Position
    4) PLAYER Y Position
    5) Player Inventory Mushroom 0-999999999
    6) Player Inventory Fire Flower 0-999999999
    7) Player Inventory Tail 0-999999999
    etc

    Then you can link these all to the Environment Variables at the Start, During and End of any Game.
    Say the Player picks up a Fire Flower. This would trigger the Variable for the game to change on line 6 and auto save.

    1) 3
    2) 100
    3) 98
    4) 102
    5) 0
    6) 1
    7) 0
    etc

    Player picks up a Mushroom in the same location.

    1) 3
    2) 100
    3) 98
    4) 102
    5) 1
    6) 1
    7) 0
    etc

    Player picks up a Tail in the same Location.

    1) 3
    2) 100
    3) 98
    4) 102
    5) 1
    6) 1
    7) 1
    etc

    Player move and picks up another Mushroom.

    1) 3
    2) 100
    3) 250
    4) 102
    5) 2
    6) 1
    7) 1
    etc

    Last, Player gets Hurt. Lost one life and has inventory change / picked up a mushroom.

    1) 2
    2) 25
    3) 100
    4) 102
    5) 3
    6) 1
    7) 1
    etc

    Thus, when the player Continues this game in the future. They have exactly what they had when they left and are in the Exact Same spot they left off at.
    Obviously, you'd need to have a Continue function the user can click to load the savegame MarioSaveinfo.ABC

    You could even make numerous Saves by allowing the user to name their Saves. Editbox +".ABC"

    You can also add Enemy Positions and Enemies remaining to the save files. This way if the user killed 5 out of 10 enemies. When they continue the game. 5 Specific Enemies would remain in their exact locations.

    Not to mention in app Updates you can simply add a line for Player only Specific Data. ( Plan this ahead of time to make it easier / I.E. Make a Player Only Save file and a Default Enemy Save File "EDITBOX"+_ENEMIES.ABC"
    This way the Enemies Save info is linked to the Player's Save Info File. Two Files that the user Creates. One for themselves and one hidden for the Enemies.

    Just an Idea. I personally never use INI for any saves. I Tried it a few times, but didn't like having to look through the code in order to add or remove something for saving. I also didn't like the layers of Labeling to get to specific Values or Strings.

    I also Use this to rewind games during play. However, that is another topic and requires multiple list files.

    Hope this gives you another option.
    Well, I don't use List object, it's hard and may be very complicated. I'm talking about INI++.

  9. #9
    Clicker Fusion 2.5 (Steam)

    Join Date
    Jan 2017
    Location
    Poland or I think it's France
    Posts
    117
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well actually turns out that INI++ is affecting the Memory for some reason, I'll be switching on the rugular INI.

Similar Threads

  1. I have a problem with saves
    By Zwyrolek in forum Fusion 2.5
    Replies: 3
    Last Post: 6th August 2018, 01:59 AM
  2. Shake object, Shakes an object/frame, saves it as animation in multiple img files
    By PixelABCD in forum Guides, Tutorials, Examples, Widgets
    Replies: 0
    Last Post: 14th July 2018, 03:23 PM
  3. Saving - multiple saves and deleting saves
    By FGRaptor in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 1st September 2011, 05:47 PM
  4. Problem with saves
    By Marek in forum The Games Factory 2 - Technical Support
    Replies: 8
    Last Post: 3rd June 2009, 12:26 AM
  5. RPG saves help
    By Megaman in forum Multimedia Fusion 2 - Technical Support
    Replies: 11
    Last Post: 10th December 2008, 10:18 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •