Invictusblade Posted September 12, 2023 Posted September 12, 2023 Invisible Dead Body Fixer View File so I have finally made an invisible dead body fixer that (should) work on every dead NPC in the game (including all mods) so the mod is extremely simple install it and run it so the basic idea of the mod is that it will equip and unequip an invisible armor piece on a dead body, which will force the body to reappear. and this will be maintained for a short while until you decide to move on. More details So a new game isn't required but be aware that existing dead NPCs will remain invisible. (This mod adds an armor piece upon spawn) This mod also contains a mechanic to cancel this fix (for performance reasons) There is two options Limited and Unlimited. Limited - The armor will deactivate after you do a couple of loads away from the dead body. (8192 units away which is roughly a couple of hundred meters, I guess). Unlimited - The armor will never deactivate. (might have minor performance issues). (you can resume the fix by going to the body, go into Console, Click on the NPC, and type 'equipitem armor_Tick' and enter) You need the latest version of Robco Patcher (At least v3.5) https://www.nexusmods.com/fallout4/mods/69798 because while the script and mod is easy, the distribution of it is the insanely hard part. Thanks to aGuycalledB's Project PACER for some of the screenshots (needed to test modded corpses) Please note, the screenshots are in the correct order. and I am using my other mod called Random Overlay Framework to define the invisible bodies. Please let me know if there is any issues or complains Submitter Invictusblade Submitted 09/12/2023 Category Other Requires Robco Patcher Version 3.5.0 4
Invictusblade Posted September 12, 2023 Author Posted September 12, 2023 Please note, that it won't be a quick fix (well it will take 10-ish seconds) so it is possible to still find invisible bodies within that timeframe (such as Project PACER) it has a corpse within view when you enter. incase there are any issues, Please do the following 1. go into console (assuming access) 2. click on invisible NPC 3. type 'inv' and enter 4. take a screenshot of the results. 5. so this mod has two armors Called Tick(Armor_Tick) and Tock(Armor_Tock). Tick should be the first one that appears when it starts. btw I couldn't think of a better name than Tick and Tock.
SquigglySwag Posted September 12, 2023 Posted September 12, 2023 This is awesome. Thanks so much. I was just planning on commenting on the ROF thread that I was still experiencing this exact issue, despite using the DeadInvisibleBodiesFix_ROF.esp that comes with that mod. This was actually bothering me a lot, even though it's arguably a minor issue. I'll be trying this soon (hopefully within the next 48 hours) and will update this comment with my results. Before installing this, should I un+reinstall ROF and not select the invis fix from that mod? Or is it safe to just leave that old .esp active and install this after it?
Invictusblade Posted September 12, 2023 Author Posted September 12, 2023 56 minutes ago, SquigglySwag said: This is awesome. Thanks so much. I was just planning on commenting on the ROF thread that I was still experiencing this exact issue, despite using the DeadInvisibleBodiesFix_ROF.esp that comes with that mod. This was actually bothering me a lot, even though it's arguably a minor issue. I'll be trying this soon (hopefully within the next 48 hours) and will update this comment with my results. Before installing this, should I un+reinstall ROF and not select the invis fix from that mod? Or is it safe to just leave that old .esp active and install this after it? so it shouldn't matter because they work differently (I had them running at the same time when this mod was part of ROF) *I then realise that I could easily separated them and here we are. I will be changing version of my ROF's Dead Body fix because it does contains the death overlays. (which I might add more to) *so it won't influence NPCs. this bug has annoyed me since I started using BodyGen. (I am glad that this mod should work on Modded Content) *I did notice some stacking in Papyrus so I will look into it (I kinda repeated myself in the script)
steelpanther24 Posted September 12, 2023 Posted September 12, 2023 Do you know how this impacts the game in late stages? I use GCM and set it so the bodies are present for at least a week (in game), but even then they disappear, usually as a memory saving technique.
vaultbait Posted September 12, 2023 Posted September 12, 2023 (edited) 49 minutes ago, steelpanther24 said: Do you know how this impacts the game in late stages? I use GCM and set it so the bodies are present for at least a week (in game), but even then they disappear, usually as a memory saving technique. I have a feeling it will need some of the cleanup @Invictusbladesaid was in the works. I looked through a decompiled version of the script last night and the only checking for whether the actor is dead is in the OnContainerChanged() events. Basically every human or ghoul actor in the game (living or dead) will have two armor items with attached scripts getting un/re-equipped every 10 seconds. Worse, the current script is relying on simple Utility.Wait(5) calls rather than at least setting and reacting to timer events. This probably accounts for the stack size errors mentioned earlier. Edited September 12, 2023 by vaultbait
steelpanther24 Posted September 12, 2023 Posted September 12, 2023 1 hour ago, vaultbait said: I have a feeling it will need some of the cleanup @Invictusbladesaid was in the works. I looked through a decompiled version of the script last night and the only checking for whether the actor is dead is in the OnContainerChanged() events. Basically every human or ghoul actor in the game (living or dead) will have two armor items with attached scripts getting un/re-equipped every 10 seconds. Worse, the current script is relying on simple Utility.Wait(5) calls rather than at least setting and reacting to timer events. This probably accounts for the stack size errors mentioned earlier. Whoa.....that ...is not good. I spent hours on a code because it was taking 15ms of processing time and I want simplify the code (without AI because...it is homework) to get it down to 15microseconds. Ah well, this mod seems promising, if it doesn't require a big hit to the late game FPS. I like my immersion...but still want it to be playable. Falcon 4.0 looks good on my bookshelf, but I will never play it again.
Oldwolf58 Posted September 12, 2023 Posted September 12, 2023 One note, I've found that a simple Unequipall command on the dead actor will clear the invisible body glitch. It does mean you get a naked dead actor but if they've been dead any length of time you can roll play it that someone already stripped them looking for valuables or whatnot and they still have items in inventory just nothing equipped so you can still loot them. A simpler mod to run that command on them on a one time basis might work??? don't know I'm NOT a coder like you guys. You all are way beyond what I could dream of doing
vaultbait Posted September 12, 2023 Posted September 12, 2023 1 hour ago, Oldwolf58 said: One note, I've found that a simple Unequipall command on the dead actor will clear the invisible body glitch. It does mean you get a naked dead actor but if they've been dead any length of time you can roll play it that someone already stripped them looking for valuables or whatnot and they still have items in inventory just nothing equipped so you can still loot them. A simpler mod to run that command on them on a one time basis might work??? don't know I'm NOT a coder like you guys. You all are way beyond what I could dream of doing Right, but also running it on a corpse actor that is visible runs a chance of turning them into an invisible naked corpse, such is the nature of this LooksMenu bug. Unfortunately there's no way for a script to tell whether the actor's body is visible or invisible, so it needs to run the same thing on all corpses, and that needs to be something that will turn the invisible bodies visible but not the other way around.
Invictusblade Posted September 12, 2023 Author Posted September 12, 2023 like I said, It needs a bit of clean up and reworking. but it works-ish I probability should have kept it in the ROF Thread for a while longer. so I will work on it today so question is there a event that allows it to read when you load a save game? because I can cut it to 1. on spawn 2. on gameload 3. maybe a single item and not have it repeating
vaultbait Posted September 13, 2023 Posted September 13, 2023 6 minutes ago, Invictusblade said: so question is there a event that allows it to read when you load a save game? Yes, you want to remote register for OnPlayerLoadGame, something like this: Event OnLoad() RegisterForRemoteEvent(PlayerRef, "OnPlayerLoadGame") EndEvent Event Actor.OnPlayerLoadGame(Actor akSender) ; do stuff EndEvent 1
Invictusblade Posted September 13, 2023 Author Posted September 13, 2023 (edited) 6 hours ago, vaultbait said: Yes, you want to remote register for OnPlayerLoadGame, something like this: Event OnLoad() RegisterForRemoteEvent(PlayerRef, "OnPlayerLoadGame") EndEvent Event Actor.OnPlayerLoadGame(Actor akSender) ; do stuff EndEvent thank you, this has help greatly also I cleaned up the script (removed the timers) Event OnEquipped(Actor akActor) AkTarget = akActor akActor.unequipitem(Armor_Tick) EndEvent Event OnUnEquipped(Actor akActor) RegisterForRemoteEvent(PlayerRef, "OnPlayerLoadGame") EndEvent Event Actor.OnPlayerLoadGame(Actor akSender) if AkTarget.GetDistance(PlayerREF as ObjectReference) < 8192 if AkTarget.IsDead() AkTarget.equipitem(Armor_Tick) else AkTarget.Removeitem(Armor_Tick) Endif else UnregisterForRemoteEvent(PlayerRef, "OnPlayerLoadGame") Endif EndEvent so I was wondering about the final outcome, when to stop the script? How often do we revisit corpses? because at the moment, I have it set to cancel after you get outside of 8192 units and then when the next load happens then the invisible bug happens again Load->Cancelled->Load->Invisible body also I haven't seen any stacking in the last few papyrus logs edit-> I decided to leave the Armor_Tick inside of the body incase you want to resume it (console, click on NPC, Equipitem armor_tick) Edited September 13, 2023 by Invictusblade
Invictusblade Posted September 13, 2023 Author Posted September 13, 2023 (edited) here is the latest beta most of the changes are listed above Dead Body Fixer v1.2.7z script Scriptname INVB_Overlay_Tick_Tock extends ObjectReference Armor Property Armor_Tick Auto Const Mandatory Actor Property PlayerRef Auto Const bool Tick = True ::Should have removed this Actor AkTarget Event OnContainerChanged(ObjectReference akNewContainer, ObjectReference akOldContainer) akTarget = (akNewContainer as Actor) if akTarget == None akTarget = (akOldContainer as Actor) endIf if akTarget != None if akTarget.IsDead() akTarget.equipitem(Armor_Tick) else akTarget.Removeitem(Armor_Tick) Endif Endif EndEvent Event OnEquipped(Actor akActor) AkTarget = akActor akActor.unequipitem(Armor_Tick) EndEvent Event OnUnEquipped(Actor akActor) RegisterForRemoteEvent(PlayerRef, "OnPlayerLoadGame") EndEvent Event Actor.OnPlayerLoadGame(Actor akSender) if AkTarget.GetDistance(PlayerREF as ObjectReference) < 8192 if AkTarget.IsDead() AkTarget.equipitem(Armor_Tick) else AkTarget.Removeitem(Armor_Tick) Endif else UnregisterForRemoteEvent(PlayerRef, "OnPlayerLoadGame") Endif EndEvent Edited September 13, 2023 by Invictusblade 1
vaultbait Posted September 13, 2023 Posted September 13, 2023 6 hours ago, Invictusblade said: so I was wondering about the final outcome, when to stop the script? How often do we revisit corpses? because at the moment, I have it set to cancel after you get outside of 8192 units and then when the next load happens then the invisible bug happens again Load->Cancelled->Load->Invisible body also I haven't seen any stacking in the last few papyrus logs edit-> I decided to leave the Armor_Tick inside of the body incase you want to resume it (console, click on NPC, Equipitem armor_tick) I've got a similar challenge in Milking Human Kindness (I want it to run a script on nearby actors in a performant manner), and so am getting familiar with using quest reference collection aliases. The idea is that you have a reference collection defined with the set of filter conditions (race, keywords, dead state, distance from the player, maybe even line of sight) to be filled by some limited number of actors that meet those criteria, and attach a script to that collection. Then you periodically start the quest that manages that alias so that it will fill it with nearby human and ghoul corpses and run the intended script. This approach is apparently much, much faster because a lot more of it is happening inside the game engine rather than in attached scripts, and you're able to limit the actors it's working on to ones that matter, and the script attachment doesn't persist indefinitely on those actors but rather goes away as soon as the alias is unfilled.
ptmc2112 Posted September 13, 2023 Posted September 13, 2023 (edited) 10 hours ago, Invictusblade said: so I was wondering about the final outcome, when to stop the script? How often do we revisit corpses? because at the moment, I have it set to cancel after you get outside of 8192 units and then when the next load happens then the invisible bug happens again Load->Cancelled->Load->Invisible body also I haven't seen any stacking in the last few papyrus logs edit-> I decided to leave the Armor_Tick inside of the body incase you want to resume it (console, click on NPC, Equipitem armor_tick) If you really wanted to test the limits, you could use the Fallout Who Regenerated mod with the Stattenheim Remote Summon addon, so you could test it anywhere. The 2 pics in the spoilers is me testing it with the TARDIS from that mod. I'm using Version 1.2 of Invisible Dead Body. 1st pic is what happened when i saved and loaded inside the TARDIS then left (the interior of the TARDIS is an interior cell)2nd pic is view of the TARDIS from the body (using the police box shell as it's easy to recognize) Spoiler Saving and loading while outside did not fix the corpse. Edited September 13, 2023 by ptmc2112
Invictusblade Posted September 13, 2023 Author Posted September 13, 2023 5 hours ago, ptmc2112 said: If you really wanted to test the limits, you could use the Fallout Who Regenerated mod with the Stattenheim Remote Summon addon, so you could test it anywhere. The 2 pics in the spoilers is me testing it with the TARDIS from that mod. I'm using Version 1.2 of Invisible Dead Body. 1st pic is what happened when i saved and loaded inside the TARDIS then left (the interior of the TARDIS is an interior cell)2nd pic is view of the TARDIS from the body (using the police box shell as it's easy to recognize) Reveal hidden contents Saving and loading while outside did not fix the corpse. so have you discovered the body before installing the mod? because I believe Robco Patcher adds items on spawn which is how my mod works I had just tested without my mod on the same NPC, and if I visited the NPC before activating the mod then it won't work. (I saved then exited and activated the mod)
ptmc2112 Posted September 14, 2023 Posted September 14, 2023 (edited) 1 hour ago, Invictusblade said: so have you discovered the body before installing the mod? because I believe Robco Patcher adds items on spawn which is how my mod works I had just tested without my mod on the same NPC, and if I visited the NPC before activating the mod then it won't work. (I saved then exited and activated the mod) I made a new game after installing the 1.2 version. I try not to update mid-game. Edited September 14, 2023 by ptmc2112
Invictusblade Posted September 14, 2023 Author Posted September 14, 2023 42 minutes ago, ptmc2112 said: I made a new game after installing the 1.2 version. I try not to update mid-game. I meant that the mod will still work, just not on that Dead NPC (because he has already been spawned) so a new game isn't required. (because you don't actually see that many dead bodies (Killed NPCs are different))
ptmc2112 Posted September 14, 2023 Posted September 14, 2023 I thought the description implied it would always work on every invisible dead body when loaded into the current cell
steelpanther24 Posted September 14, 2023 Posted September 14, 2023 Hmm... I wonder how memory intensive it would be to "decay" the bodies to increase immersion. After X weeks, the body would become "ghoul like." Though I guess that would mean swapping out the bodies for ghoul bodies and skeletons (for dead ghouls decaying).... probably not worth it though.
Invictusblade Posted September 17, 2023 Author Posted September 17, 2023 so how is this mod going for everyone? any issues? I am just wondering because I might post this mod to Nexus over this coming week unless there is any issues.
SquigglySwag Posted September 17, 2023 Posted September 17, 2023 (edited) 6 hours ago, Invictusblade said: so how is this mod going for everyone? any issues? I am just wondering because I might post this mod to Nexus over this coming week unless there is any issues. I haven't had a chance to play much yet but I should be playing a fair bit later today. I just downloaded your latest beta from this thread (v1.2) and ran around to most of the corpses I remember encountering in my playthrough so far. I just started a new game 2 weeks ago and I think I've only encountered 4 or 5 pre-placed corpses total in my playthrough. I started by going to Sanctuary and looked at the Dead Raider (I think that is the actual name shown when hovering over this particular corpse) body out past the bridge, and unfortunately she still has an invisible body. I don't know if there's something weird in the game's programming with that particular corpse. For what it's worth, I had previously already stripped this body naked. In the past, this clothed corpse's body was invisible but it appeared when I stripped the armor off, but then when I ran past it again an hour later it was invisible and has been invisible ever since. Then I went to the corpse (I think it's named Corpse in-game) in the shack near Vault 111, the first corpse I found in my playthrough. This corpse is also already stripped and naked and the body is visible, I assume the newest v1.2 file fixed this but I don't remember if I experienced the invisible body issue with this particular corpse. Then I went to Lexington because I remember seeing at least 2 invisible bodies in this area. There is a female Raider corpse near the fast travel point, I'm 99% sure I previously experienced the invisible body bug with her clothed corpse, but now with the v1.2 file her body is visible when I ran up to it. Then somewhere nearby there is a male Raider corpse who I'm also 99% sure I was having the invisible body with his clothed corpse as well, but now it is visible. The problem is I'm not 100% positive whether these are pre-placed corpses or if they were spawned as living NPCs but killed by nearby feral ghouls before I actually came into contact with them. (EDIT: I was too curious so I uninstalled the 1.2 fix, loaded a previous save from just before I installed the fix, went to Lexington, and the female and male Raider corpses there have invisible bodies again, so the fix does seem to be working (unless I'm going insane or it's just random). The female Corpse in the shack near 111 was NOT invisible even without the fix, I guess the bug never affected that one for me, not sure why.) I'll keep playing with the mod and hopefully come across more pre-placed corpses soon. I don't really want to start a new game just to test if it'll fix the Dead Raider outside Sanctuary. Based on the earlier comments in this thread, I'm honestly surprised it seemingly fixed the other corpses I've already previously encountered before installing the fix. Performance-wise, it seems fine, but I've only played for a few minutes since installing the v1.2 fix. I was already getting stutter with my load order while running around places like Lexington and it's still there but it doesn't seem any worse than before. TL;DR: I think it's working? But I need to play more and come across some new pre-placed corpses to know for sure. Sorry this probably wasn't very helpful. Edited September 17, 2023 by SquigglySwag
ptmc2112 Posted September 22, 2023 Posted September 22, 2023 (edited) On 9/17/2023 at 4:49 AM, Invictusblade said: so how is this mod going for everyone? any issues? I am just wondering because I might post this mod to Nexus over this coming week unless there is any issues. Only issue I can tell is that it only triggers on new game or whenever the game loads, not when the dead body is loaded into memory. So if you were to save then reload, the body becomes visible, but if you were to go inside a door that leads to a different cell (be it from 1 internal cell to a different internal cell, from an external cell to an internal, or an internal cell to an external cell), and previously seen bodies since your last game load will be invisible again. Only workaround is by saving then loading the save you just made (you don't even need to quit the game). Other than that it works great. Edited September 22, 2023 by ptmc2112
ebbluminous Posted September 22, 2023 Posted September 22, 2023 On 9/17/2023 at 11:49 AM, Invictusblade said: so how is this mod going for everyone? any issues? I am just wondering because I might post this mod to Nexus over this coming week unless there is any issues. For some reason the game CTDs when I start it up with this mod active - Don't even get to the start menu
Invictusblade Posted September 22, 2023 Author Posted September 22, 2023 2 hours ago, ebbluminous said: For some reason the game CTDs when I start it up with this mod active - Don't even get to the start menu have you updated Robco Patcher?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now