Modding data files

From SpaceSlog Wiki
Revision as of 17:45, 26 April 2025 by Produno (talk | contribs)
Jump to navigation Jump to search

The current way you can mod SpaceSlog is via the JSON data files. Almost every object can be modified in this way.
In the future we will open up new ways for you to create mods, but we will talk about that in another section.



What is a JSON file?

JSON stands for JavaScript Object Notation. It's a lightweight and widely-used data format that's easy for humans to read and write, while also being straightforward for machines to parse and generate.
The data in JSON is organized into key-value pairs and supports structures like arrays, strings, integers (whole numbers) and boolean values. Because we use Godot and it uses it's own parser, we can use extra values like "Vector2()".


Setting up your mod

Inside the SpaceSlog game source folder you will see two folders, Data and Modules. All the games core files can be found in Data/Core. You can browse these and make adjustments, though it's always best to create your own mod within the Modules folder.
To do that just create a new folder within the Modules folder and call it whatever your mod is named. Within this you need a Mod_info.json file which will store the basic info of your modification, and then your folders that contain your mod data (Which you can either create, or copy over from the Core folders).