Editing Creating Custom Blocks
From Eco - English Wiki
Your changes will be displayed to readers once an authorized user accepts them. (help)
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
[[File:Stained Glass Block.png|frame]] | [[File:Stained Glass Block.png|frame]] | ||
This page will walk you through the basics of adding custom blocks to Eco utilizing the Glass models found already in the game to make a Green Stained Glass block. A completed tutorial can be [https://github.com/StrangeLoopGames/EcoModKit/tree/examples/Examples/Blockset here] as well as the asset files needed to complete this tutorial. | This page will walk you through the basics of adding custom blocks to Eco utilizing the Glass models found already in the game to make a Green Stained Glass block. A completed tutorial can be [https://github.com/StrangeLoopGames/EcoModKit/tree/examples/Examples/Blockset here] as well as the asset files needed to complete this tutorial. | ||
https://github.com/StrangeLoopGames/EcoModKit/tree/ | https://github.com/StrangeLoopGames/EcoModKit/tree/examples/Examples/Blockset | ||
== Initial Scene Setup == | == Initial Scene Setup == | ||
Eco has special naming requirements for GameObjects within the mod scene. For blocks this involves a empty GameObject with the name "Blocks" and a BlockSetContainer attached. This object will contain all BlockSets used by your mod. | Eco has special naming requirements for GameObjects within the mod scene. For blocks this involves a empty GameObject with the name "Blocks" and a BlockSetContainer attached. This object will contain all BlockSets used by your mod. | ||
Line 13: | Line 13: | ||
[[File:Green Stained Glass BlockSet.png|thumb]] | [[File:Green Stained Glass BlockSet.png|thumb]] | ||
A BlockBuilder represents a single form of a block inside Eco and defines the rules and meshes used to display it in the world. For the purposes of this tutorial we will be creating seven BlockBuilder objects for our new BlockSet. This list includes three block forms and four builders to represent the various stack states. | A BlockBuilder represents a single form of a block inside Eco and defines the rules and meshes used to display it in the world. For the purposes of this tutorial we will be creating seven BlockBuilder objects for our new BlockSet. This list includes three block forms and four builders to represent the various stack states. | ||
* GreenStainedGlassWindow | * GreenStainedGlassWindow | ||
* GreenStainedGlassStacked1 | * GreenStainedGlassStacked1 | ||
Line 24: | Line 25: | ||
The naming of these block sets is important for the code step later in the tutorial. Eco associates client side object with code by matching the given name. To create the seven required BlockBuilders right click the Unity asset explorer and go to Create -> VoxelEngine -> CustomBuilder. Do this for all seven builders and name them matching the list above. Once you have all seven builders return to the BlockSet object you previously created and click "New Block" and assign your first BlockBuilder and repeat for all seven. The order in which these are added is not important. | The naming of these block sets is important for the code step later in the tutorial. Eco associates client side object with code by matching the given name. To create the seven required BlockBuilders right click the Unity asset explorer and go to Create -> VoxelEngine -> CustomBuilder. Do this for all seven builders and name them matching the list above. Once you have all seven builders return to the BlockSet object you previously created and click "New Block" and assign your first BlockBuilder and repeat for all seven. The order in which these are added is not important. | ||
== Common Bugs == | == Common Bugs == |