Project 1999

Go Back   Project 1999 > Server Issues > Bugs

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #7  
Old 07-03-2011, 08:18 PM
Anathuril Anathuril is offline
Scrawny Gnoll


Join Date: Apr 2011
Location: New Jersey
Posts: 29
Default

According to the code that I was looking at, fizzle rate is restricted between 1 and 95 just before the random number is pulled and tested. Code I am looking at (comment seems to be in line with code) looks like:

// always at least 1% chance to fail or 5% to succeed
fizzlechance = fizzlechance < 1 ? 1 : (fizzlechance > 95 ? 95 : fizzlechance);
if(IsBardSong(spell_id)) { ... }
float fizzle_roll = MakeRandomFloat(0,100);
...
if(fizzle_roll > fizzlechance) return(true);
return false;

If you expect a minimum 5% fizzle rate, the code I am looking at is not doing it.
Am I looking at the wrong code? ./zone/spells.cpp

Also, I had some free time today, and put together a simple test program, imported the random number generator directly from the google archive (from a couple months ago), ./common/MiscFunctions.cpp, and ran some tests of my own. In sample sizes of 100,000 random numbers, I am consistently getting strings of 3 *equal* results at a rate of roughly 10 instances per run. The probability of 3 hits of the same number (out of a space of 100) in a row is roughly one in a million, but I get roughly one in ten thousand from this RNG. Duplicates are coming in at a rate of about 1,000 per run of 100,000, and I calculate probability of consecutive duplicates at one in 10,000.

Probably won't get a chance to nail down whether this is inherent in the algorithm for a while ... have a happy 4th if you are a US type :-).

Thanks and regards -
Anathuril
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:16 PM.


Everquest is a registered trademark of Daybreak Game Company LLC.
Project 1999 is not associated or affiliated in any way with Daybreak Game Company LLC.
Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.