Everything posted by HughJanus
-
(Another ) mod request : Add max health for ped changer
Does this mod (SetPlayerHealth.asi) work if you disable rage hook?
-
Ped Damage Overhaul
@lufanlun q1 This question was mentioned by Fitfondue. When I was shooting with the police, some police officers did not have guns in their hands, but they still had guns. This feels a bit weird, can this be fixed? I tried to fix it using the suggestion by fitfondue. We will see if this helped. q2 When I hit a leg of the policeman with a gun, the policeman fell, then stood up and continued to shoot at me, and then I ran away. The policeman chased me or ran away. When the policeman ran after me or ran away, he fell down. and ran two or three steps and fell again, and then repeat this all the time. I don't think this is very reasonable. I think it is possible to set the police to run a little longer and then fall, or how to set it to look more reasonable and more comfortable It would be great if it could be set up that the police slowly dragged their legs or chased me while holding their legs. Unfortunately we cant assign animations yet, because the current version of OpenIV is not yet compatible with RDR 2, so we cant take a look at the animations. Stumbling and falling is the best we can do for now. q3 The police will appear to want to fall but not really fall, which looks strange. Wondering if i can fix it. Set the runningthreshold for both legs from 20 to 30 in the ini, this should fix it. q4 When I hit the police's two legs, the police would fall, then stand up and continue shooting at me, then the problems mentioned in q3 above would occur. According to what you said before, after hitting two legs, the police will fall down and never stand up again. I wonder if this has something to do with the health value being set too high. no, if someone is hit in both legs they will stumble more frequently. NPCs only stay down if under dyingthreshold. q5 When the police or npc falls, he will not stand up again (not really dead). Arthur cannot carry the police. At this time, if the police can be picked up directly, it can only be picked up after using a rope or after the police really die. I think this is possible? What is possible? The status you are describing is the dyingthreshold and is known to behave this way. There is no way around that, unfortunately. If we want the NPC to ragdoll, we cant pick it up.
- 1,271 comments
- 5 reviews
-
Ped Damage Overhaul
New in this version: removed chance for cowering in the disarming logic (replaced it with hands up, just for testing) -> so you can see if the invisible guns bug disappears z-coord of head: altered the check to this: the z-coord of the left and right calf are checked against the z-coord of the head bone minus the value of the ini parameter. If the calves are lower than the z-coord of the head bone minus the ini parameter, dyingpush is triggered. In code: if ((vec_calf_left.z < (vec_head.z - ini_zvaluehead)) && (vec_calf_right.z < (vec_head.z - ini_zvaluehead))) then do stuff ----> has to be tweaked, i havent done nothing in the ini yet tried to reduce the knockbackchance when disarming (dont know if I can do it further without having to touch the normal knockback feature) if disarming-lasso is enabled, the disarmed NPCs should now also show the same behavior as when disarmed by gunshot for the falling I have added an ini parameter -> falldamage -> the value which is set, will be deducted from the NPCs health for every script loop (every ~millisecond) while the NPC is falling - maybe this way we can let them take proper fall damage disabled the stumbling when NPC is on mount the lasso will always disarm before reaching the NPC, because I can only check if an NPC is targeted and if the lasso was fired, but not if the lasso actually caught someone. I dont know how to make dropped guns disappear, unfortunately, so we either have to drop them and let them lie around or let them disappear on disarming. Coding took some time, so I didnt have time to test those things thoroughly 😕 PedDamOv_1.3a8.zip
- 1,271 comments
- 5 reviews
-
-
- 1
-
-
(Another ) mod request : Add max health for ped changer
I think there is already a mod like that: https://www.nexusmods.com/reddeadredemption2/mods/125
-
Ped Damage Overhaul
Oh and concerning the first person zoom thing - I would have to take a look at that separately, but I wont have the time (I'll be working on the Ped Damage Overhaul). I suppose it is possible with the methods we already have (after doing a quick search), but to actually implement it and test it would take time I would rather spend on the Ped Damage Overhaul, since things are flowing so well currently. Sorry, guys. Maybe at a later point in time.
- 1,271 comments
- 5 reviews
-
Ped Damage Overhaul
Dude, we might need a bugtracker lol Would it be better if disarmed enemies dont drop their guns, but they just disappear? Melee damage wasnt altered, but of course if their health is higher, they take longer to knock out with the same damage done by punches 🙂 I could implement a parameter for melee damage (so you can set it the way you want). The taunting could maybe be helped, but I havent tried anything yet. The bleedout will be enabled, I just disable it, so I can check on different stuff without the NPCs dying. Checking for if NPC is on horse is a good idea. Disabling the knockdown states for disarming might be tricky - Ill have to see about that. Invisible guns dont come from cowering - I have tested the disarming feature before doing anything with the disarming behavior and they were partly invisible from the beginning (I think it has something to do with the guns parts - the ones you can modify seem to be invisible). Setting the running threshold to 30 at bothlegs hurts my heart, but I guess there wont be another option 😢 Thanks for always testing so thoroughly!! I think we might have to extend our excel so we can write down all the bugs and tackle them one by one.
- 1,271 comments
- 5 reviews
-
-
- 1
-
-
(Another ) mod request : Add max health for ped changer
The playerhealth option in the Ped Damage Overhaul uses exactly the same code as this mod does. But if its not working for you, set the playerhealth in the Ped Damage Overhaul ini to 0 and use this mod. There shouldnt be any conflicts. As for ScriptHook and Rage, I dont know, but they may be conflicting.
-
Mod Request "Vintage Camera Overhaul"
For Screenshots or for what?
-
Ped Damage Overhaul
1) I dont really know what you mean 😕 2) There is already a feature like that, but its not activated. You can add the parameter "BleedWhenShot" and "BleedingChanceShot" (see the changelog of v1.2 for more information).
- 1,271 comments
- 5 reviews
-
Ped Damage Overhaul
Tried to fix the fleeing. Have only tested for ~10mins but couldnt reproduce the looping during that time. The chances are now as follows (kept cowering and hands up but set it to low chances, just for variety): 5% chance of hands up happening -> if done more than 5 damage in that state, NPC will flee 5% chance of cowering -> if done more than 5 damage in that state, NPC will flee 45% chance of being aggressive (standard behavior) -> if done more than 40 damage in that state, NPC will flee (if you disarm the NPC a second time during decreasing the 40 health points (e.g. knife), the chances are again the same for every behavior as it was with the first disarming) 45% chance NPC will flee instantly I have also added some checks to bothlegs damaged -> is running, is sprinting, is walking (not included in oneleg checks), is going for cover. The zvalue for the head bone I have set to be divided by 1000 -> so if you set it to 99 it will be 0,099 when checking in the code. PedDamOv_1.3a7.zip
- 1,271 comments
- 5 reviews
-
-
- 1
-
-
Ped Damage Overhaul
I will try another method for the fleeing and see if anything changes. As for the tackling - does it only occur with both legs or with one leg also? Because in the one leg logic, I check if the NPC is running or sprinting (and is over the runningthreshold), in the bothlegs logic I only check for the runningthreshold (so they also stumble when walking faster). If it only happens for bothlegs, I guess I will add the running and sprinting check to this logic too. Thats correct. The fleeing when losing health only works for hands up and cowering :)
- 1,271 comments
- 5 reviews
-
-
- 1
-
-
Ped Damage Overhaul
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
- 1,271 comments
- 5 reviews
-
-
- 1
-
-
Ped Damage Overhaul
@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.
- 1,271 comments
- 5 reviews
-
Ped Damage Overhaul
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.
- 1,271 comments
- 5 reviews
-
-
- 1
-
-
Ped Damage Overhaul
- 1,271 comments
- 5 reviews
-
Ped Damage Overhaul
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)
- 1,271 comments
- 5 reviews
- [SOLVED] How to make a ped flee or cower properly?
- [SOLVED] How to make a ped flee or cower properly?
-
TASK_SMART_FLEE_PED
Has anyone gotten this one to work yet?
-
[SOLVED] How to make a ped flee or cower properly?
I cant get the fleeing to work. I have tried AI::TASK_SMART_FLEE_PED(peds, playerPed, 100.0f, 100, false, false, 0); AI::TASK_SMART_FLEE_PED(peds, playerPed, 100.0f, 100, true, false, 0); AI::TASK_SMART_FLEE_PED(peds, playerPed, 100.0f, 100, false, true, 0); AI::TASK_SMART_FLEE_PED(peds, playerPed, 100.0f, 100, true, true, 0); But the NPCs only turn their back on me but keep standing still. When using the cowering task, it looks like NPCs are doing squats (they cower, get up, cower, get up,..): AI::TASK_COWER(peds, 50, 0, 0); AI::TASK_COWER(peds, 50, 1, 0); I have also tried this method, but it makes NPCs run in one direction, crashing into trees, stones, objects, etc.: AI::_0xE86A537B5A3C297C(peds, playerPed); Does anyone know how to make a ped flee or cower properly?
-
Ped Damage Overhaul
@Jim Jam Banana Slam: all the ones mentioned by you are now excluded. see file attached. please add more if they come to your mind. PedDamOv_1.3a4.zip
- 1,271 comments
- 5 reviews
-
-
- 1
-
-
Ped Damage Overhaul
@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
- 1,271 comments
- 5 reviews
-
Ped Damage Overhaul
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!
- 1,271 comments
- 5 reviews
-
Ped Damage Overhaul
@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
- 1,271 comments
- 5 reviews
-
Ped Damage Overhaul
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
- 1,271 comments
- 5 reviews
-
-
- 2
-