How difficult would it be to implement some sort of function that is called when a stat point is gained? Meditation is suposed to increase whenever a player gains a point of mana and it is also suposed to increase the rate at which the player regenerates.
Currently I understand that it would only be possible to affect the rate gain. Perhaps by calling RecalcVitals() on a player whenever they gain a point of intelligence or meditation, which then checks the regen rate of that stat, which could then be changed to reflect the new skill/stat. But getting Meditation to have a chance to increase whenever a point of mana is regenerated wouldn't be easy. The only way I can think of would be to have some sort of script sitting on the player checking every second and if it notices a change in mana from the time before, award some points.
Is there a way a more elegant solution could be afforded by the core? Something like defining a regen function in vitals.cfg that is called whenever that point is regenerated. This could also help in implementing Focus, which is the same thing except more for strength and stamina (but also affects meditation).
If I'm incorrect in any of this, please let me know.
Method to execute script when vitals are regened
Re: Method to execute script when vitals are regened
I thought that wouldn't be very clean but you know what you're talking about so I'll believe you!tekproxy wrote:The only way I can think of would be to have some sort of script sitting on the player checking every second and if it notices a change in mana from the time before, award some points.
Thanks.