User Tag List

Results 1 to 4 of 4

Thread: Saving with INI: Actual difference between value and group-item-value

  1. #1
    Clicker Multimedia Fusion 2 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleUnicode Add-on
    iamjot's Avatar
    Join Date
    Nov 2008
    Location
    Austria
    Posts
    712
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Saving with INI: Actual difference between value and group-item-value

    Hey. About the INI object. What is the actual difference if I save my stats this way:

    Set value
    Load value

    Which works just fine - Or if I save my stats this way:

    Set value (group - item)
    Load value (group - item)

    Or even the "in - between - way"

    Set value - item
    Load value - item

    All 3 options are saving and loading my stats. When should we use which option. Thx!

  2. #2
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleSWF Export Module
    Konidias's Avatar
    Join Date
    Aug 2009
    Posts
    1,546
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Ini files can store values inside of named items, which can be placed into groups.

    The extension gives you the ability to set the current group or item individually, or you can set the current group/item when you save/load a value.

    So for example, if you just set value to 5 and save, then your Ini will look like this:

    5

    Okay, but now what if you want one value for "health" to be 5, and one value for "attack" to be 3? You can't just:

    Set value 5, Set Value 3... because it has no idea what items to set those values to. Therefore you need to give the items names, and then set the values based on those names.

    So for example, if you use Set value - item "5" and "health" and "3" and "attack" your Ini will look like this:

    health=5
    attack=3

    So that you can actually save/load from those values based on item name.

    Finally, you might find yourself wanting to group items so that you can handle them in groups instead of individually. Say now that you have your health/attack stats, you also want some player options for music and sfx volume. So you could set up groups "PlayerStats" and "Options" that look like this:

    [PlayerStats]
    health=5
    attack=3

    [Options]
    music=10
    sfx=8

    So something like that. In order to access these values, you need to set the proper group/item first. Hence all the ways to set current group/set current item.

  3. #3
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleiOS Export ModuleSWF Export Module
    Skyhunter's Avatar
    Join Date
    Jan 2007
    Location
    Croatia
    Posts
    451
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Also should be mentioned you can use same item names in different groups:

    [Player1]
    health=5
    attack=3

    [Player2]
    health=4
    attack=7

    etc...

  4. #4
    Clicker Multimedia Fusion 2 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleUnicode Add-on
    iamjot's Avatar
    Join Date
    Nov 2008
    Location
    Austria
    Posts
    712
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Great answers! Thx guys. I have always been using the INI object withouth really thinking about it. This makes sense now.

Similar Threads

  1. INI Group / Item Value Only A Text Expression?
    By jfohl3r in forum Fusion 2.5
    Replies: 2
    Last Post: 12th January 2014, 10:26 PM
  2. [Request] INI - Change Group/Item Name
    By Bipolar_Games in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 14th October 2012, 06:20 PM
  3. Saving Group info to Global Values
    By matt_barr in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 22nd October 2009, 04:37 PM
  4. setting ini path, group, item from variables
    By ajp in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 10th September 2009, 10:33 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
  •