new weapon type (like a fishing rod)

trimblen

New member
Hello, everybody! How can I create a new weapon type with UFPS? I found only a bow type that's a little bit something like I want. Do you have any tutorials (weapon type, animator tutorials)? Thanks!
 
All the tutorials we have can be found here:

We don't really have any tutorials on creating any kind of item. But you can pretty much do anything with the item action modules.
The most versatile weapon type is Magic.
I do remember someone mentioning how they were able to make a fishing rod using the magic item modules.

The animator setup is tightly related to the Trigger module and the itemAction type. Things like Charge trigger can require a different state transition compared to a Simple Trigger.

Here you'll find the documentation for the Magic item, look at the flow chart. It should help you understand each step of the magic item use life cycle.

If you think you can't implement your rod using the magic item (for example you have many states each with different input).
Then you'll need to make your own custom UsableItemAction
You can have a look at the other ItemActions for reference. And you can make use of the ModuleGroups for effects, etc.. if you want to

Or you can take a completely different approach and have a custom CharacterAbility or ItemAbility that activates only when fishing rod is active (This can be done with a state)

I hope that points you in the right direction
 
For this and the following (during and after casting your line + catching the fish, reeling it in etc) I would definitely be going with making an ability. You could have the ability equip the rod, or have the rod being active, start the ability. Personally I would have the ability do all the work. Utilising equip unequip functionality within the ability and handling all the in betweens inside the ability also.
 
I have some ideas but @Sangemdoko is the brains behind the new item system so I'll see if he can give any suggestions.
For this and the following (during and after casting your line + catching the fish, reeling it in etc) I would definitely be going with making an ability. You could have the ability equip the rod, or have the rod being active, start the ability. Personally I would have the ability do all the work. Utilising equip unequip functionality within the ability and handling all the in betweens inside the ability also.
Also can I add some custom animation value like default ones? For example, just copying knife logics?
 
Sure can. Utilize the override AbilityIntData. Call UpdateAbilityAnimatorParameters when you change the value. You could also utilize SetAbilityFloatDataParameter to drive the movement animation of the fishing rod.
 
Top