![]() |
Spell fizzle rate calculation incorrect?
1 Attachment(s)
Hi. I have been playing on project 1999 a few months now. I tend to like casters. Although some people tell me that their fizzle rates have been as they remember back in the day, I disagree. Once I had a real example, I was told that others have noticed.
So, I have a L22 cleric with Wis of 123 that has his alteration at cap for his level. While fighting a mob in LOIO, I attempt to cast a root spell, which is a level 14 spell (eight levels below the current!). I get FIVE FIZZLES IN A ROW. If you want to tell me that you remember that from the old EQ, I will tell you you're lying. I played many casters prior to 2002 on EQ - NEVER had more than three fizzles in a row (in fact, I only remember one of those), and multiple fizzles hardly ever happened on spells that were BELOW my level. I am including a screen shot of the exchange for you. I am now certain that the fizzle rate is incorrectly calculated. Also, within the last few days, another exchange resulted in four fizzles out of eight casts for the expulse undead spell (again a L14 spell casted with my cleric at L21!). I have a shot of that exchange as well, if you want it. Any help in fixing the fizzle rate would be hot! BTW, another issue I have is that the random number generator streaks like mad - this is a good case in point! If I get a chance, I think I will try to dig out the code for the durn thing and do my own testing of its randomness ... Wow - another BTW - you really make it tough to send a screen of what happened with the restrictions you have on attachments :-) ... All in all, despite the glitches, I think you all are doing a marvelous job - thanks for the efforts!! Thanks and regards - Anathuril |
Quote:
|
EQ's RNG has always been streaky as hell. On live there were days where I was untouchable. I'd dodge like crazy, never fizzle, never get a spell interrupted and get a crit every other cast. Then there would be days where nothing went right. A moss snake would interrupt me, mobs would hit for max no matter what and crits basically disappeared. All part of EQs particularly fun RNG!:D
|
Assuming this persons skill was maxxed, there should be a 5% chance on a fizzle on root. What are the mathematical odds of getting 5 fizzles in a row, each having a 5% chance.
Need a math nerd! |
The statistics are what led me to write my initial mail. I was hoping it was the fizzle code ... but ...
I looked at the code. Had a bit of a runaround due to the way some of the structs work, etc., but I think I have a good idea of what is going on with the fizzle code at this point. And, lo and behold, the fizzle coding looks to be correct as far as I can make out. Calculations for my cleric's casting of a root indicated: par_skill = 32 ... (root lev for cleric is 7) : ((7 * 5) - 10) + 7) act_skill = 137 ... (level 22 cleric with max skill on alteration) : (115 + 22) specialize = 0 basediff = 25 ... base difficulty for root diff = neg 79.9 ... (cleric wis 123) : (32 + 25 - 137) - (123 -125)/20 fizzlechance = neg 5.98 adjusted to 1 ... (basefizzle is 10) : (10 - 0 - 15.98) chance of 1 against a roll of 1 to 100 ... To put things in perspective - Coin toss - 5 out of 5 at 50% per trial (heads meaning success) - probability => .03125 (i.e. 1 in 32 sets of 5 tosses) My root fizzles - 5 out of 5 at 1% per trial - probability => .0000000001 (i.e. 1 in 10 billion) My expulse fizzles - 4 out of 9 at assumed 1% per trial - probability => .00000121 (i.e. 1 in 826446) I can get my head around the expulse fizzles - sure *could* happen even with reasonably random numbers. However, the root fizzles are another story. Sure the root fizzles *could* happen, and I am the unluckiest guy around, but combined with the expulse fizzles in a matter of a couple of days causes me to be VERY suspicious of the random number generator, especially since I don't see problems in the fizzle code itself. So, until I have a chance to look at the thing, I guess I'll just have to live with it :-0. Thanks and regards - Anathuril |
Fizzle rate should be capped at a maximum of 95% failure and a minimum of 5% failure. Specialize and the higher of bard dex/cha are the only things that come after the calculation to reduce the rate below 5% failure.
|
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 |
We split off from PEQ's code base over a year and a half ago.
|
Interesting - that probably explains why I can't find a reason for the excessive fizzle rate. I see streaking in the RNG, but the overall distribution of values looks roughly reasonable, and the RNG output is therefore apparently not the source of the high fizzle rate. The fizzle rate has to be a result of a calculation in the fizzle code then, but I don't know precisely what code to look at, so I will leave you to it as you wish.
The probability of a streak of five fizzles, even if the fizzle rate is .05, is .0000003125, or one in 3.2 million. four fizzles out of nine casts comes to about one in .0006426 or one in 1556. Still doesn't make sense. If the real fizzle rate is significantly higher, as I have empirically observed, that could explain the streak of five in a row on the low level spell. Thanks and regards - Anathuril |
Quote:
Seriously though, I have had a large amount of double fizzles on spells 10+ levels below with all skills maxxed. I know that the 5% minimum would be in place at that point. I felt that it was pretty strange seeing double and triple fizzles so often on trvial spells. It has been so bad that I normally spam click every spell I cast and look at the casting bar and stop when it keeps going. The ongoing joke about fizzles in EQ is true, but only for newly gained spells ( 15 skill points, basically 3 lvls, above that new spell should drop it to 5% failure rate ) and for people who do not max out their skills. Im going to start taking some screen shots of my own. RNG being streaky or not, we should all play the lotto if this continues... either that or something strange is going on with the 5% min fail rate. |
All times are GMT -4. The time now is 10:41 AM. |
Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.