Page 1 of 1
Stats Regen Rate...
Posted: Fri Sep 05, 2014 6:31 am
by Harley
Tell me please, how can I speed up regen rate separately stats?
I have regen.src
Code: Select all
exported function GetLifeRegenRateExported(mob)
var rate := GetObjProperty(mob, CPROP_NAME_PREFIX_REGEN_RATE + VITALID_LIFE);
if (rate != error)
return Cint(rate);
/*
rate := Cint(rate);
if(rate != error)
return rate;
endif
*/
endif
return 1200;
endfunction
end etc.. functions.
When I change return 1200; to return 600; or toreturn 6000;
Nothing happened. My stat (gm & non-gm) growing 1 in 5 seconds.
Who know that system? With best regards!
Re: Stats Regen Rate...
Posted: Fri Sep 05, 2014 7:32 am
by Austin
If you are changing the return value of function GetLifeRegenRateExported(mob) in your script then you would have to restart POL because it is an exported function.
Exported functions get cached in a special way to make them run extremely fast.
If you want to change the regeneration rates without restarting POL you need to set a base rate, then a custom property system that modifies on that.
Simple Example:
Code: Select all
exported function GetHitsRegenRate(mobile)
var base_regen := 1200;
return base_regen + CInt(GetObjProperty(mobile, "HitsRegenerationMod"));
endfunction
After you change your regeneration modifying cprop you need to call the RecalcVitals() function in vitals.em (099)
Here was my approach to it years ago
Attributes package:
http://sourceforge.net/p/mytharria/code ... ttributes/
Files specifically of interest:
http://sourceforge.net/p/mytharria/code ... vitals.cfg (core file to set vitals up)
http://sourceforge.net/p/mytharria/code ... ttings.cfg (regen elem)
http://sourceforge.net/p/mytharria/code ... alInit.src (virtal hook)
http://sourceforge.net/p/mytharria/code ... /regen.inc (additional regen utility functions)
Re: Stats Regen Rate...
Posted: Fri Sep 05, 2014 2:18 pm
by Harley
Austin, thank u for ur answer!
Yes, I restarted my server, but nothing happened! That's why I'm interested in, where & what have I change...
All that u uploaded, I have used..
With best regards!
Re: Stats Regen Rate...
Posted: Fri Sep 05, 2014 8:02 pm
by Austin
The usual is 1200. Try setting it to something more extreme like 4000.
Re: Stats Regen Rate...
Posted: Sat Sep 06, 2014 6:11 am
by Harley
I got one! There is in my script:
Code: Select all
var rate := GetObjProperty(mob, CPROP_NAME_PREFIX_REGEN_RATE + VITALID_LIFE);
if (rate != error)
return Cint(rate);
So, when I have changed return 1200; in the end of the code, nothing happened! But when I changed code in thoose example, I have stat (health) regeneration (I have added return Cint(6000);) 6 points per 5 seconds!
Now my question is - where can I change time of stats regeneration?
With best regards!
Re: Stats Regen Rate...
Posted: Sun Sep 07, 2014 5:02 am
by Yukiko
Tell me please, how can I speed up regen rate separately stats?
Now my question is - where can I change time of stats regeneration?
There is a setting in ..\pkg\systems\attributes\config\settings.cfg called GainSpeed. Maybe that is what you are looking for. It is referenced in two functions in the file ..\pkg\systems\attributes\include\advanceCheck.inc
It looks like this setting is applied to skills and vitals universally without regard for each stat or skill.
If this is the setting you are looking for then it doesn't look like it can be set to a different rate per each stat as the scripts are currently written. Which is what I gather you want to do.