Jump to content

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

RDR2 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

  1. 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.
  2. 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.
  3. 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.
  4. 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).
  5. 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
  6. 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 :)
  7. 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
  8. @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.
  9. 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.
  10. 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)
  11. With the one from above (my post) the ped will flee sprinting away from the playerPed. What does yours do? Do you know any of the flags? Cowering works for me this way: AI::TASK_COWER(peds, 50, 1, 0);
  12. This is my solution (dont know how or why, but after testing with several different values, this is it): AI::_0x7B74D8EEDE9B5727(peds, playerPed, 100.0f, 0.0f, 0.0f, 0.0f, 0, 0, 1500.0f, 0);
  13. HughJanus

    TASK_SMART_FLEE_PED

    Has anyone gotten this one to work yet?
  14. 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?
  15. @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
  16. @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
  17. 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!
  18. @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
  19. 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
  20. I sent you a pm for a better way of documenting our suggestions and plans.
  21. Very good suggestions! I dont have that much time this weekend, so I'm not sure how far I get on implementing anything new. But if I do, I'll post it here so you can take a look at it.
  22. Version 1.2 is out. Thanks for all the appreciation and thanks a lot to @fitfondue for putting so much time and work into this mod!
  23. Thanks for the feedback, I was thinking about releasing two versions. I was aiming for a long bleed out time 🙂 I did not code aterial bleeding to magnify the bleedout, the health detereorates when bleeding from an artery in vanilla. With the stumble chance of 80 the NPCs were stumbling every two steps (this is a behavior I could imagine for both legs being damaged, but for "normal" stumbling it is a bit too often for my taste), but I will check the suggested values tonight. I'll try out your realistic ini and release the two versions either tonight or tomorrow (depending on how far I get with testing and tweaking). You will be mentioned as the co-author of this mod, brace yourself 😛
×
×
  • Create New...