Difference between revisions of "Pricing Component"

From wiki
Jump to: navigation, search
(bool)
("sellable")
Line 64: Line 64:
  
 
== "sellable" ==
 
== "sellable" ==
'''Valid options ([[Modding_Key_Terms#Bool|Boll]]): <code>True or False</code>'''
+
'''Valid options ([[Modding_Key_Terms#Bool|Bool]]): <code>True or False</code>'''
  
 
'''Default Value:''' If not specified, will default to True.
 
'''Default Value:''' If not specified, will default to True.

Revision as of 14:28, 27 August 2020

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,
  "sellable": 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. The typical selling price 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.) #"sellable" is whether or not you want to let players to sell the item.

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: If not specified, will default to True.


States whether or not this item can be bought from the catalogue.

"sellable"

Valid options (Bool): True or False

Default Value: If not specified, will default to True.


States whether or not this item can be sold. Useful for making sure important items can't be sold.