Placeholders and math in % chance activation

Summary

I think it would be beneficial to use variables, placeholders, and math in the % chance portion of skills, like so:

  • skill{s=skill1} @self ~onTimer:20 0.1

but instead of 0.1 it would be

  • skill{s=skill1} @self ~onTimer:20 <random.float.0.1to0.3>

or something along the lines of

  • skill{s=skill1} @self ~onTimer:20 <target.level>/100

Value

Being able to have a fluid or addressable % chance of a skill triggering instead of a rigid hard-defined one allows for more enemy and skill customization. For example, a user could change a variable based on a set of conditions and those conditions could effect the % chance of a skill triggering. Maybe a skill is more common if the mob is on fire, or it's daytime, or whatever. Alternatively, for skill uses in MMO plugins, you can set a % chance that scales based off of a player's stat value. I was hoping to use this feature in a redesign of MMOItems elemental effects, where the % chance of an elemental effect scales inversely with the player's attack speed.

1/<stat.attack_speed>

This would be a 100% chance of happening if the attack speed is any slower than 1 (like most axes) and a less than 100% chance of triggering if the attack speed is faster than 1 (like all swords and daggers).

I am aware I can do this by setting internal variables with <random.1to100> and testing which is larger, but I think my suggestion would be a less resource intense way to accomplish the same thing.

Edited Jun 09, 2022 by dandyjay
Assignee Loading
Time tracking Loading