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. Since the creators of RPH are among us, I thought why not just ask 🙂 I'm playing this game atm and more and more ideas are coming to me while playing. But there are no modding tools as simple to use as RPH or Script Hook (that I know of). Is there any possibility of getting something similar for Cyberpunk 2077?
  2. Havent played since my last post, but back then it happened everywhere (gallows, trees, bridges, etc.).
  3. I have something to report: for me if I try to hang NPCs, they will get agitated and try to punch me (their fists glitching from their back to Arthurs face^^). So when on a gallow, for example, they wont stay on the trap door most of the time. Is this the usual behavior or does it have something to do with other mods I am using? (just checking before I investigate further)
  4. @AnymYo If you mean how to make NPCs stumble, increase DSEuphoriaChance in the ini (it reflects the percentage of NPCs who will stumble around when going down). If you mean they should not go down within a few shots, increase NPCHealth or decrease DyingMovementThreshold. @Fenyix If the trainer runs with ABs script hook, you should be fine. If it needs RPH, I think there may be some problems since ABs script hook and RPH dont seem to work together well (from what I remember from bug reports).
  5. First off: do you have any other mods, trainers or hooks installed? Did you change anything in the ini? Which version are you using? Can you describe those incidents a little more? What exactly do you do to make them live forever? How do they behave before lying on the ground? Do they get shot or melee-ed? How often do they get shot and by which weapon, if they do?
  6. I dont know which types are supported by lua, but only these worked for me in C++ struct ScriptedSpeechParams { const char* speechName; const Any* voiceName; alignas(8) int v3; alignas(8) Hash speechParamHash; alignas(8) Entity entity; alignas(8) BOOL v6; alignas(8) int v7; alignas(8) int v8; }; void PedFearTest(Ped ped) { string speechline = "LAW_HAIL"; ScriptedSpeechParams params{ speechline.c_str(), 0, 1, 0x67F3AB43, 0, true, 1, 1 }; AUDIO::x_PLAY_AMBIENT_SPEECH1(ped, (Any*)&params); }
  7. Why dont you try it that way? Pass the ped instead of the clerk and pass the struct instead of the bool (and use the hash of the speech native).
  8. Is there an option in lua to invoke the native directly? Like in c++ it would be invoke<BOOL>(0x8E04FEDD28D42462, ped, params);
  9. @MrEuphrates OK, so I took a look at the document you linked. The definition of the native doesnt make sense to me. Heres what I mean: loading stream in C (return type is "bool", function name is "LOAD_STREAM", parameters are two char*): BOOL LOAD_STREAM(char* streamName, char* soundSet); loading stream in lua (return type is "bool", function name is "LoadStream", parameters are two strings): local retval --[[ boolean ]] = LoadStream( streamName --[[ string ]], soundSet --[[ string ]] ) ambient speech in C (return type is "bool", function name is "PLAY_PED_AMBIENT_SPEECH_NATIVE", parameters are Ped and Any*): BOOL PLAY_PED_AMBIENT_SPEECH_NATIVE(Ped ped, Any* params); ambient speech in lua (return type is "bool", function name is "PlayPedAmbientSpeechNative", parameters are ??): local retval --[[ boolean ]], params --[[ Any ]] = PlayPedAmbientSpeechNative( ped --[[ Ped ]] ) I dont even know how to interpret the definition.
  10. How do you use natives in lua? Could you please post an example. For me the description doesnt match the code above, because the code above seems to describe a wrapper named "PlayPedAmbientSpeechNative" while the example uses a wrapper called "_PLAY_AMBIENT_SPEECH1".
  11. I dont know redm. What are the files that come with it? Is there a file including the native functions you are able to use? I would suggest searching there, if there is one. With ABs script hook there comes a file with natives, for example. This is the one I edit to make natives work with other types (like described in this thread).
  12. I was talking about lua. How do you call natives? You have a library of wrapper functions, I suppose? Is this library edit-able / can you edit the wrappers?
  13. Cant you change the native wrapper so the method is invoked with the type you specify?
  14. @egg6 I cant promise or predict any time frame, but I will see what I can do. Edit: So I quickly searched the natives to check if there is a method which returns a pickup, but the only ones I could find were methods with which you can create pickups. The plan was to check with DOES_PICKUP_OBJECT_EXIST if one of the mentioned pickups exists (to then disable the glow), but this method only takes a pickup object as input and I dont know how to convert the name or a hash into such an object. I searched all the methods which return objects and entities, but none are for pickup objects or generic objects (like e.g. the function GET_HASH_KEY which returns the hash for anything in the game, it seems). So what Im trying to say is that I dont really know how to proceed with the only thing available being the name of the pickups (and no function to do something with it).
    Great mod which adds more (much needed) functionality to the helpful tool we have in this immersive western game - the lasso. Installation is simple and the usage is non-intrusive and very intuitive. Hats off to shtivi, who still keeps updating his work after all these months 👍 Looking forward to more interesting features!
  15. Overhaul, but those are testing versions. There is a setting called HorseFallingDelta - take a look at it, description is in the ini. Thanks for the bug report, I will take a look at it. Edit: made a new version fixing the following bugs: overpowered bolt action rife (tweaked the modifiers) dying states forever (new ini value for maximum time in dying states) falling from horses can still be instant kills (had an error in the time computation which is now fixed) invincible NPCs (if the health was exactly at a dying state threshold, some actions werent triggered - now fixed) Please test, friends. This is a release candidate. If everything works out, we should be able to release this. PedDamageOverhaul.ini PedDamageOverhaul.asi
  16. @egg6 The native function you quoted can only be used in script mods (so no OpenIV). And OpenIV currently does not allow the modifying of files, so no chance of doing it there either (yet). I havent looked into it really. I suppose what you would have to do is iterate through all the pickups and disable the glow for each one using the native function you quoted. I dont know how to get the pickups, though. I would have to do some research, but dont really have a lot of time, unfortunately. If you manage to find out how to get all the pickups, I could do it for you.
  17. Yes, headshots to the actual brain are always one shot kills. Also the way the body part modifiers work is that we check how much damage was done by the last wound and then give back a portion of health to the NPC (according to the modifier). So if a shot is a instant kill shot, the body part modifiers are of no use. Edit: I just tested it and the leg shots work, as do the dying states. Everything seems fine to me. Just played 20mins (shooting NPCs, law disabled) and everything worked as it should. Edit2: New version with two other bugs fixed (reported by the mod team). PedDamageOverhaul.asi PedDamageOverhaul.ini
  18. As stated above, you have to check if the ped is human and if its not the player. Also if you set the health each loop, every NPC will get their health set all the time. Solution (dont just copy the code, please read it and try to understand the problem and the solution): //before loop int health = 100; //in loop if (ENTITY::GET_ENTITY_MAX_HEALTH(peds[i], 0) != health) { ENTITY::SET_ENTITY_MAX_HEALTH(peds[i], health, 0); ENTITY::SET_ENTITY_HEALTH(peds[i], ENTITY::GET_ENTITY_MAX_HEALTH(peds[i], 0), 0); } For figuring out if the current ped is a story character, I check the ped model with IS_PED_MODEL. For example, if you want to check if the current ped you have in peds is John Marston, you would use the native like this: PED::IS_PED_MODEL(peds[i], GAMEPLAY::GET_HASH_KEY("CS_johnmarston")); And it would return true if this model is being used by the ped and false if its not.
  19. It's so the artery shot for the neck can trigger. If the health is too low after the neck shot, NPCs cant get up afterwards.
  20. I dont think there is a way of grouping them, you have to iterate through all the NPCs. We do it like this: //how many peds you want to be affected const int size = 1024; //container for the peds Ped peds[size]; //filling the ped container and counting how many are in it (the method "worldGetAllPeds" tries to put 'size' amount of peds into 'peds' and returns the actual amount it was able to assign int count = worldGetAllPeds(peds, size); //looping though the peds for (int i = 0; i < count; i++) { //do something with peds[i] //example for health ENTITY::SET_ENTITY_MAX_HEALTH(peds[i], HEALTHVALUE); ENTITY::SET_ENTITY_HEALTH(peds[i], ENTITY::GET_ENTITY_MAX_HEALTH(peds[i], 0), 0); } Dont forget to check if the current ped is not the player and if its human. The player and animals are also peds.
  21. Afaik the compatibility issue is between ABs script hook and RPH. To solve it for this mod would mean to completely rewrite the mod in C# and make use of RPH instead of ABs script hook (which would be a whole load of work^^).
  22. We use SET_ENTITY_HEALTH and SET_ENTITY_MAX_HEALTH.
  23. OK, thank you. I hope I will have enough time tomorrow to properly take a look at the problem. Edit: Another try for a quick fix (see attached). PedDamageOverhaul.asi
×
×
  • Create New...