Calculating NPC Mitigation and Avoidance

From The Al`Kabor Project Wiki
Jump to navigation Jump to search

For an in-depth explanation of EQ's melee mechanics and TAKP's model of it, see this thread on eqemulator.org.

All NPCs and PCs have an offense and mitigation value which are used to determine how hard they hit or get hit in melee combat. The displayed ATK and AC values in the client are both actually comprised of two values. ATK is offense plus to-hit, and AC is mitigation plus avoidance. Note that the offense skill in the character skill list is not the same thing as the offense value referred to in this wiki. The offense skill that players raise in melee combat actually just grants to-hit in the ATK calculation.

Unlike offense and the ATK field, TAKP's Armor Class database field is straight up the mitigation value parsed from NPCs.

Requirements and Preparation[edit]

This will require using a spreadsheet and running two of Torven's log parsing lua scripts. If you can't use spreadsheet software, then this is over your head and you should stick to basic stats.

Producing mitigation and avoidance logs is not nearly as difficult as offense and to-hit because you may use a high level character to tank the NPC, and so copious amounts of healing is not required. The character you use does not need to be a 65 warrior either to get some estimates. A 65 warrior is still what should be used however, because attacking an NPC while having certain ATK values enables another means to calculate an estimate.

As a 65 warrior with maxed skills, target one of these ATK values:

  • 1673 ATK/691 Offense (Veteran's Enhancement + 185 worn ATK + 280 strength)
  • 1875 ATK/841 Offense (185 worn ATK + 520 strength)
  • 1975 ATK/916 Offense (Veteran's Enhancement + 250 worn ATK + 520 strength)

The offense value is what matters. If you can reach one of those three offense values, then do so. Estimates can still be obtained otherwise however. For mitigation logs, higher offense is more desirable; so of the three, 1975/916 is the best to use. If you can't hit any of these three targets, then get as much offense as you can without doing anything that may introduce error. (like using bard songs, which may fall and are hard to factor the +atk) Just don't have a low offense. If you have a shaman, click off the 'Increase All Skills Damage Modifier' buff.

Download this spreadsheet and click the second tab (PC vs NPC). Copy a line at the bottom and fill in your stats and it will compute an Offense value for you. Note that the 'Veteran's Enhancement' AA is auto-granted and is 75 raw ATK. You can verify that you input the stats correctly by comparing the 'Atk Calc' cell with the in-game ATK. Do not start a log until these match.

Daybreak recently granted all melee classes an auto-granted AA that multiplies melee damage. For warriors this is called 'Innate Felstrike'; other classes get an equivalent AA but it's named something unique to each class. If you're on Test then you want to turn this off by doing a /resetaa. This cannot be disabled on production servers.

Note: when you disable AAs with /resetaa, buy some useless AA like Eyes Wide Open afterward so it 'recomputes' the AAs. You have to reset each time you log in to get rid of auto-granted AAs as well.

Avoid wearing +accuracy and +strikethrough items. Avoid heoric agi and dex.

The weapons you want to wield will have to be at least 15 damage and hit as fast as possible. The two-hander from General Druav Flamesinger is not a bad option either, but generally you'll want to dual wield two one-handers that are around 15-20 damage. DO NOT WIELD WEAPONS WITH ELEMENTAL DAMAGE. If you dual wield, the two weapons will need to be different damage types. (slash, crush, pierce)

The NPC running out of hitpoints will be a problem for many NPCs. One thing you can do is mainhand a fire beetle eye and only use the offhand to attack with, as that hand does not get a damage bonus. You will need to make longer logs when doing this however, as you'll get less data over time. Otherwise you can simply reset the NPC and allow it to heal, then re-pull.

If the 65 warrior is not the tank, you can give your high level tank a non-magic weapon and his ripostes will keep the mob from forgetting him after 10 minutes. You'll need to build hate on the NPC somehow if you use a high level tank. You may need to automate +hate spells while wielding a fire beetle eye if the NPC is not immune to non-magic weapons to keep it on you.

Parsing Your Log[edit]

Once you have a log, you'll need to parse it with meleedmg.lua.

This output looks like this:

Combat statistics for attacker Me
--- Damage Type: slash -------------------------------------------
12053 3 0.0048185514229785 133 0.14786929679265 234 0.0060231892787231
0.55098315772007 0.44901684227993 0.26449846511242 0.049033435659172 0.065958682485688 0.06952625902265
Total Damage: 497629
Normal Hits: 6641 (100.0%)
- Min Normal Hit: 3 (0.5%)
- Modal Normal Hit: 133 (14.8%)
- Max Normal Hit: 234 (0.6%)
- Avg Normal Hit: 74.9
- Post Modal Normal Hits: 120 (1.8%)
Total Swings: 12053; Landed Blows: 6641 (55.098%); Avoided Swings: 5412 (44.901%)
- Misses: 3188 (26.449%)
- Dodged: 591 (4.903%)
- Parried: 795 (6.595%)
- Riposted: 838 (6.952%)
Normal Hits:
1] 3: 32 (0.4%)
2] 4: 33 (0.4%)
3] 6: 18 (0.2%)
4] 7: 40 (0.6%)
5] 9: 122 (1.8%)
6] 10: 22 (0.3%)
7] 12: 44 (0.6%)
8] 13: 82 (1.2%)
9] 15: 20 (0.3%)
10] 16: 48 (0.7%)
11] 18: 56 (0.8%)
...

Just as with offense logs, you'll want to copy and paste the two lines under 'Damage Type:' into the spreadsheet on the second tab.

From here the spreadsheet will calculate an Avoidance AC estimate for you.

Mitigation AC is trickier. There are several ways to come up with an estimate.

If you parsed the NPC using one of the three offense values above, it enables a way to compute estimates if the NPC has mitigation below a certain threshold. The spreadsheet has colored cells in columns AU and AV that correspond to one of the Offense values mentioned above.

disim.lua[edit]

The most common method used however is to run another one of Torven's scripts. This script is a melee combat simulator. You can input the known combat variables and simulate hits at varying mitigation values until the output matches the parsed log results. This will work with any character-- all you need is the offense value of the attacking PC and weapon damage.

The script is disum.lua. Edit the variables at the top of the script to match your situation. Set MIT_AC to what you suspect the NPC's mitigation is.

Scroll down to the end of the script and make sure the uncommented lines are the "PCDamage(OFFENSE, MIT_AC, PC_LEVEL, true);" block. This script has multiple forms of output, but for this we want to call the PCDamage function at varying MIT_AC values.

Run the script. Output produces several lines like this:

Simulating 691 Offense, 650 Mitigation at level 65
Weapon Dmg: 18; Damage Bonus: 0; Dmg Table: 295; Base Bonus+100: 418
Min Hit: 2 (2.49%) Modal Hit: 36 (4.03%) Modal2 Hit: 6 (5.98%) Max Hit: 107 (5.59%)

The goal here is to find the mitigation AC values that produce results that match your log's meleedmg.lua results. Keep trying different MIT_AC values until you find the values that most closely match the Min Hit%, Modal Hit% and Max Hit% results. If any one of those is below 1% then you should ignore that particular value however, as accuracy becomes bad at that low percentage. Note that Innate Felstrike will result in different min/max/model hits, but it's the percentiles that we care about. A very high offense may make min hit% useless, but it also makes max hit% more accurate.

'Modal' will have two numbers at certain mitigation values. Use the one that more closely matches the log if there are two displayed. (it's probably modal2)

114 Offense Logs[edit]

There is another way to get mitigation estimates, but this way is the trickiest.

115 offense is a threshold at which the PC damage multiplier kicks in. If a player character has less than that offense, then it will only produce 20 possible damage values just like any NPC would. This quirk can be taken advantage of to compute mitigation estimates, however it requires a specially made character. This character must be a level at which the target NPC is a grey con and does not provide skill-ups when the character attacks it.

So to do this, you'll want to make a level 90+ SK and carefully raise its weapon skill to 100 and no further. Raise the offense skill to the cap. Then give it 96 strength in gear. Equip a fast 10 damage weapon. The weapon must be at least 10 damage, but it can be higher. 10 is preferable because you don't want to do more damage than you need to otherwise you'll kill the NPCs too fast which requires resetting them which is a chore.

Once you have a log, you can compare the results with the '114 Offense' table in the 'Mitigation PvP' tab in the spreadsheet. DI1 is the min hit, and DI20 is the max hit.

The 'Est Mit DI20' and 'Est Mit DI1' cells will also give you an estimate if the NPC has about 200 or less mitigation.

Mitigation of the Mighty[edit]

MotM multiplies the armor class of the buffed NPC, so mitigation results will be inaccurate on these NPCs. The exception to this are Luclin NPCs which did not have their armor class modified (claim came straight from a Daybreak Dev and parses agree) because it was already deemed to be sufficiently high enough; so you can get mitigation estimates from Luclin bosses on Test.

NPC avoidance is not affected by MotM. Avoidance is remarkably similar across all NPCs that have been parsed.