Difference between revisions of "Broom Items"
DeamonHunter (Talk | contribs) m (Small copy paste error.) |
DeamonHunter (Talk | contribs) (Update Page.) |
||
Line 9: | Line 9: | ||
</pre> | </pre> | ||
− | Brooms | + | Brooms allow you to sweep items around. They also break to [[Tile|Tiles]] that have the [[Sweepable Component]] in their specifications. |
= Creating a Broom Item = | = Creating a Broom Item = | ||
− | + | Replacers are created in much the same way as [[Craft Items]]. In fact you should follow the guide, [[Items#How to Make a Normal Item]], until you finish all of the steps there. | |
+ | Once you have gone through that guide, there are two more steps you will need to do. The first step is to change the "kind" from "staxel.item.CraftItem" to "staxel.item.Broom". | ||
− | + | The second step depends on what you are using to create items. | |
− | + | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | = | + | == Asset Manager == |
− | + | Navigate to the item you had created before. Head to the components property and click on the <code>[...]</code>. When the new window pops up, click on "Add" and select "broom". | |
− | |||
− | |||
− | + | Once that is done, the Asset Manager should have selected your new component. Check out the three properties and change them to suit your needs. | |
− | + | When you are done, close both windows by clicking "OK". Save the asset and continue to "Build and Validate Assets" like the normal item tutorial. | |
− | == | + | == Text Files == |
− | + | The second step is to add the following to the end of the item file created; | |
− | + | <pre> | |
− | + | "broom": { | |
− | + | "sweepRadius": 1.5, | |
+ | "usageDistance": 3.0, | ||
+ | "pushVelocity": 7.0 | ||
+ | }, | ||
+ | </pre> | ||
− | + | With that out of the way, it is time to start editing these values. The outermost property "broom" is known as a [[:Category:Component Modding|Component]] that holds all the information. (Specifically the [[Broom Component]]). | |
− | + | Inside of that it includes three properties. "sweepRadius" determines how large the area of effect will be. "usageDistance" determines how far away from the character that the broom can be used. "pushVelocity" determines how much force will be used to push the items. Any of these properties can be removed in order to give the default values. | |
− | + | ||
− | + | After you finished editing the values, rerun <code>Content Builder</code> and you are good to go. | |
− | + | = Spawning in a Broom Item = | |
+ | Follow the guide at [[Items#How to Spawn an Item]]. When that guide mentions "kind", make sure to use "staxel.item.Broom" instead of "staxel.item.CraftItem" else you won't be able to spawn the item. |
Revision as of 05:25, 12 December 2017
Items are fairly broad in their types. Each type has it's own properties and uses.
This page is for items that will act as if they were a Broom.
Brooms are all items that have the following line;
"kind": "staxel.item.Broom",
Brooms allow you to sweep items around. They also break to Tiles that have the Sweepable Component in their specifications.
Creating a Broom Item
Replacers are created in much the same way as Craft Items. In fact you should follow the guide, Items#How to Make a Normal Item, until you finish all of the steps there.
Once you have gone through that guide, there are two more steps you will need to do. The first step is to change the "kind" from "staxel.item.CraftItem" to "staxel.item.Broom".
The second step depends on what you are using to create items.
Asset Manager
Navigate to the item you had created before. Head to the components property and click on the [...]
. When the new window pops up, click on "Add" and select "broom".
Once that is done, the Asset Manager should have selected your new component. Check out the three properties and change them to suit your needs.
When you are done, close both windows by clicking "OK". Save the asset and continue to "Build and Validate Assets" like the normal item tutorial.
Text Files
The second step is to add the following to the end of the item file created;
"broom": { "sweepRadius": 1.5, "usageDistance": 3.0, "pushVelocity": 7.0 },
With that out of the way, it is time to start editing these values. The outermost property "broom" is known as a Component that holds all the information. (Specifically the Broom Component).
Inside of that it includes three properties. "sweepRadius" determines how large the area of effect will be. "usageDistance" determines how far away from the character that the broom can be used. "pushVelocity" determines how much force will be used to push the items. Any of these properties can be removed in order to give the default values.
After you finished editing the values, rerun Content Builder
and you are good to go.
Spawning in a Broom Item
Follow the guide at Items#How to Spawn an Item. When that guide mentions "kind", make sure to use "staxel.item.Broom" instead of "staxel.item.CraftItem" else you won't be able to spawn the item.