mirror of
https://github.com/PixelGuys/Cubyz.git
synced 2025-09-22 10:53:55 -04:00
Created Addons (markdown)
parent
08410aa1a5
commit
a747fd26c6
165
Addons.md
Normal file
165
Addons.md
Normal file
@ -0,0 +1,165 @@
|
||||
With Cubyz Addons you can easily add content to the game.
|
||||
Unlike modding, writing an Addon doesn't require any programming experience.
|
||||
|
||||
Here you can find an instruction on how to make addon files. At the end of this page you will find a list of links to existing addons.
|
||||
|
||||
## 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`).
|
||||
<br> 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
|
||||
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.
|
||||
<br> Put the texture of your item in `*cubyz install path*/assets/*addon name*/textures/items`.
|
||||
<br> Copy the texture path(relative to the `…/assets/…/items` folder) into the file you made for your item:<br>
|
||||
```
|
||||
texture *path to texture*/*name of file*.png
|
||||
```
|
||||
If no path or an invalid path is specified the texture will default to no texture.
|
||||
|
||||
Example item file(`addons/cubyz/items/coal`):
|
||||
```
|
||||
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
|
||||
Each block has the following attributes:
|
||||
- a block class which can be one of the following: `wood`, `stone`, `sand`, `unbreakable`, `leaf`, `fluid` and `ore`.<br>
|
||||
The block class determine if the block can be broken and with what tool you can break it.<br>
|
||||
Default value: `stone`<br>
|
||||
Syntax example: `class stone`
|
||||
- a hardness which represents the time in seconds needed to break the block by hand. It can get significantly reduced by the right tools.<br>
|
||||
Default value: `1`<br>
|
||||
Syntax example: `hardness 1`
|
||||
- a block drop, which is the item the player will get when they break the block.<br>
|
||||
Default value: `none`<br>
|
||||
Syntax example: `drop auto`(to auto-generate the drop with the same name as the block) or `drop addon_name:item_name`
|
||||
- a 3d model<br>
|
||||
Default value: `undefined`<br>
|
||||
Syntax example: `model cubyz:block.obj`
|
||||
- a texture for that 3d model.<br>
|
||||
Default value: `undefined`<br>
|
||||
Syntax example: `texture cubyz:blocks/cactus` if the texture is in `cubyz install path/assets/cubyz/textures/blocks/cactus.png`
|
||||
- wether the block is transparent.<br>
|
||||
Default value: `no`<br>
|
||||
Syntax example: `transparent yes`
|
||||
- light absorption in case the block is transparent.<br>
|
||||
There are four light channels: sun, red, green, blue. The value is given as hexadecimal: `0xssrrggbb`<br>
|
||||
Default value: `0x00000000`<br>
|
||||
Syntax example: `absorbedLight 0x06080008`(The block lets mostly green light through)
|
||||
- light emission: how much light the block emits<br>
|
||||
There are four light channels: sun, red, green, blue. The value is given as hexadecimal: `0xssrrggbb`<br>
|
||||
Default value: `0x00000000`<br>
|
||||
Syntax example: `emittedLight 0x00ff8000`(The block emits orange light)
|
||||
- wether the block is degradable(trees can grow through it).<br>
|
||||
Default value: `no`<br>
|
||||
Syntax example: `degradable yes`
|
||||
- wether the block is solid.<br>
|
||||
Default value: `yes`<br>
|
||||
Syntax example: `solid no`
|
||||
- a GUI that is opened on left-click. Possible GUIs in non-modded cubyz: cubyz:workbench<br>
|
||||
Default value: `none`<br>
|
||||
Syntax example: `GUI cubyz:workbench`
|
||||
|
||||
##### Ores
|
||||
If you specify the block class ore, you can set a few more attributes that define the world generation of these ores:
|
||||
- how many veins there are on average in each chunk.<br>
|
||||
Default value: `0`<br>
|
||||
Syntax Example: `veins 10`
|
||||
- how big each vein is on average.<br>
|
||||
Default value: `0`<br>
|
||||
Syntax Example: `size 15`
|
||||
- maximum height of ore veins.<br>
|
||||
Default value: `0`<br>
|
||||
Syntax Example: `height 128`
|
||||
|
||||
Example block file(`addons/cubyz/blocks/coal_ore`):
|
||||
```
|
||||
class ore
|
||||
hardness 40
|
||||
veins 10
|
||||
size 15
|
||||
height 128
|
||||
drop cubyz:coal
|
||||
model cubyz:block.obj
|
||||
texture cubyz:blocks/coal_ore
|
||||
```
|
||||
|
||||
#### Recipes
|
||||
In each file you can define shortcuts for item names like this:
|
||||
```
|
||||
L = cubyz:oak_log
|
||||
T = cubyz:oak_top
|
||||
P = cubyz:oak_planks
|
||||
```
|
||||
Then you can create any amount of recipes you want. If you want a recipe to contain empty spaces, you can use 0 instead of the item name or shortcut.
|
||||
##### shapeless recipes:
|
||||
You can define shapeless recipes using the `shapeless` keyword simply by enumerating all items (or their respective shortcut) seperated by spaces(or other space-like symbols like tabs) and stating the result(and how many items you want to get):
|
||||
```
|
||||
shapeless
|
||||
L
|
||||
result 4*P
|
||||
```
|
||||
##### shaped recipes:
|
||||
You can define shaped recipes using the `shaped` keyword. Afterwards you have to define the shape of your recipe using items. And at the end you need to specify the result:
|
||||
```
|
||||
shaped
|
||||
P P
|
||||
P P
|
||||
result cubyz:workbench
|
||||
```
|
||||
|
||||
#### Biomes
|
||||
biome files are seperated in two parts:
|
||||
##### 1. general attributes
|
||||
- temperature in an arbitrary unit(0 meaning super cold, 360 meaning super hot)<br>
|
||||
Default value: `180`<br>
|
||||
Syntax Example: `temperature 115`
|
||||
- height arguments(minimal height, average height, maximal height)<br>
|
||||
Default value: `128`<br>
|
||||
Syntax Example: `height 120-140-256`
|
||||
- humidity(0 meaning dry, 1 meaning wet)<br>
|
||||
Default value: `0.5`<br>
|
||||
Syntax Example: `humidity 0.4`
|
||||
- roughness(how rough the terrain is. Can be any value >= 0 where 0 means no roughness at all, 0.3 means slightly rough, 1 means pretty rough, 2-4 means super rough, 100 means random spikes, higher values were not tested)<br>
|
||||
Default value: `1`<br>
|
||||
Syntax Example: `roughness 0`
|
||||
- rivers(if rivers should start in this biome)<br>
|
||||
Default value: `yes`<br>
|
||||
Syntax Example: `rivers`
|
||||
- ground structure: how the surface blocks are structured.<br>
|
||||
Default value: `stone`<br>
|
||||
Syntax Example: `ground_structure cubyz:grass, 2 cubyz:dirt, 1 to 5 cubyz:cobblestone`
|
||||
|
||||
##### 2. structures
|
||||
After the `structures:` keyword, you can add structures that get generated by cubyz-intern or modded structure generators. Currently there are:
|
||||
###### cubyz:simple_vegetation
|
||||
Columns of a certain block type with a certain height and chance:
|
||||
`cubyz:simple_vegetation cubyz:cactus 0.01 3 2` will generate a cactus on every 100th block with a height of 3 to 3+2 blocks.
|
||||
###### cubyz:simple_tree
|
||||
Columns of a certain block type with a certain height and chance:
|
||||
`cubyz:simple_tree cubyz:oak_leaves cubyz:oak_log cubyz:oak_top 0.05 4 3` will generate an oak tree on every 20th block with a 4 to 4+3 block high stem.
|
||||
|
||||
Example file(`addons/cubyz/biomes/forrest`):
|
||||
```
|
||||
temperature 110
|
||||
humidity 0.6
|
||||
height 102-114-140
|
||||
ground_structure cubyz:grass, 2 to 3 cubyz:dirt
|
||||
roughness 0.1
|
||||
|
||||
structures:
|
||||
cubyz:simple_tree cubyz:oak_leaves cubyz:oak_log cubyz:oak_top 0.05 7 3
|
||||
cubyz:simple_vegetation cubyz:grass_vegetation 0.3 1 0
|
||||
```
|
||||
|
||||
## 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.
|
||||
|
||||
|
||||
Currently there is no addon here(apart from the base addon) :(
|
||||
|
||||
- [cubyz base addon](https://github.com/PixelGuys/Cubyz/tree/master/cubyz-client/addons/cubyz)
|
Loading…
x
Reference in New Issue
Block a user