melia icon indicating copy to clipboard operation
melia copied to clipboard

Skill SP Costs and Cooldowns

Open Terotrous opened this issue 1 year ago • 3 comments

Many skills have abilities or conditions that affect their SP cost, overheat charges, or overheat time. For example, the Ranger ability Ranger39 reduces the overheat time of the skill by 5 seconds. Currently we don't implement these in any consistent way (and for most skills they aren't implemented at all). Perhaps skill handlers should also have methods to get the SP cost / charges / overheat duration of a skill, which they could simply leave unimplemented for the current behavior?

Terotrous avatar Sep 28 '24 20:09 Terotrous

Do you have information on how officials are handling this by any chance, and where the information is stored? I think we should learn more about the requirements.

exectails avatar Oct 03 '24 19:10 exectails

Taking the example of SP Consumption increase for abilities,

In shared.ipf/script/calc_property_skill.lua the func SCR_Get_SpendSP handles most of the skills, then abilities extra SP requirements get added via local abilAddSP = GetAbilityAddSpendValue(pc, skill.ClassName, "SP");

But there are special functions for certain skills too (in that same file) and what function each skill use is defined in skill.ies

The actual additional SP being spent is a property of ability.ies, CT_AddSpend

kenedos avatar Oct 03 '24 19:10 kenedos

Thanks. That's about what I expected 🤔 That opens up the question of whether we should perhaps use scriptable functions as well. We could still put them into the skill handlers, but we'd also have the freedom to put them into the ability handlers if we wanted to. The advantage would be flexibility and the potential to affect multiple skills at once. Though that might still not fully cut it... I see SCR_Get_SpendSP apply modifiers based on buffs, events, states, and more, in addition to abilities.

Still, scriptable functions might be a good place to start. Adding them to the skill handler classes would technically work perfectly fine as well, we've done that on other projects, but in this environment we'd then have to add additional checks in other spots, spreading the modifiers across different systems.

exectails avatar Oct 03 '24 20:10 exectails