#1
|
|||||||||
|
Channeling Fix
Channeling rate on P99 seems to be inaccurately high particularly at lower levels. This was previously discussed in another thread but I'm starting a new one for visibility.
EVIDENCE Old bug report: https://www.project1999.com/forums/s...d.php?t=343453 Torven TAKP discussion on changing to the decompiled methodology: https://www.takproject.net/forums/in...68/#post-72810 Dolalin private message to me repeating statement from TAKP dev: Quote:
https://web.archive.org/web/20061207...sage.id=239994 https://web.archive.org/web/20061011...cending&page=3 Quote:
Quote:
Quote:
Quote:
EQEMU This is because the EQEmu code starts with a guaranteed ~30% success rate, scales up too quickly with channeling skill improvements, does a 100 roll, and only does a single channeling check roll for a spell cast which is modified by the number of times you are hit. It is widely known that the EQEmu code is based on nothing. Classic evidence compiled from archived live EQ developer forum posts and decompiled EQ Mac client code by an EQEmu developer indicates this is incorrect. Forum posts support that a channeling roll is done separately for every time you are hit. The client decompile gives us near exact methodology for channeling during classic era. This methodology can be summed up in the following code which is based on Dolalin's LUA pseudo code provided by the EQEmu developer who reverse engineered the classic client. I used that exact same methodology but converted to C++ code and replacing the existing spells.cpp logic. + spell_level_diff_bonus = GetLevel() - spells[spell_id].classes[GetClass()-1]; + if(spell_level_diff_bonus < 6) { + spell_level_diff_bonus = 0; + } else { + spell_level_diff_bonus = spell_level_diff_bonus * 3; + } + channelchance = GetSkill(EQ::skills::SkillChanneling) + GetLevel() + spell_level_diff_bonus; + if(channelchance > 370) { + channelchance = 370; + } + if(!spells[spell_id].uninterruptable) { + LogSpells("Channel chance: [{}]", channelchance); + int channel_checks = attacked_count; + for(channel_checks; channel_checks > 0; channel_checks--) { + int interruptchance = zone->random.Real(0, 391); + LogSpells("Interrupt roll: [{}] Check Number: [{}]", interruptchance, channel_checks); + if(interruptchance > channelchance && interruptchance > 39) { + LogSpells("Casting of [{}] canceled: interrupted", spell_id); + InterruptSpell(); + return; + } + } } METHODOLOGY First, we get the difference between the player level and the spell scribe level. For my Enchanter example I am level 20 using a level 12 spell so the value is 9 inclusion of the scribe level. Second, we check if the difference value is 6 or more. If not, no modifier is applied. If yes, a bonus to channeling chance is created which is 3x the difference and in this example would be 9*3 or 27. Third, we calculate our channeling chance which is your channeling skill level, plus your player level, plus the spell scribe/player level difference bonus. In this example that is 100 channeling skill, plus level 20, plus a 27 bonus for casting a level 12 spell (Choke) giving us a chance of 147. Fourth, we check if our channeling chance is greater than 370 and if so set it back to 370 which is the maximum chance you can have as an interrupt is always a possibility. Fifth, once you cast this spell a count is obtained of the number of times you are attacked. At the end of the cast a separate interrupt chance roll is done for every time you were attacked. The EQEmu code caps this attack count at 15 and I have left this alone, it is unknown if classic had a cap but the decompile doesn't seem to indicate there was one. The roll value is 391 compared to your channeling chance which in this case is 147 for a level 20 Enchanter casting Choke. This means if you are hit once the interrupt roll of 391 must be less than your channeling chance of 147. If it is higher you are interrupted. A level 20 Enchanter has a 38% chance to cast Choke through 1 attack. A level 20 Enchanter has a 31% chance to cast a level 20 spell through 1 attack. A level 50 Enchanter has a 78% chance to cast through 1 attack. This gives the new function: X = times hit during cast, capped at 15 Y = player level Z = scribe level to player level difference if >=6 channel_chance(x, y, z) ((Y * 5 + 5 + Y + Z * 3) / 391)^X = A Or for our level 20 Enchanter casting a level 12 spell and being hit 1-4 times and 15 or more times... channel_chance(1, 20, 9) = ((20 * 5 + 5 + 20 + 9 * 3) / 391)^1 = 39% success rate channel_chance(1, 20, 9) = ((20 * 5 + 5 + 20 + 9 * 3) / 391)^2 = 15% channel_chance(1, 20, 9) = ((20 * 5 + 5 + 20 + 9 * 3) / 391)^3 = 6% channel_chance(1, 20, 9) = ((20 * 5 + 5 + 20 + 9 * 3) / 391)^4 = 2% channel_chance(1, 20, 9) = ((20 * 5 + 5 + 20 + 9 * 3) / 391)^15 = .0000007% Level 20 Enchanter casting a level 20 spell and being hit 1-4 times and 15 or more times... channel_chance(1, 20, 9) = ((20 * 5 + 5 + 20 + 0 * 3) / 391)^1 = 32% success rate channel_chance(1, 20, 9) = ((20 * 5 + 5 + 20 + 0 * 3) / 391)^2 = 10% channel_chance(1, 20, 9) = ((20 * 5 + 5 + 20 + 0 * 3) / 391)^3 = 3% channel_chance(1, 20, 9) = ((20 * 5 + 5 + 20 + 0 * 3) / 391)^4 = 1% channel_chance(1, 20, 9) = ((20 * 5 + 5 + 20 + 0 * 3) / 391)^15 = .00000004% A level 50 Enchanter casting a level 49 spell and being hit 1-4 times and 15 or more times... channel_chance(1, 20, 9) = ((50 * 5 + 5 + 50 + 0 * 3) / 391)^1 = 78% success rate channel_chance(1, 20, 9) = ((50 * 5 + 5 + 50 + 0 * 3) / 391)^2 = 60% channel_chance(1, 20, 9) = ((50 * 5 + 5 + 50 + 0 * 3) / 391)^3 = 47% channel_chance(1, 20, 9) = ((50 * 5 + 5 + 50 + 0 * 3) / 391)^4 = 37% channel_chance(1, 20, 9) = ((50 * 5 + 5 + 50 + 0 * 3) / 391)^15 = 2% This is the existing EQEmu formula and again X is capped at 15 attacks: ((30 + Y / 400 * 100) - X * 2) / 100 = A Currently on P99 a level 1 character casting a level 1 spell and being hit 1 times with 5 channeling skill has a 29% success rate. Level 20 casting a level 20 spell and being hit 1 times has a 54% success rate. Level 20 casting a level 20 spell and being hit 4 times has a 48% success rate. Level 20 casting a level 20 spell and being hit 15 or more times has a 26% success rate. Level 50 casting a level 49 spell and being hit 1 times has a 92% success rate. Level 50 casting a level 49 spell and being hit 4 times has a 86% success rate. Level 50 casting a level 20 spell and being hit 15 or more times has a 64% success rate. SUMMARY This demonstrates how broken channeling is using the EQEmu code compared to classic decompiled channeling and developer forum post supported code changes. A level 1 Enchanter casting a level 1 spell after being hit 1 time has a 29% success rate on EQEmu code compared to 10% on proposed classic code. A level 20 Enchanter casting a level 20 spell after being hit 15 or more times has a 26% success rate on EQEmu code compared to .00000004% on proposed classic code. A level 50 Enchanter casting a level 50 spell after being hit 15 or more times has a 64% success rate on EQEmu code compared to 2% on proposed classic code. Making channeling classic would represent a fundamental change to P99 gameplay mechanics which will reintroduce difficulty at all levels of the game and likely put an end to a lot of existing "cheesy" strategies. It may also even allow reverting AE group nerf changes as AE killing mobs would be significantly more challenging. This change will reintroduce a lot of the difficulty involved in soloing in particular especially indoors or without SoW/Jboots and in theory should encourage more grouping and social behaviour which I feel is lacking on P99 due to the ease of soloing and primarily related to channeling ability. It may also add to the difficulty of high level play including raiding and especially in situations where players are currently relying on being able to cast while being attacked by multiple high level mobs. NOTE: Dolalin mentioned he has provided the LUA code from EQEmu dev who decompiled the classic client. I have this as well but won't post it since he probably wanted it kept private for a reason and will leave that up to him to repost if needed. A patch file is attached for my code changes. NOTE2: I also change the NPC channeling chance from EQEmu 85 to 391 in my patch because the channeling roll changes from 100 to 391 which means NPC channeling also needs to conform to this higher roll. The NPC channeling chance on P99 already seems to be modified so that would need to be reviewed by devs to ensure this change doesn't interfere. I don't know how NPCs calculate distance moved channeling check or if they are using the EQEmu code, I imagine they're using a different code base. NOTE3: There is also a "&& interruptchance > 39" in the code which I didn't mention above. This is the lower limit of channeling chance from the classic decompile which effectively sets your channeling chance to 39 and was likely to help lower level players. A level 3 player with the formula above has a 6% chance to channel through 1 hit for example, level 1 is only 3% chance. This bit of code raises the channel success rate to 10% for level 1-5 and then at level 6 the formula scales to higher than 10%. NOTE4: I have done no validation for Bard songs, NPCs, etc because that code seems to be handled by separate code blocks within the same function. Might be worth checking before making this live. NOTE5: The reason I left the attack cap at 15 attacks is due to performance concerns. I have not stress tested or validated performance changes due to this code change. A character being hit 1,000 times would previously do 1 random, now they will do 15, without a cap they would do 1,000. This seems like it has some potential to degrade performance but limiting to 15 per character should avoid that while still approaching a near 0% success rate. It may be worth considering adding something like if attack count is > 30 we just guarantee an interrupt of the spell. This would avoid rolls where players are hit >30 times instead of doing the 15 rolls and would guarantee that if players are being hit excessively they will fail rather than giving them that small chance of success which according to the decompile and dev statements doesn't exist. NOTE6: Although I enjoy trolling Enchanters this change is intended to make P99 more classic and my quest to fix this began when I was just bored with P99. I saw too many people soloing, power leveling up alts due to the ease of leveling, and generally being unsocial jerks in the game. I knew live EQ was much more challenging to solo on any caster class and that this is a big part of why grouping was more popular except for the few classes like Necro, Druid, etc who had ways to avoid channeling checks via pets, run speed buffs, etc. I'll end with archived Enchanter tears from the archived thread above where an Enchanter was crying that now they won't be able to crowd control as easily since the old channeling code is being restored. This matches the live Enchanter experience where Enchanters died more than any other class and were in short supply for that reason as no one wanted to play it. Enchanter is powerful but also should be much more difficult to play well and their power is primarily level 50+. Quote:
| ||||||||
Last edited by azxten; 12-04-2021 at 08:23 PM..
|
#2
|
||||
|
Patch file:
https://www.pastefile.com/2969hw Quote:
https://imgur.com/a/zncfhij Successful cast [You must be logged in to view images. Log in or Register.] Two rolls failure [You must be logged in to view images. Log in or Register.] One roll failure, we don't reroll if you failed the first roll [You must be logged in to view images. Log in or Register.] | |||
#3
|
|||
|
Stop spamming.
| ||
#4
|
|||
|
I confirm I supplied the LUA pseudocode that Torven sent me from TAKP for this change.
| ||
#5
|
|||
|
nilbog isnt going to even glance at this bro
| ||
#6
|
|||
|
I don't know nilbog but this looks like an exemplary bug report and your shit posting isn't warranted in this guys thread. In my threads I consider it acceptable but only because I'm a bristlebane guy.
| ||
#7
|
|||
|
It's okay I like the haters. Nilbog already said in PM he'll review it but it also likely warrants testing as I noted which may take awhile.
| ||
#8
|
||||
|
Quote:
__________________
Loramin Frostseer, Oracle of the Tribunal <Anonymous> and Fan of the "Where To Go For XP/For Treasure?" Guides Anyone can improve the wiki! If you are new to the Blue or Green servers, you can improve the wiki to earn a "welcome package" of platinum and/or gear! Send me a forum message for details. | |||
#9
|
|||
|
Feels good. On classic I corner casted AoE spells with like 8 mobs on me as a wiz, more than that was crazy, I imagine sometimes they missed it was hard and not easy.
Otherwise I would strafe run and turn a bit to try and get a root off if out of doors. | ||
#10
|
|||
|
I haven't had the time to review this yet, but if it is an improvement on our existing system, it will certainly be considered and credit given where it is due.
| ||
|
|