How do I use something like INI files with NodeWebkit

0 favourites
  • 3 posts
From the Asset Store
Convert multiple Excel files into JSON files and import them into construct3.
  • Hi everyone.

    I'm working on a program that will let users create and edit data files. What's my best option for easy data management within the file (setting and retrieving numbers or strings for specific variable names like "X POSITION=144" etc.)

    I've used INI files in the past, which would be perfect for my needs. Is there any equivalent for C2 that would work well with NodeWebkit?

    Thanks

    -Mike

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Hi everyone.

    I'm working on a program that will let users create and edit data files. What's my best option for easy data management within the file (setting and retrieving numbers or strings for specific variable names like "X POSITION=144" etc.)

    I've used INI files in the past, which would be perfect for my needs. Is there any equivalent for C2 that would work well with NodeWebkit?

    Thanks

    -Mike

    You can make it load a text file where you could read the data from using NWjs or the XML object might work as well.

  • Load all the data you want to save into arrays.... Then save all the arrays into a single "Save array" and save as text file in .json format.

    If you are making one for simple user settings, that the user will be able to understand and read later, you should study the GetTokenAt get token count.

    The second option is the hardest, but if you want users to understand the file it is your best bet.

    There is a Save and Load game feature as well, but it will not let you have much control over what gets saved. You can save to the built in save slots, or dump the save into a .json string, and save it as the text file.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)