Regen code rewriting need tester and feedback

If you want to help us or give some corrections / codes, put it here ;)

Moderators: osRose dev team, ospRose dev team, osiRose dev team, Moderators

Re: Regen code rewriting need tester and feedback

Postby lmame on Tue Nov 02, 2010 9:43 pm

Food is handled in ::PlayerHeal, not in regeneration.
I changed the way it worked a rev or two ago so it's normal it's working better.
The world is full of love and peace ^_^
Image
User avatar
lmame
Admin
Admin
 
Posts: 8997
Joined: Mon Aug 06, 2007 4:42 pm
Location: July City

Re: Regen code rewriting need tester and feedback

Postby Planetary_Myth on Wed Nov 03, 2010 1:49 am

Note: Tested and everything works proper now.
Found a piece of code I had wrong that was giving full mp when hp was full.
Updated fix in first post.

Fix was the code in blue.
This code is at the end of the mp section.

  1.            if (Stats->HP < Stats->MaxHP || Stats->HP < Stats->MaxHP)
  2.                 lastRegenTime_mp = clock();
  3.                 //Log(MSG_INFO,"RegResetMP %i",lastRegenTime_mp,clock();

Change to:
  1.            if (Stats->HP < Stats->MaxHP || Stats->HP >= Stats->MaxHP)
  2.                 lastRegenTime_mp = clock();
  3.                 //Log(MSG_INFO,"RegResetMP %i",lastRegenTime_mp,clock();
Planetary_Myth
Smoulie
Smoulie
 
Posts: 49
Joined: Sun Apr 18, 2010 2:50 pm

Re: Regen code rewriting need tester and feedback

Postby amaedict on Mon Nov 08, 2010 3:47 pm

there is still some tweaking needed in this code.

regeneration is VERY slow while sitting, and it should be faster than normal while sitting.

if you can fix that then you will have yoursel;f a kickass regen system ;)
We Have it all ... Image
Image
User avatar
amaedict
Clown
Clown
 
Posts: 531
Joined: Thu Apr 23, 2009 2:44 pm

Re: Regen code rewriting need tester and feedback

Postby Planetary_Myth on Mon Nov 08, 2010 8:47 pm

In short change "nb_sec_stance" other one not listed is for standing.

  1. 19.     if(Fairy)
  2. 20.     {
  3. 21.     nb_sec_stance= 8;  <--- seconds to wait to heal with a fairy
  4.  
  5. 26.     if (Status->Stance==1)
  6. 27.     {
  7. 28.     nb_sec_stance= 5;  <--- seconds to wait to heal sitting.
Planetary_Myth
Smoulie
Smoulie
 
Posts: 49
Joined: Sun Apr 18, 2010 2:50 pm

Re: Regen code rewriting need tester and feedback

Postby lmame on Sat Nov 13, 2010 12:31 pm

When I did the tests on naRose, you had some hp/mp "boost" each 3 seconds when you sitted or had a fairy, perhaps they changed that.

Anyway, I added your code to dev rev II-304, thanks for sharing ;)
The world is full of love and peace ^_^
Image
User avatar
lmame
Admin
Admin
 
Posts: 8997
Joined: Mon Aug 06, 2007 4:42 pm
Location: July City

Re: Regen code rewriting need tester and feedback

Postby Planetary_Myth on Sun Nov 14, 2010 6:53 pm

Thank you lmame and I could be wrong on the seconds so if you get a different answer than by all means change the code as you see fit. :D
Planetary_Myth
Smoulie
Smoulie
 
Posts: 49
Joined: Sun Apr 18, 2010 2:50 pm

Previous

Return to Submit Code

Who is online

Users browsing this forum: No registered users and 4 guests