New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sentry damage value and <context.damage> different in "damage trigger". #398
Comments
I would've used the "npc.health" tag and then calculated the difference to figure out how much damage has been dealt, but the problem is that that it shows the <npc.health> value first (as full health) and then apply the Sentry damage. So Denizen is always a step ahead of the Sentry value so I'm unable to calculate an accurate damage. |
As was said in the IRC, Sentry stores its damage modifications entirely internally, an external plugin can't see it. It requires jrbudda helps a little, and probably Depenizen use as well.
... Done! |
Great, I've used your suggestion with near perfect success. The only problem at this point is the last hit is not properly calculated because "npc.health" isn't valid anymore since the NPC died. Can you please suggest a way to deal with that? The console throws the following error:
|
Okay, actually maybe like this:
Basically: If the NPC is still spawned, define the damage as current health - previous health - otherwise, assume the NPC died, and define the damage as exactly as much health as the NPC had. EDIT: Actually, Ima see if I can make <npc.health> return 0 when the NPC dies... EDIT3: I'm closing this because there's nothing more that can be done (at least as far as Denizen coding). Feel free to continue asking for help here or in the IRC. |
I can confirm "context.damage" is now returning a value in the "damage trigger", which is great - thanks for adding that.
The problem (same as with "npc.last_damage.amount") is that Sentry returns one value and "context.damage" returns another. "context.damage" seems to show the amount of damage that would've been dealt by the weapon type and if the NPC had no armour/effects applied it. What it needs to do is grab the value reported by Sentry after the armour modifiers have been applied.
Alternatively, let me know if I'm using the wrong tag maybe?
The text was updated successfully, but these errors were encountered: