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 34
  • Thanks 7
 Share

You may also like

  • Lenny's Mod Loader RDR
    By LMS
       2448395   748   6
  • RDR 2 Asi Loader
    By LMS
       1547484   160   5
  • Improvements in Blood
    By Cazanu
       74393   8   0
  • Red Dead Offline
    By LMS
       792812   447   12
  • Lenny's Simple Trainer
    By LMS
       1135592   1351   25
  • Crime & Law Rebalance and Enhancement
    By natsutwt
       106559   25   4
  • User Feedback

    Recommended Comments



    @HughJanusI'll make sure to test the default values you set for the .ini! Only after testing all the features as you've configured them will I start tinkering around.

     

    As for the 1.3 list you've proposed:

    - "chance of surviving bleedout (so not everyone will bleed out eventually)" - Thing is, NPCs only go into the dying state (in which they bleed out) once they've been shot many times, and at that point it makes sense for bleedout to be inevitable unless they receive medical treatment. Even the arm and the leg have arteries that if shot will cause you to die from blood loss in a minute. So this feature would actually be less realistic and might add unnecessary complexity. However, it actually makes sense for surviving a fire, and the mod already does that perfectly.

    - "finding out some animation hashes" - If that's possible right now, that would be awesome.

     

    - "special behavior when shot in both legs (dont know which behavior yet, maybe force pushing consistently but very weakly so it looks like stumbling/limping?)" - The game does its utmost to blend upright NPCs back into normal animation as soon as they seem stable enough, so in all likelihood they'd just glitch out. The "constant force push" method only works if they're in the dying state, i.e. lying on the ground in an enforced ragdoll state. It's worth testing out that feature to see if it looks good. If you want to see what it might look like, just walk into an NPC who's in the dying state (best do it in first person, because player movement is steadier in first person).

     

    The best behaviour, I think, would be the dismemberment behaviour but without the dismemberment. It's very underutilized in the vanilla game. Speaking of which, the "drunk" ragdoll behaviour might look great for NPCs who have been shot many times. Might be worth testing that out if the hash for it is known.

    - "disarming NPCs when shot in the hand (lawmen are almost un-disarmable)" - That would be fantastic. If aggressive lawmen can be fully disarmed and then run away like a normal NPC, it would provide players with a non-lethal way of defeating a lawman. It would be nice to have more non-lethal ways of neutralizing lawmen.

    I'll offer my views on 1.3 as soon as I'm done with testing the release candidate. 🙂

    Link to comment
    Share on other sites

    Lurker here, made a throwaway account to say thanks to @HughJanus for all the amazing work done on this mod. I've been using and tweaking this mod since 1.1 and have been sneakily following this progression here, downloading the beta branches and experimenting with values. 

     

    I found a pretty amusing glitch with the latest 1.2 beta, on a mission with Lenny, when he got shot and went into a stumble animation, somehow the horizontal forcepush accumulated to some wacky degree or something because he would consistently fly at mach speed into the distance and lie in a dying state if not just die instantly outright. It was a consistent glitch, and had to just hope he laid there out of danger until the next checkpoint was hit. Pretty funny tbh

     

    There must be slightly different values to the euphoria script which applies to friendlies, but until openIV comes fully supporting RDR2 I doubt if we'll be able to get to the bottom of it.

     

    Also, in your new version with NPC health set to 450, I have the dying threshold to 400... what can I say? I want the guns to feel dangerous I guess... and I like to kick 'em in the head to finish them off! 

     

    Anyway, cheers to you, HJ x

    Link to comment
    Share on other sites

    @HughJanusTested 1.2 at default values. I am very glad to report that you've got a stable and (as far as I could tell) bug-free release candidate. I haven't tested it on missions due to a lack of time today, but that's gonna be a considerable undertaking, considering that Rockstar does all sorts of fuckery with the code in missions which may explain @ThanksHJ's problem above.

    So my feedback on free roam gameplay:

    - Bleed out is so subtle that it seems to not be working, but it IS working (I found that out by tweaking the values later). What matters is, it's working. If you're going for a really long bleed-out time, then you got it.

     

    - Arterial bleeding magnifies the bleed-out! Did you code that? 'Cause it does. Enemies who are bleeding from an artery will bleed out faster, often going beneath the DyingThreshold in the middle of the whole "get up, run, fall over, languish on ground" routine and may become incapacitated at different stages of the process. Sometimes an enemy will become incapacitated right after the artery shot (because the code by chance made them lose a lot of blood right away and put them under the DyingThreshold), some will ragdoll mid-run and some will get as far as languishing. It does add quite a bit of variety, because it keeps them from always reacting the exact same way. And fortunately, turning off BleedWhenDying does NOT make arterial bleeding stop dealing incremental damage. It still deals damage, so enemies do die from it regardless of whether or not BleedWhenDying is active.

     

    - Stumbling works, but it's prone to glitches if StumbleChance is set higher than your default value. This is because the RunningThreshold of 26 is still a bit low and affects NPCs who are moving slowly as they shoot at you. Their momentum isn't enough to tip them over so they'll just kind of glitch out without ragdolling, and StumbleChance magnifies that. I stand by the values I proposed previously: 30 for RunningThreshold, 80 for StumbleChance. It doesn't affect NPCs who are moving slow but does very quickly affect NPCs who break into a run. So it scales better, because this way, if the player wishes to increase StumbleChance, they won't be met with glitches.

     

    - The shotgun's effective range is still a bit too fearsome. Dialing it down to 2 or 3 may be ideal.

     

    So: after testing, I've tinkered with the .ini and come up with a "Realism" version, should you wish to make that available alongside your values. What this version does is:

     

    - Turns off invincibility by default.

     

    - Lowers NPC health to 70, which may seem too low, but they can still take something like four high-velocity shots to the torso without dying.

     

    - SpecialWeaponModifier is set to 1 because, at a lower health level, there's no reason to change it. Lower health also keeps fall damage as lethal as it is in vanilla. A health of 450 will make NPCs too resilient to high falls.

     

    - Sets KnockbackThreshold to 70 to fit the new health value, but maintains KnockbackChance at 11. It works really well so I kept it unchanged.
     

    - Sets DyingThreshold to 40. It takes two revolver shots OR 1 rifle shot to the chest to down an NPC permanently. Surprisingly, arterial bleeding scales properly and isn't brief, so that remains believable as well.

     

    - Changes BleedingChanceDying to 5 and BleedingValue to 1, in order to scale the bleeding time to a lower health level. The average time I saw in a few tests was something like two minutes, but it varies, and arterial bleeding is also magnified accordingly.

     

    - Sets StumbleChance to 80 and RunningThreshold to 30, making it impossible for NPCs to run, but avoiding the glitches caused by slower movement.

     

    - Melee, as far as I can tell, is not affected by any of this. NPCs can still take a lot of punches.

    - Increases FireHealth to 165 (I think that was the previous value) because 125 is a tad too fast, I think. Survival rate is unchanged.

     

    I've attached the .ini file below. Feel free to add it to the 1.2 release as an option for people who don't like the higher health. 🙂 Tomorrow I'll write more detailed suggestions for 1.3 features. On this test run I realized there is a ragdoll behaviour for when an NPC gets stuck beneath a dead horse. They try to wriggle themselves free of it, sometimes succeeding, sometimes failing. That behaviour may turn out to be useful.

    PedDamageOverhaul.ini

    • Like 2
    Link to comment
    Share on other sites

    Thanks for the feedback, I was thinking about releasing two versions.

    I was aiming for a long bleed out time 🙂

    I did not code aterial bleeding to magnify the bleedout, the health detereorates when bleeding from an artery in vanilla.

    With the stumble chance of 80 the NPCs were stumbling every two steps (this is a behavior I could imagine for both legs being damaged, but for "normal" stumbling it is a bit too often for my taste), but I will check the suggested values tonight.

    I'll try out your realistic ini and release the two versions either tonight or tomorrow (depending on how far I get with testing and tweaking).

    You will be mentioned as the co-author of this mod, brace yourself 😛

     

    • Like 1
    Link to comment
    Share on other sites

    @HughJanus Thanks for posting this stuff publicly. I did some tweaking of my own with the .ini in 1.1 but couldn't get it quite right. I've tried out the new version and the settings @fitfondue has there, I like everything except I put the NPC health and knockbackthreshold at 100 instead of 70. I found people were dying in one shot a lot so I wasn't seeing the effects of the mod as much. Just my opinion. Thanks guys.

    • Like 1
    Link to comment
    Share on other sites

    @HughJanusThank you so much! That's very kind of you. I'm glad to be of help. By the way, what you said about the StumbleChance may be something that could be done to differentiate one leg being shot and two legs being shot. If both legs are shot, just increase StumbleChance to a fall-every-two-steps value. Until then, NPCs would stumble more rarely. I think that would work, if we can't find a more sophisticated behaviour for it. Before I get to my suggestions for 1.3, let me address @Jim Jam Banana Slam's point: in my testing, shotguns straight-up kill at close range (as in, you see a red crosshair), revolvers usually require two shots to the torso to down an enemy into the dying state (not killing them at first) and rifles may take just one shot to do the same. I found that to be more believable than vanilla settings, but if you're seeing a red crosshair at the first shot (as in, enemies are outright dying right away) please let us know. That would not be the intended design.

    SUGGESTIONS FOR 1.3:

    - Aggressive enemies always have that "shocked" reaction when they enter the knockback/dying state, and it takes a couple of seconds for them to fall. You tried to work around this by using a force push but you said it didn't look right. However, a weak but constant force push lasting two seconds would probably look right. Enemies in the "shocked" state are very susceptible to physical forces, with the exception of bullet impacts. A weak but constant force push backwards may lead to interesting reactions, and it shouldn't affect passive NPCs because they don't have the anti-stagger behaviour. They would still be affected by the force push but it would probably be too weak to change their ragdoll behaviour significantly. It's worth a try, at least until the anti-stagger behaviour can be isolated and removed completely.

     

    - Same force push method for downed enemies, to see if it makes them roll around on the ground realistically. This is in case no other ragdoll behaviours can be found and triggered instead.

    - StumbleChance increased to 80 or higher for enemies shot in both legs.

    - If the on fire behaviour can be triggered without the fire, I'd suggest adding it as a possibility for when an enemy is shot in both legs.

    - If the artery shot ragdoll behaviour can be triggered without the bleeding / health loss, I'd suggest making it happen more often, because it's a very good ragdoll behaviour. Who knows, it might even override the anti-stagger behaviour.

    - If the "wriggle oneself out from under horse" ragdoll behaviour can be triggered without the horse, I'd suggest testing it to see if it can be used as a "crawling away from battle" behaviour.

     

    - If the "dismemberment" behaviour can be isolated and customized, then I'd suggest making it last considerably longer (just like you did for the on-fire behaviour), and applying the ragdoll behaviour to non-dismemberment wounds to the arm and the leg.

    - Occasional arterial bleeding from headshots. Without the ragdoll behaviour, just the bleeding.

    - Making it possible to disarm lawmen, at which point they lose heart and run away like any other NPC. A workaround for this would be to make them flee if they're shot in the right arm, regardless of whether or not they still have a gun on their hand, since they can't shoot with a wounded arm.

     

    - Making NPCs wake up MUCH sooner after they're knocked out by melee damage.

     

    I have no idea how viable any of that is 😄 And this is your mod, you're the one doing the hard work of coding it, so ignore whatever you feel doesn't fit its scope or doesn't interest you.

    • Like 2
    Link to comment
    Share on other sites

    1 hour ago, fitfondue said:

    @HughJanusThank you so much! That's very kind of you. I'm glad to be of help. By the way, what you said about the StumbleChance may be something that could be done to differentiate one leg being shot and two legs being shot. If both legs are shot, just increase StumbleChance to a fall-every-two-steps value. Until then, NPCs would stumble more rarely. I think that would work, if we can't find a more sophisticated behaviour for it. Before I get to my suggestions for 1.3, let me address @Jim Jam Banana Slam's point: in my testing, shotguns straight-up kill at close range (as in, you see a red crosshair), revolvers usually require two shots to the torso to down an enemy into the dying state (not killing them at first) and rifles may take just one shot to do the same. I found that to be more believable than vanilla settings, but if you're seeing a red crosshair at the first shot (as in, enemies are outright dying right away) please let us know. That would not be the intended design.

    SUGGESTIONS FOR 1.3:

    - Aggressive enemies always have that "shocked" reaction when they enter the knockback/dying state, and it takes a couple of seconds for them to fall. You tried to work around this by using a force push but you said it didn't look right. However, a weak but constant force push lasting two seconds would probably look right. Enemies in the "shocked" state are very susceptible to physical forces, with the exception of bullet impacts. A weak but constant force push backwards may lead to interesting reactions, and it shouldn't affect passive NPCs because they don't have the anti-stagger behaviour. They would still be affected by the force push but it would probably be too weak to change their ragdoll behaviour significantly. It's worth a try, at least until the anti-stagger behaviour can be isolated and removed completely.

     

    - Same force push method for downed enemies, to see if it makes them roll around on the ground realistically. This is in case no other ragdoll behaviours can be found and triggered instead.

    - StumbleChance increased to 80 or higher for enemies shot in both legs.

    - If the on fire behaviour can be triggered without the fire, I'd suggest adding it as a possibility for when an enemy is shot in both legs.

    - If the artery shot ragdoll behaviour can be triggered without the bleeding / health loss, I'd suggest making it happen more often, because it's a very good ragdoll behaviour. Who knows, it might even override the anti-stagger behaviour.

    - If the "wriggle oneself out from under horse" ragdoll behaviour can be triggered without the horse, I'd suggest testing it to see if it can be used as a "crawling away from battle" behaviour.

     

    - If the "dismemberment" behaviour can be isolated and customized, then I'd suggest making it last considerably longer (just like you did for the on-fire behaviour), and applying the ragdoll behaviour to non-dismemberment wounds to the arm and the leg.

    - Occasional arterial bleeding from headshots. Without the ragdoll behaviour, just the bleeding.

    - Making it possible to disarm lawmen, at which point they lose heart and run away like any other NPC. A workaround for this would be to make them flee if they're shot in the right arm, regardless of whether or not they still have a gun on their hand, since they can't shoot with a wounded arm.

     

    - Making NPCs wake up MUCH sooner after they're knocked out by melee damage.

     

    I have no idea how viable any of that is 😄 And this is your mod, you're the one doing the hard work of coding it, so ignore whatever you feel doesn't fit its scope or doesn't interest you.

    Those are all very good ideas, I second these! Best RDR2 mod to date. Very impressed and excited to see where it goes! Thank you so much Hugh Janus and Fitfondue!!!

    • Like 2
    Link to comment
    Share on other sites

    @fitfondue I was just using the Cattleman and regular ammo, I just kept getting the bright red kill indicator after one torso shot, so I wasn't getting all the falling down and other fun stuff. It was somewhat realistic like that though and the revolvers were a bit weak in vanilla for my taste. I was just shooting civilians at close range though, that might be why lol. It's better now with the new release anyway.

     

    I'm doing a fresh playthrough of the story and your gang members are a lot more likely to die on you so you have to cover them more, which is actually pretty awesome, but I will say it's a bit rough (but hilarious) when Micah takes a bullet to the leg and starts falling down every couple of feet lol. Nothing game breaking so far, I'm still early in the game though.

    Link to comment
    Share on other sites

    @Jim Jam Banana SlamThe Cattleman with regular ammo most definitely should not be killing that fast on the realistic setting. I just tried it on my game and it takes three shots for the damn thing to deplete more than 30 health. Is this the only mod you're using? Did you tinker with anything in the game?

     

    As for the mod working with the story playthrough, that's awesome. Please let us know if any bugs come up. And hey, can't have enough Micah stumbling around in the mud like the asshole that he is.

    Link to comment
    Share on other sites

    @fitfondue

    I actually posted that before Hugh put out the 1.2 release, I was just using the latest file he had uploaded in the comments here and the .ini file you uploaded in the comments. I'm sure it was your .ini but I might have put the wrong ASI file in or something. It's a lot better with the proper 1.2 files installed, here's a quick video of that.

     

    PS: I have a trainer with never wanted on and GeForce Experience makes my game stutter a bit apparently lol

    • Thanks 1
    Link to comment
    Share on other sites

    @Jim Jam Banana SlamThanks for the video! Yeah, it seems to be working as intended there. At 1:15 it's a good demonstration of that pesky anti-stagger behaviour that makes enemies temporarily stand still while being unresponsive to bullet impacts.

    Link to comment
    Share on other sites

    Very good suggestions!

    I dont have that much time this weekend, so I'm not sure how far I get on implementing anything new. But if I do, I'll post it here so you can take a look at it.

     

    • Like 1
    Link to comment
    Share on other sites

    I did a very quick implementation of the pushing in dying state.

    You can now set a value in the ini to either use the normal pushing (force is applied to the center mass of the NPC) or the advanced pushing (you can choose a bone which is receiving the push).

    All based on chance (when is the push being dealt, which axis (x, y or z) is receiving the push), as usual. Here is the code snippet for that part:
     

    int rand = 0 + (std::rand() % (999 - 0 + 1));
    if (rand < ini_dyingpushchance)
    {
    	int randxyz = 0 + (std::rand() % (99 - 0 + 1));
    	if (ini_useadvanceddyingpush == 1)
    	{
    		if (randxyz < 33) ENTITY::APPLY_FORCE_TO_ENTITY(peds[i], 1, ini_dforcepushx, 0, 0, ini_dforceoffx, ini_dforceoffy, ini_dforceoffz, ini_dforcebone, 1, ini_ignoreupvec, 0, 0, 0);
    		else if (randxyz < 66) ENTITY::APPLY_FORCE_TO_ENTITY(peds[i], 1, 0, ini_dforcepushy, 0, ini_dforceoffx, ini_dforceoffy, ini_dforceoffz, ini_dforcebone, 1, ini_ignoreupvec, 0, 0, 0);
    		else ENTITY::APPLY_FORCE_TO_ENTITY(peds[i], 1, 0, 0, ini_dforcepushx, ini_dforceoffx, ini_dforceoffy, ini_dforceoffz, ini_dforcebone, 1, ini_ignoreupvec, 0, 0, 0);
    	}
    	else
    	{
    		if (randxyz < 33) ENTITY::APPLY_FORCE_TO_ENTITY_CENTER_OF_MASS(peds[i], 1, ini_dforcepushx, 0, 0, false, true, false, false);
    		else if (randxyz < 66) ENTITY::APPLY_FORCE_TO_ENTITY_CENTER_OF_MASS(peds[i], 1, 0, ini_dforcepushy, 0, false, true, false, false);
    		else ENTITY::APPLY_FORCE_TO_ENTITY_CENTER_OF_MASS(peds[i], 1, 0, 0, ini_dforcepushz, false, true, false, false);
    	}
    }

     

    In the ini you can find some more information.

    Have only tested it one minute to see if the different pushings (advanced and normal) are working.

    Will be back tonight.

    PedDamOv_1.3a.zip

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

    Hello ! Great mod so far i've been following every updates since the release. However i'd like to suggest some of new features if it's possible ( probably not without Open IV)

    Currently, i'd suggest to implement those features whenever it is possible 

    Edited by Maro
    Link to comment
    Share on other sites

    Alright here's my thoughts about possible features @HughJanus

     

    -Dismemberment may/or may not kill instantly if not shot in the head ( Now can disable peds ) > Based on a certain chance will also trigger dying/bleeding animations Or the anti stagger/knockback feature (in that case, loop pain audio in a more consistent way so they'll always scream until death comes 

     

    in depth thoughts about the dismemberment feature :

     

    1- if dismemberment occurs in the arm > Peds will be disabled for good and will try to run for his life ( whatever animations required for this ) 

    2 - If dismemberment occurs on the legs > Peds will be disabled for good and will crawl/or Dying animations

    *Dismemberment will always occurs bleeding features so they'll always loose health other time

     

    -Disarming oponent when shot at their pistols/or arms ( Currently it seems we can only disarm their rifles, but once they take out their pistols, we cannot )

    *If it's possible > Based on a certain chance, make npcs taking out another pistols after a short delay/or running animations/Or even force them picking nearby weapons ( i'm not sure if that's is possible right now )

     

     

    [-General enhancement for future releases with optimized modding support : More pain audio to add immersions ? More animations to tied to npcs ?]

     

    Right now this is the only thing i can think off beside the fact being able to force animations on npcs would be a great addition to the immersion, such as, a crawling animations if npcs are shot in both legs for example ( return of the kneel animation from RDR1 ?! ) Anyway i'll follow this mod but that's a very great work so far ! keep it up man

     

     

    PS : i doubt all of this can be done right now but i wanted to give more suggestions for the future !

     

    PS2: @lininop Your suggestions are awesome, hope the mod author will be able to implement those in some ways

     

    Edited by Maro
    Link to comment
    Share on other sites

    fitfondue

    Posted (edited)

    @HughJanusJust gave it a quick test and yep, we've got a workaround! All the code you added is functioning properly, including IgnoreUpVector. By using these values...

    DyingPushChance=500
    DyingForcePushX=20
    DyingForcePushY=0
    DyingForcePushZ=0
    UseAdvancedDyingPush=0

     

    ... enemies who go into the anti-stagger behaviour will now wander around before falling, so they no longer come to a stop. They walk around dazed, then fall, sometimes into scenery. It looks far better, but in order to really test it, could you add non-relative x y and z options? I might be more successful at finding the right values that way, particularly for things that require a push in one consistent direction.

    Incidentally, I tested different bones with different forces, and it's really really good that you added a bone-specific option. It does lead to different results and is worth testing. For now the center of mass force push yields better results than bone-specific, but I'll have to test further.

     

    One thing I learned from this is that the anti-stagger behaviour is REALLY persistent even at high forces. But the code you added improves it immensely. A force push of 15-20 makes a difference while NPCs are in the anti-stagger behaviour, but not so much when they're on any other behaviour, so there isn't much conflict with the mod's other functions.

     

    I'll provide more detailed feedback tomorrow!

    EDIT: NPCs don't roll around on the ground just yet, but that's probably because the force push vector is relative. A non-relative force push in one consistent direction may help with this.

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

    @HughJanus Also i forgot to ask, but why not adding a feature that prevent dead bodies from despawning unless we really leave the area ( like checking if player has reached a certain radius etc ) Npcs despawn way too fast in my opinion, unless they're taken from lawmens

     

    this would add a lot of immersion as, now dead bodies will be able to decompose and reach higher state of decomposition ( skeleton ) unless lawmens are taking them somewhere else

    Edited by Maro
    Link to comment
    Share on other sites

    @Maro: Anything with animations (dismemberment, limping, etc.) as well as corpse despawning, I cant do at the moment. Without OpenIV I dont see any chance to get things done without an exorbitant amount of researching and coding of scripts which determine animations.

    Concerning the disarming - I have just tested a disarming feature, but the behavior after NPCs have been disarmed is really weird - the walk towards you calmly and then attack you bare fisted. I will try that again later.

     

    @fitfondue: Attached you can find a new version. I have added the requested parameters to the ini. I have also done a first implementation of "one leg damaged" vs "both legs damaged" and added according values to the ini. I hope you have some fun trying them out^^

    PedDamOv_1.3a2.zip

    Link to comment
    Share on other sites

    @HughJanus Alright seems fine for now ! Don't hesitate however to throw us out anything about disarming i'll be glad to help you to test those aswell as the other features, keep the good work 🙂

    Edited by Maro
    Link to comment
    Share on other sites

    @HughJanusHere's my feedback: the most realistic, varied values I found were:

     

    DyingPushChance=999
    DyingForcePushX=12
    DyingForcePushY=0
    DyingForcePushZ=0
    UseAdvancedDyingPush=0
    IgnoreUpVector=1
    IsDyingForceRelative=0
    IsDyingDirectionRelative=1

    What this does is ensure that, during the anti-stagger reaction, enemies will walk around as if drunk, clutching their wounds, and fall over. If they come across scenery, they'll brace themselves against it. If their feet run into something, they'll fall. On uneven terrain, they'll also tend to fall. The direction in which they move varies to the point that it's fairly unpredictable, so it looks good.

     

    The problems:

    - The anti-stagger animation looks a bit goofy when forced to walk, but that can't be helped. It's kind of like a combination of being drunk and holding in diarrhea.

    - Enemies will noticeably twitch on the ground as the force continues to be applied to them. Sometimes it will be enough to make them turn around, but in a way that looks weird.

    I tried bone-specific pushes to see if better results could be achieved, but not only was the difference negligible, it also led to more noticeable twitching because all the force was going into a single bone.

    It's a good workaround for the anti-stagger behaviour problem, but it does lead to the ground twitching problem. My suggestion: make the force push last only for 4 seconds, or until a certain condition has been met. The force push should stop being applied once the NPC is on the ground.

    Perhaps a way to check for this would be to compare the Z position of different limbs, or relative to the ground? I don't know if this is possible. But if it is, the NPC's head being at a certain distance from the ground would be an indication that they are lying down, at which point the force push would be inactive. Once their head rises, the force push would be once again active for ragdoll situations.

    I also suggest applying this force push behaviour to knockdowns, because those could also benefit from the same "walk around drunk" behaviour.

    As for the stumbling and the lasso disarming, they're both working! The disarming works for lawmen too, and as you described, they walk toward you and attack you bare-fisted.

    A possible workaround for this would be to enforce fleeing or putting hands up. There are natives for that:
     

    void_TASK_FLEE_FROM_PED( Any p0, Any p1, Any p2, Any p3, Any p4, Any p5, Any p6, Any p7, Any p8, Any p9 )  //0x7B74D8EEDE9B5727

    voidTASK_HANDS_UP( Ped ped, int duration, Ped facingPed, int p3, BOOL p4 )  //0xF2EAB31979A7F910

    voidUPDATE_TASK_HANDS_UP_DURATION( Ped ped, int duration )  //0xA98FCAFD7893C834

    You can also look for "cower" on the native database, as there are some natives related to that behaviour as well. Did you try any of those with the lawmen?

    • Like 1
    Link to comment
    Share on other sites

    I did some further testing on the force push thing. I set the DyingThreshold so high that NPCs die in one shot and recorded video of the anti-stagger ragdoll behaviour. As it turns out, the behaviour is more predictable than it first seems: at DyingForcePushX=15 they'll pull to their right. DyingForcePushY will have them move forward. Negative values result in them flying away, so with the .ini I can't set them to move backwards or to the left.

     

    Non-relative values can be used, of course, but that means that NPCs will always move in the same world direction, and that may be worse. IsDyingForceRelative, if enabled, causes NPCs to just fly away at positive values and has no effect at negative values.

    A solution may be to randomize the y and x of the force push (with negative values as well as positive) and sustain the push in that consistent direction until they're on the ground. This system really works best with a constant force being applied, hence DyingPushChance being set to 999 in my tests.

    Here's a video recorded at the following .ini settings:

    DyingPushChance=999

    DyingForcePushX=15

    DyingForcePushY=0

    DyingForcePushZ=0

    UseAdvancedDyingPush=0

    DyingForceBone=53675

    DyingForceOffsetX=1

    DyingForceOffsetY=1

    DyingForceOffsetZ=1

    IgnoreUpVector=1

    IsDyingForceRelative=0

    IsDyingDirectionRelative=1
     

     

    • 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...