Log in

View Full Version : A Statistical analysis of Charm Duration


charleski
04-14-2025, 02:38 PM
I started playing p1999 about six weeks ago, having left EQ in early 2005 after Arch Overseers largely collapsed due to the great OoW burnout, and expected to find a community that had min-maxed the system up to the hilt. But it's clear that a lot of the folklore and baseless dogma that characterised player knowledge back then still persists. One critical element in that seems to be the subject of charm duration. In this post I will set about deriving a proper statistical analysis of charm duration and provide some tools that can be used to test it. I'm not formally a statistician, though I use stats in my work and am pretty sure that the approach used here is correct. Still, if you spot any errors, please feel free to let me know.

The first step is to be absolutely clear about what we mean by 'charm duration'.
It's generally accepted that the game's global timeline is divided up into 'ticks', each six seconds long, and that any decision about charm breaking is made at the boundary point between ticks. So we have the situation depicted in the diagram below:
https://www.project1999.com/forums/attachment.php?attachmentid=25282&stc=1&d=1744655151


The charm spell will land on a mob at some random time, which is unlikely to be exactly at a tick boundary. Providing it is not resisted there will be an initial period of less than 6 seconds before a charm-break test is applied. Subsequently, every six seconds, another test will be performed. As long as these tests keep being passed, the charm will continue, until finally a test is failed and the charm breaks. In my experience the initial cast of charm is only ever resisted if the mob is of a higher level than the spell is capable of charming.

As shown by the diagram, a charm that lasts six ticks (plus the initial period) will reflect a sequence of six consecutive passes followed by one failure. In the rest of this discussion we will ignore the initial period, which is irrelevant to the analysis. In general, a charm that last n ticks will be the result of n charm-break successes.

Important assumption: I assume that each test is performed independently. That is, the probability of success on each tick is determined without reference to the number of preceding successes. This is a reasonable assumption and simplifies things considerably. There may be a limiting factor in terms of maximum charm duration, this is unknown. The maximum charm duration I've seen so far is 818 seconds, which is over 13 and a half minutes. I expect most enchanters will be used to seeing charms last over ten minutes, such that tash wears off even though you reapply tash on each break.

So to start off, we ask, "What is the probability that a charm will last n ticks?" This is actually a very simple question and relies on the underlying probability, p, of success on each individual tick. If we toss a coin, the chance of it coming up heads is 50% (p=0.5). What is the probability of it coming up heads each time if we toss it twice? The answer is to multiply the probabilities, so p = 0.5*0.5 = (0.5)^2 = 0.25. If you toss it twice, the chance of getting two heads is 1 in 4. Likewise, if you toss it three times, the chance of getting heads three times in a row will be (0.5)^3, 1 in 8, etc. So,
The probability that a charm will last n ticks is p^n.

This is an exponential curve, and matches what we see if we just dump a whole load of individual charms together and graph the distribution. I wrote a python program (attached below as CharmParsing.py) that parses a log file, extracts the duration of charms and performs some stats that will be explained later. Usage is simply
py -m CharmParsing <path to log file>
It will create a .csv file in the same location as the log that contains the stats and a list of individual charm durations in seconds and ticks. I took a log covering a bit over 2 weeks and fed it into the program, then graphed the duration of the 427 charms. This is uncontrolled data, so merely indicative, but it does show an exponential distribution.
https://www.project1999.com/forums/attachment.php?attachmentid=25283&stc=1&d=1744655399

At this point it's important to note that, given the exponential distribution, any talk of 'average' charm duration is both misleading and completely meaningless. The average only applies to samples that are drawn from a normally-distributed population, which is very much not the case here. If we're going to analyse charm duration we need a different statistic, we need an estimate of the underlying probability (p) of success on each tick.

This can be performed by recognising that each tick during the charm duration represents a separate independent trial. A charm that lasts six ticks represents six successes and one failure. As long as we have enough data and they're properly controlled (i.e. on the same mob, with no changes that might alter the underlying probability) we can group all these trials together and use them to calculate the Wilson Score (see references below), a binomial statistic that provides an estimate of underlying probability at a specified confidence level:
https://www.project1999.com/forums/attachment.php?attachmentid=25284&stc=1&d=1744655399

where p0 = upper and lower bounds of the Wilson Score; n = total number of trials, p_hat (p with a circumflex) = number of successes/total number of trials, and c = the critical value corresponding to the level of confidence required (1.96 for 95% confidence).
This is used in CharmParsing.py to report a central probability along with its upper and lower bounds.

We're now getting somewhere. We can generate estimates of the underlying probability of charm success on each tick. But what we really want is a way to compare these values between different conditions (i.e. changes in level-difference, CHA and magic resist). We could just see if the ranges given by the Wilson Score overlap, but in some cases that might produce a Type II error (false-negative). A better method is to compare the difference between central probabilities (p2-p1) to the Newcombe-Wilson difference interval (also covered in the references below).
The test is given by:
https://www.project1999.com/forums/attachment.php?attachmentid=25286&stc=1&d=1744655399
where p1 = central probability for condition1, w(1,-) = lower bound to the Wilson Score for condition 1, w(1,+) = upper bound to the Wilson Score for condition1, etc

This is performed by CharmDiff.py, also attached. To use this, cut your log file up into separate segments, each corresponding to one controlled value for the condition being tested. Usage is
py -m CharmDiff <95¦99> <path to first log file> <path to second log file>
The first argument must be 95 or 99, the level of confidence which you wish to use. It will print results to the terminal, but this can be redirected to a file using the > operator.

We now have the tools needed to investigate charm duration in a meaningful manner, and the following posts will show some results I've gathered. I strongly encourage anyone interested to try this for themselves and post the results they get. Any scientific data are only meaningful to the extent that they can be replicated. If you're looking to compare conditions, just make sure that the logs used are properly controlled. The code used only works for L12 Charm, Beguile and Cajoling Whispers, because I'm level 51 and don't have Allure. If you want to include those, it's easy to add them to the regexps and cast duration constants at the start of the files.

It's important to note that anecdotal evidence is completely worthless here. We've all had pets that seem unusually unruly ('OMG I just recharmed the bloody thing and it's broken again!'), but that means nothing. The First Rule of Statistics is: Shit Happens. My personal gut feeling is that charm breaks are more likely to happen when I've taken my hand off the keyboard to pick up a drink, but I haven't worked out a way to test that reliably yet... If you want to generate useful data you need to keep the conditions controlled and record a sufficiently large number of trials - I would recommend at least an hour or so's worth, i.e. 600 or more trials.

Q: You use big wurds and sumz! Y u do sumz? Dey make brane hurt!
A: You've been using Illusion:Troll too much. Here's 10pp, go buy yourself a drink.

The following posts will concern different conditions that are reputed to affect charm duration. If you can't wait, I'm coming to the conclusion that charm success per tick has a fixed probability close to 0.98.

References:
The Wilson Confidence Interval for a Proportion (https://www.econometrics.blog/post/the-wilson-confidence-interval-for-a-proportion/)
Binomial Confidence Intervals and Contingency Tests (https://www.tandfonline.com/doi/full/10.1080/09296174.2013.799918)
Interval estimation for the difference between independent proportions (https://www.researchgate.net/publication/13687790_Interval_estimation_for_the_difference_be tween_independent_proportions_Comparison_of_eleven _methods)
Plotting the Newcombe-Wilson distribution (https://corplingstats.wordpress.com/2020/12/29/plotting-the-nw-distribution/)
Sean Wallis, Statistics in Corpus Linguistics Research, 2021

charleski
04-14-2025, 02:39 PM
The topic that's generated the most confusion seems to be the importance of the CHA stat.
I'm going to start off here by saying that it is, as a general principle, impossible to prove a negative. I can't prove to you that CHA has no effect on charm duration. The way statistics works is to start with a null hypothesis (that there is no difference between two conditions) and test whether the evidence shows that you can reject that hypothesis with a specified level of confidence. I.e. you are testing whether or not you can prove a positive effect.

TLDR, the result is:
Unable to reject the null hypothesis that CHA has no effect at the 95% level.

To test this I grabbed a Greater Spurbone in Emerald Jungle and parked it on the south wall. I was level 50, the mob was blue-con, resisted Beguile twice and hit for an observed max of 100, so probably level 38-39. I took off all gear with any CHA on it to take my CHA stat down to its base of 115 (because I followed the folklore and made my character according to the guide …) and proceeded to recharm on each break for around 2 hours. I then put on all the CHA gear I could find, applied the CHA buff to take my CHA up to 226 and repeated the process for another 2 hours or so. This resulted in around 1200 individual tick trials for each condition, and the results are given below:
Input data 1:
File: L50 EJ Gt Spurbone CHA 115.txt
Total trials: 1157
p charm success (per tick): 0.9742
Wilson Score lower bound: 0.9647
Wilson Score upper bound: 0.9836
Input data 2:
File: L50 EJ Gt Spurbone CHA 226.txt
Total trials: 1294
p charm success (per tick): 0.9847
Wilson Score lower bound: 0.9776
Wilson Score upper bound: 0.9915

probability difference: 0.0104

Newcombe-Wilson difference interval: -0.0117, 0.0117
Not significant at 95% level

To illustrate this further, here's a diagram showing the extent to which the two Wilson Scores overlap:
https://www.project1999.com/forums/attachment.php?attachmentid=25287&stc=1&d=1744655937

Now I know that some will be tempted to carp that the increased CHA did show a minor increase in the central success probability number. Unfortunately this fails to appreciate the actual nature of the Wilson Score. The actual probability for each condition may lie at any point within the upper and lower bounds, and these overlap substantially. Furthermore, 95% confidence (2 sigma) is pretty weak-sauce as far as confidence goes and represents the lowest level at which we can start talking about any real difference.

One factor that might come into play is an adjustment called continuity correction. This is employed to ensure that probabilities stay within the 0-1 bounds and becomes more important as the probabilities approach closer to 0 or 1 (as seen here). The programs use continuity correction in their default state, but this does lead to slightly wider Wilson Score intervals. I turned continuity correction off (you just need to change a boolean constant in the code), but it still failed to produce a significant result.

My personal feeling is that the results for the 115 CHA condition just happen to be on the lower part of the range - all my preliminary results were closer to 0.98. But it doesn't really matter, the statistics involved are capable of taking that into account, and do so here.

As I said above, I encourage you to test this for yourselves. Getting the data is rather boring, but the more data the better.

How does this affect standard guidelines? Newbie enchanters should put their points into STR, so they can carry more fine steel back to town to sell.

charleski
04-14-2025, 02:40 PM
What about level? Surely the difference in level affects charm duration?

Result:
Unable to reject the null hypothesis that level difference has no effect at the 95% level.

A few days before performing the experiment with CHA I went to GFay and faced off against the mighty level 2 orc pawn (confirmed white-con to a level 2 player). This test was also performed with a CHA of 115. I was 48 at the time, so the difference was 46 levels, as opposed to 11-12 levels against the greater spurbone in EJ.

Input data 1:
File: L50 EJ Gt Spurbone CHA 115.txt
Total trials: 1157
p charm success (per tick): 0.9742
Wilson Score lower bound: 0.9647
Wilson Score upper bound: 0.9836
Input data 2:
File: orc_pawn_CHA115.txt
Total trials: 2053
p charm success (per tick): 0.9840
Wilson Score lower bound: 0.9784
Wilson Score upper bound: 0.9895

probability difference: 0.0098

Newcombe-Wilson difference interval: -0.0110, 0.0109
Not significant at 95% level

There is one possibility that is not tested here. It may be that level difference only has a manifest effect when it is very small, possibly via an exponential factor that has saturated by the time level difference is 10 or more. Unfortunately I'm unable to test this on my own. If you know of a healer or another high-level enchanter who's willing to spend hours doing nothing other than help getting a L50 mob under control again on breaks, then drop me a line. But be warned: doing this for several hours in a row is not the most exciting experience.

charleski
04-14-2025, 02:40 PM
Finally, what about magic resist? Does that have an effect on charm duration?

I haven't formally tested this yet. This is largely because, as mentioned earlier, I frequently notice charms that last so long that tash wears off, which obviously will have a confounding effect on the succeeding trials, and I'm not sure how to handle these instances.

But frankly, the question of magic resist is largely moot anyway as we know for sure that MR is important in handling charm breaks. When charm breaks you go through the stun-L4mez-reTash-reCharm cycle (strung together with the clicky exploit) and landing the stun and mez are essential components in making that happen smoothly. Successful charming means successful handling of charm breaks, and keeping the mob's MR low is a critical factor in that.

So those Rusty Spiked Shoulderpads are indeed a useful addition, just not in terms of increasing charm duration.

Jimjam
04-14-2025, 03:00 PM
I haven't formally tested this yet. This is largely because, as mentioned earlier, I frequently notice charms that last so long that tash wears off, which obviously will have a confounding effect on the succeeding trials, and I'm not sure how to handle these instances.

If you duel a conspirator they can refresh tash on your pet before it fades, removing that confounding effect.

shovelquest
04-14-2025, 03:26 PM
Charms should only last 8 minuets (max), mountains of proof:

https://project1999.com/forums/showpost.php?p=3700313&postcount=81

I hope OP's science (that is above my pay grade) and this can put a rest to the debate and crush a bunch of people's joy :D

bcbrown
04-14-2025, 03:45 PM
Very nice work. It'll take me a couple readings to fully grasp, but on a preliminary basis your conclusions look well-founded. A couple initial comments:

You suggest that charisma does not impact charm duration, and therefore is overvalued as a stat. I don't play an enchanter, but my understanding has always been that high charisma is mainly valued for the impact on the lull line of spells, not charms.

I haven't formally tested this yet. This is largely because, as mentioned earlier, I frequently notice charms that last so long that tash wears off, which obviously will have a confounding effect on the succeeding trials, and I'm not sure how to handle these instances.

Since every tick is an independent trial, when parsing the log couldn't you track the log entry for tash wearing off and group subsequent trials separately from tash-active trials?

The test comparing durations for the orc pawn versus the EJ skeleton is interesting. I would expect that a 46-level difference would completely saturate any level-dependent effect, but a 10-12 level difference I would have expected to be small enough to show an impact if there was one. I'm happy to volunteer two hours supporting further testing with either a 60 druid or 55 cleric.

kjs86z2
04-15-2025, 08:19 AM
the AI is getting pretty good

also thats a lot of words to say (your level vs mob level) > MR > 255 cha...something that has been known for decades now

and to suggest enc start STR is absurd...even if its a trivial difference in charm durations ill still take it to decrease lull crit fails

Goregasmic
04-15-2025, 12:01 PM
From loraen's ench guide:

Of course, we obviously want charm to last as long as possible, and the main determinants of charm duration are Mob Level, Magic Resistance, and Charisma, in that order. Therefore your first choice is what level of pet to charm. At L60, I would guess that a L46 froglok dar knight will stay charmed about five times longer than a L53 froglok ilis knight. If you are getting too many charm breaks, go with lower level mobs. For example, there are two ways to solo the necrosis scarab camp: the fast way is to charm the krup roamer, but there is no shame in bringing one of the lower level frogs over from across the moat. For reasonable charm durations my recommendation is to charm something 0.75-0.85 times your level; at L60 this works out to L45-50; 51 is possible but risky and 52-53 is almost certainly going to be a short trip without malo.

I think this is based on findings in this thread (https://www.project1999.com/forums/showthread.php?t=92423&page=4) from 2013 where lvl 53 mobs charm time averaged around 90 seconds. Anyone who charmed anything will know that this is pretty short. Spent 56-58 in frenzy and the few times I tried keeping a pet around for as long as possible I've had some hit the max duration of allure which was about 18m30s (I set a gina countdown timer for 18mins when I start casting charms). So mob level absolutely has an impact post 50 it seems. This thread also tries to demonstrate the usefulness of charisma at higher levels but it is hard to get a good sample solo when ilis frogs double for 400. Also, it is important to keep in mind cha has diminishing returns after 200.

Anecdotally I think MR makes a huge difference too because sometimes I go to Lguk or other lesser zones and I'll just pop a charm on a mob without tashing to trash a camp real quick and those charms seem be very short more often than not even though the mobs cap at like level 40.

And yes, cha is vital for lull crit fails and if you do any sort of dungeon crawls, lulls will often be your most casted spell. In some tricky places I've used lull crit fails to pull and stripping down all my +cha only pieces (-50ish) and taking off cha buffs made the process much quicker.

charleski
04-15-2025, 12:45 PM
Charms should only last 8 minuets (max), mountains of proof:

https://project1999.com/forums/showpost.php?p=3700313&postcount=81

I hope OP's science (that is above my pay grade) and this can put a rest to the debate and crush a bunch of people's joy :D

The fact is, however, that you can expect to see a charm lasting over ten minutes at least once in the course of a night. I don't know if there's a hard limit in the code, but obviously very long charms are quite rare given the exponential distribution.

the AI is getting pretty good

also thats a lot of words to say (your level vs mob level) > MR > 255 cha...something that has been known for decades now

and to suggest enc start STR is absurd...even if its a trivial difference in charm durations ill still take it to decrease lull crit fails
I'm saying exactly the opposite, didn't you notice? :rolleyes:
The folklore that's built up over charm duration is founded on poor data and faulty analysis.



I think this is based on findings in this thread (https://www.project1999.com/forums/showthread.php?t=92423&page=4) from 2013 where lvl 53 mobs charm time averaged around 90 seconds. Anyone who charmed anything will know that this is pretty short. Spent 56-58 in frenzy and the few times I tried keeping a pet around for as long as possible I've had some hit the max duration of allure which was about 18m30s (I set a gina countdown timer for 18mins when I start casting charms). So mob level absolutely has an impact post 50 it seems. This thread also tries to demonstrate the usefulness of charisma at higher levels but it is hard to get a good sample solo when ilis frogs double for 400. Also, it is important to keep in mind cha has diminishing returns after 200.

Anecdotally I think MR makes a huge difference too because sometimes I go to Lguk or other lesser zones and I'll just pop a charm on a mob without tashing to trash a camp real quick and those charms seem be very short more often than not even though the mobs cap at like level 40.

And yes, cha is vital for lull crit fails and if you do any sort of dungeon crawls, lulls will often be your most casted spell. In some tricky places I've used lull crit fails to pull and stripping down all my +cha only pieces (-50ish) and taking off cha buffs made the process much quicker.

Maybe I wasn't clear enough in my first post. Average charm duration is completely meaningless. The concept of a mean only works for normally-distributed data. A lot of data does come from a normally-distributed population, but in this case that simply isn't true. For exponential data like this you can use the median instead, but that has very limited utility and generally doesn't allow the application of statistical tests. You really need to perform a deeper analysis of the data and extract an estimate of the core underlying probability.

I'm only looking at charm duration here. Resists on lull spells are obviously a completely different topic, but one that would be worth investigating properly at a later date.

As an aside, ironically I did notice a resist on the initial cast of Cajoling Whispers last night, so it can happen. It does seem very rare though, and I have to wonder if this shares the same 98% success rate that's applied to charm break rolls.

charleski
04-15-2025, 12:58 PM
Since every tick is an independent trial, when parsing the log couldn't you track the log entry for tash wearing off and group subsequent trials separately from tash-active trials?

That is certainly possible. I'll admit that I haven't really got round to working on the problem properly. This is partially because, as I mentioned, you definitely do want to keep mob MR low in order to handle the charm breaks smoothly. But this is something to keep in mind for future study.


The test comparing durations for the orc pawn versus the EJ skeleton is interesting. I would expect that a 46-level difference would completely saturate any level-dependent effect, but a 10-12 level difference I would have expected to be small enough to show an impact if there was one. I'm happy to volunteer two hours supporting further testing with either a 60 druid or 55 cleric.
One possibility that occurred to me is that level difference is factored in an exponential manner, such that small level differences have an appreciable effect, but beyond 10 levels or so it has shrunk to a vanishingly small level.

If you're happy spending several hours doing nothing other than staring at a mob waiting for it to break, drop Feressa a tell in the game. But it is pretty boring :D

shovelquest
04-15-2025, 01:15 PM
The fact is, however, that you can expect to see a charm lasting over ten minutes at least once in the course of a night. I don't know if there's a hard limit in the code, but obviously very long charms are quite rare given the exponential distribution.

But that same distribution, with actual classic charm durations would mean you should only see a charm last over FOUR minuets at least once in the night.

Salaryman
04-15-2025, 01:34 PM
RED99

Its 50/50, either it breaks or it doesnt.

RED99

DeathsSilkyMist
04-15-2025, 01:40 PM
Maybe I wasn't clear enough in my first post. Average charm duration is completely meaningless.


This is incorrect. Looking at the EQEMU source code (The server code that P99 uses as it's base), it has the following comment for charm duration:

https://github.com/EQEmu/Server/blob/a2b2a6a5cf7dec5ee9c9a7493c6a73fb4de2584f/zone/spells.cpp#L5542


//Average charm duration agianst mobs with 0% chance to resist on LIVE is ~ 68 ticks.


I doubt the programmers who coded P99 are wrong about how the results of their code work, and if it can be averaged or not.

The reason why charm duration is still a normal distribition is because each tick simply rolls a dice to see if you succeed or fail the charm resist check. The dice roll success threshold is adjusted based on level difference and MR.

The reason why you see the highest charm rate in the first 30 seconds is probably related to the EQEMU comment for charisma checks. It says Charisma is used for the initial resist check only.

Here is the comment in the EQEMU code for charisma checks on spell resists:

https://github.com/EQEmu/Server/blob/a2b2a6a5cf7dec5ee9c9a7493c6a73fb4de2584f/zone/spells.cpp#L5469


/*
Charisma ONLY effects the initial resist check when charm is cast with 10 CHA = -1 Resist mod up to 255 CHA (min ~ 75 cha)
Charisma less than ~ 75 gives a postive modifier to resist checks at approximate ratio of -10 CHA = +6 Resist.
Mez spells do same initial resist check as a above.
Lull spells only check charisma if inital cast is resisted to see if mob will aggro, same modifier/cap as above.
Charisma DOES NOT extend charm durations.
Fear resist chance is given a -20 resist modifier if CHA is < 100, from 100-255 it progressively reduces the negative mod to 0.
Fears verse undead DO NOT apply a charisma modifer. (Note: unknown Base1 values defined in undead fears do not effect duration).
*/


Now P99 does have changes to the EQEMU code that are not in the github repo, so it's certainly possible things work a bit differently on P99. But it's good to see the thought process of the developers who worked on the code.

I did a weapon DPS calculator using the EQEMU codebase recently:

https://www.project1999.com/forums/showpost.php?p=3733560&postcount=41

And the results closely match P99 parses. This shows that the EQEMU code can still closely resemble the P99 code. They don't need to completely rework the EQEMU code for P99. I'd be willing to wager most of the P99 code changes in the P99 codebase are related to adjusting code/variables based on what patch the server is on. They probably don't have sweeping changes to the EQEMU base code.

DeathsSilkyMist
04-15-2025, 02:50 PM
On an off topic note, the charisma check comment:


/*
Charisma ONLY effects the initial resist check when charm is cast with 10 CHA = -1 Resist mod up to 255 CHA (min ~ 75 cha)
Charisma less than ~ 75 gives a postive modifier to resist checks at approximate ratio of -10 CHA = +6 Resist.
Mez spells do same initial resist check as a above.
Lull spells only check charisma if inital cast is resisted to see if mob will aggro, same modifier/cap as above.
Charisma DOES NOT extend charm durations.
Fear resist chance is given a -20 resist modifier if CHA is < 100, from 100-255 it progressively reduces the negative mod to 0.
Fears verse undead DO NOT apply a charisma modifer. (Note: unknown Base1 values defined in undead fears do not effect duration).
*/


Does give some insight into why Necromancers have minus Charisma on their gear. I didn't know that fear ever had a charisma check. It makes sense, the lower your CHA, the scarier you probably look. Don't know if this CHA check for fear is on P99, but it is interesting.

If this is on P99, it means Enchanters have a resist penatly when using Fear with their CHA gear on.

kjs86z2
04-15-2025, 03:01 PM
Average charm duration is completely meaningless.

ummm...no?

Goregasmic
04-15-2025, 03:31 PM
Maybe I wasn't clear enough in my first post. Average charm duration is completely meaningless. The concept of a mean only works for normally-distributed data. A lot of data does come from a normally-distributed population, but in this case that simply isn't true. For exponential data like this you can use the median instead, but that has very limited utility and generally doesn't allow the application of statistical tests. You really need to perform a deeper analysis of the data and extract an estimate of the core underlying probability.

What I meant is when you're in your mid 50s and you charm a low to mid 40 mobs, it will usually last a couple minutes on most charms if you remove the outliars. With similar conditions, his attempts on the ilis shaman rarely broke the 60 seconds mark. This suggests mob level plays a major role in charm duration.


As an aside, ironically I did notice a resist on the initial cast of Cajoling Whispers last night, so it can happen. It does seem very rare though, and I have to wonder if this shares the same 98% success rate that's applied to charm break rolls.

Since my mid 40s I don't think I've ever had an initial cast resist on any charm. Only resists I had was landing a lower charm on a mob that was too high. That being said I almost always mez + tash + charm. Considering a ton of charms break before 30 ticks I don't think it is the same formula for charm landing because I'm at like 100% success rate.

I've been thinking about this lately and in my 50s I think I got a single color slant resist and maybe also one mesmerization resist? Not 100% sure, I could swear it happened but it is VERY rare if even possible and those mobs aren't always tashed. But now that I think of it, it also has been a LONG time since I got a nuke or slow resist. Unless I get a crit fail on lull I usually tash everything to make root more stable and lessen the odds of getting a simultaneous root+charm break. I feel like except for charm, the last tash you get in your mid 50s really makes almost everything land for most of the exp trash but then again you're fighting mobs 10-17 levels below you so it is hard to know what does what.

Lull on the other hand... been getting fewer crit resists as levels go up but regular resists are still quite common.

Goregasmic
04-15-2025, 05:35 PM
/*
Charisma ONLY effects the initial resist check when charm is cast with 10 CHA = -1 Resist mod up to 255 CHA (min ~ 75 cha)
Charisma less than ~ 75 gives a postive modifier to resist checks at approximate ratio of -10 CHA = +6 Resist.
Mez spells do same initial resist check as a above.
Lull spells only check charisma if inital cast is resisted to see if mob will aggro, same modifier/cap as above.
Charisma DOES NOT extend charm durations.
Fear resist chance is given a -20 resist modifier if CHA is < 100, from 100-255 it progressively reduces the negative mod to 0.
Fears verse undead DO NOT apply a charisma modifer. (Note: unknown Base1 values defined in undead fears do not effect duration).
*/



So if I understand correctly, above 75cha you get -1 resist check every 10cha up to 255, so considering diminishing returns probably like -15resist at 255?

(200-75)/10=12.5
(55/10)/2= 2.75

The last 55cha would be about -2.5 resist, which isn't much but I guess it matters when it is the difference between killing a named or getting harm touched by an entire room.

As for fear as an enchanter, I bought them all and I never casted one. Can't comment on that one. I can see situations where it would be useful but those are some edge cases.

PatChapp
04-15-2025, 08:38 PM
Would be interesting to compare necro charm vs enchanter
Say 50 charms of the same mob each and compare durations. Maybe do it untashed to keep the mr equal.

bcbrown
04-16-2025, 03:25 AM
You can tell by looking at a graph of a normal distribution or an exponential distribution what better fits your data. A normal distribution looks like the familiar bell curve everyone knows. An exponential distribution has a peak at the minimum value and swoops down in a curve till there's fewer and fewer at higher values. The two graphs are attached. It's clear that when looking at the provided histogram of charm duration, the exponential distribution is a better fit to the data.

Looking at these graphs also shows why the average is meaningless for data that looks like the second graph. The average is going to be a vertical line placed on the graph such that the area under the curve on the left half is the same as the right half. For a normal distribution it's obviously going to be at the top peak of the bell curve, and that's exactly why it's useful there: you know that most of the data is going to be close to the average value, and the variance tells you exactly how close.

Looking at the exponential graph also demonstrates why the average isn't very useful in this case. You can place a line that marks the average, but it's not going to tell you anything useful. Assuming you're dealing with a system that has a set chance to break charm every tick, you want to find what that set chance is, and what if anything modifies that chance. The average value doesn't help with that.

charleski, in your results you report a "p charm success per tick" value. How is this calculated? Is it the same as p-hat (charm breaks / total ticks)? Given your discussion of MR and the challenges with handling tash wearing off, were all the data collected without using tash? Are you calculating total ticks for each charm as something like total charm duration in seconds / 6, rounded down? I'm sure I can answer these questions by looking at the code, but haven't had a chance to do that yet.

Goregasmic
04-16-2025, 07:33 AM
Disclaimer: I suck@stats so honest questions here.

Outside of visualization none of those graphs are helpful?

What are we trying to figure out here exactly?

I understand average isn't very relevant, especially in the context of charm where it is a bit all over the place but isn't the probability of charm breaking kinda useless too?

We already know level and MR are the big variables and outside of tash and mob choice you have no control over those two so the only actionable parameter is charisma if it has any impact at all. Just run a low cha and a high cha dataset, compare average time and then calculate the statistical significance of the difference. We've seen with the AC parsing thread that there's a point where AC completely squelches the mob attack and you get no return for going above a certain point. Since cha is the stat that would matter the least, we'd have to run tests with non trivial mobs and probably no tash to make sure the effect of cha isn't buried by a mob that has an already bottomed out charm resistance.

I'm very curious to see if cha is useful for charm but we do know cha has a significant impact on lull and that spell is integral to the chanter life so unless you're grouping all the time you'll want maxed cha no matter what, especially knowing a lull nerf is coming.

The other thing that is a big deal is mob level difference so for this to be useful you'd have to come up with a chart that shows probability by mob level for a level 60 player. That would show us at what point mobs become non-trivial charm targets. As Loraen shows, I suspect around 50-51.

In the end, outside of curiosity, there's no use to knowing if charm has a 95% or 98% chance to break on tick because on the field it will break when it will break and you'll have to deal with it. And it isn't like you have alternative options to compare efficiency against. The only time where breaking probability would be useful is if you could come up with something like "an ilis shaman has a 80% chance to break in the first 10 ticks" which lets you figure out if that's too unruly for you or not but you'd know that with a cursory glance at the dataset.

I'm not dissing any effort at understanding the game here, these are some of the questions I have relating to charm. I'm currently 59 and I planned on running those tests when I hit 60 because I'd also like some answers too.

DeathsSilkyMist
04-16-2025, 10:37 AM
You can tell by looking at a graph of a normal distribution or an exponential distribution what better fits your data. A normal distribution looks like the familiar bell curve everyone knows. An exponential distribution has a peak at the minimum value and swoops down in a curve till there's fewer and fewer at higher values. The two graphs are attached. It's clear that when looking at the provided histogram of charm duration, the exponential distribution is a better fit to the data.

All randomized calculations in P99 are dice rolls at their core, which approach a normal (gaussian) distribution via the central limit theorem. It isn't more complicated than that. I know the theory crafting is fun, but you are overcomplicating things.

The reason why you see more successful charms at the beginning (in the first 30 seconds) is because Charm uses CHA for the resist check on the initial cast. So you have a higher chance of success at the start if you have high enough CHA.

Subsequent dice rolls must pass a resistance check threshold. This means the dice rolls you are seeing for charm fails are only a subset of the dice rolls. For example, in the code the resistance roll is a d200. If the resistance check threshold is 40, you are only seeing the dice rolls from 1-40 if you graph charm fails the way OP did. You aren't seeing the dice rolls from 41-200.

Mobs also have variations in their resistance checks based on level difference and MR.

These three reasons are why you don't see a bell curve. We aren't looking at a complete set of dice rolls with no modifications.

Tann
04-16-2025, 11:40 AM
Here is the comment in the EQEMU code for charisma checks on spell resists:

https://github.com/EQEmu/Server/blob/a2b2a6a5cf7dec5ee9c9a7493c6a73fb4de2584f/zone/spells.cpp#L5469

the problem with the above is that this was most likely changed after Torven did his research (https://www.eqemulator.org/forums/sh...ad.php?t=43370) on how charisma works on LIVE servers with the modern client.

The only tidbit of how it was back in classic era on EQlive is from this post (https://web.archive.org/web/20030611034701/http://eq.crgaming.com/archives.asp?Day=8&Month=10&Year=1999&ID=4660&Action=View) on castersrealm,

October 8, 1999

CHARISMA - THE NATURE OF CHARM

I checked with GZ this morning regardng the effect Charisma has in charming. The answer is that its effect is twofold.
Firstly it effects the chance at resisting the initial charm cast. Secondly, and more importantly, it makes it harder for the charmed NPC's save to successfully roll. This basically means it does effect duration.

Also charm does have a maximum duration. The higher level charm spell you use the longer the maximum duration can be. So there is a good reason to use that Allure spell even though its more mana.

GZ - Geoffrey Zatkin, original spell designer for EQ and collaborator with the dudes running castersrealm. Also did a nice interview (https://www.youtube.com/watch?v=gqW42BFqVjo) with aLovingRobot and talks about creating enchanters.

DeathsSilkyMist
04-16-2025, 12:47 PM
the problem with the above is that this was most likely changed after Torven did his research (https://www.eqemulator.org/forums/sh...ad.php?t=43370) on how charisma works on LIVE servers with the modern client.

The only tidbit of how it was back in classic era on EQlive is from this post (https://web.archive.org/web/20030611034701/http://eq.crgaming.com/archives.asp?Day=8&Month=10&Year=1999&ID=4660&Action=View) on castersrealm,



GZ - Geoffrey Zatkin, original spell designer for EQ and collaborator with the dudes running castersrealm. Also did a nice interview (https://www.youtube.com/watch?v=gqW42BFqVjo) with aLovingRobot and talks about creating enchanters.

The only thing that matters is how it works on P99. P99 uses EQEMU code as the base. From the comment you posted, GZ confirmed CHA is used on the initial resist check. The EQEMU comment says the same. The question is if CHA helps with the future resist checks on tick (charm breaks). OP seems to think CHA does not affect charm breaks based on his data. This would match the EQEMU's implementation and comment if OP is correct.

While I disagree with OP's idea that averages are meaningless in this scenario (they aren't meaningless), that doesn't necessarily mean his findings on whether or not CHA affects charm duration are also incorrect.

charleski
04-17-2025, 07:13 AM
In the end, outside of curiosity, there's no use to knowing if charm has a 95% or 98% chance to break on tick because on the field it will break when it will break and you'll have to deal with it. And it isn't like you have alternative options to compare efficiency against. The only time where breaking probability would be useful is if you could come up with something like "an ilis shaman has a 80% chance to break in the first 10 ticks" which lets you figure out if that's too unruly for you or not but you'd know that with a cursory glance at the dataset.


It's certainly true that we see a massive amount of variability in practice. A pet can start out causing a lot of trouble with constant breaks and then suddenly settle down and produce several runs where the charm lasts for many minutes. The overall charm duration will only show its underlying distribution when you collect many hundreds of individual charm attempts (the graph in my first post was from data collected over more than 2 weeks).

On the other hand, the exponential nature of the cumulative duration probability does mean that relatively small differences in the underlying per-tick probability would end up leading to quite dramatic changes in duration:
https://www.project1999.com/forums/attachment.php?attachmentid=25297&stc=1&d=1744885347
Though as I noted, you're only going to really see this when looking at very large numbers of different charm attempts.

There is, possibly, an additional factor in play when it comes to maximum charm duration. I've attached a zip file containing the parsed data from the L2 orc pawn (CHA 115) and an apparition in CoM (still buffing my CHA back then, so CHA was 189 if I remember correctly). The apparition charm data is from when I was L48 and doing the moat area. Unfortunately at this point I was routinely casting Cajoling Whispers, so I'm not sure if it was above or below L37, but it hit for a max of 88, if that means anything.

If you just eyeball then orc pawn data first, you'll see a surprising number of charms lasting 142 or 143 ticks (as I mention in the code, the log's precision is limited to 1second, which means that some error is introduced by the need to account for casting time of the charm spell). Out of the 31 charms, 6 last 142 or 143 ticks, which doesn't fit an exponential distribution and suggests that there's a hard limit being imposed which rolls up the long tail and caps it at 143 ticks. I didn't see the same effect on the data from the greater spurbone, and at first wondered if this was evidence of a level effect. But then I went through my old logs and found the data on the CoM apparition, in which you can see a very similar effect, only now the hard cap seems to apply at 155 ticks (5 of the 25 charms recorded have this length). Comparing these data is hard, as there's a difference both in mob level and my own CHA. I've also seen evidence that the cap can go even longer, with at least one charm from CoM when I was L49 (also with 189 CHA) lasting 161 ticks.

So, it's possible that there is indeed a hard cap on charm duration, and I can't rule out the possibility that the length of this cap is at least partially determined by CHA. I really haven't tested this, though, and looking at the sort of design that a proper test would need - studying the maximum length of 15+minute charms - something like that is going to be very gruelling.

charleski
04-17-2025, 07:37 AM
charleski, in your results you report a "p charm success per tick" value. How is this calculated? Is it the same as p-hat (charm breaks / total ticks)?

If you look at the equation for the Wilson Score interval,
https://www.project1999.com/forums/attachment.php?attachmentid=25284&stc=1&d=1744655399
you'll see it's actually the solution to a quadratic equation, with a central point [(2*n*p_hat+c^2)/(2*(n+c^2))] flanked by the +/- term, which gives the upper and lower bounds. p_hat is actually (ticks on which the charm test succeeded) / (total ticks). The central point is what's reported as p charm success per tick.


Given your discussion of MR and the challenges with handling tash wearing off, were all the data collected without using tash? Are you calculating total ticks for each charm as something like total charm duration in seconds / 6, rounded down? I'm sure I can answer these questions by looking at the code, but haven't had a chance to do that yet.
Yeah, the problem of tash wearing off is something I haven't really accounted for. I didn't want to interfere with the data by cutting it up and throwing parts of it out, so I thought it would be best just to leave it as-is. The CHA 115 data has 2 charms that last over 10mins, the longest being 138ticks, the CHA226 data has 5 charms lasting over 10mins, the longest being 161ticks. Unfortuantely, even though I spent over 4 hours on this, the numbers of very long charms are just too small to draw any sort of inference from them.

Yes, total ticks is calculated as (duration in seconds) // 6, where // is the python operator for floor division, which throws away any remainder.

kjs86z2
04-17-2025, 08:56 AM
or theres just some kind of weight that increases on the charm break/hold roll as time goes on

the bigger question: who cares?

Yumyums Inmahtumtums
04-17-2025, 10:17 AM
So if I understand correctly, above 75cha you get -1 resist check every 10cha up to 255, so considering diminishing returns probably like -15resist at 255?

(200-75)/10=12.5
(55/10)/2= 2.75

The last 55cha would be about -2.5 resist, which isn't much but I guess it matters when it is the difference between killing a named or getting harm touched by an entire room.

As for fear as an enchanter, I bought them all and I never casted one. Can't comment on that one. I can see situations where it would be useful but those are some edge cases.

It's possible to have changed but there used to be a marked difference at >200 versus <200.

I'm not going to do the work to verify this but there was a hard line at 200 with diminishing returns afterwards. It was particularly evident on my SSF characters.

Goregasmic
04-17-2025, 03:28 PM
If you just eyeball then orc pawn data first, you'll see a surprising number of charms lasting 142 or 143 ticks (as I mention in the code, the log's precision is limited to 1second, which means that some error is introduced by the need to account for casting time of the charm spell). Out of the 31 charms, 6 last 142 or 143 ticks, which doesn't fit an exponential distribution and suggests that there's a hard limit being imposed which rolls up the long tail and caps it at 143 ticks. I didn't see the same effect on the data from the greater spurbone, and at first wondered if this was evidence of a level effect. But then I went through my old logs and found the data on the CoM apparition, in which you can see a very similar effect, only now the hard cap seems to apply at 155 ticks (5 of the 25 charms recorded have this length). Comparing these data is hard, as there's a difference both in mob level and my own CHA. I've also seen evidence that the cap can go even longer, with at least one charm from CoM when I was L49 (also with 189 CHA) lasting 161 ticks.

So, it's possible that there is indeed a hard cap on charm duration, and I can't rule out the possibility that the length of this cap is at least partially determined by CHA. I really haven't tested this, though, and looking at the sort of design that a proper test would need - studying the maximum length of 15+minute charms - something like that is going to be very gruelling.

The cajoling whisper page says:

"Duration: 12.7 minutes @L39 to 20.5 minutes @L65"

There's a good chance those repeated tick numbers was the hard cap on cajoling whispers for that level. Were you L50 for the pawn? On mobile, not gonna bother with opening zip files right now. Makes no sense that an orc pawn would cap lower than an apparition/spurbone. You were at 115cha for the pawn so maybe charisma affects max duration which makes it hard to detect considering the exponential nature?

I've wondered for someone doing the charm double kill routine if you really need more than 200cha self buffed since you only need your charm to last 2-3 minutes at best. A significantly bigger mana/hp pool could be more helpful depending on where you're leveling.

It's possible to have changed but there used to be a marked difference at >200 versus <200.

I'm not going to do the work to verify this but there was a hard line at 200 with diminishing returns afterwards. It was particularly evident on my SSF characters.

The wiki entry for the charisma stat says

"Max (hard-cap): 255
Soft-cap: 200"

Past 200 the returns are probably axed in half.

DeathsSilkyMist
04-17-2025, 03:47 PM
So, it's possible that there is indeed a hard cap on charm duration, and I can't rule out the possibility that the length of this cap is at least partially determined by CHA. I really haven't tested this, though, and looking at the sort of design that a proper test would need - studying the maximum length of 15+minute charms - something like that is going to be very gruelling.

There is a hard cap on charm duration:

https://wiki.project1999.com/Charm - 4.6 minutes (Level 12) to 19 minutes (Level 60).

https://wiki.project1999.com/Beguile - 8.2 minutes (Level 24) to 19 minutes (Level 60).

https://wiki.project1999.com/Cajoling_Whispers - 12.7 minutes (Level 39) to 19 minutes (Level 60).

You gain 0.3 minutes (3 ticks) per level. All three spells follow the same scaling pattern, they just have a shorter initial duration. So you are capped at 16.3 minutes (163 ticks) on all three spells at level 51. If you gathered data at earlier levels, you need to subtract 3 ticks per level from 163 ticks.

Samoht
04-17-2025, 06:09 PM
How does this affect standard guidelines? Newbie enchanters should put their points into STR, so they can carry more fine steel back to town to sell.

While I support this sentiment 100% for other caster classes, it's just not true for enchanters.

There have already been people who pointed out that we need CHA for lulls.

And the OP has already learned that they had a flawed assumption that charm lands 100% of the time. CHA is assumed to reduce initial check. As is level. As is MR.

So this whole conversation about whether or not CHA affects charm duration might be cool to figure out, but from the two statements above, it is moot because you will have CHA already. And Wilson might say that the tests from the first post show no statistical difference, but this is magic, baby, and the enchanter sees the difference between the two graphs.

So, ultimately, my statement to Wilson is that I am in agreement with the following:

who cares?

Goregasmic
04-18-2025, 08:52 AM
Yeah.

Coincidentally I've been playing a lvl9 DE cleric and at 65cha I'm getting 50% crit fail on lulls. I'm not even getting resists it either sticks or it crit fails. I remember my ench with ~110cha was getting 10-20% in similar circumstances. At 59 with 255cha in HS north I'm probably somewhere between 5-10% but the consequences are much dire, I'd work toward 300 if it could get me sub 5%. Above 10% it is probably considered unusable if you're doing risky lull jobs.

I'm sure you could get to 60 without lull but you'd be locking yourself out of so many good spots for no particular reason. I can't remember the last time I got a charm initial resist so one could drop cha until they start getting some but that means you'd most likely get AE mez/stun resists and that's a big no no. What for exactly anyway? Sacrifice your main line of defense for an extra 200 hp/mana? You could be a little more efficient but is the extra risk worth it? But then chain mezzing/rooting/blurring adds because you couldn't lull is inefficient.

I'm trying really hard to find a scenario where you wouldn't want near max cha but outside of being a raid C2/haste bot I really can't find one that wouldn't cripple you.

Snaggles
04-18-2025, 12:14 PM
I don’t even ench and know that charm will break, crit lulls will happen, it’s the player that either lives or dies.

I also didn’t think it was overly difficult capping CHA buffed, and having a decent amount of mana with all the taps and c2. Most people can pull this off with EC gear and are still better soloers than almost every other class, in most situations.

Personally my Lull classes have a moderate set of CHA gear as the diminishing returns seems to hit hard past the mid 100’s. For messing with light blue cons that’s good enough and you don’t need to swap out 20 pieces of gear.

Goregasmic
04-18-2025, 02:46 PM
I also didn’t think it was overly difficult capping CHA buffed, and having a decent amount of mana with all the taps and c2. Most people can pull this off with EC gear and are still better soloers than almost every other class, in most situations.

Started my ench from scratch a year ago on green. I got to like 150cha in my mid 30s and only got 205 cha unbuffed in my mid 50s but it never crippled me. I think when you get to mid 40s and about 180 you're pretty good from that point. The thing is it is kind of easy to get cha gear but it often sucks (pieces with only cha) so my +mana and int was abysmal until my late 50s. It's true that ench get good regen but charm and nukes are super draining and all the little spells like root/tash/mez/stun chips at your bar too. It wasn't uncommon to get into trouble and have to gate because I couldn't finish adds I got. Or I started a fight at 50% and I got 4 charm breaks and I was OOM. So regen is nice but intra-fight mana total helps. Apparently it gets worse when you do the end game stuff because you need rapture + boltran which are 400 mana a pop and dictate is 750.


Personally my Lull classes have a moderate set of CHA gear as the diminishing returns seems to hit hard past the mid 100’s. For messing with light blue cons that’s good enough and you don’t need to swap out 20 pieces of gear.

Yeah if you want to do HS ent/basement or move around in like... Lguk it is good enough as a crit fail on lull won't be disastrous but if you're trying to break crypt keeper room (hs north, 9 mobs, half of them HTs) it is risky even with 255. It depends on the content you want to do really.

Samoht
04-18-2025, 05:43 PM
I also didn’t think it was overly difficult capping CHA buffed, and having a decent amount of mana with all the taps and c2. Most people can pull this off with EC gear and are still better soloers than almost every other class, in most situations.

It's not difficult to cap CHA, no.

What is difficult is balancing CHA, INT/mana, HP, and MR all at once while not being encumbered. That's going to be a little harder in EC gear.

If you start with the most important stat as high as possible, though, it gives you more wiggle room to get more HP and MR.

charleski
04-19-2025, 06:50 AM
There's a good chance those repeated tick numbers was the hard cap on cajoling whispers for that level. Were you L50 for the pawn?

Ah. Yes, I think you have the answer there. The orc pawn data was collected when I was level 44, the data with a cap at 155 when I was 48 and the data capped at 161 ticks when I was 49. So you're right, this is probably simply an effect governed by caster level. Though the increase doesn't seem linear (+12 ticks from L44 to 48 vs +6 ticks form 48 to 49).

Goregasmic
04-19-2025, 09:15 AM
If you start with the most important stat as high as possible, though, it gives you more wiggle room to get more HP and MR.

Yeah I read guides saying cha is easy to get so go full sta or cha/int split, I went for a 15/15 split and regret it. Not a fatal mistake but I wish I went full charisma. Not all slots have interesting charisma options so going full cha frees up a bunch of those for more interesting gear.

Ah. Yes, I think you have the answer there. The orc pawn data was collected when I was level 44, the data with a cap at 155 when I was 48 and the data capped at 161 ticks when I was 49. So you're right, this is probably simply an effect governed by caster level. Though the increase doesn't seem linear (+12 ticks from L44 to 48 vs +6 ticks form 48 to 49).

That means a noticeable amount of pets will make it to the end, that's nice to know. Never noticed since I kill my pet after every fight for leveling but when you reach farming status it is sometimes more interesting to keep one around for a bit.

DeathsSilkyMist
04-19-2025, 01:46 PM
I made a streak calculator:

https://drive.google.com/file/d/18gzIKsjUnrd-QQnw4MXFQCxLkwAlN2DZ/view?usp=drive_link - minified

https://drive.google.com/file/d/1eT17wttAM3qp63xJceV3TNz731uiZPye/view?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/a2b2a6a5cf7dec5ee9c9a7493c6a73fb4de2584f/zone/spells.cpp#L5546


//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/a2b2a6a5cf7dec5ee9c9a7493c6a73fb4de2584f/zone/spells.cpp#L5562


//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:

https://www.project1999.com/forums/attachment.php?attachmentid=25318&stc=1&d=1745083910

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.

kjs86z2
04-21-2025, 09:43 AM
all that matters is FT8

bcbrown
04-21-2025, 04:02 PM
I made a streak calculator:

This is an excellent example of using Monte Carlo methods to generate an exponential or geometric distribution. Good work!

charleski
04-24-2025, 07:08 AM
Ok, I levelled up to 53 and got Boltran's to test against a higher-level mob: Corundium (https://wiki.project1999.com/Corundium), one of the L50 golems guarding the passage in the Overthere wall. An earlier attempt to use a guard at the East Cabilis gate failed miserably as it seems these are now 'newbie guards' and resist virtually everything. Many thanks to @bcbrown (Lakemist) for his help in acquiring these data (it would have been almost impossible to do solo).

TLDR: Charisma is now has a very significant effect.
Initial cast is disregarded and stats computed solely with regard to charm breaks.
Input data 1:
File: L53 Corundium CHA115.txt
Total trials: 92
p charm success (per tick): 0.7737
Wilson Score lower bound: 0.6609
Wilson Score upper bound: 0.8847
Input data 2:
File: L53 Corundium CHA226.txt
Total trials: 457
p charm success (per tick): 0.9454
Wilson Score lower bound: 0.9176
Wilson Score upper bound: 0.9726

probability difference: 0.1717

Newcombe-Wilson difference interval: -0.1161, 0.1144
Significant at 99% level

https://www.project1999.com/forums/attachment.php?attachmentid=25326&stc=1&d=1745490865

You'll notice that the number of trials is far fewer than in the previous example with the EJ spurbone. This was largely because attempting to keep the mob charmed with a CHA of 115 was almost impossible. A charm was attempted 32 times for each condition (CHA 115 or 226). With CHA 115 the maximum charm length was 10 ticks, and charm frequently broke after only 1 or 2 ticks, meaning we had to keep it rooted while I medded up to cast another expensive (400mana) Boltran's. With CHA226 the maximum charm duration was 60 ticks and I was frequently able to med up to full in between charm breaks.

Another notable feature is that in both conditions I noticed a significant number of resists on the initial cast of charm. There were 13 initial resists with CHA115 and 10 initial resists with CHA226 (out of 32 attempts for each). This difference was not statistically significant, but a lot higher than seen in my previous data set on the EJ Spurbone (2 resists out of 30 attempts at CHA115; 0 resists out of 18 attempts at CHA226).

Clearly some charisma modifier has been switched on when attempting to charm this L50 mob. This was either turned off for the lower-level mobs, or had such a weak effect that its presence was insignificant. For comparison, I plotted the 95% interval ranges for the orc pawn, EJ spurbone and L50 Corundium, all at a CHA of 115. There is obviously a very non-linear effect at play here:
https://www.project1999.com/forums/attachment.php?attachmentid=25327&stc=1&d=1745490865

The question now is whether this is a function of the absolute mob level or the level difference between mob and caster. Since this is a static and repeatable mob, I'll go back and repeat the test when I get to 60, whioch might provide some answer.

I've updated the parsing programs (attached) to accommodate Allure and Boltran's, and also added a boolean switch in each of them which allows you to include the success or failure of the initial charm cast in the statistics. For the purposes of this analysis, this was turned off.

DeathsSilkyMist
04-24-2025, 11:50 AM
Ok, I levelled up to 53 and got Boltran's to test against a higher-level mob: Corundium (https://wiki.project1999.com/Corundium), one of the L50 golems guarding the passage in the Overthere wall. An earlier attempt to use a guard at the East Cabilis gate failed miserably as it seems these are now 'newbie guards' and resist virtually everything. Many thanks to @bcbrown (Lakemist) for his help in acquiring these data (it would have been almost impossible to do solo).

TLDR: Charisma is now has a very significant effect.
Initial cast is disregarded and stats computed solely with regard to charm breaks.
Input data 1:
File: L53 Corundium CHA115.txt
Total trials: 92
p charm success (per tick): 0.7737
Wilson Score lower bound: 0.6609
Wilson Score upper bound: 0.8847
Input data 2:
File: L53 Corundium CHA226.txt
Total trials: 457
p charm success (per tick): 0.9454
Wilson Score lower bound: 0.9176
Wilson Score upper bound: 0.9726

probability difference: 0.1717

Newcombe-Wilson difference interval: -0.1161, 0.1144
Significant at 99% level

https://www.project1999.com/forums/attachment.php?attachmentid=25326&stc=1&d=1745490865

You'll notice that the number of trials is far fewer than in the previous example with the EJ spurbone. This was largely because attempting to keep the mob charmed with a CHA of 115 was almost impossible. A charm was attempted 32 times for each condition (CHA 115 or 226). With CHA 115 the maximum charm length was 10 ticks, and charm frequently broke after only 1 or 2 ticks, meaning we had to keep it rooted while I medded up to cast another expensive (400mana) Boltran's. With CHA226 the maximum charm duration was 60 ticks and I was frequently able to med up to full in between charm breaks.

Another notable feature is that in both conditions I noticed a significant number of resists on the initial cast of charm. There were 13 initial resists with CHA115 and 10 initial resists with CHA226 (out of 32 attempts for each). This difference was not statistically significant, but a lot higher than seen in my previous data set on the EJ Spurbone (2 resists out of 30 attempts at CHA115; 0 resists out of 18 attempts at CHA226).

Clearly some charisma modifier has been switched on when attempting to charm this L50 mob. This was either turned off for the lower-level mobs, or had such a weak effect that its presence was insignificant. For comparison, I plotted the 95% interval ranges for the orc pawn, EJ spurbone and L50 Corundium, all at a CHA of 115. There is obviously a very non-linear effect at play here:
https://www.project1999.com/forums/attachment.php?attachmentid=25327&stc=1&d=1745490865

The question now is whether this is a function of the absolute mob level or the level difference between mob and caster. Since this is a static and repeatable mob, I'll go back and repeat the test when I get to 60, whioch might provide some answer.

I've updated the parsing programs (attached) to accommodate Allure and Boltran's, and also added a boolean switch in each of them which allows you to include the success or failure of the initial charm cast in the statistics. For the purposes of this analysis, this was turned off.

Charisma does have an effect on the initial cast of charm, and golems tend to have higher MR. That coupled with your significantly less data for the 115 CHA testing could explain the difference. I'd advise testing on a mob with less MR, as MR will affect charm breaks quite a bit. That specific mob you are testing is going to break quite a bit probably due to it's MR whether or not CHA affects charm breaks, which can muddy the data.

There probably isn't a level 50+ special check of some kind, there's no evidence of that in the EQEMU code. Unless someone has a P99 patch note or some in-era evidence of that.

charleski
04-24-2025, 12:38 PM
Charisma does have an effect on the initial cast of charm

I found no evidence of that. Resist rates on the initial cast were equally high in both conditions.
That coupled with your significantly less data for the 115 CHA testing could explain the difference. I'd advise testing on a mob with less MR, as MR will affect charm breaks quite a bit. That specific mob you are testing is going to break quite a bit probably due to it's MR whether or not CHA affects charm breaks, which can muddy the data.
The number of trials compiled only affects the sensitivity of the test. The relationship between sensitivity and number of trials is effectively an inverse square law:
https://www.project1999.com/forums/attachment.php?attachmentid=25329&stc=1&d=1745511244
Sensitivity is, as a rough estimate, around twice the value shown in the graph. So the 1100 trials used for the EJ Spurbone gave a little under 2% sensitivity. But it rises rapidly for lower numbers of trials (this is one of the benefits of the Wilson Score). This test produced 92 tick-trials for the CHA115 condition and 457 for the CHA226 condition, and after adjusting for the change in p_hat this gives a sensitivity estimate of around 10%, comfortably under the difference that was found. So I feel confident in the result.

The goal here was to test on a mob with a fixed level that was easily accessible to allow repeatability. If you can think of another candidate with lower MR, please let us know.

There probably isn't a level 50+ special check of some kind, there's no evidence of that in the EQEMU code. Unless someone has a P99 patch note or some in-era evidence of that.
I think that, after 10+years of operation, it would be an error to assume that the code running p99 is identical to the EQEMU base.

kjs86z2
04-24-2025, 01:49 PM
the nerd boners are raging

DeathsSilkyMist
04-24-2025, 02:35 PM
I think that, after 10+years of operation, it would be an error to assume that the code running p99 is identical to the EQEMU base.

This is an incorrect assumption. The EQEMU codebase and the P99 codebase have been updated in tandem by the same programmers. P99 is just a branch of the EQEMU source code. This means you want to keep the codebases as similar as possible, so it is easier to update both codebases when you make bug fixes or other changes that apply to both codebases. The EQEMU code also has "legacy" versions of some variables and calculations to make it easier for people to make their own classic servers. This means EQEMU is already built with P99 type servers in mind out of the box.

Most of the P99 only changes probably deal with turning on/off bits of code and changing variables based on what patch the server is on, rather than significant changes to base EQEMU code.

My DPS calculator proves P99 is using the same EQEMU code for the calculations, due to how similar the calculator's results are to P99 parses:

https://www.project1999.com/forums/showpost.php?p=3733560&postcount=41

My streak calculator in this thread also matches your data quite well:

https://www.project1999.com/forums/showpost.php?p=3734584&postcount=38


The goal here was to test on a mob with a fixed level that was easily accessible to allow repeatability. If you can think of another candidate with lower MR, please let us know.


Honestly just don't pick a golem/construct type mob. As I said they tend to have higher MR from my experience.

I use
https://wiki.project1999.com/Mentrax_Mountainbone
And
https://wiki.project1999.com/Eldak_Howlingbear

For my DPS calculator, and their AC matches nicely with the expected AC value for a level 50 mob.


I found no evidence of that. Resist rates on the initial cast were equally high in both conditions.


You potentially did on both tests, you just dismissed them as insigificant.


Another notable feature is that in both conditions I noticed a significant number of resists on the initial cast of charm. There were 13 initial resists with CHA115 and 10 initial resists with CHA226 (out of 32 attempts for each). This difference was not statistically significant, but a lot higher than seen in my previous data set on the EJ Spurbone (2 resists out of 30 attempts at CHA115; 0 resists out of 18 attempts at CHA226).


For both the spurbone and the golem, you got more initial resists with less CHA. +3 initial resists on the golem and +2 initial resists on the spurbone at 115 CHA. Granted both datasets are small, so you really need to run a larger test on initial charm resistance before declaring CHA has no effect on the initial resist.

Goregasmic
04-24-2025, 03:05 PM
I don't think golem MR matters since it was the same for all tests? If anything, with no tash and high MR it helps mitigate the possibility that charisma is hidden behind already squelched resists. You'd just have to keep in mind you'll get lesser returns on mobs with low MR if tash already nullified all potential resists.

It is known mob level and MR has an effect on charm duration, here I think the level difference really shows and makes some "room" for charisma to do something. I hypothesized you might see no return on charisma on very low level mobs since the level difference is so big it nullifies any possible resists anyway. On a higher mob with resists that aren't buried under tash/level difference charisma could help. It seems to follow the logic of AC mechanics too so it wouldn't be a wild idea.

It is also known charm duration seems to nosedive past 50 due to level gap closing in. This tracks with what we already knew; past that point you can't squelch the mob's resists entirely.

DeathsSilkyMist
04-24-2025, 03:18 PM
I don't think golem MR matters since it was the same for all tests? If anything, with no tash and high MR it helps mitigate the possibility that charisma is hidden behind already squelshed resists. You'd just have to keep in mind you'll get lesser returns on mobs with low MR if tash already nullified all potential resists.

It is known mob level and MR has an effect on charm duration, here I think the level difference really shows and makes some "room" for charisma to do something. I hypothesized you might see no return on charisma on very low level mobs since the level difference is so big it nullifies any possible resists anyway. On a higher mob with resists that aren't buried under tash/level difference charisma could help. It seems to follow the logic of AC mechanics too so it wouldn't be a wild idea.

Yes and no. Based on the EQEMU code, there is a minimum resist chance. This means the MR and level difference of the mob can't be so low that you hit the minimum resist chance. In that case you are correct that the effect of CHA would be hidden, because you would be at the minimum resist chance already.

However, if MR is too high, you may not notice CHA's effect either.

In my streak calculator:

https://www.project1999.com/forums/showpost.php?p=3734584&postcount=38

You can see that once you get to a certain resistance chance, the average duration of a charm doesn't change much. For example, you'll only get an average difference of 2-3 ticks per charm when going from a resist chance of 70 to a resist chance of 90 when rolling against a d200. If the CHA scaling is correct, you only get -18 to the resistance chance at 255 CHA.

My streak calculator is doing millions of dice rolls, so it can be hard to see an average 2-3 tick difference on a smaller set of data.

Goregasmic
04-24-2025, 04:11 PM
Ah ok, we don't disagree.

I have the feeling if you'd have 115 cha @60, mobs around lvl45 would start making charm quality decline. With maxed cha you could probably keep that charm quality maxed on mobs until level 49 or so then it declines drastically (with tash always applied).

I'd be curious to know what's the average MR on a 50+ mob and is MR its own thing or the level gap also chips into the +resist pool of the mob. Would something like malo and/or -resist gear prop charm up to make an ilis froglok (53) close to a level 49 mob in charm quality or if its MR is already bottomed out level gap alone will keep charm quality declining? That's probably the biggest implication at this point if you intended on keeping cha maxed anyway.

Duik
04-24-2025, 09:26 PM
the nerd boners are raging

Thats called a brainer.

Goregasmic
04-25-2025, 07:39 AM
Not sure how accurate that is but according to this eqemu npc scaling chart lvl52 named has 32 MR. Outside of mobs with abnormally high MR it would seem you could bottom out resists with tash on almost anything you can boltran. We don't know if the NPC resist floor is 0 or if going under 0 provides additional benefits to charm.


https://docs.eqemu.io/server/npc/npc-scaling/

DeathsSilkyMist
04-25-2025, 10:22 AM
Not sure how accurate that is but according to this eqemu npc scaling chart lvl52 named has 32 MR. Outside of mobs with abnormally high MR it would seem you could bottom out resists with tash on almost anything you can boltran. We don't know if the NPC resist floor is 0 or if going under 0 provides additional benefits to charm.


https://docs.eqemu.io/server/npc/npc-scaling/

Nice find on the doc. The floor is usually above zero because the random function generates a number between 0 and 1, like 0.33. That gets multiplied by the total number of dice faces. So 0.33 * 200 = 66.

ewjax
05-21-2025, 05:13 PM
Ok, I levelled up to 53 and got Boltran's to test against a higher-level mob: Corundium (https://wiki.project1999.com/Corundium), one of the L50 golems guarding the passage in the Overthere wall. An earlier attempt to use a guard at the East Cabilis gate failed miserably as it seems these are now 'newbie guards' and resist virtually everything. Many thanks to @bcbrown (Lakemist) for his help in acquiring these data (it would have been almost impossible to do solo).

TLDR: Charisma is now has a very significant effect.
Initial cast is disregarded and stats computed solely with regard to charm breaks.
Input data 1:
File: L53 Corundium CHA115.txt
Total trials: 92
p charm success (per tick): 0.7737
Wilson Score lower bound: 0.6609
Wilson Score upper bound: 0.8847
Input data 2:
File: L53 Corundium CHA226.txt
Total trials: 457
p charm success (per tick): 0.9454
Wilson Score lower bound: 0.9176
Wilson Score upper bound: 0.9726

probability difference: 0.1717

Newcombe-Wilson difference interval: -0.1161, 0.1144
Significant at 99% level

https://www.project1999.com/forums/attachment.php?attachmentid=25326&stc=1&d=1745490865

You'll notice that the number of trials is far fewer than in the previous example with the EJ spurbone. This was largely because attempting to keep the mob charmed with a CHA of 115 was almost impossible. A charm was attempted 32 times for each condition (CHA 115 or 226). With CHA 115 the maximum charm length was 10 ticks, and charm frequently broke after only 1 or 2 ticks, meaning we had to keep it rooted while I medded up to cast another expensive (400mana) Boltran's. With CHA226 the maximum charm duration was 60 ticks and I was frequently able to med up to full in between charm breaks.

Another notable feature is that in both conditions I noticed a significant number of resists on the initial cast of charm. There were 13 initial resists with CHA115 and 10 initial resists with CHA226 (out of 32 attempts for each). This difference was not statistically significant, but a lot higher than seen in my previous data set on the EJ Spurbone (2 resists out of 30 attempts at CHA115; 0 resists out of 18 attempts at CHA226).

Clearly some charisma modifier has been switched on when attempting to charm this L50 mob. This was either turned off for the lower-level mobs, or had such a weak effect that its presence was insignificant. For comparison, I plotted the 95% interval ranges for the orc pawn, EJ spurbone and L50 Corundium, all at a CHA of 115. There is obviously a very non-linear effect at play here:
https://www.project1999.com/forums/attachment.php?attachmentid=25327&stc=1&d=1745490865

The question now is whether this is a function of the absolute mob level or the level difference between mob and caster. Since this is a static and repeatable mob, I'll go back and repeat the test when I get to 60, whioch might provide some answer.

I've updated the parsing programs (attached) to accommodate Allure and Boltran's, and also added a boolean switch in each of them which allows you to include the success or failure of the initial charm cast in the statistics. For the purposes of this analysis, this was turned off.

This is really excellent work, thanks for pulling this together and sharing! Coincidentally, recently some of us were mulling over similar questions about charm duration and discussing it in the Enchanter channel in our guild discord, and I thought I might share some thoughts / ideas here:

1) Probability of Charm Duration

If the charm-break check is being performed every tick, then I believe the math associated with that check is given by:

pd(n) = (1-p)^n

where

pd(n) = probability that charm duration will achieve 'n' ticks
p = probability that charm will fail on any given check
n = number of successive charm break checks

This equation generates this graph, which matches exactly with both the PREDICTED graphs generated by OP, as well the MEASURED histograms also generated by OP. Really cool that the measured histogram data matches the prediction so nicely.

2) Inferring Mob Level from Max Melee Values

To help quantify the level difference topic, OP might be able to tighten up charmed-mob level estimates by using this equation, which correlates mob level with its observed max melee values:

Mob Level <= 30: Level = MaxMelee / 2.0
Mob Level >= 30: Level = (MaxMelee + 60) / 4.0

This works reasonably well on most exp mobs up thru Kunark, and some of Velious, although exceptions begin to creep in here and there (giants, spectres, some Hole mobs, some Juggs in Seb, etc)

But you might be able to use this to tighten up your estimate of mob level, and thus the assessment on impacts from level difference.

3) Suggestions for other higher level charm targets

Agree, Corundium is tough, his charm break data seems to vary quite a bit from other mobs, to the point I have wondered if he has some special case coding going on or something.

Suggest the two level 50 giants in FM as possible candidates (although they are often camped by exp grinders).

https://wiki.project1999.com/Mentrax_Mountainbone
https://wiki.project1999.com/Eldak_Howlingbear

I have used them for levelling, I will see if I can run some tests and share the data here.

4) Other Discussion

If we hypothesize that p, the probability of charm break on any given tick, is a function of the three variables mentioned, i.e.

p = f(level diff, CHA, MR)

then the challenge is to try to measure that, using your handy parsing code, or infer it from reading the EQEmu source code and hoping that is representative of the P99 source code.

Trying to infer it from the EQEmu source code is pretty tough. My opinion, that code is a snake pit, mostly uncommented, full of special cases and difficult to understand code. I've tried to read it and it's tough sledding. But maybe other folks might have better luck.

Goregasmic
05-21-2025, 06:59 PM
If you want to test mobs of a particular level loramin came up with this list, post #49

https://www.project1999.com/forums/showthread.php?t=437358&page=5

Some quest mobs might be tougher than usual so might want to check them out on the wiki first.

I know chardok has some static-level 53s like di'zok cryptmaster you could borderline charm with boltran. Shouldn't be too long to get a bunch of samples in at 53 but unlike the low level mobs that are too tame to let charisma make a difference, it is possible the 53s are too unruly to see a noticeable difference too.

My chanter is 85% into 59. I'll be able to do some testing relatively soon.

commongood
05-22-2025, 09:05 AM
Thanks a bunch to the OP for all the hard work and to the rest of you data-heads for all the great input.

Just a curiousity: why are we using Boltran's to charm a lvl 50 mob? Why not use Allure and save mana?

Also, Boltran's entrance on the wiki states much shorter maximum duration (~7 mins vs, for instance Cajoling Whispers and Allure both of whom are ~20 mins max duration).
I don't know how these maximum durations have been established and it could well be that Boltran's is exclusively used on lvl 51+ mobs why are always much closer to the caster's own level and thus will generally not last as long. But it could be that Boltran's works differently from the previous spells in that line.

kjs86z2
05-22-2025, 12:05 PM
cast time

can recharm on a stun without having to mez

Goregasmic
05-22-2025, 12:13 PM
cast time

can recharm on a stun without having to mez

You can do it too with allure and a gcd reset on a 8sec stun if you're quick enough.

spoil
05-22-2025, 01:38 PM
Allure is a 6-second cast time so it's not that tight, unless you don't have keybinds and you're clicking your spells or something. But Boltrans can also be useful when fighting a mob that's immune to stun, less opportunity for your recharm to get interrupted.

commongood
05-26-2025, 06:35 AM
cast time

can recharm on a stun without having to mez

I didn't mean in general, I meant specifically for this experiment. I understand using Boltran's in live scenarios with high level mobs where the reduced cast time matters. But for testing it seems the extra mana cost is a meaningful burden.

enjchanter
05-28-2025, 11:50 PM
the AI is getting pretty good

also thats a lot of words to say (your level vs mob level) > MR > 255 cha...something that has been known for decades now

and to suggest enc start STR is absurd...even if its a trivial difference in charm durations ill still take it to decrease lull crit fails

^^

bcbrown
06-29-2025, 09:04 PM
I've been doing a little digging into Torven's writeups on equemu, and I think he can explain why you didn't see an effect from level difference here:


A few days before performing the experiment with CHA I went to GFay and faced off against the mighty level 2 orc pawn (confirmed white-con to a level 2 player). This test was also performed with a CHA of 115. I was 48 at the time, so the difference was 46 levels, as opposed to 11-12 levels against the greater spurbone in EJ.


What we can determine from this is that there is a limit as to how much advantage a player gets from being a higher level than the NPC-- that limit is 20% resist rate, or 40 resist value. Resist rate flattens starting at +9 levels above the NPC-- the level advantage players get over NPCs is capped at 9 levels, and 9 levels corresponds with 20% resist rate. The second item of note is that the rate of change is not linear, and gets stronger the farther away from the NPC's level one is. The warlord and soldier resist rates hit 100% at their two points due to the maximum allowable level hit range.

from https://web.archive.org/web/20200813133025/https://www.eqemulator.org/forums/showthread.php?t=38673


The resist modifier from level difference is: diff^2 / 2, capped at -40. Charm ticks add +4 to the caster's level here. For example, the Crystalline golem's effective MR vs a level 65 would be: 50 - INT((65-62)^2 / 2) = 46. But for charm ticks: 50 - INT((69-62)^2 / 2) = 26.

from https://www.eqemulator.org/forums/showthread.php?t=43370

This suggests there is a level cap, which explains why this data doesn't show any impact from level difference (11-12 levels vs 46 levels)