Jump to content

Ped Damage Overhaul 2.0 BETA 7

Script mod which adds and alters "NPC behaviors"
   (5 reviews)

1 Screenshot

This mod is a teamwork of @fitfondue and @HughJanus.

 

The beta version of Ped Damage Overhaul 2.0 has been released! It contains new features and major adjustments (described in the changelog), so we'd appreciate your feedback on any bugs and performance issues you encounter. When reporting performance issues, please post your system specs if you can!

Part of this beta are the "optional features" (which require LML to work). Those are separated in two files. One is responsible for longer reactions after dismemberment (not compatible with euphoria mods), the other increases the chances of arterial bleeding (e.g. for neck shots).

 

OVERVIEW

This mod tries to make gun fights more diverse, dynamic and interesting and keep them that way throughout the game.

You will find NPCs stumbling when trying to run with hurt legs, getting the wind knocked out of them when getting shot, squirming on the ground when fatally injured, moaning in pools of their own blood until they meet their end, clutching their wounds and stumbling around when hit, etc.

 

IMPORTANT KEYS (for toggling effects)

These are the standard keys, they can be modified via the ini file (as can everything else this mod adds to the game):

  • F9 - Toggling the mod on/off (the mod is enabled by default).
  • F8 - Toggling "Kill Wounded Mode" on/off (is disabled by default). This mod adds a feature called "Dying States" which makes NPCs go down when injured and still stay alive for some time (until they bleed out). If "Kill Wounded Mode" is activated, NPCs will die instead of entering the "Dying States".
  • F7 - Toggling "Longer Bleedouts Mode" on/off (is disabled by default). Per default this mod makes NPCs in "Dying States" bleed out within a maximum of 25 seconds (to not interfere with spawning waves of enemies during missions, which are only triggered when the first wave is dealt with). If "Longer Bleedouts Mode" is activated, NPCs will take longer to bleed out (more realistic, but also hindering during some missions).
  • F2 - Toggling "Friendly Fire" on/off (is disabled by default). "Friendly Fire" currently only works for the Dutch Van Der Linde gang.

 

FEATURES

Here is a quick overview of the most important features:

First off, almost all of the features and their characteristics are based on chance, so the behaviors won't be the same every time you encounter them - which should ensure more diverse fights and keep things interesting for longer than vanilla does... that was the idea, at least 🙂

Almost every feature can be enabled, disabled or tweaked in the ini (more information further down the page), so this is not only a mod, but also enables you to create your own experience.

This mod only alters behaviors and attributes of human NPCs - animals or anything else remain untouched.

 

Light version:

  • NPCs will react to where they are being shot (leg shots will make them stumble when trying to run, hand shots will disarm them, torso shots will stagger them, etc.).
  • When NPC's health decreases below a certain threshold, they fall over and don't get back up. Then they go through different stages of dying, each with its own randomized behavior. Eventually NPCs will die of blood loss.
  • NPCs will sometimes (based on chance) audibly react when in hopeless situation (panicking, begging, cursing, etc.).
  • There is a bleeding feature, which makes NPCs lose health after they have been fatally injured. It operates bassed on chance, so NPCs don't all bleed out in the same amount of time.
  • NPCs burn alive for longer when set on fire.
  • There is a chance of NPCs surviving a fire (although they won't be able to do much afterwards).
  • NPCs have a chance of staying on the ground for a random amount of time when shot (based on their health) - so you can now knock the breath out of your opponents.
  • For all included behaviors the movement and pain sounds have been adjusted (and also randomized) to hopefully make your experience more interesting.

 

Standard version:

  • The same features as in the light version apply as well as the following additions:
  • NPC health and player damage tweaked to offer a more satisfying experience (no more bullet sponges).
  • NPC damage tweaked to offer more challenge to the player (since NPCs don't eat bullets for breakfast anymore).
  • You can now feel the difference between weapons, their condition and ammo types in combat (shooting with a properly maintained, powerful weapon with special ammo now feels like it should).
  • NPCs are less accurate shots and their accuracy declines along with their health.
  • Arm and leg shots do less damage to NPCs.
  • All NPCs can be disarmed (yes, even lawmen).
  • Hogtying disarms NPCs, so if they manage to get loose, they can't shoot you - they might draw a hidden knife, though.

 

Overhaul version:

  • The same features as in the standard version apply as well as the following additions:
  • Core Drain (health, stamina, dead eye) has been moderately increased - now hunting and buying food become necessary options.
  • Cores will be fully drained after death.
  • Additional 25% of money lost after death.

 

We hope that you have as much fun with this mod as we have creating and improving it!

 

 

INSTALLATION

  1. Download Alexander Blade's ScriptHook: http://dev-c.com/rdr2/scripthookrdr2/
  2. Extract Dinput8.dll and ScriptHookRDR2.dll into the main directory of RDR 2 (where the .exe file is).
  3. If you want PDO's additional features, download Lenny's Mod Loader. If not, ignore steps 4, 5 and 8. https://www.rdr2mods.com/downloads/rdr2/tools/76-lennys-mod-loader-rdr/
  4. Extract the folder Mod Manager into the main directory of RDR 2 (the actual Mod Manager folder, not just its contents). Then go into the Mod Loader folder and extract only its contents into the main directory as well (not the actual folder, just its contents).
  5. In the Mod Manager folder, run the ModManager.UI.exe file to make sure Lenny's Mod Loader is properly installed in the RDR 2 directory.
  6. Download your preferred version of Ped Damage Overhaul, then open the zip and choose whether you prefer Light, Standard or Overhaul configurations (see mod description to understand the differences).
  7. Extract the contents of the chosen folder into the main directory. If you're using Lenny's Mod Loader, any files pertaining to it will be automatically placed in the correct folder.
  8. If you're using Lenny's Mod Loader, run ModManager.UI.exe to see if the optional files are showing as installed. If they are, you're good to go.
  9. Start the game and have fun!
  10. While in game, you can press F9 to check if the mod was loaded correctly (F9 once to disable, then F9 again to re-enable the mod).

 

 

TWEAKING

In general, every parameter in the ini has a description (including information on how to disable the feature). Feel free to play around.

There are already a lot of features enabled and tweaked for out-of-the-box use, yet there are some features left untouched which can be enabled in the ini. That said, if you just want to disable one or more features, set their respective values to 0 (or whatever value the description suggests).

Examples:

  • To turn off the bleeding feature: set BleedWhenDying to 0
  • To turn off the disarming when hogtying NPCs: set HogtyingDisarms to 0
  • To turn off the dying state features: set DyingStateChance to 0

 

If you want to disable a feature which is based on chance, just set the chance value to 0.

Examples:

  • To turn off the knocking the wind out of your opponents: set KnockbackChance to 0
  • To turn off the possibility of NPCs surviving fire: set FireSurvivalChance to 0
  • To turn off the chance of stumbling when shot in the leg: set StumbleChanceOneLeg and StumbleChanceBothLegs to 0

 

There are also many other features that can be activated in the ini - here are some examples:

  • LassoDisarms -> makes catching someone with your lasso disarm them (no hogtying necessary)
  • NPCWeaponModifier (and many other damage modifiers) -> makes NPCs do more or less damage, depending on what you set it to
  • BleedWhenShot -> enables a bleeding feature which triggers when an NPC gets shot (so not the usual "bleed out when under x health" but consistent bleeding which is applied after the first hit of a bullet - the bleeding chance and deducted health points can be set separately)

 

The ini is full of values for those wanting to experiment a little.

One word of warning to tweakers: If the NPCHealth is set too high, headshots might not be lethal anymore, unless they hit the actual brain of the NPC (so a shot in the jaw would do more damage than other body parts, but would not be an instant kill). Actual "brain-shots" are always one-shot-kills, no matter the health.

 

 

 

KNOWN "ISSUES" (they are not real issues)

  • The disarming feature can be exploited to slow down new waves of lawmen. The same is true for the dying state feature. If there are too many lawmen dying or fleeing around the player, new waves won't spawn in until the lawmen die or get enough distance (this feature can be turned of in the ini file, if that is a deal breaker to you).
  • When disarming is enabled, the dropped weapons may appear partly invisible. This is only optical, though, they can be picked up and used as usual.

 

 

The source code of Ped Damage Overhaul can be found here:

https://github.com/HJHughJanus/PedDamageOverhaulRDR2

 

 

If you are looking to enhance your experience by using an Euphoria Mod, please take a look at the work of @AnymYo.

C.E.R.R. is tweaked for cineastic reactions and designed to work with PDO:

 

Edited by HughJanus

What's New in Version 2.0 BETA 7   See changelog

Released

Changelog v2.0 BETA 7

 

  • Added an ini parameter to enable/disable the disarming of downed opponents
  • Added an ini parameter to disable the "longer bleedouts" feature in missions
  • Fixed a bug where NPCs in cover would sack down all of a sudden when using euphoria mods
  • Fixed a bug where health for npcs in vehicles would not be set correctly
  • Fixed a bug where health for "Other Story NPCs" would not be set correctly
  • Fixed a bug where damage multipliers would not be applied if they were set above 100%
  • Adjusted some values in case the ini is not found (due to not following the installation instructions, which is very common, it seems^^)
  • Like 32
  • Thanks 7
 Share

You may also like

  • Lenny's Mod Loader RDR
    By LMS
       2068583   736   5
  • RDR 2 Asi Loader
    By LMS
       1346382   158   5
  • Lenny's Simple Trainer
    By LMS
       1071356   1348   25
  • Improvements in Blood
    By Cazanu
       58918   6   0
  • User Feedback

    Recommended Comments



    Dude, you even made a video? I am freaking overwhelmed 😄

     

    I tried those fleeing methods yesterday:

    SET_PED_FLEE_ATTRIBUTES

    TASK_SMART_FLEE_PED

    But none worked, unfortunately. (maybe I used wrong values too - I only tested 2 or 3 different ones).

    I saw the task_flee_from_ped too, but it has so many values and I dont know which is which (int, bool, ped, etc.) so it would be hard to find out if it doesnt work because Im using the wrong values or if the values are in the wrong position. I didnt have that amount of time yesterday.

     

    What I noticed during my testing yesterday is when there are >40 peds involved in a fight, the performance goes down noticeably. I will try to make the code more performant also from now on.

    Yesterday before going to sleep I wrote down some stuff I have to try today. Fortunately today I will have at least 3,5 hours for testing, so I hope I can make some progress with all the things you mentioned and solutions you suggested.

    Thanks for your great work!

    Link to comment
    Share on other sites

    Just so you guys know, the stumbling when shot in the leg is a problem for the story missions since gang members count as peds. Not only is it fairly likely that one of them is going to take a bullet to the leg at some point in a lot of missions and then faceplant over and over until they die, but apparently the StumbleThreshold still takes effect on horseback if the ped was shot in the leg prior to mounting the horse, so they'll just continuously fall off their horse until they die lol. This is obviously a problem for any mission where you fight on foot and then are supposed to flee the scene on horseback while being chased. It's still possible to use the StumbleChance settings so far but you'll be repeating a lot of checkpoints.

     

    There are also a few parts where gang members will consistently be killed if you're using the realistic .ini settings. I've been able to use dead eye to stop it from happening in every case so far, but it's pretty much physically impossible to stop it otherwise. Bumping the NPCHealth up to 90 has also worked in every case so far.

     

    I can upload a video of this stuff if you need it. 🙂

    • Like 1
    Link to comment
    Share on other sites

    @Jim Jam Banana Slam: a guy from nexus notified me yesterday and I already have a list of peds which should be excluded - here is it:

    • hosea matthews
    • leopold strauss
    • javier escuella
    • micah bell
    • john marston
    • dutch van der linde
    • lenny
    • uncle
    • bill williamson
    • rain falls
    • sadie adler
    • kieran

    If you know any more, please let me know.

    Attached you can find a work-in-progress version, in which these characters should already be excluded (not tested yet).

    PedDamOv_1.3a3.zip

    Link to comment
    Share on other sites

    @HughJanus Oh perfect, Sean and Charles as well. The train robbery mission with them in chapter two is one of the problem missions.

     

    EDIT: Also Eagle Flies. And maybe his friend Paytah. Hercule Fontaine and Leon Fuentes might need to be excluded as well.

    Edited by Jim Jam Banana Slam
    • Like 1
    Link to comment
    Share on other sites

    Added disarming with weapons (if you shoot the right hand or forearm - used the bone IDs I know, so I might be missing some fingers or so to trigger the disarming behavior).

    The weapon gets dropped but it looks weird on pistols (the pistols seem to be missing parts, but only optically - if you pick them up, you can use them normally).

    I have also added a randomizer for a few behaviors when peds get disarmed.

     

    For the dying push there is a value in the ini for the head bone z-coord. The code gets the z-coord of the head bone and compares it to the one from the ini. If the bone is lower than the ini, the dying push is not applied anymore. Doesnt seem to be working though.

     

    Also a few minor things changed and I dont know if I forgot to mention anything. Some new values are in the ini (disarming with lasso, weapon modifier for non special weapons and other stuff).

     

    Have fun testing 😛

     

    PedDamOv_1.3a5.zip

     

    Edit: corrected file (uploaded wrong version before)

    Edited by HughJanus
    Link to comment
    Share on other sites

    @HughJanus For some reason, the mod seems to don't get anymore the values from the ini file. i'm not sure why, is there an efficient way to tell if the script gets the right values from the ini ? thanks in advance!

     

    i have high suspicious that there's something wrong, disarming features doesn't work so far aswell as lasso, (same from stumbling feature when shot in both legs) it does disarm rifles but not pistols. i'll try to get a clear instal, maybe it's conflicting with another script like bank robbery mod or something ,i'm not entirely sure

     

    PS: i used the 1.3a6 version

     

    testpdo1.png

    Edited by Maro
    Link to comment
    Share on other sites

    @Maro Everything is working for me, must be something on your end?

     

    @HughJanus As far as the disarming, sometimes they get stuck repeating the beginning of the hands up of animation over and over, if that makes sense. Also for the behaviour where they draw a knife after being disarmed, (nice touch btw) if you disarm them again, they'll just keep pulling more knives over and over, I'm not sure if it's every time but I got it to happen several times in a row. They also sometimes still think they have a pistol after you disarm them, as seen in the attached screenshot.

    20200216115600_1.jpg

    • Like 1
    Link to comment
    Share on other sites

    it's probably something on my end ! i'm reinstalling everything and only have the script + AB hook on. will see if it fix it @Jim Jam Banana Slam

    Edited by Maro
    • Like 1
    Link to comment
    Share on other sites

    Alright after a clean install, everything worked as intended, i'll now try and debug the mod ! keep it up @HughJanus @Jim Jam Banana Slam

     

    Also i was wondering, is it possible to "enable" the antagonize mode for hostile npcs ? just for immersion though, being able to throw out some salt at knocked npcs haha.

    Edited by Maro
    Link to comment
    Share on other sites

    fitfondue

    Posted (edited)

    Thank you all for reporting! @HughJanusI'll do a thorough test of all the new features and fixes tomorrow, as today I am utterly out of time. The Z-coord thing may be due to Z-coord 0 being way below ground level at a fixed point, so there would be no sweet spot that would work in every case (all the NPC has to do is climb a small hill and all of a sudden the method stops working). Perhaps the best method would be to compare the non-relative Z coords of two limbs, for instance, the head and the pelvis. If they're almost level with each other, force push would stop working, and resume working once the head was a certain distance above the pelvis. There would have to be a range (to allow for inclination and weird poses) but I believe that with the right values, it would work.

    EDIT: I just realized that enemies can sometimes end up on a sitting position, so comparing head to pelvis wouldn't work as smoothly as necessary. Maybe comparing it with both feet is a safer method. Meaning if at least one foot is in the Z-range of the head, the force push stops working. The reason for using both feet is because every once in a while one foot ends up in a weird position that might be out of the z-range, so the other foot acts as a failsafe (because it's rare for both feet to end up in a weird position at the same time).

    Edited by fitfondue
    Link to comment
    Share on other sites

    Alright, so after some testing it seems i encountered an issue. 

    This is what happened exactly : I shot twice in the arm an npc while he was riding horse. firstly the npc dropped the rifle, then after i pulled him off of his horse ,he just ran away. So it seems the disarming feature for pistols is working just fine, however after a short time, he stopped completely and this is what happened on my side. It seems the npc was looping an animation indefinitely @HughJanus @Jim Jam Banana Slam

    Edited by Maro
    • Like 2
    Link to comment
    Share on other sites

    @Maro That's the hands up animation bug I described earlier, thanks for getting a video of it! Btw you probably want to tag @fitfondue instead of me, he's the other co-author, I'm just some guy who reported some bugs without being asked 😆

    • Like 2
    Link to comment
    Share on other sites

    fitfondue

    Posted (edited)

    @Maro Thanks for the video! I ran into that bug myself.

     

    @HughJanus I found time for a quick test run (I'll still do a more thorough test tomorrow). Amazing work on the disarming feature! It doesn't always work (depends on how you hit the arm) but mostly it does. I think the hitboxes could be more generous (basically, anywhere on the right arm should cause the gun to drop, from fingers to almost the shoulder) and reactions need some work (it looks weird for a lawman to remain indefinitely in the hands-up animation in the middle of a firefight). Here's what I have in mind. I don't know how viable this is, but here goes:
     

    THE FEATURE:


    - Disarmed ped (from now on called DP) enters hands-up animation UNLESS there's a firefight going on, at which point they may either flee or attack you (with bare fists, a knife or a second gun).

     

    CHECKS:

     

    - Check how many peds are around in a 20-meter radius


    - Check how many of those peds are hostile to player. If that's not possible, check how many have their guns out (because that usually happens when the player provokes it).

    - Check how close the player is to DP


    - Check whether player is aiming at DP


    - Probably fourteen other checks I'm not thinking of because I'm atrocious at coding.

     

    LOGIC:

     

    - After being disarmed, the DP will enter the hands-up animation, and they'll only flee once the player leaves the area or uses the "defuse" interaction prompt.

     

    - However, if there are more than 5 peds in a 20-meter-radius, the DP will only keep their hands up if you keep aiming at them. If you stop aiming at them for more than, say, 4 seconds, they'll lower their hands and flee. The reason for this is that they're in a populated area with plenty of eyewitnesses, so they feel safer.

     

    - If there are more than two peds in the 20-meter radius who are hostile to the player, you'll need to be aiming your gun at DP to keep them in hands-up position. As soon as you stop aiming at them, the DP will either flee or try to attack you, because you're distracted by the peds who are hostile to you.

     

    - If the player happens to be very close to the DP after disarming them, there's a very high likelihood that DP will attack, because it's very easy for a ped to punch the gun out of the player's hand. So the player is encouraged to keep their distance.

     

    - Whether the NPC flees or attacks is determined by distance to the player. If all they need to do is take a few steps toward you, they're likely to attack. If they're distant, they're more likely to flee.

     

    This should ensure that the hands-up behaviour will make sense depending on the situation. Alone in the woods? DP prefers to play it safe and stay still no matter what. In populated areas? DP will flee a few seconds after you stop aiming at them. During a firefight? As soon as your attention is not on them, they'll either flee or attack.

    If this is all too complicated for now, I suggest not using the hands-up animation yet and just tweaking the chances:

    - If player disarmed DP by shooting their right arm, DP flees every time. They can't shoot or fight with a wounded right arm.

     

    - If player disarmed DP by shooting their gun, DP can still fight, so they flee 80% of the time, or attack 20% of the time (with fists, knife or a second gun). The reason for attacks being rare is that bare-fisted NPCs are VERY difficult to deal with. They just punch the gun out of your hand. So the player isn't actually rewarded for disarming them unless the DP flees.

     

    Incidentally, I did encounter a potential bug, which is that interaction prompts with other NPCs disappear, and the actions are no longer possible. If you press the antagonize button, you'll just punch the NPC you're locked onto. I'll test more tomorrow to see if I can isolate what's triggering that bug. It can be fixed by disabling and re-enabling the mod (either with F9 or by unloading and reloading Scripthook with CTRL+R) and in my case it seemed to happen after firefights, but I'm still not sure what the exact trigger is.

    By the way, for anybody here who doesn't know this: you can easily test .ini values by just unloading and reloading the scripts after changing the .ini. No need to restart the game. You do this by enabling file name extensions, and creating a notepad file in the RDR2 main directory called ScriptHookRDR2. If you have file name extensions enabled, it will appear as ScriptHookRDR2.txt. Then you rename the .txt to .dev, so that the file is now named ScriptHookRDR2.dev. You'll know you did it right because the icon will change and the file type will appear as "DEV file". 

    Then, in-game, you just press CTRL+R to unload scripts, and you press it again to reload. You'll know it's working because the game briefly lags when scripts are reloaded (but not when they're unloaded). Quickest way to test the difference between .ini values for those of you who want to find the sweet spot faster.

    Edited by fitfondue
    • Like 2
    Link to comment
    Share on other sites

    Thanks to @Maro and @Jim Jam Banana Slam for reporting!

     

    @fitfondue: the current disarming feature only does the following:

    *check if an NPC who has a gun out was hit in the forearm or fingers (the bones I know, might be missing some)*

    if so, *get weaponhash of the weapon the NPC is currently holding and make the NPC drop this weaponhash from his inventory*

    *randomize a number between 0 and 99*

    if number between 0 and 24 *force NPC into hands up and write down his current health*

    if number between 25 and 49 *force NPC into cowering and write down his current health*

    if number between 50 and 74 *make NPC flee*

    everything over 74 does not touch the normal behavior, so the NPC would get aggressive (as he would usual - drawing knives, etc.)

    *check if any NPCs health you wrote down is now less*

    if so *make NPC flee*

     

    thats everything it does.

    complex behavior like the one you suggested above would take me a lot of time and research. I could do that, but we wouldnt get on with any other feature.

    I would suggest getting the disarming feature to a state where it is OK and then making it more complex later.

    I would like to see if I can get some animation IDs so we can use those, or get into evovling the dying state (with randomly pushing NPC bones when down).

     

    As for the hands-up-bug - i guess its because I have set the NPC to flee a distance of 9999 (I dont know if its metres or feet?). Maybe after that it stops fleeing and goes into a state in which it doesnt know what to do?

    I will see if setting the fleeing distance to -1 changes something.

    Edited by HughJanus
    • Like 1
    Link to comment
    Share on other sites

    @fitfondue Awesome ideas about the disarming feature ! However i'd suggest that we want to be sure that the npc won't pull out a third gun or a second knive, imo it would a little too much. But i think you already thought of it

     

    @HughJanus as i've been testing more and more, when people are knocked out, ( when you can aim at them "red marker" but they're disabled i can hear some pain loop audio, do you think you can extend that ( audio wise) aswell as adding more to it ?

     

    (example,pushing their bones like you suggested very slightly to make the pain more visual or literally using random animations such as the bleeding out animations. ( now we would want some diversities in those so they kind behave differently from each others). Sometimes it's pretty silent but you can hear them a little if you're close enough

     

    I think the most interesting part will come when you'll be able to mess with the dismemberment but we aren't there yet right lol

    Edited by Maro
    Link to comment
    Share on other sites

    30 minutes ago, HughJanus said:

    complex behavior like the one you suggested above would take me a lot of time and research. I could do that, but we wouldnt get on with any other feature.

    I would suggest getting the disarming feature to a state where it is OK and then making it more complex later.


    @HughJanus I agree wholeheartedly. Making lawmen disarmable is already a huge step forward. I think that, for 1.3, just making them flee or attack after being disarmed is enough. If I understand correctly, your code forces NPCs to flee if a certain health threshold is met? I'll go into the game now to test this more thoroughly, as well as finding out why the hell the interaction bug is happening.

     

    Link to comment
    Share on other sites

    @fitfondue Awesome ideas about the disarming feature ! However i'd suggest that we want to be sure that the npc won't pull out a third gun or a second knive, imo it would  a little too much. But you probably thought of this already 

     

    @HughJanus as i've been testing more and more, when people are knocked out, ( when you can aim at them "red marker" but they're disabled i can hear some pain loop audio, do you think you can extend that or add more to it ? Sometimes it's pretty silent but you can hear them a little if you're close enough

     

    I think the most interesting part will come when you'll be able to mess with the dismemberment but we aren't there yet right lol

     

     

    Regarding the animations. I don't know if you can actually force new animations on npcs to add more behaviours or kinda try to find a bypass method. Probably not yet since your last reply about open iv. But implementing a kneel feature for the legshot would be amazing. According to a certain chance, if npcs are shot in both legs they goes on kneel animation or they cannot move anymore since they could'nt run just like RDR 1

     

    In general by adding more and more behaviours/parameters to the npcs makes the mod highly unpredictable and realistic. So it's good imho

     

    Ps Howewer i have no idea if such animations are within the game already

    I know about a crawling animation used by Arthur but that's it and it happens only during an interactive cutscene. But i'm probably sure that i saw a kneel one aswell somewhere i just can't recall

    Edited by Maro
    Link to comment
    Share on other sites

    43 minutes ago, fitfondue said:


    @HughJanus I agree wholeheartedly. Making lawmen disarmable is already a huge step forward. I think that, for 1.3, just making them flee or attack after being disarmed is enough. If I understand correctly, your code forces NPCs to flee if a certain health threshold is met? I'll go into the game now to test this more thoroughly, as well as finding out why the hell the interaction bug is happening.

     

     

    @fitfondue Not a threshold, really. I check their health at the time they go into cowering or hands up, if their health decreases (-> the player shoots them or a bullet hits them), they flee. No threshold, just a check if something happened to their health.

     

    @Maro Anything with animations will be tricky. I checked the natives this morning and didnt find any method that would help identifying an animation which is currently played by an NPC, unfortunately. I would have liked to make a tool like "ShowLastDamagedBone" (tool in the download section of mod-rdr.com) but only with "ShowLastAnimationPlayed", but I havent found any method for doing that yet.

    When OpenIV releases, we will be able to see all the animations and play around with them. I hope there will be some progress soon.

    Link to comment
    Share on other sites

    @HughJanus I tested it. I've written the feedback below. My immediate recommendation is to disable everything EXCEPT fleeing when an NPC is disarmed, because the fleeing is indeed buggy and right now I can't test it properly because most times lawmen don't flee. They attack you or put their hands up. So in order to figure out what's causing this, it's best to force lawmen to always flee. I'll test the fleeing in a variety of circumstances to see if it's a distance problem or a pathfinding problem.

    Anyway, my feedback:

     

    - ZValueForHeadBone stops force push entirely if it's set to 0 or a negative value. If it's set to 1, force push continues regardless of where the NPC's head is. The value IS affecting the force push, but it seems that even 1 is too high, so the force push continues.

    - The force push method is working GREAT with knockdowns and dying state.  Only problems: the twitching on the ground (which most times is REALLY hard to notice, so it's not a serious issue for now), NPCs are pushed mostly to their right (nothing new there, I showed this on video before) and they can get knockdowns from having their gun shot out of their hand, which is hilarious because that doesn't wound them, so it seems like they're falling over from sheer disbelief. You can almost hear them overdramatically say "OH MY GOODNESS ME". Still, enemy reactions look much, much better than they did in 1.2. They interact with scenery way more and tend to fall off edges, so shootouts are more cinematic.

    - Disarming in and of itself is working great, but everything around it is still buggy: 1 - Enemies do indeed stop fleeing. As mentioned above, I'll need to test the fleeing in different circumstances to figure out why that is. 2 - Disarmed NPCs do not necessarily disengage if their health keeps taking hits. I've seen many keep coming at me with a knife (and drawing multiple knives) despite me shooting them several times. Similarly, NPCs will keep their hands up forever, even after being shot. They'll get up again and raise their hands instead of fleeing. 3 - Sometimes they'll draw a knife and THEN put their hands up and stay still, while holding the knife. There's some weird overlap there. 4 - Enemies will keep moving as if they're holding a gun, shuffling around, "firing" at you, but without a gun in their hand.

    - Stumbling is great. My only suggestion is to make RunningThresholdBothLegs into 30 instead of 20, because 20 affects enemies who are firing at you, so they'll often glitch repeatedly as the force pushes them forward. A value of 30 ensures that doesn't happen, while keeping the stumbling just as frequent otherwise. Aside from that, it's pretty much as perfect as it can be right now.

     

    - Two related bugs. They're not new, so don't worry, your new code isn't causing this: enemies who are in cover are not affected by knockdowns or dying states. They're immune to ragdoll while in cover. Also, if an enemy falls from a certain height after entering the dying state, they'll get back up despite being under the DyingThreshold, because (I think) the fall jolts them out of your code's ragdoll. If they're shot again, they'll stay down. The latter bug can be seen at 1:18 on the video I posted. I shoot a guy on a roof, he falls, gets up again. But he shouldn't, because that shot put him under the DyingThreshold. As I said, those bugs are not new: I've been keeping an eye on them since 1.11, and I personally do not consider them a priority. I'm mentioning them just to establish that they're not caused by the code you've added in 1.2 and 1.3.

    - The interaction bug I described above is very inconsistent and apparently rare, and it might have been caused by the Never Wanted cheat that I use to test stuff without being attacked by lawmen. It seemingly has to do with non-lawmen enemies (who show up as a small red dot on the map) who keep shooting at you regardless of whether you're wanted or not. Even if you're far from them, the game reads your situation as dangerous so it disables interactions in favour of aggressive actions. If this bug shows up again, I'll try to document it better.

     

    • Like 1
    Link to comment
    Share on other sites

    @HughJanusI made another video, this time with text commentary, to better showcase and document the existing bugs with disarming (and some other bugs I happened to catch in the recording). There are timestamps in the description to make it easier to revisit different parts, and the title makes it clear which version is being tested.

     

     

     

    • Like 1
    Link to comment
    Share on other sites

    Thanks for the video!

    Addressing your points:

    • looping behavior - maybe after they have fled the set distance, they start looping (will try to fix that)
    • shooting without weapon in hand - no idea how I can circumvent that, I dont even know how that can happen^^
    • headshots not killing - headshots do kill everytime if you hit the actual brain. If not, and the health is set high, it will only do more damage, not kill
    • stumbling although not shot in leg - the mod checks for a damaged leg, so if an NPC falls down and hurts its leg, that counts too
    • not fleeing after aggressive behavior and then being shot - that is the way it is now, the aggressive behavior is the standard behavior (which hits if the randomizer spits out a number above 74) - everything that happens here has nothing to do with the mod (except for the NPC being disarmed, which is not possible in vanilla)
    • NPC not being disarmed despite having been shot in the hand - I dont know the IDs of all hand bones yet - I only have two finger bones of the right hand and the forearm - I currently dont have more - if you hit one of the unknown bones, nothing will happen
    • Like 1
    Link to comment
    Share on other sites


    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now
    ×
    ×
    • Create New...