I made a streak calculator:
https://drive.google.com/file/d/18gz...usp=drive_link - minified
https://drive.google.com/file/d/1eT1...usp=drive_link - unminified
You can copy the code into
https://playcode.io/javascript and run it. The results will display in the "console" window. In the "web view" window there is a green play button you can use to run the calculation again. I'd suggest using the minified version, as playcode.io starts to ask for money if the line count is greater than 8.
If you take a look here, this is the minimum chance for a charm break in the EQEMU code:
https://github.com/EQEmu/Server/blob...ells.cpp#L5546
Quote:
//Average charm duration agianst mobs with 0% chance to resist on LIVE is ~ 68 ticks.
//Minimum resist chance should be caclulated factoring in the RuleI(Spells, CharmBreakCheckChance)
if (CharmTick) {
float min_charmbreakchance = ((100.0f/static_cast<float>(RuleI(Spells, CharmBreakCheckChance)))/66.0f * 100.0f)*2.0f;
if (resist_chance < static_cast<int>(min_charmbreakchance))
resist_chance = min_charmbreakchance;
}
|
CharmBreakCheckChance is set to 25. When you do the math the chance comes out to 12.1212.
The roll against the resist_chance is here:
https://github.com/EQEmu/Server/blob...ells.cpp#L5562
Quote:
//Finally our roll
int roll = zone->random.Int(0, RuleB(Spells, EnableResistSoftCap) ? RuleI(Spells, SpellResistSoftCap) : 200);
if(roll > resist_chance) {
return 100;
}
|
As far as I know the SpellResistSoftCap (255) is disabled. This means you are rolling a d200 and seeing if it beats 12.1212 when you have the best chance to avoid a charm break.
The streak calculator rolls millions of dice and does the if(roll > resist_chance) check on each roll until you get a fail. Each time you fail is a streak. So if you rolled 5 successful rolls in a row and then 1 fail, that is a streak of 5.
The average charm duration is based on what the resistance chance is. The higher the resistance chance, the worse your average.
You can see that the calculator data has the same pattern as OP's data:
[You must be logged in to view images. Log in or Register.]
TLDR: When rolling a d200 with a minimum resistance chance of 12.1212, the average charm duration is 40 ticks when your max charm duration is 190 ticks.
If you want the average based on when the data tapers off, the average charm duration is 27 ticks when the data tapers off at 82 ticks.
The average charm duration is based on what the resistance chance is. The higher the resistance chance, the worse your average.
The reason why we can average the Successful Dice Roll Streaks is because the basis for the calculation is simply millions of dice rolls, which approach a normal (gaussian) distribution via the central limit theorem.