Difference between revisions of "Pricing Component"
(bool) |
(added exceptions) |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 52: | Line 52: | ||
− | This is the price at which the people will sell this object for. | + | This is the price at which the people will sell this object for. Sell price must be less than or equal to buy price. |
Line 62: | Line 62: | ||
States whether or not this item can be bought from the catalogue. | States whether or not this item can be bought from the catalogue. | ||
+ | |||
== "sellable" == | == "sellable" == | ||
− | '''Valid options ([[Modding_Key_Terms#Bool| | + | '''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. | ||
− | States whether or not this item can be | + | == "canBeEarntFromLuckyBox" == |
+ | '''Valid options ([[Modding_Key_Terms#Bool|Bool]]): <code>True or False</code>''' | ||
+ | |||
+ | '''Default Value:''' If not specified, will default to True. | ||
+ | |||
+ | States whether or not this item can be gotten from a Lucky Box. It's recommended to leave this as true unless it's a quest item or some kind of reward or limited access item. | ||
+ | |||
+ | |||
+ | == "appearsInCatalogue" == | ||
+ | '''Valid options ([[Modding_Key_Terms#Bool|Bool]]): <code>True or False</code>''' | ||
+ | |||
+ | '''Default Value:''' If not specified, will default to True. | ||
+ | |||
+ | Defines whether or not an item is allowed to appear in the catalog. | ||
+ | |||
+ | |||
+ | == "catalogueUnlockedFromStart" == | ||
+ | '''Valid options ([[Modding_Key_Terms#Bool|Bool]]): <code>True or False</code>''' | ||
+ | |||
+ | '''Default Value:''' If not specified, will default to the same setting as "appearsInCatalogue". | ||
+ | |||
+ | Defines whether or not an item is one of the catalog's "starter" items. If this is false the item will only appear in the catalog after the player has obtained or inspected it. | ||
+ | |||
+ | You cannot have an item that is unlocked in the catalogue ( "catalogueUnlockedFromStart" = true ), but does not appear in catalogue ( "appearsInCatalogue" = false ). |
Latest revision as of 04:22, 3 November 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.
Contents
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. Sell price must be less than or equal to buy price.
"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.
"canBeEarntFromLuckyBox"
Valid options (Bool): True or False
Default Value: If not specified, will default to True.
States whether or not this item can be gotten from a Lucky Box. It's recommended to leave this as true unless it's a quest item or some kind of reward or limited access item.
"appearsInCatalogue"
Valid options (Bool): True or False
Default Value: If not specified, will default to True.
Defines whether or not an item is allowed to appear in the catalog.
"catalogueUnlockedFromStart"
Valid options (Bool): True or False
Default Value: If not specified, will default to the same setting as "appearsInCatalogue".
Defines whether or not an item is one of the catalog's "starter" items. If this is false the item will only appear in the catalog after the player has obtained or inspected it.
You cannot have an item that is unlocked in the catalogue ( "catalogueUnlockedFromStart" = true ), but does not appear in catalogue ( "appearsInCatalogue" = false ).