Regen

by Sylphas

Back to Survival Guide.

Sylphas2005-04-13 06:34:20
Anyone know the formula for regen and mercy? I'm putting together a script that outputs health/mana/ego/sip/regen for each race at a specified level, or specified stats, so I don't have to compare manually anymore.
Soll2005-04-13 06:37:00
QUOTE
{(maxhealth * .15) + 100} * (.8 to 1.2)

So for example, someone with 2000 health would sip from-

(2000 * .15 + 100) = 400 * .8 = 320 -> Min

to-

(2000 * .15 + 100) = 400 * 1.2 = 480 -> Max

I think the healing penalty for a Dracnari might accounts for a -.2 to the last number that's multiplied by the sipping constant. So a Dracnari with 2000 health would sip for-

(2000 * .15 + 100) = 400 * .6 = 240 -> Min

to-

(2000 * .15 + 100) = 400 * 1.0 = 400 -> Max


(4755 * .15 + 100) = 813 * .6 = 487
(4755 * .15 + 100) = 813 * 1.0 = 813

QUOTE
2935h, 3256m, 3783e, 10p, 22675en, 19399w elrx- --/07:41:55.235/
You take a drink from a ruby vial.
The potion heals and soothes you.
3552h, 3256m, 3783e, 10p, 22675en, 19399w elrx- --/07:41:55.446/

617

QUOTE
3552h, 3256m, 3783e, 10p, 22675en, 19543w elrx- --/07:42:44.857/
You take a drink from a ruby vial.
The potion heals and soothes you.
4240h, 3256m, 3783e, 10p, 22675en, 19543w elrx- --/07:42:45.077/

688

QUOTE
2556h, 3256m, 3783e, 10p, 22675en, 19747w elrx- --/07:43:51.703/
You take a drink from a ruby vial.
The potion heals and soothes you.
3323h, 3256m, 3783e, 10p, 22675en, 19747w elrx- --/07:43:51.923/

767
Soll2005-04-13 06:45:57

3553h, 3256m, 3783e, 10p, 22675en, 19999w elrx- --/07:45:17.957/

3790h, 3256m, 3783e, 10p, 22675en, 19999w elrx- --/07:45:18.668/


Maxhealth = 4755
Change = 237
Mercy regen = 5%
Terenas2005-04-13 15:22:18
I believe the sipping penalty formula is wrong. It should be something like this.

(2000 * .15 + 100) * (1.2 * .8) = 384
(2000 * .15 + 100) * (.8 * .8) = 256

Where the sipping penalty is applied after the calculated sip by multiplying the max value of 1.2 by .8 and the min value of .8 by another .8.
Sylphas2005-04-13 15:29:10
If you multiply 0.8 by 0.8, though, you actually increase the minimum sip.

EDIT: blink.gif doh.gif blink.gif Really, I can multiply. Just not right now, apparently.
Terenas2005-04-13 15:37:56
QUOTE(Sylphas @ Apr 13 2005, 03:29 PM)
If you multiply 0.8 by 0.8, though, you actually increase the minimum sip.
96512


No? .8 * .8 = .64 which is < .8. That's why it's a sip penalty.
Soll2005-04-13 15:44:00
I was only quoting that from another thread. wink.gif
Terenas2005-04-13 15:52:46
QUOTE(Soll @ Apr 13 2005, 03:44 PM)
I was only quoting that from another thread. wink.gif
96530


Yeah, I think that was mine, it was proven to be wrong though, that's why it was adjusted.
Sylphas2005-04-13 17:13:04
Regen seems to be 2% at level 1, 5% at level 2, and 8% at level 3. Mercy is 5% after that?
Soll2005-04-13 18:15:41
The only regen I had going was Mercy, which was giving a 5% benefit.
Sylphas2005-04-13 18:40:23
I know. I tested Elfen and Faeling racial regen, and stagform and tree totem.
Sylphas2005-04-15 04:57:37
The script I came up with, if anyone wants it.

Syntax:
SHOWSTATS
Sip is the sip penalty/bonus, defaults to 0 if you omit it.

CODE

#ALIAS showStats {display {%ansi( grey)Level%ansi( white) %1%ansi( grey), sip level %ansi( white)%if( %5, %5, 0)} {%ansi( white)@num(%2, 2)%ansi( grey) con: %ansi( white)@calcStat(%1, %2)%ansi( grey) health ~(Sip %ansi( white)%round( @calcSipMin(%1, %2, %5))%ansi( grey)-%ansi( white)%round( @calcSipMax(%1, %2, %5))%ansi( grey), %ansi( white)%round( %eval( (@calcSipMin(%1, %2, %5) + @calcSipMax(%1, %2, %5)) / 2))%ansi( grey) avg~)%crlf%ansi( white)@num(%3, 2)%ansi( grey) int: %ansi( white)@calcStat(%1, %3, %%)%ansi( grey) mana %repeat( " ", 2)~(Sip %ansi( white)%round( @calcSipMin(%1, %3, %5))%ansi( grey)-%ansi( white)%round( @calcSipMax(%1, %3, %5))%ansi( grey), %ansi( white)%round( %eval( (@calcSipMin(%1, %3, %5) + @calcSipMax(%1, %3, %5)) / 2))%ansi( grey) avg~)%crlf%ansi( white)@num(%4, 2)%ansi( grey) cha: %ansi( white)@calcStat(%1, %4, %5)%ansi( grey) ego %repeat( " ", 3)~(Sip %ansi( white)%round( @calcSipMin(%1, %4, %5))%ansi( grey)-%ansi( white)%round( @calcSipMax(%1, %4, %5))%ansi( grey), %ansi( white)%round( %eval( (@calcSipMin(%1, %4, %5) + @calcSipMax(%1, %4, %5)) / 2))%ansi( grey) avg~)} {%ansi( grey)Health Regen: %ansi( white)@calcRegen(@calcStat(%1, %2), 1)%ansi( grey), %ansi( white)@calcRegen(@calcStat(%1, %2), 2)%ansi( grey), %ansi( white)@calcRegen(@calcStat(%1, %2), 3)%ansi( grey) ~(Mercy: %ansi( white)@calcRegen(@calcStat(%1, %2), 2)%ansi( grey)~)%crlf%ansi( grey)%repeat( " ", 2)Mana Regen: %ansi( white)@calcRegen(@calcStat(%1, %3), 1)%ansi( grey), %ansi( white)@calcRegen(@calcStat(%1, %3), 2)%ansi( grey), %ansi( white)@calcRegen(@calcStat(%1, %3), 3)%ansi( grey) ~(Perfection: %ansi( white)@calcRegen(@calcStat(%1, %3), 2)%ansi( grey)~)%crlf%ansi( grey)%repeat( " ", 3)Ego Regen: %ansi( white)@calcRegen(@calcStat(%1, %4), 1)%ansi( grey), %ansi( white)@calcRegen(@calcStat(%1, %4), 2)%ansi( grey), %ansi( white)@calcRegen(@calcStat(%1, %4), 3)%ansi( grey) ~(Beauty: %ansi( white)@calcRegen(@calcStat(%1, %4), 2)%ansi( grey)~)}}
#VAR calcStat {%eval( ( %1 * ((%2 * 3) + 4)) + 300)}
#VAR calcSipMin {%eval( (@calcStat(%1, %2) * 0.15 + 100) * (0.8 * (1.0 + (0.1 * %if( %3, %3, 0)))))}
#VAR calcSipMax {%eval( (@calcStat(%1, %2) * 0.15 + 100) * (1.2 * (1.0 + (0.1 * %if( %3, %3, 0)))))}
#VAR calcRegen {%eval( %1 / %if( %2 = 1, 50, %if( %2 = 2, 20, %if( %2 = 3, 12))))}


EDIT: Bleh, forgot I used a few other things from my Utilities folder. You'll need these too:
CODE

#AL {display} {#SA %crlf@hLine(122);#IF (%1) {#SA %1;#SA @hLine(122)};#IF (%2) {#SA %2;#SA @hLine(122)};#IF (%3) {#SA %3;#SA @hLine(122)}}
#VA {hLine} {%ansi( blue)%repeat( "*", %1)}
Unknown2005-04-15 12:45:25
Wow, nice! smile.gif
Soll2005-04-15 15:49:38
Doesn't seem quite right, I am using it wrong?

QUOTE
showstats 81 16 14 14 -1


Level 81, sip level -1

@num(16, 2) con: 300 health (Sip 116-174, 145 avg)
@num(14, 2) int: 300 mana  (Sip 116-174, 145 avg)
@num(14, 2) cha: 300 ego    (Sip 116-174, 145 avg)

Health Regen: , ,  (Mercy: )
  Mana Regen: , ,  (Perfection: )
  Ego Regen: , ,  (Beauty: )
Sylphas2005-04-15 16:17:22
Hmm, @num is easy to fix, I just forgot it doesn't come with zMUD (it adds leading zeros to force numbers to a certain length).

CODE

#FU num {%if( %len( %1) < %2, %repeat( "0", %eval( %2 - %len( %1)))%1, %if( %len( %1) > %2, %rightback( %1, %2), %1))}


The rest took me a bit to figure out. If you just paste it to the command line, it collapses the functions, because while the class script gives it as #VA, you need to input it with #FU. So try this:

CODE

#ALIAS {showStats} {display {%ansi( grey)Level%ansi( white) %1%ansi( grey), sip level %ansi( white)%if( %5, %5, 0)} {%ansi( white)@num(%2, 2)%ansi( grey) con: %ansi( white)@calcStat(%1, %2)%ansi( grey) health ~(Sip %ansi( white)%round( @calcSipMin(%1, %2, %5))%ansi( grey)-%ansi( white)%round( @calcSipMax(%1, %2, %5))%ansi( grey), %ansi( white)%round( %eval( (@calcSipMin(%1, %2, %5) + @calcSipMax(%1, %2, %5)) / 2))%ansi( grey) avg~)%crlf%ansi( white)@num(%3, 2)%ansi( grey) int: %ansi( white)@calcStat(%1, %3, %%)%ansi( grey) mana %repeat( " ", 2)~(Sip %ansi( white)%round( @calcSipMin(%1, %3, %5))%ansi( grey)-%ansi( white)%round( @calcSipMax(%1, %3, %5))%ansi( grey), %ansi( white)%round( %eval( (@calcSipMin(%1, %3, %5) + @calcSipMax(%1, %3, %5)) / 2))%ansi( grey) avg~)%crlf%ansi( white)@num(%4, 2)%ansi( grey) cha: %ansi( white)@calcStat(%1, %4, %5)%ansi( grey) ego %repeat( " ", 3)~(Sip %ansi( white)%round( @calcSipMin(%1, %4, %5))%ansi( grey)-%ansi( white)%round( @calcSipMax(%1, %4, %5))%ansi( grey), %ansi( white)%round( %eval( (@calcSipMin(%1, %4, %5) + @calcSipMax(%1, %4, %5)) / 2))%ansi( grey) avg~)} {%ansi( grey)Health Regen: %ansi( white)@calcRegen(@calcStat(%1, %2), 1)%ansi( grey), %ansi( white)@calcRegen(@calcStat(%1, %2), 2)%ansi( grey), %ansi( white)@calcRegen(@calcStat(%1, %2), 3)%ansi( grey) ~(Mercy: %ansi( white)@calcRegen(@calcStat(%1, %2), 2)%ansi( grey)~)%crlf%ansi( grey)%repeat( " ", 2)Mana Regen: %ansi( white)@calcRegen(@calcStat(%1, %3), 1)%ansi( grey), %ansi( white)@calcRegen(@calcStat(%1, %3), 2)%ansi( grey), %ansi( white)@calcRegen(@calcStat(%1, %3), 3)%ansi( grey) ~(Perfection: %ansi( white)@calcRegen(@calcStat(%1, %3), 2)%ansi( grey)~)%crlf%ansi( grey)%repeat( " ", 3)Ego Regen: %ansi( white)@calcRegen(@calcStat(%1, %4), 1)%ansi( grey), %ansi( white)@calcRegen(@calcStat(%1, %4), 2)%ansi( grey), %ansi( white)@calcRegen(@calcStat(%1, %4), 3)%ansi( grey) ~(Beauty: %ansi( white)@calcRegen(@calcStat(%1, %4), 2)%ansi( grey)~)}}
#FU calcStat {%eval( ( %1 * ((%2 * 3) + 4)) + 300)}
#FU calcSipMin {%eval( (@calcStat(%1, %2) * 0.15 + 100) * (0.8 * (1.0 + (0.1 * %if( %3, %3, 0)))))}
#FU calcSipMax {%eval( (@calcStat(%1, %2) * 0.15 + 100) * (1.2 * (1.0 + (0.1 * %if( %3, %3, 0)))))}
#FU calcRegen {%eval( %1 / %if( %2 = 1, 50, %if( %2 = 2, 20, %if( %2 = 3, 12))))}


Give that a try. On a blank settings file, pasting that to my command line gave me this:

SHOWSTATS 81 16 16 14 -1
--------------------------------------------------------------------------------------------------------------------------
Level 81, sip level -1
--------------------------------------------------------------------------------------------------------------------------
16 con: 4512 health (Sip 559-839, 699 avg)
14 int: 4026 mana (Sip 507-760, 634 avg)
14 cha: 4026 ego (Sip 507-760, 634 avg)
--------------------------------------------------------------------------------------------------------------------------
Health Regen: 90, 225, 376 (Mercy: 225)
Mana Regen: 80, 201, 335 (Perfection: 201)
Ego Regen: 80, 201, 335 (Beauty: 201)
--------------------------------------------------------------------------------------------------------------------------
Soll2005-04-15 17:11:31
That did it. smile.gif
Soll2005-04-15 17:11:56
Oh mah gawd. I got Transcendant without realising.
Sylphas2005-04-18 04:25:18
New version, takes into account Life blessing and artifact torcs.

Syntax: SHOWSTATS

sip is the sip penalty/bonus.
blessing is non-zero if you have a Life blessing, zero otherwise.
torc is the level of artifact torc you have.

All arguments are optional, and default to zero (although the first 4 are pretty important, and the order has to remain the same).

CODE

#AL {display} {#SA %crlf@hLine(78);#IF (%1) {#SA %1;#SA @hLine(78)};#IF (%2) {#SA %2;  #SA @hLine(78)};#IF (%3) {#SA %3;  #SA @hLine(78)};#IF (%4) {#SA %4;#SA @hLine(78)}}

#FU {calcStat} {%round( %eval( ( ( %1 * ((%2 * 3) + 4)) + 300) * %if( %3 = 0, 1, %eval( 1 + (0.05 * %3)))))}

#FU {calcSipMin} {%round( %eval( (@calcStat(%1, %2, %4) * 0.15 + 100) * (0.8 * (1.0 + (0.1 * %if( %3, %3, 0))))))}

#FU {calcSipMax} {%round( %eval( (@calcStat(%1, %2, %4) * 0.15 + 100) * (1.2 * (1.0 + (0.1 * %if( %3, %3, 0))))))}

#AL {showStats} {display {%ansi( grey)Level%ansi( white) %1%ansi( grey)%if( %5 = 0, , ", sip" %ansi( white)%5)%ansi( grey)%if( %6 = 0, , ", Life blessing")%if( %7 = 0, , ", level "%7" torc")} {%ansi( white)@num(%2, 2)%ansi( grey) con: %ansi( white)@calcStat(%1, %2, %eval(%if(%6 = 0, 0, 2) + %7 ))%ansi( grey) health ~(Sip %ansi( white)@calcSipMin(%1, %2, %5, %eval(%if(%6 = 0, 0, 2) + %7 ))%ansi( grey)-%ansi( white)@calcSipMax(%1, %2, %5, %eval(%if(%6 = 0, 0, 2) + %7 ))%ansi( grey), %ansi( white)%eval( (@calcSipMin(%1, %2, %5, %eval(%if(%6 = 0, 0, 2) + %7 )) + @calcSipMax(%1, %2, %5, %eval(%if(%6 = 0, 0, 2) + %7 ))) / 2)%ansi( grey) avg~)%crlf%ansi( white)@num(%3, 2)%ansi( grey) int: %ansi( white)@calcStat(%1, %3, %7)%ansi( grey) mana %repeat( " ", 2)~(Sip %ansi( white)@calcSipMin(%1, %3, %5, %7)%ansi( grey)-%ansi( white)@calcSipMax(%1, %3, %5, %7)%ansi( grey), %ansi( white)%eval( (@calcSipMin(%1, %3, %5, %7) + @calcSipMax(%1, %3, %5, %7)) / 2)%ansi( grey) avg~)%crlf%ansi( white)@num(%4, 2)%ansi( grey) cha: %ansi( white)@calcStat(%1, %4, %7)%ansi( grey) ego %repeat( " ", 3)~(Sip %ansi( white)@calcSipMin(%1, %4, %5, %7)%ansi( grey)-%ansi( white)@calcSipMax(%1, %4, %5, %7)%ansi( grey), %ansi( white)%eval( (@calcSipMin(%1, %4, %5, %7) + @calcSipMax(%1, %4, %5, %7)) / 2)%ansi( grey) avg~)} {%ansi( grey)Health Regen: %ansi( white)@num(@calcRegen(@calcStat(%1, %2, %eval(%if(%6 = 0, 0, 2) + %7)), 1), 3)%ansi( grey), %ansi( white)@num(@calcRegen(@calcStat(%1, %2, %eval(%if(%6 = 0, 0, 2) + %7)), 2), 3)%ansi( grey), %ansi( white)@num(@calcRegen(@calcStat(%1, %2, %eval(%if(%6 = 0, 0, 2) + %7)), 3), 3)%ansi( grey) ~(Mercy: %ansi( white)@calcRegen(@calcStat(%1, %2, %eval(%if(%6 = 0, 0, 2) + %7)), 2)%ansi( grey)~)%crlf%ansi( grey)%repeat( " ", 2)Mana Regen: %ansi( white)@num(@calcRegen(@calcStat(%1, %3, %7), 1), 3)%ansi( grey), %ansi( white)@num(@calcRegen(@calcStat(%1, %3, %7), 2), 3)%ansi( grey), %ansi( white)@num(@calcRegen(@calcStat(%1, %3, %7), 3), 3)%ansi( grey) ~(Perfection: %ansi( white)@calcRegen(@calcStat(%1, %3, %7), 2)%ansi( grey)~)%crlf%ansi( grey)%repeat( " ", 3)Ego Regen: %ansi( white)@num(@calcRegen(@calcStat(%1, %4, %7), 1), 3)%ansi( grey), %ansi( white)@num(@calcRegen(@calcStat(%1, %4, %7), 2), 3)%ansi( grey), %ansi( white)@num(@calcRegen(@calcStat(%1, %4, %7), 3), 3)%ansi( grey) ~(Beauty: %ansi( white)@calcRegen(@calcStat(%1, %4, %7), 2)%ansi( grey)~)} {%ansi( grey)Sparkleberry: %ansi( white)@num(%round((%eval(@calcStat(%1, %2, %eval(%if(%6 = 0, 0, 2) + %7))) * 0.1)), 3)%ansi( grey) health, %ansi( white)@num(%eval(@calcStat(%1, %3, %7) * 0.1), 3)%ansi( grey) mana}}
Sylphas2005-04-19 04:49:36
Replace the %eval in the very last calculation there (the sparkleberry calculation for mana) with %round, or you get weirdness.
Nayl2005-04-20 08:01:51
Very Nice.
Very Very Nice.
clap_1.gif