Difference between revisions of "Pricing Component"

From wiki
Jump to: navigation, search
m (Formatting changes)
(Update Page.)
Line 23: Line 23:
 
</pre>
 
</pre>
  
"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.)
+
[[#"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.)
  
 
And that's it for all the properties in the Pricing Component. It is a very simple component but it does a whole lot.
 
And that's it for all the properties in the Pricing Component. It is a very simple component but it does a whole lot.
Line 37: Line 37:
  
 
== "value" ==
 
== "value" ==
'''Valid options (Float): <code>A positive decimal number.</code>'''
+
'''Valid options ([[Modding_Key_Terms#Float|Float]]): <code>A positive decimal number.</code>'''
  
 
'''Default Value:''' No default value is specified. Always need to provide your own.
 
'''Default Value:''' No default value is specified. Always need to provide your own.
Line 46: Line 46:
  
 
== "sellPrice" ==
 
== "sellPrice" ==
'''Valid options (Float): <code>A positive decimal number.</code>'''
+
'''Valid options ([[Modding_Key_Terms#Float|Float]]): <code>A positive decimal number.</code>'''
  
 
'''Default Value:''' No default value is specified. Always need to provide your own.
 
'''Default Value:''' No default value is specified. Always need to provide your own.
Line 55: Line 55:
  
 
== "buyable" ==
 
== "buyable" ==
'''Valid options (Bool): <code>True or False</code>'''
+
'''Valid options ([[Modding_Key_Terms#Bool|Boll]]): <code>True or False</code>'''
  
'''Default Value:''' True.
+
'''Default Value:''' If not specified, will default to True.
  
  
 
States whether or not this item can be bought from the catalogue.
 
States whether or not this item can be bought from the catalogue.

Revision as of 06:56, 14 December 2017

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. 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.)

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 (Boll): True or False

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


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