Difference between revisions of "Consumable Component"
DeamonHunter (Talk | contribs) m (Small grammar issue.) |
DeamonHunter (Talk | contribs) (Updated drinkable component page to consumable component.) |
||
(2 intermediate revisions by the same user not shown) | |||
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 | + | On this page, we go over the Consumable Component, signified by the following; |
<pre> | <pre> | ||
− | " | + | "consumable": { |
=Content= | =Content= | ||
} | } | ||
</pre> | </pre> | ||
− | + | Consumable Components are specifically used alongside [[Craft Items]] that have been made a [[Craft Items#Creating a Food/Drink Item|Food or Drink]]. This is used to specify the extra little things that go into making a food/drink. | |
= When and How to use = | = When and How to use = | ||
− | + | Consumable components are only used when a [[Craft Items]] is a [[Craft Items#Creating a Food/Drink Item|Drink]]. It helps specify the visual particles that happen when drinking. | |
To create this component you would use the following; | To create this component you would use the following; | ||
<pre> | <pre> | ||
− | " | + | "consumable": { |
"colour": "FFF3D377", | "colour": "FFF3D377", | ||
− | " | + | "particles": "staxel.particle.item.Drink", |
+ | "sound": "" | ||
}, | }, | ||
</pre> | </pre> | ||
− | There are only | + | There are only three properties. The first is the [[#"colour"]] value of the particles. This is an ARGB colour (That is Alpha, Red, Green, Blue) specified in hexadecimal. The second is the [[#"particles"]], which points to [[Particles|Particle System Code]]. The third is the [[#"sound"]], which points to [[Sound|Sound Code]]. |
− | + | These are all used immediately after eating/drinking the item. | |
Line 31: | Line 32: | ||
All config options must be inside the body of; | All config options must be inside the body of; | ||
<pre> | <pre> | ||
− | " | + | "consumable": { |
=Config Here= | =Config Here= | ||
} | } | ||
Line 37: | Line 38: | ||
== "colour" == | == "colour" == | ||
− | '''Valid options ( | + | '''Valid options ([[Modding_Key_Terms#Colour|Colour]]): <code>A string that is formatted to be in ARGB or RGB colour (Alpha, Red, Green, Blue in the format AARRGGBB in hexadecimal)</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 45: | Line 46: | ||
− | == " | + | == "particles" == |
− | '''Valid options (String): <code>A string containing the code to a [[Particles|Particle]] spawner.</code>''' | + | '''Valid options ([[Modding_Key_Terms#String|String]]): <code>A string containing the code to a [[Particles|Particle]] spawner.</code>''' |
− | '''Default Value:''' | + | '''Default Value:''' If not specified, will not play particles. |
− | This is the particle spawner that will be used to create the particles while drinking. | + | This is the particle spawner that will be used to create the particles while eating/drinking. |
+ | |||
+ | |||
+ | == "sound" == | ||
+ | '''Valid options ([[Modding_Key_Terms#String|String]]): <code>A string containing the code to a [[Sound]].</code>''' | ||
+ | |||
+ | '''Default Value:''' If not specified, will not play sound. | ||
+ | |||
+ | |||
+ | This is the sound that will play while eating/drinking. |
Latest revision as of 04:26, 5 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 Consumable Component, signified by the following;
"consumable": { =Content= }
Consumable Components are specifically used alongside Craft Items that have been made a Food or Drink. This is used to specify the extra little things that go into making a food/drink.
When and How to use
Consumable components are only used when a Craft Items is a Drink. It helps specify the visual particles that happen when drinking.
To create this component you would use the following;
"consumable": { "colour": "FFF3D377", "particles": "staxel.particle.item.Drink", "sound": "" },
There are only three properties. The first is the #"colour" value of the particles. This is an ARGB colour (That is Alpha, Red, Green, Blue) specified in hexadecimal. The second is the #"particles", which points to Particle System Code. The third is the #"sound", which points to Sound Code.
These are all used immediately after eating/drinking the item.
Config Options
All config options must be inside the body of;
"consumable": { =Config Here= }
"colour"
Valid options (Colour): A string that is formatted to be in ARGB or RGB colour (Alpha, Red, Green, Blue in the format AARRGGBB in hexadecimal)
Default Value: No default value is specified. Always need to provide your own.
This is the colour that particles will spawn with. (Before colour variance)
"particles"
Valid options (String): A string containing the code to a Particle spawner.
Default Value: If not specified, will not play particles.
This is the particle spawner that will be used to create the particles while eating/drinking.
"sound"
Valid options (String): A string containing the code to a Sound.
Default Value: If not specified, will not play sound.
This is the sound that will play while eating/drinking.