HughJanus
Recognized Creator-
Posts
830 -
Joined
-
Last visited
-
Days Won
93
Content Type
Profiles
Forums
Gallery
Downloads
News Articles
Modding Wiki
RDR2 Native Database
RDR2 Native Parameters
RDR2 Player Clothes Database
RDR2 Ped Voices Database
RDR2 Ped Speech Lines
RDR Modding Tutorials
RDR2 Ped Model Database
RDR2 Animations Database
RDRFR Changelog
RDRFR Installation Guide
RDRFR Features
RDRFR Settings
LML User Contributions
Everything posted by HughJanus
-
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 😄
-
-
@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 :/
-
(Another ) mod request : Add max health for ped changer
HughJanus replied to Doktor VS's topic in RDR2 Mods Discussion
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 -
c++ [SOLVED] Determining if NPC is on the ground
HughJanus replied to HughJanus's topic in RDR2 Mods Discussion
Ah, that would have probably saved me a lot of trouble lol -
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
-
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
-
c++ [SOLVED] How to make a ped flee or cower properly?
HughJanus replied to HughJanus's topic in RDR2 Mods Discussion
If I use your method, the fleeing ped returns after a few minutes and wants to attack me. If I use the value 4 instead of 3, it doesnt. Just for information^^ -
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));
-
@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?
-
-
(Another ) mod request : Add max health for ped changer
HughJanus replied to Doktor VS's topic in RDR2 Mods Discussion
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. -
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).
-
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.
-
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
-
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
-
(Another ) mod request : Add max health for ped changer
HughJanus replied to Doktor VS's topic in RDR2 Mods Discussion
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). -
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
-
(Another ) mod request : Add max health for ped changer
HughJanus replied to Doktor VS's topic in RDR2 Mods Discussion
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. -
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^^
-
(Another ) mod request : Add max health for ped changer
HughJanus replied to Doktor VS's topic in RDR2 Mods Discussion
Does this mod (SetPlayerHealth.asi) work if you disable rage hook? -
@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.
-
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
-
(Another ) mod request : Add max health for ped changer
HughJanus replied to Doktor VS's topic in RDR2 Mods Discussion
I think there is already a mod like that: https://www.nexusmods.com/reddeadredemption2/mods/125