Defining the Levelset
Once you have defined the levels, worldmaps, and timelines, there is only one thing left to do: actually define what the levelset is.
A levelset in ReTux is defined by a standard JSON file located in data/levelsets. It contains an object with the following keys:
- "name": A string indicating the name of the levelset, as shown in the levelset selection list.
- "start_cutscene" (optional): A string indicating a level file located in data/levels to start before showing the game for the first time.
- "worldmap" (optional): A string indicating the worldmap file located in data/worldmaps to start the game on. If unspecified, the levels are simply played in sequence.
- "levels": An array of strings indicating level files located in data/levels which are the levels (excluding extra sub-levels) used in this levelset. This information is used to ascertain how much of the levelset is completed. Additionally, if no worldmap is defined, this array indicates what levels are to be played, and in what order.
- "tuxdolls_available" (optional): An array of strings indicating level files located in data/levels which are the primary level files of levels containing Tux dolls. This information is used to make it possible for ReTux to ascertain what percentage of Tux dolls have been collected. If this is not defined, a player will not be able to reliably know how many Tux dolls are remaining. As such, while this array is technically optional, defining it is highly recommended.