Re: Remember the Saving Throw table formulas?

shirak@CANADA.COM
Date: 11/05/98


>I've finally been playing around with the saving throw tables provided by:
>
>From: Edward J Glamkowski <eglamkowski@ANGELFIRE.COM>
>From: Rob Baumstark <shirak@CONNECT.AB.CA>
>
>and comparing it against the stock code.  Not too similiar in some cases it

>appears.  So I've placed my comparison package (I use the term loosely) in

>my web space for them (or others) to test, tweak, etc.

My testing at home when I first did it seemed much closer than the results I
got with that download.  Hmm..., perhaps GNU C and MS VC++ do math differently...


>Note: In Rob's version I had to invert the sign of '(-level)' in his
>formula or the saving throw values went the wrong way and had to force the

>'max_level' calculation because it's not really required and messed up the

>30th level in testing.

Well..., there was definatly a bug in my calculation..., but that wasn't quite
it.  2 changes to make make the formula give very close results to Edward's.


1)  Since you hard-coded top-level in there anyways, you can take out all the
top level calculations, and hard-code it to be 30, imms don't need saving throws.

2)  Change the formula to this:

return (int)((-(high_val - low_val) / ((float)(top_level-1))) * (level - 1)
+ high_val);

Perhaps a bit more tweaking, and I can get it perfect.

(to save you the test, results with this are 860 total, and 353 wc thing)

Also..., if that function would round to nearest int instead of just dropping
the decimal (I have no help files, and can't remember function name), most of
the results of -1 (probably 100 or so) would be perfect.

Rob Baumstark.
shirak@canada.com
----------
Sorry..., no good sig.  Damn I hate having to use web-mail.
(also, sorry if stupid web-mail doesn't word-wrap properly)


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST