ChthonVII / d2r_24ptr2_wereform_calculator

Wereform IAS Calculator for Diablo 2 Resurrected 2.4 PTR2
GNU General Public License v3.0
4 stars 0 forks source link

Bite Attacks Require Testing #2

Closed ChthonVII closed 2 years ago

ChthonVII commented 2 years ago

Presently the calculator isn't applying any slowing factor to bite attacks. This is based on nothing more than a guess because they "look fast." Some empirical data points would be most appreciated.

(A preliminary test might be to eyeball if spears are obviously slower than bows. If so, some sort of factor is getting applied.)

ChthonVII commented 2 years ago

Something related that's probably worth looking into at the same time: Legacy D2 has a bug where, for wide swathes of EIAS values, there's a mismatch between the client and server in calculating the length of bite attacks, which results in every other bite attack that you see on the client not happening on the server. (The server rejects the 2nd input because it thinks the first bite is still in progress, and then stands still until the 3rd input.) I saw a 2.4PTR2 video using hunger that appeared to show monster life bars responding to consecutive bites. So maybe that bug is fixed now? (Can be tested in single player b/c both client and server code are running locally.)

Warren1001 commented 2 years ago

Bite attacks do use the slowing factor: https://docs.google.com/spreadsheets/d/1eo3VeIrSG3PvE0woLRqtG3tofafjaXEaBDsCU0uETvU/edit?usp=sharing I adjusted my calculator with your latest formula and generated that table of frames then compared. I tested the first breakpoint on your calculator and it was wrong from the getgo, so I figured it was using the slowing factor and adjusted mine and found the breakpoints to compare to.

Would I notice such a bug just from attacking? I held attacks on D2R graphics and did not notice anything unusual about the animation, but the animation may update correctly clientside and the hits are being ignored. If I have a CTC item, would the CTC cast on server-side ignored hits and be ghost casts? Or would I see alternating CTC hits on my attacks? Nevermind, I tested it on LOD. LOD: 4 frame attack but 8 frame Nova CTC (Werebear). D2R: 5 frame attack?, CTC Nova every attack (Werebear).

ChthonVII commented 2 years ago

Marvelous testing!

Since the S3 animation is using the slowing factor computed with A1, this likely resolves the oddball A2 animations too.

However, it does raise another question. In order to match the test results, we need to ignore werewolf's S3 animationspeed of 240 and use 256 instead. So, what about werebear? Do we use a constant 256 or do we borrow the 224 from A1?

As for the classic bug, you'd notice it as every other attack that you see appearing to miss. So you wouldn't see monster life bars go down or CTC triggers on every other hit. At least that's how it worked in legacy D2. Unless D2R moved a lot of stuff client-side, I'd assume it works the same.

Warren1001 commented 2 years ago

In my testings for S3 (Werewolf), animationspeed = 256 in all 3 use cases (animationspeed_human for nerffactor, animationspeed for nerffactor, and animationspeed for increment). For A1 (Werewolf/Fury), it's the same, except animationspeed = 240 for nerffactor.

ChthonVII commented 2 years ago

In my testings for S3 (Werewolf), animationspeed = 256 in all 3 use cases (animationspeed_human for nerffactor, animationspeed for nerffactor, and animationspeed for increment). For A1 (Werewolf/Fury), it's the same, except animationspeed = 240 for nerffactor.

I'm confused. Did you mean to write "werebear" in there somewhere?

Anywho, does the new version I just uploaded (1.6) look right for bite attacks on werebear?

(Also, watch out for that 6 frames rabies 1HS breakpoint. It moved when I tried changing the order of operations.)

Warren1001 commented 2 years ago

No, S3 (bite), I tested Werewolf's Rabies. A1, I've only tested Feral Rage/Fury. I'm using animationspeed = 256 in every scenario, except A1 in Werewolf, animationspeed for nerffactor is 240.

However, now that I'm comparing again, I goofed on A1. I was using animationspeed = 256 in the increment, should've been 240. But animationspeed = 256 for S3 in all cases for Werewolf is correct. Edit: so it would appear that only (so far) A1 uses wereform's animationspeed.

ChthonVII commented 2 years ago

Where is that 240 coming from? 40A1HTH has an animation speed of 256. And I am matching your observed breakpoints for werewolf Feral Rage, Fury, and Rabies using 240 exactly never.

The only 240 in animdata.d2 is for 40S3HTH, but we have to override that to make bites match the observations.

Warren1001 commented 2 years ago

LOL you fixed my off by 1 issue (with Demon Crossbow's Fury). I don't remember where I got 240 from but turns out using 240 in both places instead of 256 is practically the same thing, however with some rare case exceptions like that Demon Crossbow Fury frame that I had as 116 instead of 117. I think I got 240 from your code cuz I was looking through it, but looks like I confused myself with values, because you clearly have A1 = 256

ChthonVII commented 2 years ago

Ahhhh.... that's probably my fault then. Back when I thought A1 was directly using the frame data from the human form, the only data I had there for wereforms was for S3. And it was unlabeled.

Do you have any test data for werebear? I'm not sure whether to replace S3's animationspeed with A1's animationspeed or with a flat 256. (And, in the latter case, that would suggest I'm doing A1 slightly wrong for werebears too.)

Warren1001 commented 2 years ago

No, I don't have any Werebear data presently, but can look into it tomorrow.

ChthonVII commented 2 years ago

I'll be away for a couple days, so I apologize in advance for not responding promptly.

I can imagine 4 possible ways werebear could work:

  1. What this calculator does now. Use werebear's A1 animationspeed (224) and the human A1 animation speed to calculate the slowdown factor. Use werebear's A1 animationspeed (224) to calculate the increment for A1 attacks. Use werebear's A1 animationspeed (224) to calculate the increment for S3 attacks (instead of the S3 animation speed).
  2. Use a flat 256 and the human's animation speed to calculate the slowdown factor. Use a flat 256 animation speed to calculate the increment for all attacks. I would expect this to have a few off-by-one cases versus possibility # 1 for both A1 and S3. (Like what happened with your Demon Crossbow Fury frame.)
  3. Don't consider animationspeed at all in calculating the slowdown factor. Use a flat 256 animation speed to calculate the increment for all attacks. This would be the same as possibility # 2, except that claws would be faster on a bear sin than a human sin.
  4. Use werebear's A1 animationspeed (224) and the human A1 animation speed to calculate the slowdown factor. Use werebear's A1 animationspeed (224) to calculate the increment for A1 attacks. Use a flat 256 to calculate the increment for S3 attacks. This would lead to rather faster bite attacks for bears.

On a sort-of-on-topic note: I didn't realize it earlier, but getting werewolf bites right means that 2.4PTR2 werewolf speeds are now 100% figured out.

On a barely-related-note: Do you happen to know anything about how the "block timer" is calculated? (I'm referring to the period after a block animation during which you can block without another block animation playing.) The only source I can find that offers a formula is a Russian gaming site that says 15+floor(FBR/8) from the start of the block animation. This strikes me as questionable for several reasons. (I'm interested in figuring this out for the wereform calculator because I think it probably explains why I spent a good portion of the PTR suspecting Fury might have been stealth buffed to be uninterruptible. I'd think the viability of 1-hander + shield configurations for Fury would hit a pretty sharp plateau at the point where you can fit the 5th action frame inside the block timer.)

Warren1001 commented 2 years ago

Method 2. is the solution. Werebear, Hunger, the 8 FPA breakpoint for Cryptic Axe was 1 EIAS off between methods 1. and 2. I tested to see which one was correct and it's 2. The calculation is fundamentally the same as Rabies (animationspeed = 256 everywhere), however it uses Werebear's A1's (12) framesperdirection to calculate the slowdown factor rather than Werewolf's (13), as expected. https://docs.google.com/spreadsheets/d/1eo3VeIrSG3PvE0woLRqtG3tofafjaXEaBDsCU0uETvU/edit#gid=0 When animationspeed was 224, Cryptic Axe's 8 FPA was at 79 EIAS. When animationspeed was 256, 8 FPA was at 78 EIAS. I tested 78 EIAS and saw an 8 FPA attack, not a 9 FPA attack. I checked the first couple of breakpoints and the last breakpoint of Mighty Scepter and they were correct. 6 FPA is definitely the max for Werebear's Hunger with a Mighty Scepter.

I don't know anything about the block calculation stuff.

ChthonVII commented 2 years ago

Gee, I leave for a couple days and you pretty much solve all the open issues. Wanna tackle dual wielding next?

Based on your claw findings, it looks like:

There remains one open question, which is only of interest to modders: Are we using the human A1 animation speed or the human speed for the current animation? (E.g., if other classes could get hunger/rabies through an o-skill item, would it use their human A1 animation speed or their human S3 animation speed (assuming they were modded to be different)?)

Unless you feel like doing the modding to tackle that, I think I'll just close this issue once I've gotten around to updating the calculator.

Warren1001 commented 2 years ago

I don't feel like loading up modding stuff for animdata. It wouldn't take that long but I CBA. I'll let someone else do it if they want to. I'm only interested in stuff that applies to the live game (or LOD).

I'll look into dual wielding maybe later today or some time tomorrow.