Difference between revisions of "Fishing Rod Items"

From wiki
Jump to: navigation, search
(Initial commit.)
 
m (Oops.)
 
(3 intermediate revisions by the same user not shown)
Line 9: Line 9:
 
</pre>
 
</pre>
  
And also must include a [[Fishing Component]] in order to actually do anything.
+
These items must also include a [[Fishing Component]] in order to work. Fishing Rod items have the ability to fish on any water block.
 
+
Fishing Rods actually act as normal [[Craft Items]] but have the ability to interact with a block that allows fishing. Most of the information required is kept in the component listed below.
+
  
  
 
= Creating a Fishing Rod Item =
 
= Creating a Fishing Rod Item =
Fishing Rods are created in much the same way as [[Craft Items]]. In fact you should follow the guide, [[Craft Items#Creating a Craft Item]], until you finish all of the steps there.
+
Fishing Rods are created in much the same way as [[Craft Items]]. In fact you should follow the guide, [[Items#How to Make a Normal Item]], until you finish all of the steps there.
  
Once you have gone through that guide, there are two more steps you will need to do. First, change the "kind" from "staxel.item.CraftItem" to "staxel.item.Rod". Secondly add the following to the end of the file;
+
Once you have gone through that guide, there are two more steps you will need to do. The first step is to change the "kind" from "staxel.item.CraftItem" to "staxel.item.Rod".  
 +
 
 +
The second step depends on what you are using to create items.
 +
 
 +
 
 +
== Asset Manager ==
 +
Navigate to the item you had created before. Head to the components property and click on the <code>[...]</code>. When the new window pops up, click on "Add" and select "fishing".
 +
 
 +
 
 +
Once that is done, the Asset Manager should have selected your new component. Check out the multiple properties and change them to suit your needs. A couple of these properties will have drop down arrows which allow you to select [[Effect|Effects]] and [[Sound|Sounds]].
 +
 
 +
 
 +
When you are done, close the window by clicking "OK". Save the asset and continue to "Build and Validate Assets" like the normal item tutorial.
 +
 
 +
 
 +
== Text Files ==
 +
The second step is to add the following to the end of the item file created;
 
<pre>
 
<pre>
 
"fishing" {
 
"fishing" {
Line 35: Line 49:
 
}
 
}
 
</pre>
 
</pre>
Most of these properties are just for customising how fishing will look. "castEffect" is the [[Effects|Effect]] it will play while casting. "castSoundGroup" is the [[Sounds]] it will play when casting. "reelEffect" is the [[Effects|Effect]] it will play while reeling. "reelSoundGroup" is the [[Sounds]] it will play when reeling. "catchEffect" is the [[Effects|Effect]] it will play while catching a fish. "catchSoundGroup" is the [[Sounds]] it will play when catching a fish. "indicator" is a model which will act as the floating bobber. "castDistance" is the maximum distance in which you can cast. And finally "successTranslations" is a list of strings which point to [[Translation]] codes to show when you have caught a fish.
+
 
 +
Most of these properties are just for customising how fishing will look. "castEffect" is the [[Effect]] it will play while casting. "castSoundGroup" is the [[Sound]] it will play when casting. "reelEffect" is the [[Effect]] it will play while reeling. "reelSoundGroup" is the [[Sound]] it will play when reeling. "catchEffect" is the [[Effect]] it will play while catching a fish. "catchSoundGroup" is the [[Sound]] it will play when catching a fish. "indicator" is a model which will act as the floating bobber. "castDistance" is the maximum distance in which you can cast. And finally "successTranslations" is a list of strings which point to [[Translation]] codes to show when you have caught a fish.
 +
 
 +
 
 +
After you finished editing the values, rerun <code>Content Builder</code> and you are good to go.
  
  
 
= Spawning in a Fishing Rod Item =
 
= Spawning in a Fishing Rod Item =
Follow the guide at [[Craft Items#Spawning in a Craft Item]]. When that guide mentions "kind", make sure to use "staxel.item.Rod" instead of "staxel.item.CraftItem" else you won't be able to spawn the item.
+
Follow the guide at [[Items#How to Spawn an Item]]. When that guide mentions "kind", make sure to use "staxel.item.Rod" instead of "staxel.item.CraftItem" else you won't be able to spawn the item.
  
  
 
= Config Options =
 
= Config Options =
The list of basic properties is included at [[Craft Items#Config Options]].  
+
The list of basic properties is included at [[Items#Config Options]].  
  
All additional information being included at [[Fishing Component#Config Options]].
+
This item does need additional information. This additional information is contained in a [[Fishing Component]] which needs to be added along with the item file.

Latest revision as of 06:41, 12 December 2017

Items are fairly broad in their types. Each type has it's own properties and uses.

This page is for items that allow you to fish

Fishing Rod Items are all items that have the following line;

"kind": "staxel.item.Rod",

These items must also include a Fishing Component in order to work. Fishing Rod items have the ability to fish on any water block.


Creating a Fishing Rod Item

Fishing Rods are created in much the same way as Craft Items. In fact you should follow the guide, Items#How to Make a Normal Item, until you finish all of the steps there.

Once you have gone through that guide, there are two more steps you will need to do. The first step is to change the "kind" from "staxel.item.CraftItem" to "staxel.item.Rod".

The second step depends on what you are using to create items.


Asset Manager

Navigate to the item you had created before. Head to the components property and click on the [...]. When the new window pops up, click on "Add" and select "fishing".


Once that is done, the Asset Manager should have selected your new component. Check out the multiple properties and change them to suit your needs. A couple of these properties will have drop down arrows which allow you to select Effects and Sounds.


When you are done, close the window by clicking "OK". Save the asset and continue to "Build and Validate Assets" like the normal item tutorial.


Text Files

The second step is to add the following to the end of the item file created;

"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,
  "successTranslations": [
    "fishing.success1",
    "fishing.success2",
    "fishing.success3"
  ]
}

Most of these properties are just for customising how fishing will look. "castEffect" is the Effect it will play while casting. "castSoundGroup" is the Sound it will play when casting. "reelEffect" is the Effect it will play while reeling. "reelSoundGroup" is the Sound it will play when reeling. "catchEffect" is the Effect it will play while catching a fish. "catchSoundGroup" is the Sound it will play when catching a fish. "indicator" is a model which will act as the floating bobber. "castDistance" is the maximum distance in which you can cast. And finally "successTranslations" is a list of strings which point to Translation codes to show when you have caught a fish.


After you finished editing the values, rerun Content Builder and you are good to go.


Spawning in a Fishing Rod Item

Follow the guide at Items#How to Spawn an Item. When that guide mentions "kind", make sure to use "staxel.item.Rod" instead of "staxel.item.CraftItem" else you won't be able to spawn the item.


Config Options

The list of basic properties is included at Items#Config Options.

This item does need additional information. This additional information is contained in a Fishing Component which needs to be added along with the item file.