Skip to content
View in the app

A better way to browse. Learn more.

RDR2Mods.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Ped Damage Overhaul

You're viewing a summary of the most helpful posts in this topic — about 2 minutes of reading instead of 12 minutes for all 24 posts.

Featured Replies

Find the mod download page here:

 

 

 

 

And the source code of v1.48 here (I tried to comment most of the code understandably - please be kind, I know the code isnt the most sophisticated or efficient):

 

v1.48_src.txt

 

Edited by HughJanus
revamped the page

  • 4 weeks later...

I like the concept of this mod even though I tweaked it without the knowing that the mod was for gunfights. So, I was tweaking to try to make the fist fights harder and longer including the bleeding effects during a fight. With that said, Is there any mod available for fist fights and do what this mod is doing for gunfights?

  • 3 months later...

Hello. I saw on nexus that this mod tweaks npc health. Can you tell me which natives correspond to the ai' health?

  • Author
Just now, Wengu4 said:

Hello. I saw on nexus that this mod tweaks npc health. Can you tell me which natives correspond to the ai' health?

 

We use SET_ENTITY_HEALTH and SET_ENTITY_MAX_HEALTH.

Thank you for reply. For example if i want to increase humanoid enemies health in the game i go with SET_ENTITY_HEALTH( entity?, int); ? How do i group them in the entity field? AIwepdmg and playerweapondmg are pretty easy to tweak

  • Author
9 hours ago, Wengu4 said:

Thank you for reply. For example if i want to increase humanoid enemies health in the game i go with SET_ENTITY_HEALTH( entity?, int); ? How do i group them in the entity field? AIwepdmg and playerweapondmg are pretty easy to tweak

 

I dont think there is a way of grouping them, you have to iterate through all the NPCs.

We do it like this:

//how many peds you want to be affected
const int size = 1024;

//container for the peds
Ped peds[size];

//filling the ped container and counting how many are in it (the method "worldGetAllPeds" tries to put 'size' amount of peds into 'peds' and returns the actual amount it was able to assign
int count = worldGetAllPeds(peds, size);

//looping though the peds
for (int i = 0; i < count; i++)
{
	//do something with peds[i]
  
  	//example for health
  	ENTITY::SET_ENTITY_MAX_HEALTH(peds[i], HEALTHVALUE);
  	ENTITY::SET_ENTITY_HEALTH(peds[i], ENTITY::GET_ENTITY_MAX_HEALTH(peds[i], 0), 0);
}

 

Dont forget to check if the current ped is not the player and if its human.

The player and animals are also peds.

Edited by HughJanus

Whoa, that's very helpful. It's working for me. I wanted to ask about your nice checker in code if it's a story npc. The problem is when you tweak AI_WEAPON_DAMAGE it somehow affects melee damage etc. But that's not the problem. I wanted to do the same thing but not with the health like in your mod but with the weapon damage: While Enemy,other npc's damage scaling increases, this value for your allies(story characters) remains the same. How can i express it in the code? Thanks
Edit:
Introducing this value makes everyone immortal including mc

ENTITY::SET_ENTITY_HEALTH(peds[i], ENTITY::GET_ENTITY_MAX_HEALTH(peds[i], 0), 0); <-where does this line lead and what values should i enter here? The last zero should remain zero if i got it right from db

Edited by Wengu4

  • 2 years later...
On 4/27/2021 at 9:50 PM, Wicker said:

If your cores are draining much faster with this mod, and so you have to eat far more often, wouldn't that inevitably make Arthur overweight? Is there any way to stop that?  

I'm just now trying it and yes he's fat af now. You ever hear of a fix for that?

  • 4 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.