-
Notifications
You must be signed in to change notification settings - Fork 81
JSON Mods
The easiest and fastest way to create a mod is using JSON
JSON is a human-understandable and easy way to store data which is stored as "attribute" : value
Let's see the example of the Berrymeal:
"berrymeal" : {
"categories" : ["food", "edible", "meal"],
"colonyPointsMeal" : 10,
"icon" : "./textures/icons/berrymeal.png",
"isPlaceable" : false
}
This ALL the code needed to generate the berrymeal type (item) in the game. It's easy, right?
(The explanation of the meaning of each attribute needed to create a type (item/block) will be explained in a different guide, this is only an example to show how easy is to work with JSON files).
JSON files can be used to:
- Types (either items or blocks)
- Recipes
- Textures
- BlockJobs (Jobs in a placeable block)
- AreaJobs (Jobs in a placeable area)
- Science (Research)
- Trees (with custom shape)
- ...
JSON files can ADD, MODIFY or REMOVE existing elements depends on the type of JSON file that you want.
JSON files are user-friendly and time-saving, but due to their simplicity they have some restrictions and cannot be used for everything, for example, you cannot create new interfaces, or add specific behavior to a block such as spreading through the world like water. For these cases, it is necessary to program code, which will be discussed in other guides.