User Tag List

Results 1 to 7 of 7

Thread: Loading Multiple Ini Files

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator ProPatch Maker
    coreyschroeder's Avatar
    Join Date
    Apr 2014
    Location
    ATX
    Posts
    56
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Loading Multiple Ini Files

    I would like to create a "save game system" using ini files.
    However, instead of only having one ini file, or a predefined number of "save slots", I would like there to be no limit.

    I messed around with this a bit whilst stuffing my face with easter chocolates yesterday..
    I've managed to create various ini files, but cant seem to figure out how to display these various files to the user for selection.

    I envision this being some sort of list that is populated with the names of all of the various ini files - the user clicks on the name from the list, and the information is loaded.
    Cant figure the list part out - any thoughts?

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleMac Export ModuleSWF Export Module
    Game_Master's Avatar
    Join Date
    Jul 2007
    Location
    England
    Posts
    1,705
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The File-Folder extension allows you to run a browsing loop on a folder, which returns all of the files in the specified folder. You could use that to load all of the ini files from your game's save directory. However, the disadvantage of a method like this is that it is only compatible with the exe runtime.

    If you want something that is compatible with all runtimes, then each time you create a new ini file, add an item to a list, which would contain the names of each of the ini files. Save the list, and then when you want your user to be able to load the ini files, load in the list, and you can display that to the user.

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator ProPatch Maker
    coreyschroeder's Avatar
    Join Date
    Apr 2014
    Location
    ATX
    Posts
    56
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Game_Master - Thanks for taking the time to reply.
    It would be ideal for this application to run on all available runtimes, so I dont want to lock myself into limiting extensions..

    I understand the concept of what you are proposing - what I don't understand is: once the list of the ini file names is created, where is all of this list data stored? If I want to be able to restart the application and load one of the various saved files, obviously this list information needs to be saved as well.. So, would I use an ini for that as well? Like, one master ini that stores all of the names of the various ini save files?

    I appreciate your time on this!

  4. #4
    Clicker Fusion 2.5 DeveloperInstall Creator Pro

    Join Date
    Sep 2006
    Posts
    517
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi everyone,
    Another option would be to create a kind of chained-list using two parameters in each INI file telling which file is the next one and which one is the previous one.
    ouly

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator ProPatch Maker
    coreyschroeder's Avatar
    Join Date
    Apr 2014
    Location
    ATX
    Posts
    56
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ouly - I appreciate you taking the time to reply!
    Honestly, Im having a hard time conceptualizing how this will solve my problem.

    Anyone else have some ideas that may work?

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleMac Export ModuleSWF Export Module
    Game_Master's Avatar
    Join Date
    Jul 2007
    Location
    England
    Posts
    1,705
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by coreyschroeder View Post
    I understand the concept of what you are proposing - what I don't understand is: once the list of the ini file names is created, where is all of this list data stored? If I want to be able to restart the application and load one of the various saved files, obviously this list information needs to be saved as well.. So, would I use an ini for that as well? Like, one master ini that stores all of the names of the various ini save files?
    The list object allows a list to be saved (so you could save the list to the same directory as your ini files).

    You could have a system like this:
    1. At the start of the frame, load the list (e.g. "save_list") from a file into the list object.
    2. When the user saves the game as a new save, add an item to the list object containing the name of the ini that the save is associated with. Then save the list (the list object has this functionality) to your game directory (it could be the same location as your ini files).
    3. If the user wants to load a save file, display the list object to them, and ask them to select the name of the save from that list.
    4. When the select a save, you can use the selection of the list object as the file name of the ini file.

    I can make an example if you want - just let me know.

  7. #7
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator ProPatch Maker
    coreyschroeder's Avatar
    Join Date
    Apr 2014
    Location
    ATX
    Posts
    56
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Game_Master - I've never played with the list object, so I was unaware of its built-in save functionality.
    I really appreciate you taking the time to expand on this topic.
    I'm going to play around with it this afternoon, and see if I can get something working.

Similar Threads

  1. Loading files such as INI,Text files, List Files?
    By Gibbon in forum SWF/Flash Export Module Version 2.0
    Replies: 3
    Last Post: 21st July 2012, 06:41 AM
  2. Loading bmp files from a server
    By Rockdude in forum SWF/Flash Export Module Version 2.0
    Replies: 2
    Last Post: 10th March 2011, 07:09 PM
  3. Ini++ loading multiple files crashes application
    By Blue66 in forum Multimedia Fusion 2 - Technical Support
    Replies: 13
    Last Post: 22nd May 2010, 05:39 PM
  4. Problem to loading multiple lines in Text object!
    By Crian in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 20th May 2010, 04:51 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
  •