Difference between revisions of "Currency Component"

From wiki
Jump to: navigation, search
(Initial commit.)
 
(Update formatting.)
 
Line 2: Line 2:
 
[[: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.
 
[[: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 Currency component, signified by the following;
+
On this page, we go over the Currency Component, signified by the following;
 
<pre>
 
<pre>
 
"currency": {
 
"currency": {
Line 8: Line 8:
 
}
 
}
 
</pre>
 
</pre>
Currency components are the compliment to [[Pricing Component]]. They are used for [[Items]], specifically [[Coin Items]], and are used to specify how many coins you will get for receiving that item
+
Currency Components are the compliment to [[Pricing Component]]. They are used for [[Items]], specifically [[Coins Items]], and are used to specify how many coins you will get for receiving that item
  
  
 
= When and How to use =
 
= When and How to use =
Currency components should be used whenever you want to specify a new coin. In most cases this is not needed, although it may be useful when wanting to create a new money tier in order to avoid a large number of items being spawned.
+
Currency Components should be used whenever you want to specify a new coin. In most cases this is not needed, although it may be useful when wanting to create a new money tier in order to avoid a large number of items being spawned.
  
  
Line 34: Line 34:
  
 
== "petalWorth" ==
 
== "petalWorth" ==
'''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.

Latest revision as of 01:05, 21 November 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 Currency Component, signified by the following;

"currency": {
  "petalWorth": 0.0
}

Currency Components are the compliment to Pricing Component. They are used for Items, specifically Coins Items, and are used to specify how many coins you will get for receiving that item


When and How to use

Currency Components should be used whenever you want to specify a new coin. In most cases this is not needed, although it may be useful when wanting to create a new money tier in order to avoid a large number of items being spawned.


To create this component you would use the following;

"currency": {
  "petalWorth": 0.0
}

The only property, "petalWorth" is how much the item will be worth when picked up.


Config Options

All config options must be inside the body of;

"pricing": {
  =Config Here=
}

"petalWorth"

Valid options (Float): A positive decimal number.

Default Value: No default value is specified. Always need to provide your own.


This is the amount of money this item will give to you upon picking up.