Updated h2h WS, Added support for ftp Multi Hit, Reworked cartio rang…
Reworked cratio cap for ws range. Added support for ftp on all hit of multi hit ws. Updated hand to hand weaponskill in accordance with new value. Also change the Critical_Hit_Rate to follow curve instead of guesstimate
I affirm:
- [x] I have paid attention to this example and will edit again if need be to not break the formatting, or I will be ignored
- [x] that I agree to LandSandBoat's Limited Contributor License Agreement, as written on this date
- [x] that I have read the Contributing Guide
- [x] that I've tested my code and things my code changed since the last commit in the PR, and will test after any later commits
I don't have time for a full review ATM, but from a quick glace, a few notes:
- Please add your sources in the scripts, so we can check the changes easier.
- Check style. (Remove uneeded parenthesis, check whitespace at the end of lines, etc...)
I will do a proper review later. ^^
Once you are done checking and everything is good/ready I will want to remove the commented link to ws page and the commented out code that won't be used anymore.
I've found a potential issue with increasing the number of hits while looking through your changes to the weaponskills.lua and the individual H2H weaponskills.
https://github.com/LandSandBoat/server/blob/11a20c304407f6df3ab126c2d2113ef3a8e55451/scripts/globals/weaponskills.lua#L183-L185
These lines inside the getMultiAttacks function already handle adding an additional hit to H2H weapon skills.
Your changes to single-hit weaponskills like Backhand Blow would potentially make it a 3-hit weaponskill (2 hits + the H2H "offhand"). https://github.com/LandSandBoat/server/blob/11a20c304407f6df3ab126c2d2113ef3a8e55451/scripts/globals/weaponskills/backhand_blow.lua#L22
Resetting the number of hits in the weapon skill lua's to their defaults should solve the issue.
https://github.com/LandSandBoat/server/blob/11a20c304407f6df3ab126c2d2113ef3a8e55451/scripts/globals/weaponskills.lua#L218-L282 Also, could you please cite where the uncapped cRatio information came from? The information on BG Wiki (https://www.bg-wiki.com/ffxi/PDIF) appears to be from December 2019 and caps ranged cRatio at 3.5. To my knowledge the cRatio code you adjusted only affects ranged weapon skills.
Physical weapon skill cRatio is calculated here: https://github.com/LandSandBoat/server/blob/11a20c304407f6df3ab126c2d2113ef3a8e55451/scripts/globals/weaponskills.lua#L993-L1096
For the multiChances value I have to say I don't know how it is suppose to interact wouldnt the multichance make other ws like raging fist, shinjin spiral, asuran fist(mabe not this one cause of cap) too strong by adding another hit that is'nt suppose to happen? The number of hit of the in game description have been changed on the retail server. But patch note didn't come with rework of the ws themself and the http://wiki.ffo.jp confirmed the hit where there before description change. I'm not sure myself what is best since I didn't know about that added multi hit, but I think it might be best to remove it instead of changing the ws number of hit?
For the cratio I seem to have misunderstood part of it I will rework it and double check right now. But as you said nothing as changed and it is only for range.
Removing it entirely would affect Dual Wielders but the possibility of removing just the H2H qualifier does exist. I'm definitely curious about how this is handled because in fiddling with the physical weapon skill system on my server I found that multihit weaponskills like Asuran Fists/Shijin Spiral/etc were actually doing their number of hits +1.
Ok, additional research into it has resulted in the following:
- The calcParams.extraOffhandHit is set to true on Line 630 in the onPhysicalWeaponskill function when dual wielding or using H2H.
- The current code set up proceeds as Main Hand > Extra Offhand Hit > getMultiAttacks.
- I'm going to revise my earlier comment regarding removing multiChances because it seems like that handles allowing both the main hand and off hand to proc double/triple/quad attack.
- My recommendation is that the weapon skill lua's params.numHits be set to the game's description so that an additional hit isn't added in. The weaponskills.lua already adds in the "offhand" hit from H2H so it's not necessary to add it in to the weapon skill itself. My argument for leaving the extraOffhandHit parameter intact is that the additional hit comes from the "dual wielding" aspect of H2H and is not part of the weaponskill itself.
On a related note, and worth investigating, discussion with Claywar has made us both question if the order of hit operations is correct. Clay thinks that the process should be Main Hand > getMultiAttacks > Extra Offhand Hit, but since the Extra Offhand Hit is currently added to the Main Hand hit's damage it may, mathematically, be similar.
One thing to note as well, in the past the absolute maximum number of hits per weaponskill was 8. Asuran would be a WS that shouldn't receive any offhand bonus. This may have changed over the years, but needs to be investigated.
The thing is I am in the game right now and backhand blow is describe as delivers a twofold attack. And so are the other ws I have changed the number of hit for. So now the question is are we suppose to get a additional off hand hit on top or not, this would need to be tested.
This needs to be tested with TP returns. Combo shows 3-fold, Shoulder Tackle, One Inch Punch, and Backhand Blow show 2-fold, and Raging Fists shows 5. Combo and Raging I would expect those, but we need to determine its actually two-hit + offhand, or one-hit + offhand, and the message being inaccurate.
For differentiating between the weapon types I recommend:
local weaponType = attacker:getWeaponSkillType(xi.slot.RANGED) local cRatioCap = 3.25
if (weaponType == xi.skill.MARKSMANSHIP) then cRatioCap = 3.5 end
There is one inaccurate description been dragonkick reading as an 8 fold ws and definitely isnt. The other description where revised here, did they remove the off hand hit at the same time? https://forum.square-enix.com/ffxi/threads/53127-September.-11-2017-%28JST%29-Version-Update
thanks for the help @Schaedelschaden
Any trick to check the difference between 1 hit + off hand or 2 hit with no off hand?
For determining the cRatio? Since all dual wielded weapons are 1-hand they would fall under the 1-hand cRatio caps and 2-hand weapons would fall under their respective 2-hand cRatio caps.
The extraOffhandHit parameter calculates its own cRatio in the getSingleHitDamage function. Basically, each hit independently calculates its own cRatio using the getSingleHitDamage function.
I meant for testing the monk ws on retail.
Oh, sorry about that. I believe it would be a matter of checking the TP returned per hit after executing the weaponskill. I'm not sure what your current TP returned is but if you receive 75 tp for one hit, you should receive 150 for two hits, 225 for three hits, etc. I can't remember at the moment if multihit weaponskills receive a different TP return than normal hits. You'll also want to make sure that you're not swapping on/off Store TP gear during weaponskills.
I did some digging and watched video of old and new age monk. They both act the same on ws. Also digged the ws tp formula. tp per hit + 10*extra hits. Howling fist did a return in tp of 2X tp per hit but only started to give + 10 on monk at higher level so when they got either kick attack of double attack proc, raging fist did 2X tp + 10-40 tp. I have tested on the private server and the ws behave in the same way right now. Conclusion I will change back the number of hit on ws. I will add a comment on the hit for future reference. I do not have the proof to know if raging fist should go down from 6 hit (main hit + off hand + 4 hit) to 5 hit (main hit + off hand + 3).
I have finished re-working everything and ready for a full review but I saw that there is a style error cyclomatic complexity that I do not know how to resolve.
I forgot to talk about the order of hit operations you where talking about. From the retail behavior that I was investigating, if you change the order of operation to Main Hand > getMultiAttacks > Extra Offhand Hit. Then when hit over the 8hit cap get truncated wouldn't you loose the extra Offhand Hit? This would mean loosing the full tp return of a hit in exchange for only a +10 tp. And on the other hand if the extra offhand hit doesn't get truncated then you would end up with 8 hit +1 offhand hit. It seems to me taking the extra offhand hit before the multi is the right way to go.
One more observation this time for asuran fist. The ws on old retail for someone doing 5 tp per hit did a return in tp of 16. Meaning 2x tp (10) (2hit) +6tp (6hit) that would a be a full hit asuran and show that the off hand hit does apply. If off hand hit didnt apply this would mean 1X tp (5) + 11tp (11hit) and we can agree that is impossible. Found video with raging fist and the same observation can be made monk was doing 2 hit for 11 tp (5.5tp~ hit) got 16 return from raging fist for a break down of 2X tp (11 tp) + 5 hit (5 tp) so again the off hand hit does apply to raging fist. I checked many new video but they are level 99 and rarely use asuran fist they did use raging first but use so many buff and attack so fast that doing the math is difficult.
I took the opportunity to do some testing with the H2H weapon skills on retail and will post my results below. Basically, I believe that the current weapon skill text in retail takes into account that the "off hand" attack is added to the weapon skill and therefore results in a "fivefold attack" consisting of the main hand + off hand + 3 additional hits for Raging Fists. A weapon skill like One Inch Punch, which was always understood to be a one-hit weapon skill, has had its text adjusted to read as a "twofold" attack due to the main hand + offhand hits. Asuran Fists appears to be the main hand + off hand + 6 additional hits. My thoughts are based on the reasonable assumption that the main hand and off hand hits return their "normal" TP while the additional hits provided by the weapon skill add 10 TP per hit landed (Main hand = 58 TP, off hand = 58 TP, each additional hit = 10 TP).
Job: MNK99/DNC49 TP returned by white damage main hand & offhand hits: 116 Gear: Eminent baghnakhs, Espial cap, Twilight torque, Kemas earring, Espial gambison, Espial bracers, Woodsman ring, Espial hose, Espial socks Trusts: Kupipi, Koru-Moru, Karaha-Baruha
Target: Angler Tiger (Abyssea - La Theine) Buffs: Haste II, Haste Samba, Cruor buffs, no atma
One Inch Punch (In-game text: Twofold attack) 1 - 58 TP returned (1 hit) 2 - 116 TP returned (2 hit) 3 - 116 TP returned (2 hit) 4 - 58 TP returned (1 hit) 5 - 58 TP returned (1 hit) 6 - 116 TP returned (2 hit) 7 - 116 TP returned (2 hit) 8 - 116 TP returned (2 hit) 9 - 116 TP returned (2 hit) 10 - 116 TP returned (2 hit)
Target: Bight Uragnite (Ceizak Battlegrounds) Buffs: Haste II, Haste Samba
Raging Fists (In-game text: Fivefold attack) 1 - 146 TP returned (5 hits) 2 - 146 TP returned (5 hits) 3 - 146 TP returned (5 hits) 4 - 146 TP returned (5 hits) 5 - 146 TP returned (5 hits) 6 - 146 TP returned (5 hits) 7 - 136 TP returned (4 hits) 8 - 146 TP returned (5 hits) 9 - 146 TP returned (5 hits) 10 - 146 TP returned (5 hits)
Asuran Fists (In-game text: Eightfold attack) 1 - 176 TP returned (8 hits) 2 - 176 TP returned (8 hits) 3 - 176 TP returned (8 hits) 4 - 176 TP returned (8 hits) 5 - 166 TP returned (7 hits) 6 - 176 TP returned (8 hits) 7 - 176 TP returned (8 hits) 8 - 176 TP returned (8 hits) 9 - 176 TP returned (8 hits) 10 - 136 TP returned (4 hits) (weapon skill killed the mob and did not land all hits) 11 - 176 TP returned (8 hits) 12 - 166 TP returned (7 hits) 13 - 176 TP returned (8 hits) 14 - 176 TP returned (8 hits) 15 - 176 TP returned (8 hits)
These findings lead me to believe that we have been providing far too many hits through the individual weapon skill lua's (looking at you Raging and Asuran Fists) and that the lua's will likely need to be updated to properly reflect the main and off hand hit contributions to the weaponskills.lua process.
I'm not sure I should bring this point on this dicussion but there is one last thing that have been bothering me about asuran fist and any accuracy with tp ws. And it's the dreaded negative acc at 1000 ftp. I will try to make my case as best as I can.
First I will start with the fact that the penalty for two ws that had know bad accuracy have been removed.
- The penalty to Accuracy for the weapon skills "Guillotine" and "Penta Thrust" has been removed. source http://www.playonline.com/ff11us/polnews/news12126.shtml
On the other hand asuran fist or dancing edge on retail never had bad acc but I don't have good data to prove it myself so I will put that aside. I did find somone on Eden who did interesting testing. On retail with squid sushi my monks accuracy was 415 and had a melee hit rate of 97.70% Vs 50 greater colibiri
I averaged a 174.8 tp return out of a possible 176 max tp return 44/50 weaponskills returned full tp which = 88% chance to hit all 8 hits
My eden mnk Riaq which has 428.27 accuracy with crab sushi and had a melee Accuracy of 94.43% Riaq's average weaponskill return was 123 tp per asuran
4/53 weaponskills returned full tp which = 7.5% chance to land all 8 hits source https://github.com/EdenServer/community/issues/1485 They make a compelling point against the penality acc on weapon skill with acc varie with tp Ffxi update clearly state tp bonus TP bonus increased when the bearer has 2,000 or more TP source https://forum.square-enix.com/ffxi/threads/42588
The wording make me believe that even at 1000 tp it is not negative, most likely just regular acc. What I would propose is a change to params.acc100 = 1 params.acc200= 1.075 params.acc300= 1.15 1.15 at 300 would be in line with most suchi giving acc boost of 15%. One thing for sure guillotine and penta thrust doesn't have negative acc anymore since 2007.
Is there anything this PR is doing that hasn't been updated elsewhere?
The H2H multihit fTP variables are set up in this PR but additional formatting could be done to align the weaponskill files with the other fTP weaponskill changes from other PR's. The weaponskill.lua changes look to be updating only the pDIF ceiling calculations but may be addressed by another planned PR.
I fixed the CI warnings and tested everything locally after merging, no errors in scripts. Ready for review again.