User Tag List

Page 1 of 4 1 2 3 ... LastLast
Results 1 to 10 of 32

Thread: Ways for INIs to save multiple game files?

  1. #1
    No Products Registered

    Join Date
    Apr 2007
    Location
    Summerville, SC
    Posts
    58
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Ways for INIs to save multiple game files?

    Hi, can someone tell me how to use the INI object to save multiple game files? Like the user can name their game file and it will save global values into that file, that way multiple people could have save files. Also is there a way to load multiple game files? Thanks.

  2. #2
    Clicker Fusion 2.5 Developer

    Join Date
    Jun 2006
    Location
    Hampshire, UK
    Posts
    963
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Ways for INIs to save multiple game files?

    Just set the ini file to be the same as the player name!

    So have an edit box, and when they click 'save' save an ini file which is called [contents of edit box].ini!

  3. #3
    No Products Registered

    Join Date
    Apr 2007
    Location
    Summerville, SC
    Posts
    58
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Ways for INIs to save multiple game files?

    Right.... I've used a technique like that before, guess it never really registered.:S Any ideas of how to load different files?

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Popcorn's Avatar
    Join Date
    Jun 2006
    Location
    Norway, Bergen
    Posts
    2,366
    Mentioned
    13 Post(s)
    Tagged
    0 Thread(s)

    Re: Ways for INIs to save multiple game files?

    Store the filenames in a list, then just loop through the list to get the filenames.

  5. #5
    No Products Registered

    Join Date
    Apr 2007
    Location
    Summerville, SC
    Posts
    58
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Ways for INIs to save multiple game files?

    I think I'm going to use a list object to display names, is there a way for MMF2 to check all of the INI files saved and put their filename in one line on the list, and then have it so that whichever line is selected when you click a button it will load that specific data? I know there's something simple I'm missing here, I know how to save one file and load it back but I've never really done multiple files. Thanks.

  6. #6
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export Module
    DavidN's Avatar
    Join Date
    Jun 2006
    Location
    Boston, MA, USA
    Posts
    4,044
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Ways for INIs to save multiple game files?

    The technique for loading one of multiple files is virtually the same, but you need to specify the file name to load in a different way - rather than just saying to set the INI object's file literally to "save.ini", you need to set it to the contents of the selected line of your list box - something like List Select$("List").

    I think that the List object even has a "Load file list" action so that you can instantly get a list of INI files in your game's folder.

  7. #7
    Clicker Multimedia Fusion 2
    Greg's Avatar
    Join Date
    Dec 2006
    Location
    Poland
    Posts
    315
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Ways for INIs to save multiple game files?

    I always use Tree Control Object to display all of the INI files in the folder. Then player can choose a file, which he wants to load.

  8. #8
    No Products Registered

    Join Date
    Apr 2007
    Location
    Summerville, SC
    Posts
    58
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Ways for INIs to save multiple game files?

    Thanks for that last bit of info, the whole saving and loading a list worked perfectly. Here, I'll list what I have so far. On my title frame, you can select New game or load. When you press new game, you can type in a name, which is saved to the list object. The ini's current file is set to the contents of the edit box then. So now you play the game, and some global values get set to the ini. Then, when you come back, this time you choose load and your name is on the list object. You click it and press start, but when you go back to the game your global values aren't set. And another thing, is it possible to set the ini's path to your game's folder without saving it as the name? I did my path into a folder called "Game data" but when I actually went there it was saved outside the folder and titled "Game data.ini". If I could just set it's path but still make the user able to set it's name I think everything would work. Thanks.

  9. #9
    Clicker Multimedia Fusion 2
    Greg's Avatar
    Join Date
    Dec 2006
    Location
    Poland
    Posts
    315
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Ways for INIs to save multiple game files?

    Code:
    Set current file to
    Apppath$+"your_folder\"+text from Edit Object
    Apppath$ takes a full path to your game. Then you can add folder, which in you want to save your files and finally add the filename from the Edit Box.

    Result will be for example:
    C:\Your game\Saves\my_file.ini

    C:\Your game\ = Apppath$
    Saves\ = name of the folder with save files
    my_file.ini = filename taken from the Edit Box

  10. #10
    No Products Registered

    Join Date
    Apr 2007
    Location
    Summerville, SC
    Posts
    58
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Ways for INIs to save multiple game files?

    Thanks... I tried it but only found that it wasn't saving the ini anywhere. The path to my game folder is C:\Program Files\Game Title. Now I have another folder in the game title folder that holds save data. So here's what I put whenever the user either types a new name or loads a saved game:

    Set current file to
    Apppath$+"Game Title"+Edittext$("Edit Box")

    Of course with the "Game Title" name being my game folder. First I just want to see if it will at least save the ini into the game folder, then try the game data folder within the game folder. Is there something I'm doing wrong with the code or is there another way? Thanks.

Page 1 of 4 1 2 3 ... LastLast

Similar Threads

  1. Ways to Speed Up Game?
    By Corlen in forum Android Export Module Version 2.0
    Replies: 8
    Last Post: 14th July 2013, 01:16 AM
  2. Best way to save data I need to sort multiple ways?
    By TheDigitalAlchemist in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 23rd April 2012, 11:59 AM
  3. INI files for save game
    By Drcooper in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 25th June 2010, 02:34 AM
  4. Way to Save Separate Game Files with INI?
    By Jdsfrog in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 24th October 2007, 04:14 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
  •