From a5d666481467641bbbc8519afc89459addde032a Mon Sep 17 00:00:00 2001 From: IntegratedQuantum <43880493+IntegratedQuantum@users.noreply.github.com> Date: Sun, 7 Jun 2020 19:13:01 +0200 Subject: [PATCH] Updated Addons (markdown) --- Addons.md | 80 ++++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 74 insertions(+), 6 deletions(-) diff --git a/Addons.md b/Addons.md index e27e117..cc5939e 100644 --- a/Addons.md +++ b/Addons.md @@ -6,11 +6,11 @@ Here you can find an instruction on how to make addon files. At the end of this ## How to make your own Addon: 1. Locate the `addons` folder(should be inside the location you installed Cubyz in) 2. Create a new folder with the name(should not contain any spaces) of your Addon. -3. Decide what things you want to add and add the corresponding folder(`items`, `blocks`, `recipes`, `biomes`). -4. Create a text file in the folder that represent the item/block/biome name(`name.any_extension` or just `name`). +3. Decide what things you want to add and add the corresponding folder(`items`, `blocks`, `recipes`, `biomes`, `materials`). +4. Create a text file in the folder that represent the item/block/biome/material name(`name.any_extension` or just `name`).
For recipes the file name is not used anywhere in the game and can be used for structuring. 5. Check the following examples on how to fill the file: -#### Items +### Items There is not much to do here. All you can do is add a texture path. There will come more possibilities in later versions, if requested.
Put the texture of your item in `*cubyz install path*/addons/*addon name*/items/textures`.
Copy the texture path(relative to the `textures` folder) into the file you made for your item:
@@ -25,7 +25,7 @@ texture materials/coal.png ``` Item IDs are generated as `addon_name:item_name`. That's also the name that has to be used for recipes and block drops. -#### Blocks +### Blocks Each block has the following attributes: - a block class which can be one of the following: `wood`, `stone`, `sand`, `unbreakable`, `leaf`, `fluid` and `ore`.
The block class determine if the block can be broken and with what tool you can break it.
@@ -88,7 +88,7 @@ model cubyz:block.obj texture cubyz:coal_ore ``` -#### Recipes +### Recipes In each file you can define shortcuts for item names like this: ``` L = cubyz:oak_log @@ -112,7 +112,7 @@ P P result cubyz:workbench ``` -#### Biomes +### Biomes biome files are seperated in two parts: ##### 1. general attributes - temperature in an arbitrary unit(0 meaning super cold, 360 meaning super hot)
@@ -156,6 +156,74 @@ structures: cubyz:simple_vegetation cubyz:grass_vegetation 0.3 1 0 ``` +### Materials +Materials define what properties a tool has depending on what parts of it are made from this material. + +##### Base properties +- head durability: how much durability is added to the tool if the head is made of this material. Negative values are also possible.
+Default value: 0
+Syntax Example: `head 20` +- binding durability: how much durability is added to the tool if the binding is made of this material. Negative values are also possible.
+Default value: 0
+Syntax Example: `binding 10` +- handle durability: how much durability is added to the tool if the handle is made of this material. Negative values are also possible.
+Default value: 0
+Syntax Example: `handle 10` +- damage: how much damage is dealt by the tool if the head is made of this material.
+Default value: 0
+Syntax Example: `damage 7.5` +- speed: how fast the tool breaks blocks if the head is made of this material.
+Default value: 0
+Syntax Example: `speed 2.5` +- level: what mining level the tool can break if the head is made of this material.
+Default value: 0
+Syntax Example: `level 2` +##### Modifiers +Each material can also add certain modifiers to the tool. These can have active(on use) and passive(per tick) effects. Currently there are only a few modifiers(cubyz:falling_apart and cubyz:regrowth).
+Modifers have also a strength value which determine how strong the effect is. If multiple parts add the same modifier, the effect will get stacked.
+Modifiers can be added like this:
+`modifier cubyz:falling_apart 2`
+Or more general:
+`modifier *mod*:*modifier name* *strength*` + +You can add as many modifiers as you want. + +##### Crafting Items +These are the items from which you can make the parts of the tool.
+Each item also has an associated material value which determines how many items are needed to create head/binding/handle of certain tools. Here is a list of how much material value is needed for each tool part: +Part|Material Value +-|- +Binding|50 +Handle|50 +Sword Blade|200 +Axe Head|300 +Pickaxe Head|300 +Shovel Head|100 + +New items can be added like this:
+`cubyz:stick 50`
+or more general:
+`*mod*:*item name* *material value*` + +Example file(`addons/cubyz/materials/wood`): +``` +head -20 +binding 50 +handle 20 + +damage 0.1 +speed 1 +level 1 + +modifier cubyz:regrowth 1 +modifier cubyz:falling_apart 5 + +cubyz:stick 50 +cubyz:oak_planks 100 +cubyz:oak_log 150 +cubyz:oak_top 150 +``` + ## Existing Addons If you made an addon and want it to appear on this list, contact us on [discord](https://discord.gg/XtqCRRG) so we can see if it contains any inappropiate content and if it doesn't, we'll add it to the list.