π Critical hit weaponskills (CritVaries) proc 100% of the time.
UmeboshiXI opened this issue Β· comments
I affirm:
- I understand that if I do not agree to the following points by completing the checkboxes my issue will be ignored.
- I have read and understood the Contributing Guide and the Code of Conduct.
- I have searched existing issues to see if the issue has already been opened, and I have checked the commit log to see if the issue has been resolved since my server was last updated.
OS / platform the server is running (if known)
Branch affected by issue
base
(Default LandSandBoat) Latest Pull as of 3/18/2024.
Steps to reproduce
It seems from what I can see, weapon skills that have a scaling critical hit rate that varies with TP seem to always crit no matter how much TP you have.
For this example, I made a print in weaponskills.lua where CriticalHits are determined for easy feedback.
Then I set the params.critVaries to 0 for all fTP levels. (Vorpal Thrust in this example)
See that it still crits. Spamming it over and over gets the same results.
If I completely comment out params.critVaries = { } in Vorpal_Thrust.lua, then my printToPlayer message does not show up and the damage is as expected from a non critical hit (noticeably lower damage).
Currently, I do not think the fTP values for param.critVaries is being considered at all and weaponskill.lua is only checking to see if the param exists at all in the actual weaponskill file (If param.critVaries = { } exists, then CriticalHit = True, else false.)
Expected behavior
The fTP levels of params.critVaries = { } should influence the critical hit rate for each swing of the weapon skill instead of being 100% crit at all times.
The issue is from xi.combat.physical.calculateTPfactor
using local actorTP = actor:getTP()
, but when a player readies a ws, tp is recorded and set to 0, this causes the tpfactor to default to 1