A downloadable capx file

Download NowName your own price

This is a capx project file for use with Scirra Construct 2, an HTML5 game creation program. It allows your Construct 2 game to read and write to a SHARECART1000 o_o.ini file.

You can read more about the SHARECART1000 system here.

I put this together for my entry to the Teacart 1k, but I thought it may be useful to others! It took me a good chunk of time pre-jam to get it (sorta) working, but I continued to work on it post-jam as well. At this point, I think it's pretty solid and reliable, although I'm not a master of SHARECART/Construct/anything so I don't claim it to be perfect.

This capx contains:

  • A Dictionary object, which stores all the o_o.ini values and allows them to be compared and modified in-game
  • The NWjs plugin, which is required for performing file operations on o_o.ini
  • A Text object that displays the status of o_o.ini file operations for debugging
  • Four functions on a single event sheet, explained below
    • getSavePath(): Finds the working directory and sets the "savePath" variable to [working directory]\..\dat
    • initializeDictionary(): Populates the Dictionary object with default o_o.ini values
    • readSHARECART(): Reads the values from the o_o.ini file at "savePath" (if it exists) and sets the in-game Dictionary's values accordingly. If o_o.ini doesn't exist, it creates a new one at "savePath". Invalid entries will halt this process and throw an error
    • writeSHARECART(): Writes the values from the in-game Dictionary into the o_o.ini file at "savePath". If o_o.ini doesn't exist, it creates a new one at "savePath". Out of range values will be written as default values

Feel free to use it for your own projects!


Download NowName your own price

Click download now to get access to the following files:

SHARECART1000 Template.capx 178 kB