Hi, been looking into something like LD for a while I'm trying to create a way of damaging armor dependant upon the body part hit but a lot of this is beyond me atm I need some way to get which equip slot is hit and nothing else, no extra effects added I wish I had more knowledge to look into the OnHit event and see if its possible to get these locations from Havok , I dont think I'll ever get that good though Would your implementation in C++ work with Borgut1337's DeadlyCombat mod? From what I can gather your C++ work introduces double fast trigonometry approximations many thanks and credit to you & other modders for their efforts
Hey , really sorry for the late response, I didn't notice this until yesterday. The various Location Damage mods (there are a few now- mostly in Classic but some have been ported to SSE) all use camera input and trigonometric calculations to estimate where an enemy was hit. They use Papyrus functions to check the incident camera angles when a projectile is fired to determine its trajectory, which can then be used along with the target's dimensions to figure out which hit zone is being impacted. This method is highly accurate for melee combat and channeled spells and somewhat accurate for ranged projectiles including arrows and spells. Due to projectile speed + gravity, the results for archery tend to be inaccurate at long range. I made three major changes to the original mod to improve its performance and stability (when fighting a lot of NPCs).
It is possible that there is hit box data available in Havok that could be discovered with reverse engineering and exposed through SKSE, given that implementations of the feature exist in Fallout 3 and 4 and it is believed that the engine did not evolve much after Skyrim. No doubt this would provide the highest fidelity results with negligible performance loss. This is why it's so tragic that- if the theory is true- the code is sitting there but was never exposed in the Papyrus API by Bethesda. However, I do not possess the requisite skills with decompiling to confirm this theory. I don't believe any SKSE extension is relying such changes either (but I last investigated in 2016). Any mod that implements Locational Damage through camera positioning and trigonometry could benefit from moving the math library calculations from Papyrus into native C++ code for performance reasons. Provided the extension is crash-proof, there is no downside. The use of trigonometry approximations is just to go even further with performance improvement but it's really only critical to support NPC->PC locational damage which fires events far more often than in PC->NPC interactions. It also goes a long way towards decreasing the total response time and it's really cool to see scripted effects apply quickly, especially headshots and staggering. I can message you this weekend to talk about it more.
Sorry, there's no way to increase the hit range for headshots outside of checking the setting for adding 'neck' as a headshot. But the mod is meant to be used for close range anyway; longer shots tend to get increasingly inaccurate.
Trust me I know. It's very easy to make a mistake in SKSE plugin land and consistently crash your game. Fortunately I think I have all the checks in place to prevent fatal exceptions
If only this mod was implemented in a big overhaul like Requiem... I would literally pay money for it! That's if it didn't have any bugs. I wish I knew more about that stuff so that I could test it and talk with Ogerboss, Heckur and the rest of the Requiem team.
If anything, I'd love to see this working with Requiem even with some sort of patch.
LD should function with requiem- it's just scripts with a couple SKSE dependencies. Or do you mean balance wise? I think it'd probably need tweaking to reduce the critical hit chances and magnitudes. There's certainly value in implementing these systems within gameplay overhauls so you get first-class access to special effects and mechanics, but in terms of the bare minimum you should be able to give it a try now with some tinkering.
I am definitely going to, but they will be more opinionated. I'm actually busy enjoying the game and haven't resumed working on the patch. Thank you very much though for the feedback, I hope the next articles are at least worth reading to you even if they are not technical
Thank you for this. I've played locational damage only a little, but I am interested in seeing the results of your methods.
But I didn't know that the original mod caused script bloat. I mean... I understand it is very very script heavy, but has it issues with "wrong" scripts, not ending properly, continually increasing while you play, like they say for some other combat mods? I don't really know about this stuff though.
My understanding is that script bloat is a reported issue for this feature. Maybe just Deadly Combat but it's hard to tell. It might be designed to have none and it's a false alarm. Just making sure I report the same issues until we have another wave of testing.
15 comments
been looking into something like LD for a while
I'm trying to create a way of damaging armor dependant upon the body part hit but a lot of this is beyond me atm
I need some way to get which equip slot is hit and nothing else, no extra effects added
I wish I had more knowledge to look into the OnHit event and see if its possible to get these locations from Havok , I dont think I'll ever get that good though
Would your implementation in C++ work with Borgut1337's DeadlyCombat mod?
From what I can gather your C++ work introduces double fast trigonometry approximations
many thanks and credit to you & other modders for their efforts
It is possible that there is hit box data available in Havok that could be discovered with reverse engineering and exposed through SKSE, given that implementations of the feature exist in Fallout 3 and 4 and it is believed that the engine did not evolve much after Skyrim. No doubt this would provide the highest fidelity results with negligible performance loss. This is why it's so tragic that- if the theory is true- the code is sitting there but was never exposed in the Papyrus API by Bethesda. However, I do not possess the requisite skills with decompiling to confirm this theory. I don't believe any SKSE extension is relying such changes either (but I last investigated in 2016). Any mod that implements Locational Damage through camera positioning and trigonometry could benefit from moving the math library calculations from Papyrus into native C++ code for performance reasons. Provided the extension is crash-proof, there is no downside. The use of trigonometry approximations is just to go even further with performance improvement but it's really only critical to support NPC->PC locational damage which fires events far more often than in PC->NPC interactions. It also goes a long way towards decreasing the total response time and it's really cool to see scripted effects apply quickly, especially headshots and staggering. I can message you this weekend to talk about it more.
If anything, I'd love to see this working with Requiem even with some sort of patch.
But I didn't know that the original mod caused script bloat. I mean... I understand it is very very script heavy, but has it issues with "wrong" scripts, not ending properly, continually increasing while you play, like they say for some other combat mods? I don't really know about this stuff though.