Everything posted by HughJanus
-
Ped Damage Overhaul
I have added a few more parameters: ;booleans for dying movement IsDyingMovementForceRelative_ArmsX=0 IsDyingMovementForceRelative_ArmsY=0 IsDyingMovementForceRelative_ArmsZ=0 IsDyingMovementForceRelative_LegsX=0 IsDyingMovementForceRelative_LegsY=0 IsDyingMovementForceRelative_LegsZ=0 IsDyingMovementForceRelative_SpineX=0 IsDyingMovementForceRelative_SpineY=0 IsDyingMovementForceRelative_SpineZ=0 IsDyingMovementDirectionRelative_ArmsX=1 IsDyingMovementDirectionRelative_ArmsY=1 IsDyingMovementDirectionRelative_ArmsZ=1 IsDyingMovementDirectionRelative_Arms=1 IsDyingMovementDirectionRelative_LegsX=1 IsDyingMovementDirectionRelative_LegsY=1 IsDyingMovementDirectionRelative_LegsZ=1 IsDyingMovementDirectionRelative_Legs=1 IsDyingMovementDirectionRelative_SpineX=1 IsDyingMovementDirectionRelative_SpineY=1 IsDyingMovementDirectionRelative_SpineZ=1 IsDyingMovementDirectionRelative_Spine=1 IgnoreDyingMovementUpVector=0 ;chance intervals for dying movement (which body parts will be moved is decided by the randomizer - if it lies between the chance01 and chance02, the corresponding part(s) will be moved) DyingMovementLegChance01=0 DyingmovementLegChance02=13 DyingMovementArmChance01=14 DyingMovementArmChance02=27 DyingMovementSpineChance01=28 DyingMovementSpineChance02=41 DyingMovementLegArmChance01=42 DyingMovementLegArmChance02=55 DyingMovementLegSpineChance01=56 DyingMovementLegSpineChance02=69 DyingMovementArmSpineChance01=70 DyingMovementArmSpineChance02=83 DyingMovementAllChance01=84 DyingMovementAllChance02=99 I hope its self-explanatory^^ Will start testing now. PedDamOv_v1.4a5.zip Edit: I removed the thigh bones from the leg section (because if force was applied, there was a high chance it would make it look like the NPC thrusts its pelvis^^) - so the leg section only consists of the calves now. For the relative force variables I also added some without the axis, which is applied when all the axis are triggered simultaneously (like with the direction). PedDamOv_v1.4a6.zip Edit2: I have added new code so that the NPC will "remember" the randomizers for the time it is being pushed. So from now on, as long as a push lasts, it should have the same values (combination of bones being pushed and the direction in which they are pushing). So if you set the push phase to 5 seconds, the full 5 seconds will push the same bones in the same direction. If you choose the pushing values low enough, it almost seems like fluent movement. Now its a matter of tweaking the pushing intervals (everything over 1 second looks like the NPC is being "tense" (like having a seizure) for that time - so I think we need to stay below the 1 second, but adjust the waiting time and pushing chance so that the change of intervals is not noticeable and meanwhile keeping the pushing values at a level that looks believable). I think a lot of tweaking has to be done now lol I have already played around almost an hour with the values, but have not come up with a good solution yet^^ Im thrilled to see what you will do with it - until now you were always the one better at tweaking stuff 🙂 PedDamOv_v1.4a7.zip
- 1,271 comments
- 5 reviews
-
Ped Damage Overhaul
Adapted the code a little, so the movementchance would trigger the push for the whole duration of the seconds set in the ini. After the push a minimum of the wait time set in the ini will pass, then the chance applies again. Also edited the chances of the body parts, so there is also the chance of body parts moving simultaneously. All in all, just a little polish. I also tried to fix the lawmen speaking when in dying state - hope I solved it. New version attached. @fitfondue Unfortunately every line of code (generally speaking - in realitiy of course not every line) in the script is executed in the same interval - so no chance of getting one check to get done less often (unless we use a timer which is counting). But I would say we worry about the performance when we notice an impact 🙂 I think the problem will be waking NPCs up, because I havent found a native for it yet^^ PedDamOv_v1.4a4.zip
- 1,271 comments
- 5 reviews
-
Ped Damage Overhaul
I have now done a reimplementation of the movement in dying state like @fitfondue suggested in a private conversation (based on a duration -> moves for 5 seconds, waits for 3, moves for 5, ect -> all configurable in the ini). lol it is hilarious. Files attached xD The implementation is now: if NPC is in dying state and the dyingmovementchance checks out: generate 3 random numbers between 0 and 99 number 1 determines the body part which is moving (arms, legs or spine) number 2 determines which of the part is moving (left arm, right arm, left calf, right thigh, etc.) number 3 determines the axis which is being pushed (x, y or z) pushing is done for the duration set in the ini, then the NPC will not be pushed for the waiting duration in the ini, then pushing again -> for every push the 3 numbers are generated from scratch this is only a first implementation, I am open to new randomizer-concepts! @Frizio I'll check your suggestions during next week since I dont have that much time this weekend and I want to play around with the dying movement a little more - I think we are onto something. Thanks for the input! PedDamOv_v1.4a3.zip
- 1,271 comments
- 5 reviews
-
Ped Damage Overhaul
I will have to check the natives for anything that can tell me if someone is hogtied, since I havent been able to find that out yet. I totally agree that this would be less exploitable, but I havent been able to do it yet. Leg/Arm-shots can work but not the way you would think - we would have to check if certain bones have been hit and then give the NPC with health points - because we dont know where it has been hit before the damage is done. I would suggest giving a percentage of the NPChealth value back (depending on the setting for the damage modifier) if certain bones have been hit. What do you think? For NPCs to wake up we have to be able to find out if they have been knocked out by melee damage - I dont know if we will be able to determine the type of damage that was done to an NPC (I dont even know if there is something like a damage type). If it should only count for Arthur we may be able to check if he is armed and currently targeting an NPC, and if that NPC is on the ground and has less than x health -> do something. Then we have to figure out how to wake someone up^^ (but I think the arthur version will cost some performance, since we need to be scanning and checking a lot of stuff permanently)
- 1,271 comments
- 5 reviews
-
Ped Damage Overhaul
Great work, my man! I took the changelog and known issues, added stuff I thought was worth mentioning and released v1.3. The new version on nexus should be up in the next half hour, I just got word from our guy there that he is booting up his PC in this very moment^^ Looking forward to doing more in v1.4 😄
- 1,271 comments
- 5 reviews
-
-
- 1
-
-
Ped Damage Overhaul
Did you encounter any odd behavior with fire health over 165? When I tested 165 was the sweet spot - above more than 23% would survive and some also happened to get back on their feet.
- 1,271 comments
- 5 reviews
-
Ped Damage Overhaul
@fitfondue Most values remain the same from the last release. I only tweaked those we found out to be problematic and added the new ones. So those should be OK, I hope^^ Concerning the jerky movement: yeah, I got the best results when setting the pushing values to a low value and the offset between 1 and 15 and the chance to 28 or so. It seemed like NPCs were moving like they were coughing lol I have not found a way to make the animations more slow and smooth yet. But I have not tried for long. As for the ragdoll types, I dont think they are distinguishable when the NPC is on the floor - I guess they only differentiate in how the NPC behaves when standing (e.g. 3 is stumbling with closed legs, 4 is stumbling with wide legs - on the ground they look almost the same). I have already tried applying damage to the NPCs via code when down, but unfortunately it only applies damage and doesnt cause the NPC to react. I guess we will have to search for some new natives if we cant get it done with the force push ones :/
- 1,271 comments
- 5 reviews
-
(Another ) mod request : Add max health for ped changer
On the mod page (in the comments). https://www.mod-rdr.com/downloads/rdr2/mods/42-ped-damage-overhaul/page/6/?tab=comments#comment-1268
-
Any animation names known (or any idea how I can figure them out)?
I would like to find out some animation names, but have not found a native to do it (i was searching for something like GET_ENTITY_ANIM(Entity e)). I found and thought that maybe someone has been able to figure out some values for the anim name and anim dict we could use here.. Has anyone?^^
-
[SOLVED] Determining if NPC is on the ground
Ah, that would have probably saved me a lot of trouble lol
-
Ped Damage Overhaul
I think I nailed the value for the zcoord. I now also implemented the dying movement, it works as follows: ini values: DyingMovementForceOffsetX=8 DyingMovementForceOffsetY=8 DyingMovementForceOffsetZ=8 DyingMovementPushX=60 DyingMovementPushY=60 DyingMovementPushZ=60 DyingMovementChance=30 If an NPC lies on the ground and is below the dying threshold, a randomizer generates a number between 0 and 999. If this number is below the DyingMovementChance, a random bone of these will be chosen: right thigh right calf left thigh left calf right forearm left forearm spine01 spine02 spine03 spine04 spine05 and randomly X, Y or Z axis will be chosen and either DyingMovementPushX, DyingMovementPushY or DyingMovementPushZ will be applied to the bone at the offset specified in the ini. If the pushing values are too low, its barely noticeable, too high and it will look like weird kicking. I guess they have to be tweaked a bit but I think we can achieve something acceptable with it. Attached you can find the new alpha for v1.4. PedDamOv_v1.4a1.zip Edit: Added a version in which you can tweak the pushes according to the body parts (since they have different weight, they need different push forces). New ini parameters: DyingMovementPushX_Legs DyingMovementPushY_Legs DyingMovementPushZ_Legs DyingMovementPushX_Arms DyingMovementPushY_Arms DyingMovementPushZ_Arms DyingMovementPushX_Spine DyingMovementPushY_Spine DyingMovementPushZ_Spine PedDamOv_v1.4a2.zip
- 1,271 comments
- 5 reviews
-
-
- 1
-
-
Ped Damage Overhaul
I found the solution: Now all we have to do is figure out the right value for the ini file. The code for enabling: if (rand < ini_dyingpushchance && vechead.z > groundzcoord + ini_zvaluehead) { *do dying push logic* } Edit: In the attached asi you get the zcoords shown of the NPC you last shot (at the time you shot it). PedDamageOverhaul.asi
- 1,271 comments
- 5 reviews
-
-
- 1
-
- [SOLVED] How to make a ped flee or cower properly?
-
[SOLVED] Determining if NPC is on the ground
I want to check if an NPC is on the ground. I am using the following code to get the positions of the headbone and the ground shown on the screen: char c[40]; char c2[40]; float act = 1; float act2 = 1; std::string text = "Zcoord ground = "; std::string text2 = "Zcoord head = "; Vector3 vechead = ENTITY::GET_WORLD_POSITION_OF_ENTITY_BONE(playerPed, 21030); float groundzcoord; GAMEPLAY::GET_GROUND_Z_FOR_3D_COORD(vechead.x, vechead.y, vechead.z, &groundzcoord, true); act = groundzcoord; text = "Zcoord ground = " + std::to_string(act); act2 = vechead.z; text2 = "Zcoord head = " + std::to_string(act2); strcpy(c, text.c_str()); strcpy(c2, text2.c_str()); DrawText(0.4, 0.4, c); DrawText(0.3, 0.3, c2); Unfortunately both values seem to be always 0: Can someone hint me in the right direction, please? How can I get the z coordinate of the skull (bone ID should be 21030) and from the ground? Edit: here is the line of code that needed correcting: Vector3 vechead = ENTITY::GET_WORLD_POSITION_OF_ENTITY_BONE(playerPed, PED::GET_PED_BONE_INDEX(playerPed, 21030));
-
Ped Damage Overhaul
@fitfondue I have started experimenting with other stuff for v1.4 now. I found the method GET_GROUND_Z_FOR_3D_COORDI hope this will get us the z coord of the ground, so we can properly check the height of the head bone! Sleep well 🙂 Edit: I just let the zcoord of head and the ground be shown on screen and they both are always zero: I dont know how to get proper coordinates. The natives dont seem to work the way I thought. Here is the code I am using: char c[40]; char c2[40]; float act = 1; float act2 = 1; std::string text = "Zcoord ground = "; std::string text2 = "Zcoord head = "; Vector3 vechead = ENTITY::GET_WORLD_POSITION_OF_ENTITY_BONE(playerPed, 21030); float groundzcoord; GAMEPLAY::GET_GROUND_Z_FOR_3D_COORD(vechead.x, vechead.y, vechead.z, &groundzcoord, true); act = groundzcoord; text = "Zcoord ground = " + std::to_string(act); act2 = vechead.z; text2 = "Zcoord head = " + std::to_string(act2); strcpy(c, text.c_str()); strcpy(c2, text2.c_str()); DrawText(0.4, 0.4, c); DrawText(0.3, 0.3, c2); Maybe the method for getting the head bone position is faulty (or my parameters are) and it returns 0?
- 1,271 comments
- 5 reviews
-
-
- 1
-
-
Ped Damage Overhaul
@fitfondue Here are my suggestions for release v1.3. As soon as you agree, we will release 🙂 PedDamOv_v1.3rc_standard.zip PedDamOv_v1.3rc_realistic.zip
- 1,271 comments
- 5 reviews
-
(Another ) mod request : Add max health for ped changer
The next version of the ped damage overhaul will a have NPC damage modifiers in the ini. This might help you. If everything goes fine, we might be releasing tonight 🙂 Edit: or you could just grab one of the testing builds and check if that does it for you.
-
Ped Damage Overhaul
If I set the ped as cop to false, it doesnt do anything 😕 Behavior remains exactly the same, also the blips on the map remain. Edit: try this asi, maybe I have found a way to not make them turn around. Turning around after 1st disarming should only have a chance of 7% now. PedDamageOverhaul.asi Edit 2: What we could do about the standing up after falling is we could check if NPC is under dying threshold and not in ragdoll, if so, make them stumble with a certain chance (only downside is, if someone is in artery shot behavior, and they stumble, they will be in dyingstate ragdoll afterwards - so no writhing and dying).
- 1,271 comments
- 5 reviews
-
-
- 1
-
-
Ped Damage Overhaul
The blip method does nothing for me - just tried it. Also tried to get a blimp from the disarmed entity and remove it, but that hasnt worked either. I'm not even sure if that would solve the problem since the blimps may only be an optical singal, whereas the spawned lawmen are managed by something in the back (maybe there is a flag for lawmen which is removed when they die and when the flag is gone, the blip is also not drawn anymore). As for setting the fleeing range - it is already set to "-1" which should be "unlimited". I dont know why they are coming back.
- 1,271 comments
- 5 reviews
-
-
- 1
-
-
Ped Damage Overhaul
I think we made it now. The disarming only triggers the knockback if you disarm the rifle using an unknown bone. I tried for 10mins disarming NPCs now and I only saw someone getting knocked down twice (when holding a rifle). I also updated the ini a little (structure and descriptions as well as new values so you can enable and disable the disarming). Do you think we should add the hands up, cower and aggressive behaviors for disarming via gun or should we leave them out? So what new stuff did we add? polished the stumbling feature (doesnt trigger on horses or in other special cases, better behavior in general) polished the knockback feature (better behavior in general) added option to make the lasso disarm caught NPCs lawmen can now be disarmed (dropped weapons look partly transparent, though) addressed falling damage added new behavior for shooting both legs vs. shooting only one leg PedDamOv_1.3b1.zip
- 1,271 comments
- 5 reviews
-
-
- 1
-
-
Ped Damage Overhaul
Just saw that the way I implemented the check if NPCs did fall (for not getting up) prevents them also from running around wounded (when shot in arteries). I suppose the only way we can fix the getting up after falling stuff, is if we figure out how to check if an NPC is lying down (then the falling doesnt matter anymore). Edit: I also noticed that if the falling sets the health to 100 and the fall doesnt kill the NPC, the health is later set back to the NPChealth value, because the new max health is 100 so the script "thinks" this NPC hasnt been set to the correct health value. So what I did now is get the falldamage value from the ini, make this the health to be set when falling, and if the max health is the fall damage ini value, the script recognizes that and doesnt touch the health of this NPC. So the ini falldamage value now sets the health for the NPCs when falling. But this doesnt solve the getting up issue after falling. We have to come up with a different logic for that. PedDamOv_1.3a10.zip
- 1,271 comments
- 5 reviews
-
-
- 1
-
-
(Another ) mod request : Add max health for ped changer
There seems to be nothing wrong on your side, @element117. Other testers have reported that the player health feature in the Ped Damage Overhaul is not working for them as well. We are currently trying to figure out why (among other things we are doing with the Ped Damage Overhaul).
-
Ped Damage Overhaul
What I did in this new version: removed the hands up state from gun disarmin behavior removed all the states but the fleeing from lasso disarming behavior (NPCs should now always flee after being lasso disarmed) tried to disable knockback on disarming (not sure if it worked though, havent had the chance to test it since an update started downloading when I wanted to test^^) tried to make NPCs stay down when under dying threshold and falling implemented falling damage like @fitfondue suggested (setting health to 100 when recognizing someone is falling) removed the last changes from zcoord, so the if-check now works like in the previous version (if z-coord of headbone < ini_z-coord of headbone, pushing stops) Havent taken a look at the playerHealth setting yet. But it seems odd that it doesnt work - the code is pretty simple and straight forward: if (ini_playerhealth != 0) { if (PED::GET_PED_MAX_HEALTH(playerPed) != ini_playerhealth) { PED::SET_PED_MAX_HEALTH(playerPed, ini_playerhealth); ENTITY::SET_ENTITY_HEALTH(playerPed, PED::GET_PED_MAX_HEALTH(playerPed), 0); } } What it does: if the ini setting for player health is not 0 check if the max health of the player is the ini setting if not, set it to the ini setting and set the health to max health so after the first iteration the maxhealth should be set to the ini setting and the loop should not be entered again. I do it the same way for NPCs to set them to ini health. Maybe there is something special with the player health..? PedDamOv_1.3a9.zip
- 1,271 comments
- 5 reviews
-
-
- 1
-
-
(Another ) mod request : Add max health for ped changer
Negative values bug the game out. I had the same case when I implemented bleeding for the PedDamageOverhaul - I decreased the health bit by bit (5 health points at a time) and NPCs wouldnt die most of the time. That was because when an NPC only had 2 health points left and I deducted 5 from it, it would go to -3 (which bugged it out). @Doktor VS: what settings did you choose to make it work? I dont have the time to try anything out under the week, I can take a look at it on saturday or sunday.
-
Ped Damage Overhaul
The lasso fleeing behavior is weird, because I use exactly the same native to make them flee 😮 I will try your version of fall damage in the next version, but I dont know if it already counts as falling if an NPC is being shot and falling to the ground (thats why I chose the approach of decreasing health). Concerning the z-coords - I guess we just let it the way it is now (before the last two updates) and look at that topic again later. For making it impossible for disarming to trigger the knockback, I will have to do some work. I'll see how fast I can come up with that. For the next version I will also remove the hands up behavior for testing (but I dont suppose this is gonna solve it). I have an idea why this bug occurs: lawmen are usually hard to disarm when holding rifles and impossible to disarm when holding guns. When I force the disarming of a rifle, although it would not normally disarm, maybe the NPC still "thinks" it is holding a weapon..? (because maybe when disarmed with rifle, it automatically gets the gun) But thats just a guess into the blue^^
- 1,271 comments
- 5 reviews
-
-
- 1
-