Pricing Component
Category:Component Modding are all optional properties that can be added to any file. Components are useful in extending the original files with even more information, such as the cost of the item or whether the block can be broken by a weapon.
On this page, we go over the Pricing component, signified by the following;
"pricing": { =Content= }
Pricing components are the most universal component. They are used for Items, Tiles, and plenty of other files. Literally anything that could be sold to players will use the pricing component to do so.
When and How to use
Pricing components should be used whenever you want an item to be sold or bought. It is not needed when the item should not be bought OR sold. (i.e. Creative only items, Debugging items etc).
To create this component you would use the following;
"pricing": { "value": 10.0, "sellPrice": 6.0, "buyable": true }
"value" is the amount you want people to buy this object for. "sellPrice" is the amount you want people to sell this item for. A typical "sellPrice" in staxel is roughly 60% of the buying price. And buyable is whether or not you want to let players buy it from the catalogue. (i.e. Setting to false hides the item from catalogue.)
And that's it for all the properties in the Pricing Component. It is a very simple component but it does a whole lot.
Config Options
All config options must be inside the body of;
"pricing": { =Config Here= }
"value"
Valid options (Float): A positive decimal number.
Default Value: No default value is specified. Always need to provide your own.
This is the price at which the people will buy this object for.
"sellPrice"
Valid options (Float): A positive decimal number.
Default Value: No default value is specified. Always need to provide your own.
This is the price at which the people will sell this object for.
"buyable"
Valid options (Bool): True or False
Default Value: True.
States whether or not this item can be bought from the catalogue.