Project MMO

Project MMO

10M Downloads

New Perk Attribute: delay

Silvertide7 opened this issue ยท 3 comments

commented

Describe the solution you'd like
Add a delay or something of the sort to a perk. This would allow you to set a delay before that perk is triggered. It potentially also gives the player some control over when they want a perk to activate depending on how the perk is built. It would also be cool if there was a way to decrease the delay based on the level. delay_decrease_per_level. Defaulting to 0 but if set then as you level the perk would trigger faster.

Why is this feature needed
It would add more configurability and balancing to perks. For instance when sprinting it might take you 5 seconds of sprinting before the perk, say temporary move speed or damage buff, is triggered. Then you could make a perk where if you get a running start and run for 5 seconds it adds a ton of damage to the attack or something. This would also pair well with my other feature request of a CROUCHED perk event being triggered. Crouch for 10 seconds and the invisibility effect is added, as well as temporary move speed to increase your crouch walking / sneaking speed for a rogue type player. Or night vision.

Describe alternatives you've considered
None

commented

This will only be possible in 1.19.4 and 1.20 because the reworked version of the perk system can support it. I hope that doesn't invalidate your request.

commented

Nope I'm always going to be using the latest pmmo version for the most part.

commented

So, in the course of implementing this, there are a few technical limitations that prevent this full idea from being possible. First, having a perk activate after a delay when the event is triggered works just fine. In your example above, a speed boost that only kicks in after X seconds has passed works. The technical limitation is that there is no way to check "is player still doing X". Therefore if I crouch for a half second, i will get invisibility shortly after, whether I am still crouched or not. same for the sprint. I'll get a speed boost whether i'm still sprinting or not.

This limitation is similar to the limitation that temp_attributes faces, in that there is no connection between events that creates a concept of continuity.

since i believe your idea was to have perks that a player would "channel/charge" to activate, I'm not sure what I have currently built will meet your intent. Note, however, that a custom perk could implement it's own "is X still true" logic in the conditions attribute, but this would only work for custom implementations as you'd likely pair a specific custom perk with a specific event and it would not be universally useful.