coavins / mhrise-coavins-dps

A detailed DPS meter for Monster Hunter Rise (PC)
GNU General Public License v3.0
24 stars 11 forks source link

Some attacks are not recorded when performed by other players #47

Open coavins opened 2 years ago

coavins commented 2 years ago

Damage for certain attacks is captured correctly when it is the local player who performs the attack, but is not counted when the same move is done by a remote player. This seems to be distinct from other "host vs client" issues because it doesn't seem to matter who is hosting the quest in this case.

Affected moves:

See #46 and #33 for more information.

Haato3o commented 2 years ago

HunterPie has the same issue, I've been investigating it too but no luck so far.

I did find another function that can be hooked, which works for the multi-hits of Leaping Thrust (I haven't tested the other attacks though, only leaping thrust) but only for the quest host, this new function seems to be a good start but I had some duplicate damage issues with it on some attacks, so still need to investigate further. I don't use REFramework, but the function can be located at MonsterHunterRise.exe+01148640. The register r15 has the pointer to the monster and rax will have the pointer to the damage after that function is called.

Something else I've noticed, when I'm not hosting the quest and put a memory access watcher in the monster pointer, if someone use Leaping Thrust on the monster, the monster pointer will only be accessed once by a certain function, if I'm hosting, it will be accessed 3 times by the same function. So my assumption is that you can't track those two extra hits if you're not the host.


Edit: After some more testing, MonsterHunterRise.exe+01148640 happens before the attack type id is set, so can't get the source of the damage from there. And the reason for the duplicate damage is because that function is called by another function for remote players (MonsterHunterRise.exe+01148E40)

coavins commented 2 years ago

Glad to hear there are another pair of eyes on this! Thanks for sharing your findings. I did notice you're using a slightly different function than me, what looks like the actual calc instead of the post-calc method I'm hooking. I'll try to help investigate this further when I find the time.