|
Using Python3 to estimate BIS gear sets for Ninja.
By Izanami 2021-07-19 18:31:31
Node 456
Updated: 2022 January 28:
ML20 NIN99/WAR53 & R25 Odyssey.
Slightly updated code for easier reading (see Github link below).
While a simple average is nice and convenient for DPS spreadsheets, it does not tell the whole story for most weapon skills. To know exactly how your weapon skill damage will be distributed, you need detailed information about your stats, the enemy you're fighting, and the mechanics of weapon skill damage. As a side-project to learn a bit of basic Python3 programming and about the FFXI damage formulae, I've written a Python3 code to simulate weapon skills and obtain distributions of the damage being dealt given a set of gear and an enemy.
I'm not very familiar with GitHub, but I've put the code on my newly-created GitHub page ( https://github.com/IzaKastra/wsdist_v2).
The code is not meant to replace DPS spreadsheets, but the gear sets provided here should agree with the spreadsheets reasonably well. I believe the sets presented here are the best in slot sets currently available, but you may find marginally better sets for specific enemies. I therefore encourage you to play around with these sets using the spreadsheets to try to find potentially better or worse options that fit within your gear budget.
In addition to finding the best katana weapon skill sets, the code has the added benefit of working with all jobs and all physical and hybrid weapon skills (after minor modifications to adjust for different player race/job stats). This allowed me to also check the best Evisceration, Savage Blade, and Tachi: Jinpu/Koki/Kagero/Goten/Kasha sets for Ninja. I have a version of the code that works for SAM and nearly works for DRK. I "simply" need to work out the DRK Smite trait before it's finished. This is technically the second of three parts of a Python3-based DPS simulator. It currently has everything it needs to be a full DPS simulator, including real-world time between attacks, TP return, and auto-attack/WS damage, but it seems appropriate to stop where I am for now.
I've tested the code's output against SimonSes' NIN Hybrid WS spreadsheet for Blade: Chi and find the difference to be within 0.5%-2% depending on the TP range and buffs used. For physical weapon skills, I tested the results against the Ninja DPS spreadsheet and found that Blade: Shun, Kamu, Hi, and Ku all agree within 5% or better, while Blade: Metsu shows 10% differences due to incorrect Aftermath: Attack+10% handling in the spreadsheet (see the spoiler below). This of course does not mean that I've done everything perfectly.
The spreadsheet is applying Kikoku's aftermath only to the Ninja's base attack (Lv99+STR+Skill), not including BRD songs, attack traits from /WAR, or the +70 attack from job gifts. My in-game testing has shown that Kikoku's AM is applied additively with the other percentage-based boosts like Fury, Chaos, and Berserk; Attack = (Base+BRD)*(1+Berserk+Chaos+Fury+Kikoku_AM)+Food. The image below shows my observed and calculated Attack values with different buffs up.
I've modified the code to automatically adjust a given gearset until it finds the "best" piece in each slot for a specified weapon skill. I then ran the code for 3 different buff states and 3 different TP ranges that I consider to be typical low/mid/high buffs for content in-game:
Low Buffs: Only Grape Daifuku and Dia2, not even trust buffs (but we know you'd end up with March, Paeon, and Evoker's Roll anyway)
Standard Buffs: Grape Daifuku, Dia2, Minuet5, Minuet4, Honor March, Victory March, Lucky Chaos Roll (Songs+7, Rolls+7, HonorMarch+4)
High Buffs: Grape Daifuku, Dia2, Minuet5, Minuet4, Honor March, Victory March, Lucky Chaos Roll, Fury, Frailty (Songs+7, Rolls+7, Geomancy+6, HonorMarch+4)
High Buffs (Hybrid): Grape Daifuku, Dia2, Minuet5, Minuet4, Honor March, Victory March, Lucky Chaos Roll, Fury, Malaise (Songs+7, Rolls+7, Geomancy+6, HonorMarch+4) -- Only used for Blade:Chi
tp = [1000,1300]
tp = [1500,1800]
tp = [2000,2300]
I use max skill-potency geomancy bubbles and songs with 5/5 Minuet merits and 20/20 Minuet job gifts. I did not use any buff-enhancing abilities such as Crooked Cards, Marcato, Blaze of Glory, etc.
My earlier testing suggested that Hitaki is by far the best off-hand weapon for "damage varies with TP" weapon skills. However, it also only showed ~30-70% off-hand hit rate on the Apex Toad target that I'm simulating against (Evasion:1103~1163, Lv131-133), which would likely translate to significantly reduced TP gain and thus significantly reduced WS frequency. Because of this, I removed Hitaki and reran my simulations without it being an option. If you are able to make up for the significantly reduced accuracy and auto attack damage, then Hitaki should probably be your go-to for "damage varies with TP" weapon skills.
I did not test any Herculean gear since I believed it would be a waste of time given the accessibility of Nyame R10+ and the random nature of obtaining "good" augments behind multiple layers of RNG. I encourage you to input the sets I present here into the spreadsheets and see how your Herculean gear compares, though.
It should be noted that these sets are based raw weapon skill damage values. Stats such as Skillchain Bonus (see Nyame) have no effect as a result until I finish the code to be a proper DPS simulator with auto-attacks, TP rounds, auto-WS, and SCs. Swapping some pieces listed in these sets with Nyame will lower weapon skill damage, but the skillchain bonus stat will likely result in larger overall damage.
The details of the code's algorithm are explained in a bit of detail below, but the process is likely very well known to most of you. For now, here is the list of "best average" gear sets for each buff state for a few of Ninja's available weapon skills at specific TP ranges. Each one contains an imgur link to the simulated distributions, which display the gear used and basic player stats for all tests run on that specific weapon skill. A representative image is also presented in each section. The list of all sets can also be found on my FFXIAH item sets page. The comments within each gear set may provide swaps for varying TP ranges.
Note that these gearsets are for a Master Level 20 Lv.NIN99/WAR53, R25 Odyssey gear, and R15 UNM gear.
Blade: Chi
ItemSet 380757
To nobody's surprise, with the release of augmented Nyame gear, the "best average damage" gearset for Blade: Chi is incredibly easy to predict. Blade: Teki and Blade: To likely use an identical weapon skill set, but I did not test them. I would not be surprised if To/Teki used Fotia Belt, though. Since both of them are single-hit weapon skills.
Note that these tests were done on a neutral monster with 100 Magic Defense and no Magic Evasion. I believe many relevant enemies have something like 150 Magic Defense or an SDT value that would guarantee at least a 50% magic damage resist.
Blade: Hi
ItemSet 380758
ItemSet 380759
ItemSet 380760
Kannagi (R15) was locked into the main hand.
Andartia Mantle AGI+Crit Rate for low buffs
Andartia Mantle AGI+WSD for standard/high buffs
Critical hit weapon skill damage varies wildly based on the AGI stat of your target. This is because up to 15% of your Crit Rate comes from dDEX. Unfortunately, Blade: Hi has an 80% AGI modifier, which is essentially useless for meleeing. I'm still convinced the developers accidentally swapped the modifiers for Jishnu's Radiance (80% DEX) and Blade: Hi (80% AGI) and refuse to admit it.
Since Apex Toads do not have a published AGI value to calculate dDEX from, I ended up performing about 2 hours worth of auto-attacks in various sets to estimate it myself (AGI ~ 354-358). Either way, I don't necessarily recommend the Blade: Hi sets presented here. I don't think Blade: Hi is a good weapon skill in general compared to the other Katana options. The conditions required for critical hit weapon skills to perform well are too variable to simply stick with a single set based on a spreadsheet or code. You should do your own research based on exactly what you plan to use the weapon skill on and build your set around that.
Blade: Kamu
Blade: Ku
ItemSet 380763
ItemSet 380764
ItemSet 380765
Blade: Ku is surprisingly powerful when compared to Blade: Shun. The +60% damage on Gokotai, 1.25 FTP, and 30% STR+DEX modifier put in a lot of work to boost the damage. Unfortunately the skillchain properties are not great compared to Blade: Shun with Heishi.
Blade: Metsu
ItemSet 380766
ItemSet 380768
These sets are a good example of not using a lot of Nyame where Nyame would likely win. Blade: Metsu has excellent skillchain properties so I expect at least 4/5 Nyame with Relic legs to win in most cases considering they provide +24% skillchain damage.
With the release of R25 Nyame, most of these sets actually use Nyame for maximum physical damage. The skillchain damage stat on Nyame is just a bonus on top now.
Blade: Shun
Blade: Ten
Savage Blade
ItemSet 380771
ItemSet 380772
ItemSet 380773
For Naegling's "Weaponskill: Attack bonus based on number of upgrades" stat, I assumed the player had at least eight buffs up (protect, shell, haste, utsusemi, kakka, yonin, food, signet) for all sets. Standard buffs added 4 songs and 2 rolls for 14 total buffs, and high buffs added a single GEO bubble for 15 total buffs. The player's base attack then received +1% per buff present. This bonus attack was added to the player's base attack before any other buffs were added.
Evisceration
ItemSet 380942
ItemSet 380770
ItemSet 380943
Tauret was locked into the main hand.
Ryuo Tekko Path A or D
Andartia Mantle DEX+Crit Rate
Kendatsuba Samue +1 or Mpaca Doublet R25 are generally the go-to body slots for Evisceration.
Similar to Blade: Hi, critical hit weapon skill damage will vary wildly depending on the AGI of your target. Your dDEX provides as much as 15% critical hit rate that you're potentially missing on high AGI targets unless you stack more DEX. Luckily, Evisceration has a 50% DEX modifier, so this is not likely to be a problem. I still recommend finding your own set that works well on the content you plan to use Evisceration on (Odyssey Lamia/Aquans or that one Master Trial) instead of just sticking with this set or one from the spreadsheet.
Tachi: Goten
ItemSet 383500
Tachi: Goten is the Lightning-elemental hybrid weapon skill. The Donar Gun would likely be fantastic for this weapon skill, but it would require that you never unequip the gun since you would lose TP to swap to Shuriken for TPing.
Be sure to weaponskill above 2000 TP.
You may want to use Samurai subjob for Hasso/Zanshin in order to increase your TP gain rate when relying on the Great Katana weapon skills.
Tachi: Jinpu
ItemSet 383497
Nyame Path B
Andartia Mantle STR+WSD
Ninja Nodowa +2 when attack capped and TP>2000.
Fotia Belt > Orpheus's Sash when below 1500 TP. You should always weapon skill above 2000 effective TP, though.
Tachi: Jinpu is a powerful tool for a Ninja to have available against Earth-based enemies weak to magic and slashing damage. This is essentially the Great Katana version of Blade: Chi, so you'll want to WS above 2000 effective TP.
You may want to use Samurai subjob for Hasso/Zanshin in order to increase your TP gain rate when relying on the Great Katana weapon skills.
The best part of Tachi: Jinpu is that it creates and endless skillchain loop with itself. When fully buffed, you are able to simply spam Tachi: Jinpu and create powerful skillchains with every use. It's unfortunate that the developers did not allow Blade: Chi to self-skillchain endlessly as well.
Tachi: Kagero
ItemSet 383499
Tachi: Kagero is the Fire-elemental hybrid weapon skill. Tachi: Kagero is especially potent on a few enemies in Odyssey C, such as Puks and Bomb Clusters. Be sure to weaponskill above 2000 TP.
You may want to use Samurai subjob for Hasso/Zanshin in order to increase your TP gain rate when relying on the Great Katana weapon skills.
Tachi: Kasha
ItemSet 383491
ItemSet 383492
Nyame Path B
Andartia Mantle STR+WSD
I don't expect anyone to use Tachi: Kasha on Ninja, but it is a pretty weapon skill.
You may want to use Samurai subjob for Hasso/Zanshin in order to increase your TP gain rate when relying on the Great Katana weapon skills.
Tachi: Kasha is the Great Katana version of Blade: Retsu, since it can Paralyze the enemy. I'm not sure if it is as potent as Blade: Retsu, though.
Tachi: Koki
ItemSet 383498
Nyame Path B
Andartia Mantle STR+WSD
Tachi: Koki is a single-hit weaponskill. Ninja Nodowa +2 will likely not beat Fotia Gorget unless you hold until 3000 TP for some reason.
Epaminondas's Ring can replace Gere Ring when near attack cap, but you lose those rare triple attack procs.
Tachi: Koki is the light-elemental hybrid weapon skill, which means it benefits greatly from Weatherspoon Ring (SoA final reward option). Despite the boost in power from Weatherspoon Ring, I don't see Koki getting much use.
You may want to use Samurai subjob for Hasso/Zanshin in order to increase your TP gain rate when relying on the Great Katana weapon skills.
As a side note: Blade: Ei is a Darkness-based magical Katana weapon skill. There is no Darkness-based hybrid weapon skill. This is unfortunate because it would likely be very powerful with Archon Ring and Pixie Hairpin +1
Based on the sets listed above, we can make a short list of gear priority for a newer Ninja to reference.
Odin: Gere Ring
UNM: Lugra Earring +1 (Aug) > Sailfi Belt +1 (Aug) >= Seething Bomblet +1 (Aug) > Blistering Sallet +1 (Aug)
Lilith: Malignance Gloves > Malignance Tabard > Malignance Boots > Malignance Tights >= Malignance Chapeau
Bumba: Nyame Mail > Nyame Sollerets > Nyame Gauntlets > Nyame Flanchard >= Nyame Helm
Arebeti: Mpaca Cap > Mpaca Hose > Mpaca Doublet > Mpaca Gloves >= > Mpaca Boots
Ngai: Gleti's Knife
Xevioso: Kunimitsu
Relic: Legs > Head > Hands >= Feet > Body(TP low haste)
AF: Head
Adhemar: Head(A) > Body(B) > Hands(B) > Feet(A)
However, just because an item didn't show up here doesn't mean it doesn't hold a best-in-slot position in some situation. The 2021 Ninja Gearsets thread provides excellent gear to use for many weapon skills without considering Odyssey gear. Many of these sets are well within uncertainty of my "best average" sets presented here.
Here I give a "brief," but relatively detailed, description of how the damage was calculated within the code. Let me know if there are any mistakes or inaccuracies that need to be corrected. I'm confident in the algorithm, but I may have done a poor job explaining in some places.
The simulations were based on Apex Toads with three sets of possible stats, excluding their innate -25% MDT. This can be thought of as having three unfortunate Apex Toads in a room and each weapon skill hit one of them randomly. Taken directly from my code, the stats used were:
Code
e_mdef = 0-malaise*(15+3*nbubble) if 0-malaise*(15+3*nbubble) > -50 else -50
apex_toad = {'Level': [131, 132, 133],
'Defense': [1206*(1-dia[dia_potency]-frailty*(0.148+0.027*nbubble)), 1239*(1-dia[dia_potency]-frailty*(0.148+0.027*nbubble)), 1272*(1-dia[dia_potency]-frailty*(0.148+0.027*nbubble))],
'Evasion': [1103, 1133, 1163],
'VIT': [264, 270, 276],
'AGI': [354, 356, 358], # AGI roughly measured using Scoreboard on two different toads.
'MND': [218, 224, 228],
'INT': [285, 293, 299],
'CHR': [270, 277, 284],
'Magic Defense': [e_mdef, e_mdef, e_mdef]} # Enemy Magic Defense has a floor of 50
For Physical weapon skills, I used the standard BG-wiki formula to calculate damage: Due to the random nature of PDIF, a new value is calculated for each hit individually.
Additional hits after the first main-hand hit, whether they be from multi-hit weapon skills or multi-attacks, were performed in the order suggested by the testing of Austar. In the case of multi-attack procs on weapon skills, testing by Saevel and Austar show that there can be no more than two multi-attack checks of any kind per weapon skill and that the off-hand weapon will always get one of these two checks if you have an off-hand weapon equipped, otherwise the main-hand will get both checks only if the weapon skill has at least two natural hits.
In addition to the testing of Saevel and Austar, I tested this by using 404 Blade: Retsu while dual-wielding (2+1 hits) with 29% DA and 31% TA on Apex Toads. The observed TP return distribution from 404 Blade: Retsu closely matches the expected distribution assuming that only the first two hits (the first main hit and the one sub hit in this case) can multi-attack. Any assumptions that all weapon skill hits can multi-attack (6 chances for Blade: Shun for example) quickly cause the expected distribution to diverge from the observed.
For Hybrid weapon skills, I used the equation provided by Bahadir's Blade: Chi testing, Jakey's YouTube video, and SimonSes' NIN Hybrid Damage calculator, which splits the weapon skill damage into two parts
Hybrid = Physical + Magical
The physical damage is calculated using the exact same method as mentioned previously for purely physical weapon skills, with the important change that FTP is 1.0 and non-replicating for the physical portion of Hybrid weapon skills (see Bahadir's testing). The magical damage is calculated using the physical damage and the player's "Magic Damage" stat as a base:
In addition to the basic formula for damage, it is important to explicitly mention the following special cases that are included in the damage calculations:
Unlike the first main-hand hit, the first off-hand hit does not gain the bonus from the standard weapon skill damage stat.
Certain "weapon skill damage" stats on weapons apply to all hits. Examples of this include Naegling Savage Blade Damage +15%, augmented REMA weapons, and the hidden weapon skill damage bonus on Mythics and Relics.
Weapon skills gain a hidden ~+100 accuracy to their first hit. My testing of 1745 unbuffed (Brygid+KuyinHathdenna+YoranUC) Blade: Chi on Apex toads heavily suggests that this bonus applies to the first off-hand hit as well.
Buffs to player Attack are applied in a specific order:
Attack = (8+Gear+Traits+Gifts+Skill+STR+STR(food)+STR(buffs)+BRD)*(1+COR+GEO+Kikoku10%+Berserk)+Attack(food)
The player's secondary/auxiliary/off-hand attack is calculated using only half of their STR stat (see BG-wiki: "Attack")
STR from food is immediately used to calculate base attack, but "Attack+" from food is not applied until all other buffs have taken effect.
Before running the code, I manually selected equipment for each equipment slot that I wanted to test. This allowed me to exclude testing items like Mummu Kecks for Blade: Chi, which would obviously be a waste of time. To allow the output of my code be easily compared to the spreadsheets, the code uses a distribution's average damage to determine which piece of gear is "better" than another. It should be noted that the average is not a good summary statistic for multi-peaked distributions, though. The algorithm itself is simple:
(Edit 2021-08-23: I've adjusted the code's algorithm to use averages for intermediate steps, and 50,000 simulations as the last step. The process for finding best sets is now identical to manually selecting gear in a spreadsheet and checking the DPS value. The advantage is that this code is automated and provides expected damage distributions at the end for further analysis.)
1) For each item slot (or for each pair of two item slots simultaneously), cycle through all selected equipment and calculate the average weapon skill damage from that test gear set.
2) If the average damage is higher than the previous highest, then keep that item equipped, otherwise ignore it and try another combination of gear.
3) After all slots (or all combination of two slots simultaneously) have been tested and the best item in each slot determined, restart from the beginning with the previous best set as the starting place, checking each slot (or combination of two slots simultaneously) again, up to 20 times until. This allows for some gear to change based on changes to already tested slots.
4) Stop early if gear changes result in an average damage increase less than 0.5%, or if no changes are made within two consecutive iterations. This is the convergence criterion and it usually triggered before iteration 7.
With the above algorithm, the code's runtime is ~3 seconds to find a best set while swapping only one slot at a time, or ~180 seconds if changing two slots simultaneously. An additional 10 seconds is required to build a distribution of 50,000 simulations for the fancy output plots.
The list of gear tested in each slot is presented here. All weapon skills used the same pool of gear. All UNM gear is R15. All Odyssey gear is R25. Code
mains = [Heishi, Kannagi, Kikoku, Nagi, Gokotai]
subs = [Ternion, Kunimitsu, Gleti_Knife, Tauret, Gokotai, Crepuscular_Knife]
grips = [Alber_Strap]
ammos = [Yetshila, Seething_Bomblet, Cath_Palug_Stone, Aurgelmir_Orb, Pemphredo_Tathlum, Ghastly_Tathlum, Crepuscular_Pebble]
heads = [Adhemar_Bonnet_A, Adhemar_Bonnet_B, Hachiya_Hatsuburi, Mochizuki_Hatsuburi, Malignance_Chapeau, Kendatsuba_Jinpachi, Mummu_Bonnet, Nyame_Helm, Mpaca_Cap, Blistering_Sallet]
necks = [Ninja_Nodowa, Fotia_Gorget, Caro_Necklace, Baetyl_Pendant]
ears = [Ishvara_Earring, Lugra_Earring_Aug, Moonshade_Earring, Brutal_Earring, Friomisi_Earring, Crematio_Earring, Balder_Earring, Mache_Earring1, Mache_Earring2, Odr_Earring, Crepuscular_Earring]
ears2 = [Ishvara_Earring, Lugra_Earring_Aug, Moonshade_Earring, Brutal_Earring, Friomisi_Earring, Crematio_Earring, Balder_Earring, Mache_Earring1, Mache_Earring2, Odr_Earring, Crepuscular_Earring]
bodies = [Kendatsuba_Samue, Adhemar_Jacket_A, Adhemar_Jacket_B, Malignance_Tabard, Nyame_Mail, Samnuha_Coat, Gyve_Doublet, Abnoba_Kaftan, Mpaca_Doublet, Tatenashi_Haramaki, Ryuo_Domaru_A, Agony_Jerkin]
hands = [Adhemar_Wristbands_A, Adhemar_Wristbands_B, Mochizuki_Tekko, Mummu_Wrists, Malignance_Gloves, Kendatsuba_Tekko, Nyame_Gauntlets, Mpaca_Gloves, Tatenashi_Gote, Ryuo_Tekko_A, Ryuo_Tekko_D]
rings = [Gere_Ring, Hetairoi_Ring, Shukuyu_Ring, Apate_Ring, Ilabrat_Ring, Regal_Ring, Epona_Ring, Petrov_Ring, Rufescent_Ring, Begrudging_Ring, Epaminondas_Ring, Mummu_Ring, Beithir_Ring, Dingir_Ring, Metamorph_Ring, Shiva_Ring1, Shiva_Ring2, Weatherspoon_Ring]
rings2 = [Gere_Ring, Hetairoi_Ring, Shukuyu_Ring, Apate_Ring, Ilabrat_Ring, Regal_Ring, Epona_Ring, Petrov_Ring, Rufescent_Ring, Begrudging_Ring, Epaminondas_Ring, Mummu_Ring, Beithir_Ring, Dingir_Ring, Metamorph_Ring, Shiva_Ring1, Shiva_Ring2, Weatherspoon_Ring]
capes = [Andartia_DAdex, Andartia_DAstr, Andartia_DAagi, Andartia_Critagi, Andartia_Critdex, Andartia_WSDstr, Andartia_WSDdex, Andartia_WSDagi, Andartia_Nuke]
belts = [Windbuffet_Belt, Fotia_Belt, Grunfeld_Rope, Kentarch_Belt, Sailfi_Belt, Orpheus_Sash]
legs = [Kendatsuba_Hakama, Adhemar_Kecks_A, Adhemar_Kecks_B, Mochizuki_Hakama, Samnuha_Tights, Jokushu_Haidate, Malignance_Tights, Mummu_Kecks, Gyve_Trousers, Hizamaru_Hizayoroi, Nyame_Flanchard, Mpaca_Hose, Tatenashi_Haidate, Ryuo_Hakama_A, Rao_Haidate_B]
feet = [Mochizuki_Kyahan, Adhemar_Gamashes_A, Adhemar_Gamashes_B, Malignance_Boots, Mummu_Gamashes, Kendatsuba_Sune_Ate, Nyame_Sollerets, Mpaca_Boots, Tatenashi_SuneAte, Ryuo_SuneAte_D, Rao_SuneAte_D]
Finally, since this post is already pretty long, I may as well link my official forum post from last year. This post details my requested Ninja job adjustments. Feel free to give it a like/comment.
https://forum.square-enix.com/ffxi/threads/57263-2020-2021-Ninja-Job-Adjustment-and-Feedback?s=66c8aaed6a12e3a576c9ee8f403e1174
Asura.Arico
Server: Asura
Game: FFXI
Posts: 535
By Asura.Arico 2021-07-19 19:02:10
This is so cool! Great job. This has been on my growing list of things to do.
Question -- I'm surprised Nagi didn't score higher on the hybrid/magical WS. From my parses it beats Heishi by a decent margin. Did you include the fact that Mythic AM3 procs on hybrid WS count as additional magical hits? Or was Heishi just better in the long run?
[+]
By Pantafernando 2021-07-19 19:21:04
Everyone using python nowaday.
Good thing im a forever bandwagoner
[+]
Asura.Arico
Server: Asura
Game: FFXI
Posts: 535
By Asura.Arico 2021-07-19 20:06:23
Everyone using python nowaday.
Good thing im a forever bandwagoner
Matlab?
Quetzalcoatl.Trulusia
Server: Quetzalcoatl
Game: FFXI
Posts: 1132
By Quetzalcoatl.Trulusia 2021-07-19 20:30:11
Everyone using python nowaday.
Good thing im a forever bandwagoner
Matlab?
Why would you insult that man like that?
[+]
By Izanami 2021-07-19 20:59:17
This is so cool! Great job. This has been on my growing list of things to do.
Question -- I'm surprised Nagi didn't score higher on the hybrid/magical WS. From my parses it beats Heishi by a decent margin. Did you not include the fact that Mythic AM3 procs on hybrid WS count as additional magical hits?
Thanks for the comment.
For Hybrids: I'm calculating all physical hits, including multi-attack hits, before calculating the magical portion. So the magical portion does indirectly benefit from the Mythic AM3, but only because the magical portion is based on the physical portion. The magical portion is calculated using the physical portion's total damage, the FTP listed on BG-wiki plus any Fotia gear, and any magical stats such as Magic Damage and Magic Attack. I'm not applying the magical portion multiple times for multi-attack procs. I'm treating the magical portion as a single instance of bonus damage to an otherwise purely physical weapon skill.
Assuming the method above for calculating Hybrid damage is correct, then I think in these cases it comes down to TP Bonus being such a powerful stat for "damage varies with TP" weapon skills. The TP Bonus +500 and higher base damage provided by Heishi result in a larger average damage compared to the Mythic AM3 on Nagi.
If we compare the benefit of TP Bonus+500 vs the benefit of Mythic AM3 for the specific case of using the WS at 1150 TP for the set shown above with standard buffs (BRD+COR):
"TP Bonus":
Nagi effectively has 1400 TP with FTP=0.948, while Heishi pushes effective TP to 1900 and FTP=1.385. The ratio of these states that Heishi will do 1.385/0.948=1.462 times more damage than Nagi based on TP bonus alone.
"Attacks per WS":
Using Simonses' Ninja Hybrid WS spreadsheet to estimate the average number of hits per weapon skill, Nagi will swing 4.222 times per WS with AM3 up, while Heishi will swing 3.637 times per WS. In this case Nagi wins by a factor of 4.222/3.637=1.160
If we divide these two ratios we can obtain a rough estimate of how well Heishi should perform compared to Nagi. In this specific example, we do Heishi/Nagi = 1.462/1.160=1.259. So Heishi should perform 1.259 times better than Nagi at 1150 TP. If I run my code for Heishi and Nagi separately, we see that Heishi averages at 48380 damage while Nagi averages at 38686 damage. A quick ratio shows that Heishi is 48380/38686=1.250 times better than Nagi (see spoiler for distributions), which is in great agreement with my napkin math example considering the ~0.5% standard deviation I'm allowing by only running 50,000 simulations per distribution. You can see just looking at the distributions that Nagi does result in significantly more multi-attacks, but the TP Bonus +500 on Heishi simply shifts the entire distribution by more than Nagi can keep up with.
If you were using Hitaki instead of Kunimitsu then the slope of the FTP curve changes into the 2000-3000 TP region where TP Bonus is weighted slightly less heavily. Rerunning the code with the same sets, but with Hitaki instead of Kunimitsu, we see that Heishi is only 8% better than Nagi. This relatively small difference could easily favor Nagi with the combination of an insufficiently large sample size (or observation bias) and slightly higher over TP caused by AM3 while TPing. This means that Nagi+Hitaki may actually be the best DPS weapon combo for Blade: Chi, but a proper DPS analysis would be required to determine this. My code uniformly samples TP between two limits. In reality, you only have a handful of possible TP values that can be obtained based on your store TP stat and weapon delays. Additionally, my code assumes that AM3 is always present if Nagi is equipped in the main hand. A proper analysis would have to use Blade: Kamu every 180 seconds, slightly lowering overall DPS.
Asura.Arico
Server: Asura
Game: FFXI
Posts: 535
By Asura.Arico 2021-07-19 22:51:13
Great post. It's been a while since I've read anything discussing this, but I thought the working theory was that multi hit(or maybe just AM3?) applied additional magical hits, which was the only way to explain the damage spikes that were way higher than their theoretical maximum.
Ramuh.Austar
Server: Ramuh
Game: FFXI
Posts: 10481
By Ramuh.Austar 2021-07-19 23:45:08
It should be noted that these sets are based on 50,000 single weapon skill simulations. Stats such as Skillchain Bonus (see Nyame) have no effect as a result until I finish the code to be a proper DPS simulator with auto-attacks, TP rounds, auto-WS, and SCs. Swapping some pieces listed in these sets with Nyame will lower weapon skill damage, but the skillchain bonus stat will likely result in larger overall damage. I already have this done for most jobs (also in Python3) if you want to work on something together. I just don't run every single piece likes you since you get into billions of combinations with only a few pieces per slot.
By Izanami 2021-07-20 12:56:18
[Great post. It's been a while since I've read anything discussing this, but I thought the working theory was that multi hit(or maybe just AM3?) applied additional magical hits, which was the only way to explain the damage spikes that were way higher than their theoretical maximum.
Assuming no contribution from physical damage, the magical portion of hybrid weapon skills uses the player's "Magic Damage" stat as a base. This means that even if you do 0 physical damage, you can still potentially hit some amount of magical damage assuming the enemy isn't also immune to magical damage. Luckily, the Lode Golem enemy in Ro'Maeve is immune to physical damage, allowing us to only test the magical portion of hybrid weapon skills. If mythic AM3 directly affects this magical portion in any way, then we should clearly see its effect after only a handful of weapon skills.
To keep the math simple, I took off my subjob and swapped into Store TP gear without any multi-attack. With mythic AM3 being my only source of multi-attack, the test is against the published rates of: OA3=20%, OA2=32%, and 48% without any AM3 proc. Since I don't have a 2nd character to give myself Tactician's Roll, I only performed 12 Blade: Chi with AM3 up. This is super low number statistics, but shouldn't matter much given that the OA3 and OA2 rates on mythic AM3 are 20% and 40%, respectively. Such large probabilities should frequently show up, even in low number statistics.
Out of 12 Blade: Chi, I observed damage=[249, 249, 274, 249, 249, 249, 249, 249, 274, 249, 249, 249], which is consistent with zero mythic AM3 procs on the magical portion of Blade: Chi. Coincidentally, I tested this on Earthsday just before the maintenance last night, so I received two day-procs for +10% (+25) damage.
Assuming a Binomial distribution, the chance of seeing exactly zero AM3 procs in 12 trials is 0.015%. This simple test suggests that mythic AM3 does not directly affect the magical portion of hybrid weapon skills.
If you have a COR mule for Tactician's Roll, I recommend you try this as well, but with N=50~100 instead of N=12.
I already have this done for most jobs (also in Python3) if you want to work on something together. I just don't run every single piece likes you since you get into billions of combinations with only a few pieces per slot.[/spoiler]
In my case, I'm only checking one slot at a time, which is only 102 total pieces to check per iteration. This method is usually fine, but it will fail to find a set that requires two or more pieces together if they don't perform well individually. A way around this is to calculate the average damage of all combinations of all equipment being tested. However, with the gear that I'm using for physical weapon skills, there are 49.3 billion different combinations. I think even in the best-case scenario with CUDA-based GPU multiprocessing (that I have no real experience with), it would take about 3 hours to check all 49.3 billion sets per weapon skill, based on cProfile function timing measurements. I think it might be a good way to learn some GPU programming with Python3, but it's not worth the computation time to find out that the absolute best set is only 3% better than the sets I've already found with my flawed method.
Working together on a proper DPS simulator would be pretty fun since you already finished one for most jobs and mine is almost finished. I could probably learn something about Python3 or FFXI from the collaboration. I'll be too busy for at least the next week with classes/work so I can't work on it for a while, though.
Asura.Arico
Server: Asura
Game: FFXI
Posts: 535
By Asura.Arico 2021-07-20 12:58:57
Assuming a Binomial distribution, the chance of seeing exactly zero AM3 procs in 12 trials is 0.015%. This simple test suggests that mythic AM3 does not directly affect the magical portion of hybrid weapon skills.
Interesting. I guess this probably also means Doji is better than Koga for Jinpu.
By SimonSes 2021-07-20 15:16:49
This method is usually fine, but it will fail to find a set that requires two or more pieces together if they don't perform well individually.
I think it might actually fail a lot if stuff like WSD or PDL is involved. Diminishing returns on those will change things a lot, if you compare each piece with no diminishing returns at all, then it wont be accurate.
[+]
Ramuh.Austar
Server: Ramuh
Game: FFXI
Posts: 10481
By Ramuh.Austar 2021-07-20 15:36:11
However, with the gear that I'm using for physical weapon skills, there are 49.3 billion different combinations. I think even in the best-case scenario with CUDA-based GPU multiprocessing (that I have no real experience with), it would take about 3 hours to check all 49.3 billion sets per weapon skill, based on cProfile function timing measurements. I think it might be a good way to learn some GPU programming with Python3, but it's not worth the computation time to find out that the absolute best set is only 3% better than the sets I've already found with my flawed method. It won't be very feasible when you start adding in multiple sets. Add in factors like JA abilities that don't last forever but fights length is greater than the duration like MNK having Impetus and Footwork changes, or DRK with Last Resort changes. Add in even more WS sets if doing separate WS for skillchains or running two DD simultaneously to compare how they can do either individually or doing 2-4 step skillchains, you start getting into unreasonable numbers which is why I just do manual gear selections.
[+]
By joemamma 2021-07-20 15:45:16
Well according to my spreadsheet you are wrong.
Shiva.Thorny
Server: Shiva
Game: FFXI
Posts: 2801
By Shiva.Thorny 2021-07-20 15:57:52
I thought the working theory was that multi hit(or maybe just AM3?) applied additional magical hits, which was the only way to explain the damage spikes that were way higher than their theoretical maximum
If(and I'm not substantiating this, only going off what you said) damage spikes higher than theoretical maximum occur, it's possible that AM3 is treated differently than a typical multi-attack on the server side and all the hits are being combined when determining the magic damage hit. This would both result in no effect on lode golems(as magic hit is based on physical hit, and physical hit is 0, higher physical hit doesn't matter) and allow for spikes to occur.
By SimonSes 2021-07-20 17:12:20
I thought the working theory was that multi hit(or maybe just AM3?) applied additional magical hits, which was the only way to explain the damage spikes that were way higher than their theoretical maximum
If(and I'm not substantiating this, only going off what you said) damage spikes higher than theoretical maximum occur, it's possible that AM3 is treated differently than a typical multi-attack on the server side and all the hits are being combined when determining the magic damage hit. This would both result in no effect on lode golems(as magic hit is based on physical hit, and physical hit is 0, higher physical hit doesn't matter) and allow for spikes to occur.
Im not saying Arico is lying, but I would need to see proofs of those "impossible" to occur damage spikes first, because with how hybrid works and how they respond to something like 2x TA proc, max damage potential will often be at 60-70k+ and many times you will faster reach 99k damage cap than theoretical cap on hybrids WS damage.
Asura.Arico
Server: Asura
Game: FFXI
Posts: 535
By Asura.Arico 2021-07-20 18:10:11
I'm purely basing it on a previous discussion on these boards from like 2017. I'll look for them. Pretty sure snaps was heavily involved. I'll look through his posts.
Im not saying Arico is lying, but I would need to see proofs of those "impossible" to occur damage spikes first, because with how hybrid works and how they respond to something like 2x TA proc, max damage potential will often be at 60-70k+ and many times you will faster reach 99k damage cap than theoretical cap on hybrids WS damage.
What do you mean by that?
By Izanami 2021-07-20 21:23:45
This method is usually fine, but it will fail to find a set that requires two or more pieces together if they don't perform well individually.
I think it might actually fail a lot if stuff like WSD or PDL is involved. Diminishing returns on those will change things a lot, if you compare each piece with no diminishing returns at all, then it wont be accurate.
I don't think I understand what you're getting at. Diminishing returns can not be a reason that the code finds the wrong piece of gear (or fails to find the correct piece of gear).
The only situation that the code does not handle properly will have the following logic:
Swapping to piece A is a downgrade
Swapping to piece B is a downgrade
Simultaneously swapping to pieces A and B is an upgrade of more than 0.5%
All other situations involve piece A and/or piece B being an upgrade, which the code handles properly.
These edge-case only come up with set bonuses, which provide extra stats for having more pieces equipped. Even in those cases, the extra stats gained are generally too weak to make up for the loss of damage for using a better piece. I should mention here that the code does handle set bonuses properly, but it doesn't go out of its way to build a set just for the bonuses.
The method I'm using has no trouble handling diminishing returns as long as it runs more than one iteration (checks every slot more than once). I run up to 20 iterations to deal with this, but the code has always converged within 3~5 iterations.
Asura.Arico
Server: Asura
Game: FFXI
Posts: 535
By Asura.Arico 2021-07-20 21:38:50
Swapping to piece A is a downgrade
Swapping to piece B is a downgrade
Simultaneously swapping to pieces A and B is an upgrade of more than 0.5%
Isn’t this a lot of situations?
The conventional wisdom I’ve always been told is you want a semi-even spread, because as you get more base stat WSD or MA become valuable etc and vice versa.
By Izanami 2021-07-20 21:56:55
Swapping to piece A is a downgrade
Swapping to piece B is a downgrade
Simultaneously swapping to pieces A and B is an upgrade of more than 0.5%
Isn’t this a lot of situations?
It actually might occur more often than I gave it credit for in my last post. When I wrote the code I just intuitively assumed it could happen often.
I may have been overthinking things when I wrote that last post claiming that this situation only happens with set bonuses. I couldn't think of a single concrete example where swapping two pieces together is an upgrade, but swapping either one alone is a downgrade. The code properly handles one of them being an upgrade by itself leading into both together being a larger upgrade even if the other was a downgrade, but it can't handle two "bad" pieces being better than two other "good" pieces without extra stats from a set bonus.
If you can think of an example where this is the case then please send me the gear set and buffs used so I can confirm it in the spreadsheet. It's bugging me that I think I should be able to find such a situation, but I can't. It's the same feeling as having a song stuck in my head but I can't remember all the lyrics or the title.
Ramuh.Austar
Server: Ramuh
Game: FFXI
Posts: 10481
By Ramuh.Austar 2021-07-21 00:53:34
First thing that comes to mind that way would be if piece A is more damage but gives a lower result due to something such as accuracy. Piece B would just be lower damage, but has more accuracy, so if wearing both you would cap accuracy and still have more damage.
Phoenix.Capuchin
Server: Phoenix
Game: FFXI
Posts: 3607
By Phoenix.Capuchin 2021-07-21 01:48:31
I'm still convinced the developers accidentally swapped the modifiers for Jishnu's Radiance (80% DEX) and Blade: Hi (80% AGI) and refuse to admit it.
Heh, you and me both. That's really the only reasonable explanation!
Makes me think of the other one that drives me crazy knowing it just MUST be backwards - the Alexander and Odin battlefield songs. The name "Ragnarok" (the Alexander fight music) is obviously consistent with the Norse mythology themes of Odin and Einherjar; "Iron Colossus" (the Odin music) is a perfect description of Alexander, which is... an iron colossus? I am astounded that people have argued with me over that seemingly obvious mistake. I'll die on those two FFXI conspiracy theory hills.
But back on topic, really cool project - thanks for sharing!
Asura.Nilats
Server: Asura
Game: FFXI
Posts: 23
By Asura.Nilats 2021-07-21 22:03:32
Big python/automation fan love to see it applied to FFXI kudos to you. Are you planning on releasing your code?
By Izanami 2021-07-23 16:35:59
First thing that comes to mind that way would be if piece A is more damage but gives a lower result due to something such as accuracy. Piece B would just be lower damage, but has more accuracy, so if wearing both you would cap accuracy and still have more damage.
This makes sense, thanks. The code is simulating against Apex Toads which have fairly low accuracy requirements so it's no surprise that I don't run into this issue without Hitaki equipped. Simulating against Lv137-139 Apex Bats instead may cause this issue to come up more frequently without the proper buffs. Although, a real situation wouldn't be micromanaging gear accuracy to such a degree when you could just swap a Minuet for a Madrigal anyway.
Big python/automation fan love to see it applied to FFXI kudos to you. Are you planning on releasing your code?
I'll likely upload the entire code to Github sometime later after I've made some updates to speed it up and make it user friendly. I've been incredibly busy with deadlines to meet recently and will remain busy for a while, so I'm not sure when I'll get around to this. Only one of the files needs changed to see significant performance improvements, though. I may upload the others pretty soon.
[+]
Asura.Saevel
Server: Asura
Game: FFXI
Posts: 9916
By Asura.Saevel 2021-07-23 16:58:26
Now they need to write a playbook that automatically deploys the code, analysis your gearswap and starts to update it optimize it accordingly.
[+]
By SimonSes 2021-07-23 17:03:23
Now they need to write a playbook that automatically deploys the code, analysis your gearswap and starts to update it optimize it accordingly.
It would also need to check available gear first :)
Server: Bahamut
Game: FFXI
Posts: 21
By Bahamut.Wizardstick 2021-07-23 20:18:20
I'm sure this is good info but the title of this post reminds me of that funny skit from CSI.
Especially because the post doesn't even talk about your python code.
https://www.youtube.com/watch?v=hkDD03yeLnU
Necro Bump Detected!
[31 days between previous and next post]
By Izanami 2021-08-23 13:46:01
Thanks for waiting patiently. I've been incredibly busy since making the original post. Among other things, I've recently graduated, moved to a new apartment 400 miles away, and started a new job.
I've managed to make the changes that I felt were necessary before the code was worth publishing. They were incredibly easy changes to make, but I just didn't have the time and motivation to sit down and finalize them until yesterday. I don't plan on making large changes to the code anytime soon, but it's worth at least posting what I have so that those who requested the code can view it.
I'm not very familiar with GitHub, but I've put the code on my newly-created GitHub page ( https://github.com/IzaKastra/wsdist). The format of the code is pretty embarrassing, but I definitely do not want to spend time reformatting everything in the near future.
The basic process to run the code is:
Check the gear.py file for equipment you want to test in each slot.
Modify the init.py file to choose the weapon skill, TP range, buffs, etc to be used.
Run the wsdist.py file to find the best sets.
List of changes since I made the original post:
Runtime improvement: Previously the code could easily take 60 minutes to find a single best weapon skill set. This was because I was performing 50,000 simulations for every equipment swap, for every combination of gear. As I mentioned in the original post, I've updated the code to simply calculate the statistical average once per set instead of running 50,000 simulations every time. This method for finding the best in slot equipment is now identical to the spreadsheet, but entirely automated. Once the best gear set has been identified, the code runs 50,000 simulations to plot the final distribution. The runtime is now 3 seconds to find the best set and 10 seconds to create and plot the final distribution. The runtime will of course change if you add or remove pieces of gear to check. I currently have it check just about every piece of modern Ninja equipment that we have available to us, ignoring useless augment paths.
Accuracy Improvement: There were a few posts expressing concerns about only swapping one slot at a time. There are rare edge-cases that would potentially cause the code to not identify the correct set when two pieces perform well together, but not well separately. I never once observed this to be the case, and I can't think of a common enough situation where this would even happen, but I've updated the code to allow up to two equipment slots to be swapped simultaneously to reduce the worries people may have. The runtime in this method is 190 seconds to find the best set and 10 seconds to create and plot the final distribution. The sets found through this method are generally identical to the sets found through swapping one piece at a time.
Support for 2-handed weapons: With the addition of 2-handed weapon support, I've added Samurai as a main job option. This was only added to give a 2nd example of how to add a new job to the code for other users. I have not yet added the Samurai gear to my gear.py file. Finding the best Samurai sets is not possible without first doing the tedious one-time work of adding Samurai gear. It should be noted that I do not play Samurai so I may have mistakes within the code regarding Samurai stats. For example: Overwhelm merits are coded to only apply 19% WS damage to the first hit, rather than all hits. I've made it incredibly easy to change this to apply to all hits if I happened to have guessed incorrectly.
Ease of use: I've added an input file containing most of the lines that a user would change when running the code. This code was not meant to be distributed since it was originally just a small personal project and only needed to be run once per weapon skill. However, since I received a few requests for the code itself, I at least tried to make modifying the inputs a bit easier. I don't think I broke anything with these changes, but let me know if you run into any weird issues.
Readability: Since I'm still almost a beginner with Python3, the code may be somewhat difficult to read. I've tried to add a handful of extra comments to explain some of my reasoning for how I coded things. Hopefully they help make the code somewhat readable. I did assume that if you're looking into the details of the code that you've at least read an "Intro to Python3" article online somewhere.
The code makes use of the following Python libraries:
Required:
numpy: Just about everything uses this.
scipy: Interpolation when determining weapon skill bonuses decided by TP (crit rate varies with TP for example). Could probably use numpy's interpolation instead.
Can be optional with minor modifications to the code:
cProfile: Profile the code (see how long each function call takes)
datetime: Print the time that an iteration begins.
matplotlib: Plot the final distribution. The code uses equipment icons from the Windower add-on "equipviewer," so equipviewer will also be necessary unless you make a few simple modifications to how it plots.
mpl_toolkits: Formatting the final plot.
numba: Huge performance improvements.
os: Create directory for output files.
pstats: Paired with cProfile
random: Used to determine if you pass an accuracy check or proc a multi-hit. This is used together with numba, otherwise the numpy version is used.
re: Sorting and formatting inputs to build the final plot.
sys: Debugging
Again, this was originally just small project to learn more Python3 and about the FFXI damage formulae. If you're proficient in Python3 and notice some bad habits or significant inefficiencies in my code, please let me know so that I can learn a bit more by fixing them.
Feel free to comment here, message me on ffxiah, or /tell me in game if you have any questions, comments, or suggestions, or if you find any typos or errors in my methods.
Bonus Ninja sets!
Now that we have 2-handed weapon support, we can check the best sets for Tachi: Hybrid weapon skills. Note that I only tested Alber Strap in the grip slot, so it won by default.
Tachi: Jinpu
ItemSet 383497
Tachi: Koki
ItemSet 381625
Tachi: Goten and Kagero
ItemSet 381626
Each set uses WSD+STR Andartia's Mantle.
Friomisi Earring and Lugra Earring +1 R15 are pretty interchangeable.
Epaminondas Ring can be swapped for Beithir Ring R20 or Epona's Ring
Mochizuki Hatsuburi +3, Mpaca's Cap R20, and Nyame Helm R20B show up in different situations. Mpaca's Cap R20 is good for low-TP, Nyame Helm R20B only shows up in the single-hit great katana hybrids with high buffs or TP, while Jinpu always seems to prefer Mochizuki Hatsuburi +3.
Fotia Belt wins at lower TP for the single-hit great katana hybrids. At higher TP values, the bonus FTP that Fotia Belt provides becomes worth less than the bonus 15% magical damage provided by Orpheus's Sash.
Tachi: Kasha (1500-1800 TP with BRD+COR)
ItemSet 381627
The Ghastly Tathlum is just a placeholder for Crepsecular Pebble since they use the same icon and FFXIAH doesn't have Crepsecular Pebble yet.
Asura.Bippin
Server: Asura
Game: FFXI
Posts: 1085
By Asura.Bippin 2021-08-23 13:51:17
Ammo for Kasha is wrong FYI
By Izanami 2021-08-23 14:24:38
Ammo for Kasha is wrong FYI
Thanks for the note. I forgot that gear set comments don't appear when using [itemset] formatting.
I've added a comment stating that Ghastly Tathlum is a stand-in for Crepsecular Pebble since FFXIAH has not yet added the Shinryu gear to their gear sets and since they share the same item icon.
It should also be noted that Alber Strap won by default because I didn't check other grips. Not that I expect people to actually try Tachi: Kasha on NIN.
[+]
Server: Asura
Game: FFXI
Posts: 3113
By Asura.Aeonova 2021-08-23 15:06:25
Remember the early days in the d00ns, island, and jungle while playing the game and weapon-skilling in the same gear you would TP in?
A simpler time.
Node 456
Updated: 2022 January 28:
ML20 NIN99/WAR53 & R25 Odyssey.
Slightly updated code for easier reading (see Github link below).
While a simple average is nice and convenient for DPS spreadsheets, it does not tell the whole story for most weapon skills. To know exactly how your weapon skill damage will be distributed, you need detailed information about your stats, the enemy you're fighting, and the mechanics of weapon skill damage. As a side-project to learn a bit of basic Python3 programming and about the FFXI damage formulae, I've written a Python3 code to simulate weapon skills and obtain distributions of the damage being dealt given a set of gear and an enemy.
I'm not very familiar with GitHub, but I've put the code on my newly-created GitHub page ( https://github.com/IzaKastra/wsdist_v2).
The code is not meant to replace DPS spreadsheets, but the gear sets provided here should agree with the spreadsheets reasonably well. I believe the sets presented here are the best in slot sets currently available, but you may find marginally better sets for specific enemies. I therefore encourage you to play around with these sets using the spreadsheets to try to find potentially better or worse options that fit within your gear budget.
In addition to finding the best katana weapon skill sets, the code has the added benefit of working with all jobs and all physical and hybrid weapon skills (after minor modifications to adjust for different player race/job stats). This allowed me to also check the best Evisceration, Savage Blade, and Tachi: Jinpu/Koki/Kagero/Goten/Kasha sets for Ninja. I have a version of the code that works for SAM and nearly works for DRK. I "simply" need to work out the DRK Smite trait before it's finished. This is technically the second of three parts of a Python3-based DPS simulator. It currently has everything it needs to be a full DPS simulator, including real-world time between attacks, TP return, and auto-attack/WS damage, but it seems appropriate to stop where I am for now.
I've tested the code's output against SimonSes' NIN Hybrid WS spreadsheet for Blade: Chi and find the difference to be within 0.5%-2% depending on the TP range and buffs used. For physical weapon skills, I tested the results against the Ninja DPS spreadsheet and found that Blade: Shun, Kamu, Hi, and Ku all agree within 5% or better, while Blade: Metsu shows 10% differences due to incorrect Aftermath: Attack+10% handling in the spreadsheet (see the spoiler below). This of course does not mean that I've done everything perfectly.
The spreadsheet is applying Kikoku's aftermath only to the Ninja's base attack (Lv99+STR+Skill), not including BRD songs, attack traits from /WAR, or the +70 attack from job gifts. My in-game testing has shown that Kikoku's AM is applied additively with the other percentage-based boosts like Fury, Chaos, and Berserk; Attack = (Base+BRD)*(1+Berserk+Chaos+Fury+Kikoku_AM)+Food. The image below shows my observed and calculated Attack values with different buffs up.
I've modified the code to automatically adjust a given gearset until it finds the "best" piece in each slot for a specified weapon skill. I then ran the code for 3 different buff states and 3 different TP ranges that I consider to be typical low/mid/high buffs for content in-game:
Low Buffs: Only Grape Daifuku and Dia2, not even trust buffs (but we know you'd end up with March, Paeon, and Evoker's Roll anyway)
Standard Buffs: Grape Daifuku, Dia2, Minuet5, Minuet4, Honor March, Victory March, Lucky Chaos Roll (Songs+7, Rolls+7, HonorMarch+4)
High Buffs: Grape Daifuku, Dia2, Minuet5, Minuet4, Honor March, Victory March, Lucky Chaos Roll, Fury, Frailty (Songs+7, Rolls+7, Geomancy+6, HonorMarch+4)
High Buffs (Hybrid): Grape Daifuku, Dia2, Minuet5, Minuet4, Honor March, Victory March, Lucky Chaos Roll, Fury, Malaise (Songs+7, Rolls+7, Geomancy+6, HonorMarch+4) -- Only used for Blade:Chi
tp = [1000,1300]
tp = [1500,1800]
tp = [2000,2300]
I use max skill-potency geomancy bubbles and songs with 5/5 Minuet merits and 20/20 Minuet job gifts. I did not use any buff-enhancing abilities such as Crooked Cards, Marcato, Blaze of Glory, etc.
My earlier testing suggested that Hitaki is by far the best off-hand weapon for "damage varies with TP" weapon skills. However, it also only showed ~30-70% off-hand hit rate on the Apex Toad target that I'm simulating against (Evasion:1103~1163, Lv131-133), which would likely translate to significantly reduced TP gain and thus significantly reduced WS frequency. Because of this, I removed Hitaki and reran my simulations without it being an option. If you are able to make up for the significantly reduced accuracy and auto attack damage, then Hitaki should probably be your go-to for "damage varies with TP" weapon skills.
I did not test any Herculean gear since I believed it would be a waste of time given the accessibility of Nyame R10+ and the random nature of obtaining "good" augments behind multiple layers of RNG. I encourage you to input the sets I present here into the spreadsheets and see how your Herculean gear compares, though.
It should be noted that these sets are based raw weapon skill damage values. Stats such as Skillchain Bonus (see Nyame) have no effect as a result until I finish the code to be a proper DPS simulator with auto-attacks, TP rounds, auto-WS, and SCs. Swapping some pieces listed in these sets with Nyame will lower weapon skill damage, but the skillchain bonus stat will likely result in larger overall damage.
The details of the code's algorithm are explained in a bit of detail below, but the process is likely very well known to most of you. For now, here is the list of "best average" gear sets for each buff state for a few of Ninja's available weapon skills at specific TP ranges. Each one contains an imgur link to the simulated distributions, which display the gear used and basic player stats for all tests run on that specific weapon skill. A representative image is also presented in each section. The list of all sets can also be found on my FFXIAH item sets page. The comments within each gear set may provide swaps for varying TP ranges.
Note that these gearsets are for a Master Level 20 Lv.NIN99/WAR53, R25 Odyssey gear, and R15 UNM gear.
Blade: Chi
ItemSet 380757
To nobody's surprise, with the release of augmented Nyame gear, the "best average damage" gearset for Blade: Chi is incredibly easy to predict. Blade: Teki and Blade: To likely use an identical weapon skill set, but I did not test them. I would not be surprised if To/Teki used Fotia Belt, though. Since both of them are single-hit weapon skills.
Note that these tests were done on a neutral monster with 100 Magic Defense and no Magic Evasion. I believe many relevant enemies have something like 150 Magic Defense or an SDT value that would guarantee at least a 50% magic damage resist.
Blade: Hi
ItemSet 380758
ItemSet 380759
ItemSet 380760
Kannagi (R15) was locked into the main hand.
Andartia Mantle AGI+Crit Rate for low buffs
Andartia Mantle AGI+WSD for standard/high buffs
Critical hit weapon skill damage varies wildly based on the AGI stat of your target. This is because up to 15% of your Crit Rate comes from dDEX. Unfortunately, Blade: Hi has an 80% AGI modifier, which is essentially useless for meleeing. I'm still convinced the developers accidentally swapped the modifiers for Jishnu's Radiance (80% DEX) and Blade: Hi (80% AGI) and refuse to admit it.
Since Apex Toads do not have a published AGI value to calculate dDEX from, I ended up performing about 2 hours worth of auto-attacks in various sets to estimate it myself (AGI ~ 354-358). Either way, I don't necessarily recommend the Blade: Hi sets presented here. I don't think Blade: Hi is a good weapon skill in general compared to the other Katana options. The conditions required for critical hit weapon skills to perform well are too variable to simply stick with a single set based on a spreadsheet or code. You should do your own research based on exactly what you plan to use the weapon skill on and build your set around that.
Blade: Kamu
Blade: Ku
ItemSet 380763
ItemSet 380764
ItemSet 380765
Blade: Ku is surprisingly powerful when compared to Blade: Shun. The +60% damage on Gokotai, 1.25 FTP, and 30% STR+DEX modifier put in a lot of work to boost the damage. Unfortunately the skillchain properties are not great compared to Blade: Shun with Heishi.
Blade: Metsu
ItemSet 380766
ItemSet 380768
These sets are a good example of not using a lot of Nyame where Nyame would likely win. Blade: Metsu has excellent skillchain properties so I expect at least 4/5 Nyame with Relic legs to win in most cases considering they provide +24% skillchain damage.
With the release of R25 Nyame, most of these sets actually use Nyame for maximum physical damage. The skillchain damage stat on Nyame is just a bonus on top now.
Blade: Shun
Blade: Ten
Savage Blade
ItemSet 380771
ItemSet 380772
ItemSet 380773
For Naegling's "Weaponskill: Attack bonus based on number of upgrades" stat, I assumed the player had at least eight buffs up (protect, shell, haste, utsusemi, kakka, yonin, food, signet) for all sets. Standard buffs added 4 songs and 2 rolls for 14 total buffs, and high buffs added a single GEO bubble for 15 total buffs. The player's base attack then received +1% per buff present. This bonus attack was added to the player's base attack before any other buffs were added.
Evisceration
ItemSet 380942
ItemSet 380770
ItemSet 380943
Tauret was locked into the main hand.
Ryuo Tekko Path A or D
Andartia Mantle DEX+Crit Rate
Kendatsuba Samue +1 or Mpaca Doublet R25 are generally the go-to body slots for Evisceration.
Similar to Blade: Hi, critical hit weapon skill damage will vary wildly depending on the AGI of your target. Your dDEX provides as much as 15% critical hit rate that you're potentially missing on high AGI targets unless you stack more DEX. Luckily, Evisceration has a 50% DEX modifier, so this is not likely to be a problem. I still recommend finding your own set that works well on the content you plan to use Evisceration on (Odyssey Lamia/Aquans or that one Master Trial) instead of just sticking with this set or one from the spreadsheet.
Tachi: Goten
ItemSet 383500
Tachi: Goten is the Lightning-elemental hybrid weapon skill. The Donar Gun would likely be fantastic for this weapon skill, but it would require that you never unequip the gun since you would lose TP to swap to Shuriken for TPing.
Be sure to weaponskill above 2000 TP.
You may want to use Samurai subjob for Hasso/Zanshin in order to increase your TP gain rate when relying on the Great Katana weapon skills.
Tachi: Jinpu
ItemSet 383497
Nyame Path B
Andartia Mantle STR+WSD
Ninja Nodowa +2 when attack capped and TP>2000.
Fotia Belt > Orpheus's Sash when below 1500 TP. You should always weapon skill above 2000 effective TP, though.
Tachi: Jinpu is a powerful tool for a Ninja to have available against Earth-based enemies weak to magic and slashing damage. This is essentially the Great Katana version of Blade: Chi, so you'll want to WS above 2000 effective TP.
You may want to use Samurai subjob for Hasso/Zanshin in order to increase your TP gain rate when relying on the Great Katana weapon skills.
The best part of Tachi: Jinpu is that it creates and endless skillchain loop with itself. When fully buffed, you are able to simply spam Tachi: Jinpu and create powerful skillchains with every use. It's unfortunate that the developers did not allow Blade: Chi to self-skillchain endlessly as well.
Tachi: Kagero
ItemSet 383499
Tachi: Kagero is the Fire-elemental hybrid weapon skill. Tachi: Kagero is especially potent on a few enemies in Odyssey C, such as Puks and Bomb Clusters. Be sure to weaponskill above 2000 TP.
You may want to use Samurai subjob for Hasso/Zanshin in order to increase your TP gain rate when relying on the Great Katana weapon skills.
Tachi: Kasha
ItemSet 383491
ItemSet 383492
Nyame Path B
Andartia Mantle STR+WSD
I don't expect anyone to use Tachi: Kasha on Ninja, but it is a pretty weapon skill.
You may want to use Samurai subjob for Hasso/Zanshin in order to increase your TP gain rate when relying on the Great Katana weapon skills.
Tachi: Kasha is the Great Katana version of Blade: Retsu, since it can Paralyze the enemy. I'm not sure if it is as potent as Blade: Retsu, though.
Tachi: Koki
ItemSet 383498
Nyame Path B
Andartia Mantle STR+WSD
Tachi: Koki is a single-hit weaponskill. Ninja Nodowa +2 will likely not beat Fotia Gorget unless you hold until 3000 TP for some reason.
Epaminondas's Ring can replace Gere Ring when near attack cap, but you lose those rare triple attack procs.
Tachi: Koki is the light-elemental hybrid weapon skill, which means it benefits greatly from Weatherspoon Ring (SoA final reward option). Despite the boost in power from Weatherspoon Ring, I don't see Koki getting much use.
You may want to use Samurai subjob for Hasso/Zanshin in order to increase your TP gain rate when relying on the Great Katana weapon skills.
As a side note: Blade: Ei is a Darkness-based magical Katana weapon skill. There is no Darkness-based hybrid weapon skill. This is unfortunate because it would likely be very powerful with Archon Ring and Pixie Hairpin +1
Based on the sets listed above, we can make a short list of gear priority for a newer Ninja to reference.
Odin: Gere Ring
UNM: Lugra Earring +1 (Aug) > Sailfi Belt +1 (Aug) >= Seething Bomblet +1 (Aug) > Blistering Sallet +1 (Aug)
Lilith: Malignance Gloves > Malignance Tabard > Malignance Boots > Malignance Tights >= Malignance Chapeau
Bumba: Nyame Mail > Nyame Sollerets > Nyame Gauntlets > Nyame Flanchard >= Nyame Helm
Arebeti: Mpaca Cap > Mpaca Hose > Mpaca Doublet > Mpaca Gloves >= > Mpaca Boots
Ngai: Gleti's Knife
Xevioso: Kunimitsu
Relic: Legs > Head > Hands >= Feet > Body(TP low haste)
AF: Head
Adhemar: Head(A) > Body(B) > Hands(B) > Feet(A)
However, just because an item didn't show up here doesn't mean it doesn't hold a best-in-slot position in some situation. The 2021 Ninja Gearsets thread provides excellent gear to use for many weapon skills without considering Odyssey gear. Many of these sets are well within uncertainty of my "best average" sets presented here.
Here I give a "brief," but relatively detailed, description of how the damage was calculated within the code. Let me know if there are any mistakes or inaccuracies that need to be corrected. I'm confident in the algorithm, but I may have done a poor job explaining in some places.
The simulations were based on Apex Toads with three sets of possible stats, excluding their innate -25% MDT. This can be thought of as having three unfortunate Apex Toads in a room and each weapon skill hit one of them randomly. Taken directly from my code, the stats used were:
Code
e_mdef = 0-malaise*(15+3*nbubble) if 0-malaise*(15+3*nbubble) > -50 else -50
apex_toad = {'Level': [131, 132, 133],
'Defense': [1206*(1-dia[dia_potency]-frailty*(0.148+0.027*nbubble)), 1239*(1-dia[dia_potency]-frailty*(0.148+0.027*nbubble)), 1272*(1-dia[dia_potency]-frailty*(0.148+0.027*nbubble))],
'Evasion': [1103, 1133, 1163],
'VIT': [264, 270, 276],
'AGI': [354, 356, 358], # AGI roughly measured using Scoreboard on two different toads.
'MND': [218, 224, 228],
'INT': [285, 293, 299],
'CHR': [270, 277, 284],
'Magic Defense': [e_mdef, e_mdef, e_mdef]} # Enemy Magic Defense has a floor of 50
For Physical weapon skills, I used the standard BG-wiki formula to calculate damage: Due to the random nature of PDIF, a new value is calculated for each hit individually.
Additional hits after the first main-hand hit, whether they be from multi-hit weapon skills or multi-attacks, were performed in the order suggested by the testing of Austar. In the case of multi-attack procs on weapon skills, testing by Saevel and Austar show that there can be no more than two multi-attack checks of any kind per weapon skill and that the off-hand weapon will always get one of these two checks if you have an off-hand weapon equipped, otherwise the main-hand will get both checks only if the weapon skill has at least two natural hits.
In addition to the testing of Saevel and Austar, I tested this by using 404 Blade: Retsu while dual-wielding (2+1 hits) with 29% DA and 31% TA on Apex Toads. The observed TP return distribution from 404 Blade: Retsu closely matches the expected distribution assuming that only the first two hits (the first main hit and the one sub hit in this case) can multi-attack. Any assumptions that all weapon skill hits can multi-attack (6 chances for Blade: Shun for example) quickly cause the expected distribution to diverge from the observed.
For Hybrid weapon skills, I used the equation provided by Bahadir's Blade: Chi testing, Jakey's YouTube video, and SimonSes' NIN Hybrid Damage calculator, which splits the weapon skill damage into two parts
Hybrid = Physical + Magical
The physical damage is calculated using the exact same method as mentioned previously for purely physical weapon skills, with the important change that FTP is 1.0 and non-replicating for the physical portion of Hybrid weapon skills (see Bahadir's testing). The magical damage is calculated using the physical damage and the player's "Magic Damage" stat as a base:
In addition to the basic formula for damage, it is important to explicitly mention the following special cases that are included in the damage calculations:
Unlike the first main-hand hit, the first off-hand hit does not gain the bonus from the standard weapon skill damage stat.
Certain "weapon skill damage" stats on weapons apply to all hits. Examples of this include Naegling Savage Blade Damage +15%, augmented REMA weapons, and the hidden weapon skill damage bonus on Mythics and Relics.
Weapon skills gain a hidden ~+100 accuracy to their first hit. My testing of 1745 unbuffed (Brygid+KuyinHathdenna+YoranUC) Blade: Chi on Apex toads heavily suggests that this bonus applies to the first off-hand hit as well.
Buffs to player Attack are applied in a specific order:
Attack = (8+Gear+Traits+Gifts+Skill+STR+STR(food)+STR(buffs)+BRD)*(1+COR+GEO+Kikoku10%+Berserk)+Attack(food)
The player's secondary/auxiliary/off-hand attack is calculated using only half of their STR stat (see BG-wiki: "Attack")
STR from food is immediately used to calculate base attack, but "Attack+" from food is not applied until all other buffs have taken effect.
Before running the code, I manually selected equipment for each equipment slot that I wanted to test. This allowed me to exclude testing items like Mummu Kecks for Blade: Chi, which would obviously be a waste of time. To allow the output of my code be easily compared to the spreadsheets, the code uses a distribution's average damage to determine which piece of gear is "better" than another. It should be noted that the average is not a good summary statistic for multi-peaked distributions, though. The algorithm itself is simple:
(Edit 2021-08-23: I've adjusted the code's algorithm to use averages for intermediate steps, and 50,000 simulations as the last step. The process for finding best sets is now identical to manually selecting gear in a spreadsheet and checking the DPS value. The advantage is that this code is automated and provides expected damage distributions at the end for further analysis.)
1) For each item slot (or for each pair of two item slots simultaneously), cycle through all selected equipment and calculate the average weapon skill damage from that test gear set.
2) If the average damage is higher than the previous highest, then keep that item equipped, otherwise ignore it and try another combination of gear.
3) After all slots (or all combination of two slots simultaneously) have been tested and the best item in each slot determined, restart from the beginning with the previous best set as the starting place, checking each slot (or combination of two slots simultaneously) again, up to 20 times until. This allows for some gear to change based on changes to already tested slots.
4) Stop early if gear changes result in an average damage increase less than 0.5%, or if no changes are made within two consecutive iterations. This is the convergence criterion and it usually triggered before iteration 7.
With the above algorithm, the code's runtime is ~3 seconds to find a best set while swapping only one slot at a time, or ~180 seconds if changing two slots simultaneously. An additional 10 seconds is required to build a distribution of 50,000 simulations for the fancy output plots.
The list of gear tested in each slot is presented here. All weapon skills used the same pool of gear. All UNM gear is R15. All Odyssey gear is R25. Code
mains = [Heishi, Kannagi, Kikoku, Nagi, Gokotai]
subs = [Ternion, Kunimitsu, Gleti_Knife, Tauret, Gokotai, Crepuscular_Knife]
grips = [Alber_Strap]
ammos = [Yetshila, Seething_Bomblet, Cath_Palug_Stone, Aurgelmir_Orb, Pemphredo_Tathlum, Ghastly_Tathlum, Crepuscular_Pebble]
heads = [Adhemar_Bonnet_A, Adhemar_Bonnet_B, Hachiya_Hatsuburi, Mochizuki_Hatsuburi, Malignance_Chapeau, Kendatsuba_Jinpachi, Mummu_Bonnet, Nyame_Helm, Mpaca_Cap, Blistering_Sallet]
necks = [Ninja_Nodowa, Fotia_Gorget, Caro_Necklace, Baetyl_Pendant]
ears = [Ishvara_Earring, Lugra_Earring_Aug, Moonshade_Earring, Brutal_Earring, Friomisi_Earring, Crematio_Earring, Balder_Earring, Mache_Earring1, Mache_Earring2, Odr_Earring, Crepuscular_Earring]
ears2 = [Ishvara_Earring, Lugra_Earring_Aug, Moonshade_Earring, Brutal_Earring, Friomisi_Earring, Crematio_Earring, Balder_Earring, Mache_Earring1, Mache_Earring2, Odr_Earring, Crepuscular_Earring]
bodies = [Kendatsuba_Samue, Adhemar_Jacket_A, Adhemar_Jacket_B, Malignance_Tabard, Nyame_Mail, Samnuha_Coat, Gyve_Doublet, Abnoba_Kaftan, Mpaca_Doublet, Tatenashi_Haramaki, Ryuo_Domaru_A, Agony_Jerkin]
hands = [Adhemar_Wristbands_A, Adhemar_Wristbands_B, Mochizuki_Tekko, Mummu_Wrists, Malignance_Gloves, Kendatsuba_Tekko, Nyame_Gauntlets, Mpaca_Gloves, Tatenashi_Gote, Ryuo_Tekko_A, Ryuo_Tekko_D]
rings = [Gere_Ring, Hetairoi_Ring, Shukuyu_Ring, Apate_Ring, Ilabrat_Ring, Regal_Ring, Epona_Ring, Petrov_Ring, Rufescent_Ring, Begrudging_Ring, Epaminondas_Ring, Mummu_Ring, Beithir_Ring, Dingir_Ring, Metamorph_Ring, Shiva_Ring1, Shiva_Ring2, Weatherspoon_Ring]
rings2 = [Gere_Ring, Hetairoi_Ring, Shukuyu_Ring, Apate_Ring, Ilabrat_Ring, Regal_Ring, Epona_Ring, Petrov_Ring, Rufescent_Ring, Begrudging_Ring, Epaminondas_Ring, Mummu_Ring, Beithir_Ring, Dingir_Ring, Metamorph_Ring, Shiva_Ring1, Shiva_Ring2, Weatherspoon_Ring]
capes = [Andartia_DAdex, Andartia_DAstr, Andartia_DAagi, Andartia_Critagi, Andartia_Critdex, Andartia_WSDstr, Andartia_WSDdex, Andartia_WSDagi, Andartia_Nuke]
belts = [Windbuffet_Belt, Fotia_Belt, Grunfeld_Rope, Kentarch_Belt, Sailfi_Belt, Orpheus_Sash]
legs = [Kendatsuba_Hakama, Adhemar_Kecks_A, Adhemar_Kecks_B, Mochizuki_Hakama, Samnuha_Tights, Jokushu_Haidate, Malignance_Tights, Mummu_Kecks, Gyve_Trousers, Hizamaru_Hizayoroi, Nyame_Flanchard, Mpaca_Hose, Tatenashi_Haidate, Ryuo_Hakama_A, Rao_Haidate_B]
feet = [Mochizuki_Kyahan, Adhemar_Gamashes_A, Adhemar_Gamashes_B, Malignance_Boots, Mummu_Gamashes, Kendatsuba_Sune_Ate, Nyame_Sollerets, Mpaca_Boots, Tatenashi_SuneAte, Ryuo_SuneAte_D, Rao_SuneAte_D]
Finally, since this post is already pretty long, I may as well link my official forum post from last year. This post details my requested Ninja job adjustments. Feel free to give it a like/comment.
https://forum.square-enix.com/ffxi/threads/57263-2020-2021-Ninja-Job-Adjustment-and-Feedback?s=66c8aaed6a12e3a576c9ee8f403e1174
|
|