SAC
-
Joined
-
Last visited
Posts posted by SAC
-
-
25 minutes ago, Maro said:
@SACany news with the bodies persistence, so far ?
PS for the pickup mod you proposed, Could you tweak it so only the dispatched marshals pickup the corpses and not simply other npcs !
I feel that would feel way better in term of immersion. that would absolutely fix the issue i mentioned a few post ago. Now they do have a goal thanks to your mod !
Also i absolutely agree with the idea of having dynamic locations aswell and not just the pig farms in valentine.
Thank you for your effort 🙂
Tweaking any persistence parameters is not on my schedule for the foreseeable future.
what are the “dispatched marshals”? Is there a model name for them? (like a_m_m_marshal_something)
At best I will make this “restriction” a configurable option. I like the general NPCs cleaning up.
-
-
On the same topic, I've whipped up this mod before going away, and decoupled it from my other code today. Check it out, see if it's worth pursuing.
What it does is to set up a "mass grave" location. NPCs will randomly and automatically pick up dead bodies, carry them to the mass grave site, and dump them there.
You can also use NUM6 (not F6) while focusing on a live NPC to make it stop whatever it's doing, pick up the nearest corpse and carry it to the site.
So far there is only one site configured, in Valentine, the pig farm behind the sheriff's office. If this mod gets traction, and if I have the time, I can (probably, no idea how, but can probably figure it out) add a dynamic list of sites that we can crowdsource the coordinates for.
Please note that the mod will generate an ever-growing (although slowly) log file. Please delete manually if it gets too large.
Also, please report here if you notice any of the bugs described in this file comment. I am running a lot of personal code and I have been trying for a month to track down that issue, still can't figure it out.
Also, please report if you get occasional stuttering. In my testing I haven't had any significant performance issues, but it helps keeping an eye out.
-
-
4 hours ago, Maro said:
please remember to add any potentially useful info you may find into this thread as well -
1 hour ago, Afriendo said:
Hugh janus sent me a loader for the gameconfig.xml. I'll continue testing the persistence_constance.meta file along with modifying the gameconfig.xml Sunday when I return home, and let you know how it goes. @SAC
Niceyou should be aware that the nexus “advanced persistence 1.4” (I think it’s called) mod is tweaking the gameconfig parameters too (but not persistence_constants.meta). So don’t use them both (your gameconfig, and the mod)
-
1 minute ago, HughJanus said:
Kudos to both of you for sharing your progress here!
Hopefully youll put out a mod when you have found the perfect settings. Looking forward to it! 🙂
Thanks. My computer is still sidelined, hope to have it running again Monday the latest, unless I managed to screw up the CPU too, due to overheating. Accumulated quite a backlog of stuff that I need to do, though, being away on vacation and then with the computer broken -
4 minutes ago, Afriendo said:
RDR2/update_1.rpf/common/data is where the gameconfig.xml is. That's the file we need. if you could send me a loader of that
problem is, my computer is currently unavailable due to a bricked cooler pump after a failed firmware update. I am pondering whether to just buy a new one or keep waiting for Corsair to reply to my ticket. When I manage to get it running I’ll provide you a loader for gameconfig -
-
Here you go, unpack it into the lml folder like any other mod.
The lines I have edited are marked with <!-- SAC ... -->; the comments contain the vanilla values.
Results can be unpredictable, tweak the meta file as you test and post back here values you feel you are happy with
-
1 hour ago, Afriendo said:
Do you plan on releasing it as a mod? if so, please include an ini for tweaking the parameters. 🙂
I can make a mod loader for it and explain what I’ve tweaked so the user can further adjust them. No need for a script mod with an ini, the file can be updated directly. I’ll get back on this next week when I return home -
20 hours ago, Afriendo said:
No problem, let me know if it works.
away from computer for another few days, but changing the dead body-related parameters in that file definitely increases persistence. There are some glitches (like a bunch of dead bodies teleporting to the player when activating mods like cinematic camera….)it needs tuning as to not overcrowd with dead bodies, but it definitely works. Thanks!
-
-
-
Edited by SAC
BTW, it is this easy to mess up ambientpeds and the effect of a single error is empty towns everywhere, like you are experiencing
<Item type="CAmbientModelSet"> <Name>VAL_PROSTITUTES</Name> <Models> <Name>A_F_M_VALPROSTITUTE_01</Name> <Variations type="NULL" /> <Probability value="1.000000" /> <TimeOfDay /> <InventoryInfoHash /> </Item> </Models> <SpawnDistance value="100.000000" /> <AIMemoryGroup>VALENTINE_RESIDENTS</AIMemoryGroup> </Item>
Notice the error?
validatexml detects this type of error, but, for example, it would not detect any error it if I were missing the </Item> too. However, the game would probably break.
This is why it's essential to validate the xml continuously, be careful, test each incremental change, keep backups etc - proper modding discipline. The methodology works, you need to execute properly.
-
It is done exactly as explained a long number of times to you, both on DM and on Discord.
Suggest experimenting with it until you get it right, then coming back and pay it forward by explaining how you have achieved it. You have all the information you need, you just need to apply it in an orderly and progressive manner.
-
I am trying to track down a random issue manifesting as the PC, and other NPCs around, including horses, suddenly get stuck walking in place and sometimes spinning first person camera.
I have added countless traces and conditions into the code I am working on, I get no trace of any function such as "CLEAR_PED_TASKS_IMMEDIATELY" running on the player. So, I don't really know if it's my code, or some of the other mods I am using - sure there's the option of taking ASIs out until the problem stops manifesting, but it's very random and very tedious.
So:
- have you ever encountered a bug where the player and/or the NPCs around, including horses, get stuck walking on the spot without advancing?
- does this sound like the effect of which native?
- ever had the player suddenly sinking through the ground and falling into a void? (had this too)
- any idea about the task ids below, and which native would trigger which? left is normal player behavior, right is player paralyzed
TY!
-
Edited by SAC
On 1/9/2022 at 12:53 PM, crossed99 said:I'm using this one to do that:
ENTITY::_SET_ENTITY_COORDS_AND_HEADING_NO_OFFSET(entity, coord.x, coord.y, coords.z, heading, true, true);Can't remember why I started using this instead of SET_ENTITY_COORDS, but this one works for me.
Because I needed precise positioning and I kept getting random glitches (NPCs being strung off-position), I've ended up using a loop to attempt multiple placements until the position is confirmed
PED::SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(victim, true); int position_i = 0; float trapdoor_distance = 10; Vector3 victim_pos; Vector3 trapdoor_pos; trapdoor_pos = nooseSpot->getTrapdoorPosition(); while (position_i < 10 && trapdoor_distance > 1) { ENTITY::_SET_ENTITY_COORDS_AND_HEADING_NO_OFFSET(victim, nooseSpot->getAnchorPosition().x, nooseSpot->getAnchorPosition().y, nooseSpot->getAnchorPosition().z - 0.5, requested_gallow->noosedPedHeading, true, true); WAIT(500); victim_pos = ENTITY::GET_ENTITY_COORDS(victim, 1, 0); trapdoor_distance = GAMEPLAY::GET_DISTANCE_BETWEEN_COORDS(victim_pos.x, victim_pos.y, victim_pos.z, trapdoor_pos.x, trapdoor_pos.y, trapdoor_pos.z, 1); position_i = position_i + 1; // WAIT(0); // must have a wait in while loops } SAC_appendLineToFile("sac_rdr2_log.txt", "autogallows - check 3, required " + to_string(position_i) + " positioning iterations, distance to trapdoor is " + to_string(trapdoor_distance));Sometimes it works straight up, sometimes it takes a number of tries - these are the results for 4 different NPCs being placed sequentially, note that 3 out of 4 were placed at the first try, however the 4th required 3 cycles to position correctly (which are the glitches I've seen happening in-game as well)
autogallows - check 3, required 1 positioning iterations, distance to trapdoor is 0.830377 autogallows - check 3, required 1 positioning iterations, distance to trapdoor is 0.851509 autogallows - check 3, required 1 positioning iterations, distance to trapdoor is 0.579172 autogallows - check 3, required 3 positioning iterations, distance to trapdoor is 0.788400 <!-- later edit --> autogallows - check 3, required 3 positioning iterations, distance to trapdoor is 0.831077 autogallows - check 3, required 4 positioning iterations, distance to trapdoor is 0.632743 autogallows - check 3, required 1 positioning iterations, distance to trapdoor is 0.829728 autogallows - check 3, required 1 positioning iterations, distance to trapdoor is 0.794881
LE: added more attempts demonstrating some of the NPCs take multiple iterations to position correctly
-
-
4 hours ago, crossed99 said:
I'm using this one to do that:
ENTITY::_SET_ENTITY_COORDS_AND_HEADING_NO_OFFSET(entity, coord.x, coord.y, coords.z, heading, true, true);Can't remember why I started using this instead of SET_ENTITY_COORDS, but this one works for me.
Thank you, seems to work fine.
Actually, SET_ENTITY_COORDS seems to work too, but only sometimes. Anyway, will use yours, thanks\
-
I am trying to teleport a ped to a nearby location (within the local map, not remote)
I am trying to use
SAC_appendLineToFile("sac_rdr2_log.txt", "Noose victim at x = " + to_string(nooseSpot->getAnchorPosition().x) + " y = " + to_string(nooseSpot->getAnchorPosition().y) + " z = " + to_string(nooseSpot->getAnchorPosition().z)); // trace file logs: Noose victim at x = -315.040009 y = 732.947998 z = 122.899002, so x, y and z should be valid ENTITY::SET_ENTITY_COORDS(victim, nooseSpot->getAnchorPosition().x, nooseSpot->getAnchorPosition().y, nooseSpot->getAnchorPosition().z + 1, 1, 1, 1, false);and it doesn't do anything
How should I implement this?
-
1 hour ago, crossed99 said:
I use this in my gang hideouts to make them move around and do stuff. Put zeros in the sequence in place of the ped handles, only use the actual ped in the perform sequence line.
Will this sequence execution block the rest of the script until it completes, or does it execute as a parallel thread?
-
On 10/10/2021 at 4:03 PM, Droppy said:
What happens generally is that too much work is being done in the main-thread, and as I can see a lot of developers don't properly manage threading.
How does one manage threading properly? I am having this exact issue, too much stuff happening in the main thread, I would like to branch it / multithread it, but don't know how
-
On 1/3/2022 at 7:00 PM, crossed99 said:
TASK::TASK_GO_TO_COORD_ANY_MEANS(ped, coords.x, coord.y, coord.z, 1.0f, 0, 0, 786603, 0xbf800000); TASK::TASK_FOLLOW_NAV_MESH_TO_COORD(ped, coords.x, coord.y, coord.z, 1.0f, -1, 0.5f, 1048580, 40000.0f);These are the ones I'm using. The params are: ped, coordinates, speed, timeout I think but not use, don't know the rest...
1.0 is walk speed, 2.0 should be jog and 3.0 is sprint.
edit: oh the parameter after the timeout I think is how close they're supposed to stop to the given coords. 0 is exactly the coords.
Vector3 playerpos = ENTITY::GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(PLAYER::PLAYER_PED_ID(), 0.0f + 5, 0.0f + 5, 0.0f + 0); TASK::TASK_GO_TO_COORD_ANY_MEANS(ped, playerpos.x, playerpos.y, playerpos.z, 3.0f, 0, 0, 3, 0);This works just fine (the offset is just cosmetic so they don't run into the player). Questions is how to make them do some other stuff when they complete the walking. The "go to coord" function does not return a bool on completion - I suppose a while which breaks only when coordinates are near the player?
Dead body persistence
in RDR2 Mods Discussion
I understand what you mean but I need specific model names to implement this feature