Mods are an add-on to the game that has the type of setting, weapon, axe and pickaxe.
Now we will learn what we added in v0.8 - mods.
Similar mods are stored in the "game"/mods/mod.json path. Now I will tell and show you how to create your first mod, do not be afraid!
It's easy.
What a weapon mod looks like:
{ "name": "my test mod", "type": "weapon", "chance": 75, "title": "My hyper sword", "id": "mysword", "started_count": 2, "texture": "textures/sword.png" }
Now we will analyze all this so that you understand:
- name - the name of the mod, type is the type of the mod (let's say weapon),
- type - the type of the mod (let's say weapon),
- chance - the chance that the weapon will break when killed (0 - always breaks, 101 - never breaks),
- title - This is the name of the item in the inventory and in the world,
- id - This is the designation of the item in the code, such as its quantity, etc., do not put spaces! either write together or use an underscore,
- started_count - This is the initial amount of the item that you will have in the inventor,
- texture - The path to the texture of the item that will be displayed in the inventor and in the world.
What a mod looks like with a customization type:
{ "name": "my test mod", "type": "setting", "health": 100, "food": 100 }
Now we will analyze all this so that you understand:
- name - the name of the mod, type is the type of the mod (let's say weapon),
- type - the type of the mod (let's say setting),
- health - The amount of health at the start of the game with the mod,
- food - The percentage of hunger when starting the game with the mod.