NPC Double Attack and Dual Wield Chance Parses
Hello again. My second thread will be about NPC double attack and dual wield chance.
Data Collection Methods and Tools Parsing logs is sort of my thing. Scripts to count up resists aren't the only parsers I wrote. In my efforts to assist Project EQ/TAKP, I wrote parsers specifically for the purpose of determining NPC attack delays and round sizes. One of my parsers calculates NPC double attack and dual wield rates. I charmed mobs and gave them two weapons with the same delay but different damage types (piercing, slash) to know which hand the attack came from. I then let them beat on me with my back turned for 3+ hours. (a few were overnight 8+ hours) My parsing scripts and the logs themselves can be found on my google drive: https://drive.google.com/folderview?...p=sharing#grid Data Analysis A more detailed analysis (the output from my parser) of each individual log can be found here: http://pastebin.com/thcZtkYN Here are the distilled results: Code:
Double Attack Chance http://i.imgur.com/o4bt8mL.png http://i.imgur.com/o4bt8mL.png http://i.imgur.com/dvViNp0.png http://i.imgur.com/dvViNp0.png If an NPC can dual wield, and you give it two weapons, then its model will visibly update with the weapons in hand. I gave level 1 and level 3 mobs two weapons and they did not wield the second one, but a level 4 mob did use both and was attacking for both damage types. I also parsed a level 15 cleric NPC and a level 45 wizard NPC to see what their dual wield rates were: Level 15 Cleric NPC Dual Wield rate: 21.1% Level 15 Cleric NPC Double Attack rates: 15.1%, 0% Level 45 Wizard NPC Dual Wield rate: 68.7% Level 45 Wizard NPC Double Attack rates: 50.8%, 50.1% This is in-line with Warrior NPCs. EQ Emulator doesn't currently have casters double attacking, which is sort of a big deal. (Vox is swinging once per round!) Conclusions
The Game Logic of NPC Attacks Per Round The way NPC attacks work in EQ is like this:
Not all NPCs can wield weapons. These NPCs can spawn with weapons or be given them while charmed and they will refuse to wield them, meaning they will never quad attack no matter what. (assuming it is not innate dual wield flagged) Examples include animal NPCs in PoP (poor druids); giants in BoT; and robe, cavemen, and alien NPCs in Maiden's Eye. I've not been looking for this so I don't have a long list, but it seems common in PoP. I don't know of any examples before Luclin; giving animal pets weapons in earlier eras on my druid seemed to work fine until PoP. Maybe it's a Luclin addition? NPC innate quad (which is really innate dual wield) was a feature added to raid bosses in the Velious expansion. (even VP dragons only doubled without weapons) It works as follows:
If a NPC does not have this innate quad/dual wield feature enabled, then it will always double attack unless it is wielding two 1H weapons. This flag was generally only enabled on raid bosses, and not every boss had it-- The Statue of Rallos Zek for example did not quad unless it spawned with two weapons. I've only found a few 'trash' mobs that had it, like the level 68 doomfire NPCs in PoFire. Currently EQ Emulator has three flags related to round sizes: Triple Attack, Quad Attack, and Dual Wield. However enabling Dual Wield for an NPC on EQEmu makes it quad even without weapons. This is either an oversight or a design choice that doesn't match with EQLive. (seems redundant to design it to function like Quad Attack though) On EQLive, dual wield is seemingly enabled for every NPC in the game starting at level 4. (admittedly my sample size isn't huge enough to prove this 100% but I think it likely) So a more accurate functionality would be to hard-code the enabling of dual wield on all NPCs level 4 and above, then replace the Dual Wield flag with a 'Can't Wield' flag. (or a 'Wields Weapons' flag, but this would end up being checked on the vasty majority of NPCs) For more accuracy, Quad Attack should be replaced with 'Innate Dual Wield' which enables off-hand attacks without an off-hand weapon instead of 4 attacks from the main-hand. Here is some sample data I derived my conclusions from: Code:
NToV dragons with innate dual wield wielding one weapon When EverQuest was younger, Warriors and Monks got a hidden innate triple attack at level 60 that was not something that raised up like regular skills. My parses of Al'Kabor and EQ circa 2003 also have every level 60+ Warrior and Monk NPC triple attacking-- it wasn't just given to player characters. I don't know if other classes (like rangers) got it; I think some other classes might have gotten it at a later time. In modern EQ, level 60+ NPCs no longer triple. I assume NPCs lost triple attack once SOE made triple attack an 'official' skill rather than a small innate chance. I know of no NPCs on EQLive that triple but not quad. (with the exception of sub level 36 mobs that cannot double attack the off-hand) Note that rogue NPCs that backstab the front of a target will display as a normal hit instead of a backstab, which can make the round look like it has one more swing in the log. As far as I know, triple attack had a small chance to occur on a successful double attack. My parses suggest a 10% chance to occur on a successful double attack round, but this has a wide margin of error. My data collecting efforts began only after the Al'Kabor shutdown notice and my time was spent collecting NPC min hit, max hit, and max hp data, so I wasn't thinking about this kind of data at the time, otherwise I'd have produced an overnight log or two. Some example Al'Kabor data: Code:
Level 60+ Warrior NPCs Some EQLive data: Code:
Level 60+ Warrior NPCs Al'Kabor sourced log evidence: Code:
1.7 delay mob: |
I'm a bit sad to not see a reply to this post, because certain inaccuracies are hugely imbalancing to the game on emu servers right now, and preventing me from some database entry work.
Having a little more knowledge of how EQEmu works under the hood now, it's obvious to me that what needs to be done is to decouple the NPC logic from the PC logic. NPC monks on EQEmu were for example using attack delay values from the bare fists delay table for PCs, which is silly. (demonstar fixed this I believe) It's clear to me that NPCs have their own separate simplified combat logic. Even the ability to bash isn't linked to class-- Trakanon for example is a necromancer that bashes. SOE devs seemingly set if NPCs can bash or not independent of class, and just often not gave it to caster NPCs. Class also has no bearing on dual wield or double attack availability or rates, as I mentioned previously. Caster NPCs not double attacking is a huge, huge balance issue and easily resolved. Right now it's impossible to make Trakanon double as he should be; it's either single attack rounds (which should never happen for any NPC in the entire game, minus perhaps level 1 mobs which I have not confirmed either way) or quad rounds without weapons-- there is no other state to set the mob without changing its class to a melee class. Also, flagging an NPC as dual wield capable is making it quad without weapons, so nothing can be set to dual wield in the database right now without making the mobs always quad. This has large implications for charmed pets and NPCs that naturally spawn with two weapons, like guards. Lastly, I learned two more important things since I started this thread: One, level 2 mobs can double attack (just very rarely of course), and Two, NPCs cannot wield a weapon in a particular hand unless the weapon is flagged for that hand just like PCs can't. I.e. Trakanon was only doubling me even though he had multiple teeth (which are daggers) because he couldn't offhand one because it was PRIMARY only. |
I have to admit, this thread passed me by. Interesting stuff, and will prob take a few days to digest.
Of course the consequences are massive both in code terms but also I imagine the peq database would have to have every mob tweaked.... |
This is impressive, nicely done Torven. Hope this information is put to good use.
|
DA chance: rand(500) <= skill
DW chance: rand(375) <= skill At least until 36. then it changes a bit :( |
Great read, makes me want to go do some internal testing.
|
Nicely done. Planning to start a server to tinker with in the next week or two.
|
From the parses it seems mobs skills follow: 5 * level until 51 where it becomes 250. (for DA and DW for all the mobs that Torven parsed)
36+ there is a level bonus added into their checks. DA uses rand(500), DW uses rand(375) Clients require 150 DA to offhand double attack, mobs appear to require level 36+ |
Triple Attack for clients on live appears to be: rand(1000) <= skill (plus that TA% chance SPA)
Although I only did rather short parses (27m) rand(1000) worked out for all 3 toons (85 mnk, 85 brd, 67 rog) I was parsing with error of 1-3%. |
This seems to fit the data well:
Code:
uint16 skillLevel = std::min(moblevel * 5, 200); |
So that satisfies non-pet NPC rates, but what about pets?
Two years ago I parsed all the pets up to PoP era, but never posted it. The data can be found here: https://drive.google.com/open?id=10c...9Zu1xUHSgsZL9U I'm told that Daybreak is screwing with pet stats lately, so who knows if it's current. However in 2015, pet effective skill levels were min(level * 5, 225) + level for both double attack and dual wield for mage, necro and enchanter pets at all levels. This resulted in rates higher than non-pet NPCs for most levels. Beastlord and shaman pets had lower rates: min(level * 5, 200) + level after level 35 for both double and dual. Under level 35, shaman pets were level * 5 for double attack, but not dual wield. Beastlord pet double attack seemed to be lower still at level * 5 - (35 - level) or at least that fit pretty well. Sub 35 pet dual wield rates were quite low for both classes-- less than half the rate as the other classes. Beastlord pets below level 25 did not dual wield at all, even when given weapons. This makes beastlord pets theoretically worse dps than shaman pets at some of the lower levels. (assuming they have equal offense/atk and to-hit and discounting procs) Beastlord pets however do get the block skill incidentally. (they seem to block at half the rate or so of PC monks) https://i.imgur.com/sq7UcKc.png https://i.imgur.com/sq7UcKc.png So that's Live circa 2015. But what about old EQ? Time for the hard stuff. I searched logs from Al'Kabor for pet combat, copy and pasted into new files and ran scripts on them to get attacks per round. I happened to have logs of myself raising defense skill with pets in the Arena, which were extremely useful. Demonstar finding the precise function for Double Attack and Dual Wield in the client allowed me to create a simulator script that I ran to know what the round sizes would look like at various skill levels. I could then compare this data to parsed logs. The resuts were remarkably conclusive: Code:
Enchanter pet Aanya's Animation; Level 29-33 Code:
Double Attack / Dual Wield Simulator: 10000000 rounds; Level = 40; Double Attack skill = 240; Dual Wield skill = 240 I've also discovered that PCs get the +level added to their doubles and duals at level 30, not 36. (at least on Al'Kabor) Data: Code:
File: I:\Parse\monk level 29-30.txt |
I went on Live and parsed some pet avoidance rates to estimate skill caps. I also parsed my 2015 logs and the results matched logs that I produced in November, so they don't appear to have been modified in the last couple of years.
At some point Sony granted pets (Mage, Ench and Necro pets anyway) the block skill and raised avoidance skill caps considerably, while still leaving the parry skill (monks don't parry). Block is a very effective avoidance skill, so all 4 combined result in avoidance rates of around 30% BEFORE avoidance AC checks which is insane. This is a large reason why modern pets are so much more powerful than they used to be, and yet another reason why I wonder why the TLPs are so popular when TAKP and P99 are significantly better classic EQ experiences. (although I'm unfamiliar with p99's pet stats) Beastlord and Shaman pets have lower skill caps, shaman pets don't have block, and beaslord pets don't parry. Beastlord pets had block instead of parry on AK as well and were the only pets that did as far as I'm aware. I updated my pet data spreadsheet with the avoidance skill data, which is located here: https://docs.google.com/spreadsheets...Zu1xUHSgsZL9U/ The following are simple skill formulae that match the data: Beastlord Riposte = min(level * 5, 100) add 25 for PoP pets Block = min(level * 5, 50) add 25 for the highest Kunark pet, the Luclin pet and PoP pets Parry = 0 Dodge = min(level * 5, 125) Enchanter Riposte = min(level * 5, 200) Block = min(level * 5, 225) Parry = min(level * 5, 200) Dodge = min(level * 5, 150) add 25 for PoP pet Mage Riposte = min(level * 5, 200) Block = min(level * 5, 225) Parry = min(level * 5, 150) add 25 for Kunark and PoP pets Dodge = min(level * 5, 150) add 25 for Kunark and PoP pets Necro (not Emissary of Thule) Riposte = min(level * 5, 200) Block = min(level * 5, 200) add 25 for PoP pets Parry = min(level * 5, 175) Dodge = min(level * 5, 175) Emissary of Thule - this had atypically low skill levels Riposte = 150 Block = 0 Parry = 200 Dodge = 225 Shaman Riposte = min((level - 12) * 5, 100) Block = 0 Parry = min((level - 7) * 5, 125) Dodge = min((level - 11) * 5, 125) Caveats: * I didn't parse anywhere near every pet, because these took 8 hours each to make. * It's possible/likely that RNG resulted in a few estimates that were off by a percent, but the above formulae all fit the data except for one case I believe. Again, not all pets were parsed so it's likely not perfect. * The avoidance rolls are ints, so a parsed result even if accurate would indicate a range of possible skill caps. It's possible, for example, that the 175 caps I have up there could actually be 200, but the avoidance rate would be the same regardless. * The level 9 beastlord pet did not rip, parry or dodge. It did block however. The level 11 enchanter pet did use skills. On AK, NPCs didn't use avoidance skills until level 11ish, so it's possible that the very low level pets all don't have avoidance skills like AK's normal NPCs. (other than the blocking) I only parsed the one pet under level 11 though. Now on to old EQ. Old EQ logs of pets tanking are hard to come by; let alone the same pet tanking for thousands of hits and not getting hit from behind. I do however have two logs of pets with known summons used in the arena to raise skills: Code:
Al'Kabor pets I do however think that the avoidance formulae were also modified at some point. My old EQ logs show lower avoidance rates for riposte and parry. Dodge i'm not as sure about as it is harder to estimate since it comes after rips and parries. On TAKP I just increased the avoidance divisors for Riposte and Parry by 5, to 55 and 50 respectively, but I'm far from certain of those values. It makes sense however for Sony to have modified these because they added a bunch of strikethrough in the game, and it's much easier to change the code literals than it is to modify skill caps for every NPC and PC. Block rates seem the same; my old EQ log actually parsed above expected. Block is so strong that it makes sense that they left it alone. Back in 2003, I created some prepared logs to compare Monk vs. Warrior defensive ability. Since these were carefully prepared, no hits were from behind, and all from the same two NPCs, so it's good data; albeit still not as much as we would like for this case. Code:
Level 65 Monk w/ Ton Po Chestwrap defending vs Defender Filorou (Shadowhaven Guard), Oct 30 2003: Monk block: (100+230)*1.08/25 = 14% Monk riposte: (100+225)/50 = 6% Monk dodge: (100+230)/45 = 7% Warrior parry: (100+230)/45 = 7% Warrior riposte: (100+225)*1.08/50 = 7% Warrior dodge: (100+190)/45 = 6% Keep in mind however that avoidance order back then was: Block, Parry, Riposte, Dodge. Parsed riposte and dodge rates will parse a bit lower due to skill order. For TAKP pets, I capped avoidance skills at 100 and added another 25 points for PoP pets. Along with the +5 to the skill divisors, it comes about to what the parsed results above were. (a bit too forgiving if anything) Beastlord pets I capped at 50 block. |
From what I can tell, innate dual wield is just granted to level 66+ NPCs by hardcoding; every level 66+ NPC I've looked at quad attacks. Even NPCs of the same type with level variance will double at 65 and quad at 66.
This would help explain why boss NPCs were often level 66 (particularly in Luclin). Along with the old taunt skill becoming unusable on NPCs 6 or more levels above the player, as well as the resist algorithm behaving differently at level 66+. |
Recently I've done some more old EQ pet research and I'm posting the conclusions here. I'll include some of the previous conclusions with it as well as some skill caps I've figured out previously but never mentioned before for completeness. Note that this applies to PoP era/levels and earlier and I can't say how later eras may differ.
Sony buffed pets at some point after the year 2004 and before 2015. In this post, "Live EQ" means the post-buff pets, and "Old EQ" means 2004 and earlier. This post also talks about stuff I outline in the Melee Combat Routines Analyzed and Modeled thread. See that thread for more information. Parse data mentioned in this post can be found in my AC and ATK data spreadsheet. See also my pet stats spreadsheet. NPC Dual Wield and Double Attack Skill Caps Level 1-50 non-pet NPCs: Skills capped at 200 Level 51+ non-pet NPCs: Skills are 250 Old EQ summoned pets: Skills capped at 200, this includes PoP pets Live EQ summoned pets: Mage, Necro, Enchnater pets cap at 225; Beastlord and Shaman pets cap at 200 These were determined with a high amount of certainty and I explained how I came up with it in a previous post in this thread. I rechecked it recently. NPC Offense and Weapon Skill Caps Level 1-50 pre-PoP non-pet NPCs: Skills capped at 210 Level 51+ pre-PoP non-pet NPCs: Skills are 250 Level 1-50 PoP non-pet NPCs: Skills capped at 275 (skills are level*6 up to cap instead of level*5) Level 51+ PoP non-pet NPCs: Skills are 250+level Old EQ summoned pets: Skills capped at 225, even PoP pets (shaman pets might have been 215, unverified) Live EQ summoned pets: Skills capped at 225 for non-PoP pets; 235 for PoP pets; 215 for shaman pets This was much harder to figure out and has less certainty. The way I figured this out is by parsing pets' hit/miss rates. NPC and PC To-Hit is simple to calculate and did not change with equipment or buffs until the late PoP era/LDoN equipment mods showed up. It is simply: offense_skill + weapon_skill + 7. Years ago Mackal gave me a little MQ2 plugin and I was able to get precise To-Hit values from a handful of NPCs because (oddly) the To-Hit value of NPCs is sent over the wire if the NPC has a contact proc that is a beneficial spell and it hits you. This is the only known way to get actual NPC statistics from the server. I was able to detmine that old world non-pet NPCs cap their weapon skills and offense skills at 210 up to level 50. At 51 and up the skills jump to 250 for all non-pet NPCs through Luclin. That is true for NPCs earlier than PoP, but In PoP and later NPCs have level*6 for skills with a 275 cap up to level 50, then at 51+ they do 250+level. Arena dummies use the higher PoP skill caps as well. Note that the number in the packet is the value after the 1.21 multiplication and +10 -- read my other melee damage thread to understand what that means. Anyway, this confirms that NPCs calculate To-Hit like players do. So, if you have logs of pets attacking targets with known Avoidance values, you can estimate a To-Hit from that. I made (very) long logs of characters with known To-Hit values attacking Area dummies on the Test server to get Avoidance estimates for those dummy NPCs. I then logged pets attacking them. From this I could estimate the pets' To-Hit value. With the To-Hit value I could deduce the Offense and Weapon skills by assuming that both were the same and subtracting 7. It's worth mentioning that old skill caps for players were 200 for weapon skills and 210 for Offense, so NPCs seemingly had a higher weapon skill cap. NPCs however had skills of level*5 instead of (level+1)*5. NPC Offense ATK ATK as a stat is comprised of two parts which are added together, similar to AC. Those two parts are To-Hit (the chance to land a blow) and Offense (the chance the blow will hit harder). This is easily confused with the Offense skill, but is a different stat. Offense ATK determines how frequently the attacks will hit for one of the 20 possible damage values. It's the actual number the server rolls against the target's Defense stat (the mitigation stat) in the final calculation. I explain this in the other thread. Offense ATK is calculated simply: weapon_skill + (strength_over_75 * 2 / 3) + atk_bonus atk_bonus is ATK from items, spells, or other sources like AAs or a database field. Also debuffs with negative values. Non-pet NPC offense up to level 60 is rather linear and is roughly between level*6 to level*7 up to around level 43 where it goes flat until level 51, then becomes less predictable up to around 400 then becomes much more shallow. Generally level 60+ NPCs (PoP and earlier eras) have around 400-430. See the other thread for a chart. I recently discovered some new data for summoned pet Offense ATK and is largely the reason for this post. I had parsed pet Offense ATK years ago on Live servers but I couldn't tell if the current Live estimates would apply to old EQ or not. So TAKP had the Live numbers for this. When Quarm launched it was obvious that pets were doing crazy damage (upwards of 2x rogue DPS) so this got me resarching this again, and I discovered that Live's pets were buffed at some point. I checked old EQ logs and looked for cases of summoned pets attacking similar NPCs for extended periods of time. In one case I found mage pets from January 2000 (which is before Kunark) attacking Seafuries. I then carefully parsed the mitigation AC for these NPCs where possible and tried to estimate some ATK offense for the pets. In all cases they were significantly under the Live pet estimates and ended up roughly about equal (there is significant margin of error) to the expected weapon skill of the pets after adjusting for the pet buffs. So presumably, pets had 75 strength in old EQ, meaning pet Offense ATK is equal to its weapon skill. Sony might have just granted pets strength some time after 2004, or granted the pets ATK in some other way. It makes some sense for old pets to not have innate ATK because the pet buff spells grant a lot of strength. Sony seemingly wanted players to have to give it to them that way originally. The one exception I found was the Mage epic pet which seemed to have a higher ATK value than expected, which may have been upwards of 50 points but again the certainty of this is not very high. NPC Defense Skill I'll mention Defense skill here briefly for completeness. As far as I can tell, Defense is also capped at 210 like weapon skills for non-pet NPCs. NPC avoidance shows the same flattening around level 43, then it jumps at level 51 to what I assume is also 250. See the other melee thread for a chart. I could not figure about how NPC mitigation scaled with Defense skill however. It doesn't seem to be computed like player mitigation is. It goes up mostly linerally (with a slight curve) until level 50 where it ends up around 200 AC and stays flat. Even most PoP NPCs have about 200 mitigation. Again see the other thread for a chart. I mainly mention this again here because I was able to confirm the NPC skill caps. Also knowing that AC ends up around 200 allows one to estimate pet Offense ATK from logs. Live pet mitigation usually follows the non-pet NPC scale but some pets are well above 200. |
All times are GMT -4. The time now is 10:18 AM. |
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.