Everything posted by HughJanus
-
SET_ENABLE_BOUND_ANKLES
This method doesnt seem to do anything. I have iterated through all the peds in my characters surroundings and set that to true - nothing noticeable changed.
-
[SOLVED] How to find out if you're aiming at an NPC? [C++ Scripting]
Found some stuff in the nativeDB - here are the methods I needed: And here's the code I ended up using: Player player = PLAYER::PLAYER_ID(); if (PLAYER::IS_PLAYER_TARGETTING_ANYTHING(player) || PLAYER::IS_PLAYER_FREE_AIMING(player)) { Ped playertarget; if (PLAYER::GET_PLAYER_TARGET_ENTITY(player, &playertarget) || PLAYER::GET_ENTITY_PLAYER_IS_FREE_AIMING_AT(player, &playertarget)) { if (!PED::IS_PED_HUMAN(playertarget)) PLAYER::SET_PLAYER_WEAPON_DAMAGE_MODIFIER(player, 1.0); } else PLAYER::SET_PLAYER_WEAPON_DAMAGE_MODIFIER(player, 0.05); } Note: What is the difference between lowering the weapon damage modifier and giving peds more health? - I noticed that, for example, if you shoot someone near the neck and the "bleeding and running" task triggers, the ped usually runs for about 10 seconds then lies down to die. This stays the same even if the peds health is set to something as high as 9000. But if you set the damage modifier, the amount of health drained by blood loss will lower too -> peds will run around bleeding for way more than 10 seconds if your damage multiplier is low.
- How do status effects of NPCs work (limping, bleeding, etc.)? [C++ Scripting]
- Is there any way to Spawn Plants?
-
[SOLVED] How to find out if you're aiming at an NPC? [C++ Scripting]
Hey folks, does anyone know how to find out if the player is pointing at an NPC? I would like the player to do less damage to NPCs (but not creatures), so I would like to lower the weapon damage modifier when pointing at an NPC. Increasing NPCs health I already tried, but it seems to not have the exact same effect. BR HJ
-
How do status effects of NPCs work (limping, bleeding, etc.)? [C++ Scripting]
Ah, I see. I found SET_PED_COMBAT_MOVEMENT in the nativeDB and I suppose the movement IDs will be known as soon as we have a working version of OpenIV? Thanks for all your help! Edit: I now tried the following Player player = PLAYER::PLAYER_ID(); Ped playerPed = PLAYER::PLAYER_PED_ID(); const int x = 1024; Ped peds[x]; int count = worldGetAllPeds(peds, x); for (int i = 0; i < count; i++) { if (peds[i] != playerPed) { if (PED::IS_PED_HUMAN(peds[i]) && (PED::GET_PED_MAX_HEALTH(peds[i]) != pedhealth)) { PED::SET_PED_MAX_HEALTH(peds[i], pedhealth); ENTITY::SET_ENTITY_HEALTH(peds[i], pedhealth, 0); } if (AI::IS_PED_IN_WRITHE(peds[i])) ENTITY::SET_ENTITY_INVINCIBLE(peds[i], true); } } I inserted the first "if" to check if any of this is working - and it does (peds can take more bullets). But unfortuanely writhers still die (from bleeding out or one shot). I guess I'll have to wait until the movement IDs get figured out and then override the usual behavior when peds are hit in certain bones.
-
BewilderedKrogan
You are very welcome. Were you asking on GTAforums? 😄 This forum is relatively fresh and yet untainted - lets hope it stays that way 🙂
-
RDR2 NativeDB Discussion
[this comment didnt make sense, so I removed it]
-
RDR2 NativeDB Discussion
Can I ask how the process of finding those native functions (names) works?
-
How do status effects of NPCs work (limping, bleeding, etc.)? [C++ Scripting]
Thanks for the response! I have already tried setting their entity_health to something as high as 5000, but unfortunately they still died with one shot. I will try invincibility on the weekend, thanks! As for overriding the movement clipset: I have searched the native database already for a lot of keywords (like "limp", "injured", "wound", etc.) but to no avail. Where would I find those movement sets (do they have names like "set_movement_for_ped(int movementID, ped pedID)")? Or does it mean that they have not been discovered, if I havent found them by those words?
-
BewilderedKrogan
We need an updated version (which works with RDR 2) of OpenIV to do things like that. So yes, its possible (but not at the moment).
-
Reduced vignetting (not a mod but a ReShade preset)
I tried that too, but wasnt too successful^^ Thanks for the explanation - I will check your vignette settings on the weekend and hopefully I will learn something :)
-
Reduced vignetting (not a mod but a ReShade preset)
How did you do it? I made my own reshade but couldnt manage to get the vignette away 😕
-
How do status effects of NPCs work (limping, bleeding, etc.)? [C++ Scripting]
Hey dear RDR 2 community, introduction: over the weekend I set up a development environment for RDR 2 and have played around with C++ scripts (asi) a bit. When I was studying years ago, I learned programming in Java and scripting in Python, so I am not completely new to coding. I managed to make NPCs take more bullets by playing around with their health values, but have not come very far in what I actually wanted to do. goal: my goal is to make NPC behavior more dynamic and also realistic. If I shoot NPCs in the legs, they shouldnt be able to sprint for cover (just as an example). I have yet to find out how to trigger a certain behavior (e.g. limping, lying on the floor, bleeding, etc.). In GTA 5 there was a "writhe mode" -> NPCs which had a certain amount of health entered that state in which they squirmed on the ground and could be killed by 1 shot. It seems that in RDR 2 it is the same thing. I dont want that. I want them, for example, to go down and still be able to take some bullets (so e.g. if I shoot their legs multiple times, so they have to go down, their friends should still be able to help them). problem: I would like to know how to trigger certain states (wounded, limping, etc.) and how I can circumvent the "writhe mode" (but still have NPCs play that animation, but without dying after taking 1 hit). Is this knowledge already available? I would really love to get into modding RDR 2! 🙂 Any help is much appreciated. BR HJ