Difference between revisions of "Fishing 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 Fishing component, signified by the following;
+
On this page, we go over the Fishing Component, signified by the following;
 
<pre>
 
<pre>
 
"fishing": {
 
"fishing": {
Line 8: Line 8:
 
}
 
}
 
</pre>
 
</pre>
Fishing components are mostly used in conjunction with [[Fishing Rod Items]]. They are used to specify a number of customisable things about fishing, including models and effects.
+
Fishing Components are mostly used in conjunction with [[Fishing Rod Items]]. They are used to specify a number of customisable things about fishing, including models and effects.
  
  
 
= When and How to use =
 
= When and How to use =
Fishing components should be used whenever you want to make a [[Fishing Rod Items]]. This is it's only use, and all Fishing Rod Items are forced to include this component.
+
Fishing Components should be used whenever you want to make a [[Fishing Rod Items]]. This is it's only use, and all Fishing Rod Items are forced to include this component.
  
 
This component has no necessary parts so the following is completely valid;
 
This component has no necessary parts so the following is completely valid;
Line 55: Line 55:
  
 
== "castDistance" ==
 
== "castDistance" ==
'''Valid options (Double): <code>A positive decimal value.</code>'''
+
'''Valid options ([[Modding_Key_Terms#Double|Double]]): <code>A positive decimal value.</code>'''
  
'''Default Value:''' 7.0 tiles.
+
'''Default Value:''' If not specified, will default to 7 tiles.
  
 
This is the distance at which you can use the fishing rod.
 
This is the distance at which you can use the fishing rod.
Line 63: Line 63:
  
 
== "castEffect" ==
 
== "castEffect" ==
'''Valid options (String): <code>A string that points to the code of a [[Particles|Particle]]</code>'''
+
'''Valid options ([[Modding_Key_Terms#String|String]]): <code>A string that points to the code of a [[Particles|Particle]].</code>'''
  
'''Default Value:''' "". No cast effect if not specified.
+
'''Default Value:''' If not specified, will not have any cast particles.
  
  
Line 72: Line 72:
  
 
== "castSoundGroup" ==
 
== "castSoundGroup" ==
'''Valid options (String): <code>A string that points to the code of a [[Sound]]</code>'''
+
'''Valid options ([[Modding_Key_Terms#String|String]]): <code>A string that points to the code of a [[Sound]].</code>'''
  
'''Default Value:''' "". No cast sound if not specified.
+
'''Default Value:''' If not specified, will not play a sound when casting.
  
  
Line 81: Line 81:
  
 
== "catchEffect" ==
 
== "catchEffect" ==
'''Valid options (String): <code>A string that points to the code of a [[Particles|Particle]]</code>'''
+
'''Valid options ([[Modding_Key_Terms#String|String]]): <code>A string that points to the code of a [[Particles|Particle]].</code>'''
  
'''Default Value:''' "". No catch effect if not specified.
+
'''Default Value:''' If not specified, will not play an particles while catching a fish.
  
  
Line 90: Line 90:
  
 
== "catchSoundGroup" ==
 
== "catchSoundGroup" ==
'''Valid options (String): <code>A string that points to the code of a [[Sound]]</code>'''
+
'''Valid options ([[Modding_Key_Terms#String|String]]): <code>A string that points to the code of a [[Sound]].</code>'''
  
'''Default Value:''' "". No catch sound if not specified.
+
'''Default Value:''' If not specified, will not play a sound when catching a fish.
  
  
Line 99: Line 99:
  
 
== "indicator" ==
 
== "indicator" ==
'''Valid options (String): <code>A string that contains the path to the indicator.</code>'''
+
'''Valid options ([[Modding_Key_Terms#String|String]]): <code>A string that contains the path to the indicator.</code>'''
  
'''Default Value:''' "". No model for the bobber, if not specified.
+
'''Default Value:''' If not specified, will not show an indicator.
  
  
Line 108: Line 108:
  
 
== "minWaitSeconds" ==
 
== "minWaitSeconds" ==
'''Valid options (Int): <code>A positive integer number.</code>'''
+
'''Valid options ([[Modding_Key_Terms#Integer|Integer]]): <code>A positive integer number.</code>'''
  
'''Default Value:''' 1 second.
+
'''Default Value:''' If not specified, will default to 1.
  
  
Line 117: Line 117:
  
 
== "maxWaitSeconds" ==
 
== "maxWaitSeconds" ==
'''Valid options (Int): <code>A positive integer number.</code>'''
+
'''Valid options ([[Modding_Key_Terms#Integer|Integer]]): <code>A positive integer number.</code>'''
  
'''Default Value:''' 15 second.
+
'''Default Value:''' If not specified, will default to 15.
  
  
Line 126: Line 126:
  
 
== "reelEffect" ==
 
== "reelEffect" ==
'''Valid options (String): <code>A string that points to the code of a [[Particles|Particle]]</code>'''
+
'''Valid options ([[Modding_Key_Terms#String|String]]): <code>A string that points to the code of a [[Particles|Particle]].</code>'''
  
'''Default Value:''' "". No reel effect if not specified.
+
'''Default Value:''' If not specified, will not play any particles while reeling.
  
  
Line 135: Line 135:
  
 
== "reelSoundGroup" ==
 
== "reelSoundGroup" ==
'''Valid options (String): <code>A string that points to the code of a [[Sound]]</code>'''
+
'''Valid options ([[Modding_Key_Terms#String|String]]): <code>A string that points to the code of a [[Sound]]</code>'''
  
'''Default Value:''' "". No reel sound if not specified.
+
'''Default Value:''' If not specified, will not play any sounds while reeling.
  
  
Line 144: Line 144:
  
 
== "successTranslations" ==
 
== "successTranslations" ==
'''Valid options (List of Strings): <code>A list of strings to be used for [[Translations]]</code>'''
+
'''Valid options ([[Modding_Key_Terms#List|List]] of [[Modding_Key_Terms#String|Strings]]): <code>A list of strings to be used for [[Translations]]</code>'''
  
'''Default Value:''' Can be omitted.
+
'''Default Value:''' If not specified, will not display any success notifications.
  
  
 
This is a list of strings that can be used to add text to the catch notification.
 
This is a list of strings that can be used to add text to the catch notification.

Revision as of 00:25, 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 Fishing Component, signified by the following;

"fishing": {
  =Content=
}

Fishing Components are mostly used in conjunction with Fishing Rod Items. They are used to specify a number of customisable things about fishing, including models and effects.


When and How to use

Fishing Components should be used whenever you want to make a Fishing Rod Items. This is it's only use, and all Fishing Rod Items are forced to include this component.

This component has no necessary parts so the following is completely valid;

"fishing": {},

This would leave all values at their default. You will still need this part, as it will not specify default values for this component.

To get actual use out of this component, you can use the following;

"fishing": {
  "castEffect": "staxel.particle.fishing.RodPull",
  "castSoundGroup": "staxel.sounds.place.Water",
  "reelEffect": "staxel.particle.fishing.RodCatching",
  "reelSoundGroup": "staxel.sounds.place.Water",
  "catchEffect": "staxel.particle.fishing.RodPull",
  "catchSoundGroup": "staxel.sounds.place.Water",
  "indicator": "staxel/item/gatherables/RodBobber.qb",
  "castDistance": 10.0,
  "minWaitSeconds": 1,
  "maxWaitSeconds": 10,
  "successTranslations": [
    "fishing.success1",
    "fishing.success2",
    "fishing.success3"
  ]
},

This specifies a lot more options than the original property. First of all "castEffect", "reelEffect" and "catchEffect" all point Particle codes which will play the particle at a certain time (i.e. When casting the rod, Reeling the rod to catch fish and Catching fish respectively.). Secondly "castSoundGroup", "reelSoundGroup" and "catchSoundGroup" all point to Sound codes which play at the same time as the particles. The "indicator" property specifies what model the bobber will be. "castDistance" will specify how far you can aim into water. "minWaitSeconds" and "maxWaitSeconds" specify how much time can be spent waiting for a fish. And finally "successTranslations" is a list of Translation Codes which will be used to select the text for the notification.

With that, you have a fully customised fishing rod.


Config Options

All config options must be inside the body of;

"fishing": {
  =Config Here=
}

"castDistance"

Valid options (Double): A positive decimal value.

Default Value: If not specified, will default to 7 tiles.

This is the distance at which you can use the fishing rod.


"castEffect"

Valid options (String): A string that points to the code of a Particle.

Default Value: If not specified, will not have any cast particles.


This is the particles it will play while casting the rod.


"castSoundGroup"

Valid options (String): A string that points to the code of a Sound.

Default Value: If not specified, will not play a sound when casting.


This is the sound it will play while casting the rod.


"catchEffect"

Valid options (String): A string that points to the code of a Particle.

Default Value: If not specified, will not play an particles while catching a fish.


This is the particles it will play while catching a fish.


"catchSoundGroup"

Valid options (String): A string that points to the code of a Sound.

Default Value: If not specified, will not play a sound when catching a fish.


This is the sound it will play while catching a fish.


"indicator"

Valid options (String): A string that contains the path to the indicator.

Default Value: If not specified, will not show an indicator.


This is the model it will use to float in the water (i.e. The bobber).


"minWaitSeconds"

Valid options (Integer): A positive integer number.

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


This is the minimum amount of time, in seconds, that the player needs to get to be able to get a fish.


"maxWaitSeconds"

Valid options (Integer): A positive integer number.

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


This is the maximum amount of time, in seconds, that the player needs to get to be able to get a fish.


"reelEffect"

Valid options (String): A string that points to the code of a Particle.

Default Value: If not specified, will not play any particles while reeling.


This is the particles it will play while reeling.


"reelSoundGroup"

Valid options (String): A string that points to the code of a Sound

Default Value: If not specified, will not play any sounds while reeling.


This is the sound it will play while reeling.


"successTranslations"

Valid options (List of Strings): A list of strings to be used for Translations

Default Value: If not specified, will not display any success notifications.


This is a list of strings that can be used to add text to the catch notification.