0 of 0

File information

Last updated

Original upload

Created by

Subhuman0100

Uploaded by

subhuman0100

Virus scan

Safe to use

26 comments

  1. DK662
    DK662
    • supporter
    • 2 kudos
    I had a CTD and checked my last save with re-saver and this was the problem.


                    There are 93 stacks and 220 frames, which may indicate a problem.
    WIDeadBodyCleanupScrip occurs the most often (89 occurrences)

    Can someone help out?
    nevermind. i recommend the before mentioned and linked Crash Fix.
  2. mattski123
    mattski123
    • supporter
    • 116 kudos
    Heyo, you reckon WIDeadBodyCleanupScript Crash Fix? is safe to use along with replacement WIDeadBodyCleanupScript?? And what exactly would benefit my game the most?
    1. FardeenRiyadh16
      FardeenRiyadh16
      • member
      • 16 kudos
      They replace the same script, nothing's going to break, which ever one is has higher priority wins.
    2. ChildofDragons
      ChildofDragons
      • premium
      • 76 kudos
      lilebonymace has a combo patch for them here
  3. deceptXS
    deceptXS
    • premium
    • 35 kudos
    For some reason changing the script to this has caused NPCs to start teleporting to the WIDeadBodyCleanupCell while being alive.  It happened after I rented a room and slept.  Both the NPCs I've had teleport there were Innkeepers.  Removing the edited script resolved the issue.  Not blaming the script, it looks as if it should be fine.  The issue was reproducible with my mod setup, but not sure what combination of mods causes it other than throwing this script into the mix.  The only mods that I have that edit innkeepers is USSEP and Ask Innkeepers to Show Room.  Just posting incase someone runs into a similar issue.
    1. bojanni
      bojanni
      • premium
      • 35 kudos
      Ha, I have the same thing. Getting cosy up in there. Hulda, Jonna and Wilhelm staring at some dead bodies. Don't know why this is happening yet.
    2. Toolarg
      Toolarg
      • member
      • 7 kudos
      Same here, my Innkeppers kept disappearing and sent to the body clean up cell and I just didn't know why till now.
    3. JazzKiwifruit
      JazzKiwifruit
      • premium
      • 69 kudos
      Having the same issues with live innkeepers being teleported to the dead body cell. Took me a few hours but I finally isolated it to this script "fix".

      In my case, I can reproduce it by renting a room, leaving the inn, traveling to a different area, and waiting for 24 hours. Upon returning to the original inn the innkeeper will be gone. It doesn't seem to occur until renting the room for the first time - so possibly something to do with the handling of the quest aliases? I did notice that the vanilla room rental and related quests do check if the innkeeper has died (to "clear" your booking of the room). Might be related? Or might not... Nothing in the source provided here looked suspect to me, but I'm by no means a Papyrus wizard.
    4. BrokuSan
      BrokuSan
      • premium
      • 2 kudos
      Yup getting the same issue with my innkeepers as well I suspected that this mod may have been the culprit
    5. IsharaMeradin
      IsharaMeradin
      • premium
      • 282 kudos
      Encountered this as well.  Was a bit stumped and then I remembered having this active. Unfortunately, removing it mid-game probably won't help as the script would be baked into the already loaded actors.  At least not without having to wait for a full cell reset.

      The script assumes that the NPC is dead due to the OnDeath event.  Perhaps there should be a sanity check that ensures the NPC is truly dead prior to moving them?
    6. subhuman0100
      subhuman0100
      • member
      • 372 kudos
      The script assumes that the NPC is dead due to the OnDeath event.  Perhaps there should be a sanity check that ensures the NPC is truly dead prior to moving them?

      The question in my mind is why is that event being raised if the actor isn't dead?
      I know you have enough knowledge of scripting to follow, but the stock script follows the same logic. 
      Event OnDeath(Actor akKiller)
          GoToState("Dead")
          if DeathContainer
              bool cleanedUp = false    
              while cleanedUp == false
                  utility.waitGameTime(DaysBeforeCleanUp * 24)
                  cleanedUp = checkForCleanup()
              endWhile
          else
          endif
      EndEvent

      That's stock, with whitespace removed to fit better.  OnDeath, start polling for cleanup.   The only functional change I made was RegisterForSingleUpdateGameTime() instead of WaitGameTime()

      I haven't been able to reproduce this, even with this method:
      In my case, I can reproduce it by renting a room, leaving the inn, traveling to a different area, and waiting for 24 hours. Upon returning
      to the original inn the innkeeper will be gone. It doesn't seem to occur until renting the room for the first time - so possibly something to do
      with the handling of the quest aliases?


      So, the only thing I can think of is:
      Event OnDeath(Actor akKiller)
          GoToState("Dead")
          if DeathContainer
              RegisterForSingleUpdateGameTime(DaysBeforeCleanUp * 24.0)
          endif
      EndEvent

      ...if some mod is altering the vanilla quest to fill the DeathContainer property earlier than expected, this could happen.  BUT- if that's the case, it should happen with both the stock and this version of the script.
    7. IsharaMeradin
      IsharaMeradin
      • premium
      • 282 kudos
      Looking at Mralki, innkeeper at Rorikstead: 
      Stock has no dead body clean up script applied and thus no container.
      USSEP adds the WIDeadBodyCleanup script to him and assigns a death container
      This change has been present since USKP v1.0
      Spoiler:  
      Show

      • Fixed the following named, non-respawning, non-essential NPC's missing their cleanup script, so depending on their death location their corpses could persist overly or indefinitely: Acolyte Jenssen (assigned unused urn E4B5F), Adeber (assigned unused coffin DEF28), Adisla (assigned unused urn F93DF), Aela the Huntress, Aeri, Ahkari, Ainethach, Alain Dufont, Alva, Alvor, Angi, Angrenor Once-Honored (assigned intended coffin F93DE), Angvid, Annekke Crag-Jumper, Aquillius Aeresius (assigned unused coffin 8618D), Aranea Ienith, Arcadia (assigned unused coffin E4BF6), Ardwen, Argis the Bulwark, Aringoth (assigned unused coffin 102DD1), Arnskar Ember-Master (assigned unused coffin 102DFE), Arob, Aspiring Mage, Atahbah, Atar, Athis, Atub, Azzada Lylvieve, Badnir, Bagrak, Barknar, Bassianus Axius, Beitild, Belchimac, Belrand, Bendt (assigned unused urn 863C6), Benor, Birna, Bjartur (assigned unused urn 86176), Bodil, Bolfrida Brandy-Mug, Bolund, Bor, Borgakh the Steel Heart, Borgny, Bothela (assigned unused coffin DEF2C), Boti, Brelas (assigned unused coffin F524E), Brelyna Maryon, Briehl (assigned unused coffin EC775), Bulfrek, Calder, Camilla Valerius, Captain Lonely-Gale (assigned unused coffin F5256), Captain Wayfinder, Chief Burguk, Chief Larak, Chief Mauhulakh, Cynric Endell, Dagur, Dalan Merchad, Delacourt, Derkeethus, Dravynea the Stoneweaver, Drelas, Dro'marash, Dulug, Dushnamub, Edith, Eimar, Eola, Embry, Enmon, Erik the Slayer, Eris, Faendal, Faida, Fastred, Fianna, Filnjar, Frida, Froki Whetted-Blade, Fruki, Fultheim, Gadba gro-Largash, Ganna Uriel, Garakh, Gemma Uriel, Gerda, Gerdur, Gestur Rockbreaker, Ghak, Ghamorz, Gharol, Ghorbash the Iron Hand, Gilfre, Gjak, Gloth, Golldir, Gorm, Grogmar gro-Burzag, Grosta, Gul, Gularzob, Gunding, Guthrum, Gwendolyn, Gwilin, Hadring, Haran, Helvard, Hern, Hert, Hilde, Hod, Hogni Red-Arm, Horgeir, Hroggar, Iddra, Indara Caerellia, Iona, Irgnir, J'darr, J'datharr, J'zargo, Jervar, Jenassa, Jesper, Jofthor, Jonna, Jordis the Sword-Maiden, Jorgen, Jouane Manette, Julienne Lylvieve, Kaie, Karita, Karl, Keeper Carcette, Kesh the Clean, Kharjo, Khayla, Kjar, Kjeld, Kjeld the Younger, Klimmek, Kodrir, Kust, Lami, Lash gra-Dushnikh, Leifur, Leigelf, Lemkil, Leontius Salvius, Lob, Lod, Lodvar, Lond, Luaffyn, Lu'ah Al-Skaven, Lucan Valerius, Lydia, Lynly Star-Sung, Ma'dran, Ma'jhad, Ma'randru-jo, Madena, Mahk, Malborn, Marcurio, Mathies, Maurice Jondrelle, Mena, Michel Lylvieve, Margret (assigned unused coffin DEF4C), Mogdurz, Mralki, Mul gro-Largash, Murbul, Nagrub, Narri, Nimriel, Nirya, Njada Stonearm, Odfel, Oglub, Ogol, Olda, Olur, Onmund, Orgnar, Perth, Ra'zhinda, Ragnar, Ranmir, Ravam Verethi, Reldith, Revyn Sadri (assigned intended coffin F5249), Rexus, Rhorlak, Ria, Roggi Knot-Beard, Rorik, Runil, Rustleif, Safia, Sanyon, Sarthis Idren, Seren, Sergius Turrianus, Sharamph, Shel, Shuftharz, Sifnar Ironkettle (assigned unused coffin F93EC), Sigrid, Sigurd (assigned new urn xx01A7D3), Silus Vesuius, Sirgar, Skulvar Sable-Hilt, Snorried, Solaf, Sondas Drenim, Stenvar, Sulla Trebatius, Sven, Swanhvir, Sylgja, Teeba-Ei, Temba Wide-Arm, Thadgeir, Thorgar, Thoring, Tilma, Torvar, Tulvur, Tuthul, Ugor, Ulfr the Blind, Umana, Umurn, Urog, Valdr, Valga Vinicia, Verner Rock-Chucker, Vorstag, Willem (assigned unused coffin DEF2A), Wilmuth, Wuunferth the Unliving (assigned new coffin xx01AD36), Xander, Yatul, Zaynabi


      Not sure why the improper cleanup happens with your script and not the other.
    8. subhuman0100
      subhuman0100
      • member
      • 372 kudos
      Not sure why the improper cleanup happens with your script and not the other.

      I got it.   There's only one logical reason:
      https://www.creationkit.com/index.php?title=Talk:RegisterForModEvent_-_Form
      Did you know that when a script is attached to a Form, and it makes an event registration, the event is registered with the FORM itself. When multiple scripts are attached to the same Form (Quest), the event registration will apply to ALL the Form's scripts.


      Another script attached to the actors is doing a RegisterForSingleUpdateGameTime() while they're still alive, and it's firing this script's event.

      v1.1 will be uploaded shortly after a little more testing.
    9. mattski123
      mattski123
      • supporter
      • 116 kudos
      Was this fixed?
  4. Somedude10111
    Somedude10111
    • supporter
    • 1 kudos
    Interested in this, and appreciate the explanation in description - makes total sense to me, but I'm concerned about the bug reports in the comments below.

    If those issues are resolved, would this mod (i.e. having a stable, scheduled time for dead body cleanup) render this mod unnecessary?

    https://www.nexusmods.com/skyrimspecialedition/mods/10614

    This is without using anything that adds a ton of extra spawns.
    1. subhuman0100
      subhuman0100
      • member
      • 372 kudos
      That Cleaner script is intended to clean up dead levelled bodies: non-unique characters.   the WIDeadBodyCleanup is meant to be used on unique NPCs only (per Bethesda's comments at the top of it).  They're actually opposites in other ways, The Cleaner is set to remove dead bodies  immediately after a cell unloads (or you burn them) but the WIDeadBodyCleanup delays cleanup by at least 1/2 a game day.
  5. BoredErica
    BoredErica
    • premium
    • 70 kudos
    What does WIDeadBodyCleanupScript do exactly? It moves dead NPCs to the dead body cleanup cell and moves their items into coffins right? But why? A Reddit post I read said the game 'can't delete NPCs that don't respawn' so they move them there so the corpse is gone.

    That makes me wonder, I were to make a mod that makes all NPCs respawn, could I just remove the script from the NPC without any bad things happening to my game?
  6. kandelai
    kandelai
    • member
    • 8 kudos
    I added this script and your other one for Sleep Tight as instructed on a moderate 200+ game mid play through and instantly began getting CTD's on a pretty stable build. I used MO2, ran Loot, etc. I had to remove this mod, still using your Sleep Tight patch, and now everything is fine. So, something is not meshing. I do use USSEP, if that matters.
    1. subhuman0100
      subhuman0100
      • member
      • 372 kudos
      I can theorize, first I don't think it will be related to either the number of mods you're running or to USSEP.  I had shared this initially with several friends, and all of us are (AFAIK) using USSEP, and one of them runs  "normally" with just over 1,300 mods.  I like to use her as a beta tester of sorts, because in general if something's gonna break it's going to happen with that sort of modload!

      If the vanilla (or even USSEP's, for that matter) script was running something other than the WaitGametime() when you made the save, then it was reloaded and papyrus found this script in its place, that may cause problems.
      I don't know if you use ReSaver/Fallrim Tools, but if you do and see something like this in the save, then my theory is probably correct.

      That's an image from one of my older saves, which clued me in on this in the first place.   The other active script is from Sacrosanct, and to be perfectly clear I'm not criticizing Enai Siaion at all for it- it only has a 1.5second wait in it, and it's just random luck that I happened to save during that time.
    2. kandelai
      kandelai
      • member
      • 8 kudos
      I am using Sacrosanct, so maybe that could be it.
    3. subhuman0100
      subhuman0100
      • member
      • 372 kudos
      No, no Sacrosanct won't be a problem. :)
      I meant in my previous post that it's an example of a wait that IS NOT going to cause problems!

      A single short wait() like Enai Siaion did in Sacrosanct isn't going to hurt anything.   The issue with the stock WIDeadBodyCleanup is that it's a very long wait, inside a possibly infinitely-repeating loop.

      a) check if dead body can be cleaned up
      b) if not, wait for 12 game hours
      c) go back to a

      They're two totally different scenarios.
  7. Mur4s4me
    Mur4s4me
    • premium
    • 797 kudos
    Forgive my ignorance, as I'm genuinely curious but not knowledgeable enough to have the answer by myself, but if I'm already using USSEEP, is there any reason to use your script replacement? Is it more of a script for people not already using USSEEP?
    1. subhuman0100
      subhuman0100
      • member
      • 372 kudos
      The main reasons are #10 and #11 here:
      http://wiki.beyondskyrim.org/wiki/Arcane_University:Scripting_Best_Practices
      If you google "skyrim registerforsingleupdategametime" you'll get a lot of results such as https://forums.nexusmods.com/index.php?/topic/2373259-waitgametime-or-registerforsingleupdate/
      The first reply poses the question, the next two explain the difference.  You can feel free to read more, or not, as you prefer but the gist of it is that a wait uses papyrus resources and registerforsingleupdategametime uses much less.  Except in certain specific instances, the latter is the preferred method.
  8. Exalderan
    Exalderan
    • premium
    • 831 kudos
    I hope you talked to jduvall before modifying the script. :D
    1. subhuman0100
      subhuman0100
      • member
      • 372 kudos
      No. He neglected to leave a phone number in the comments that I could contact him at.

      The only jduvall I can find mentioned at Bethesda is Jon Paul Duvall, credited as a Quest Designer on Skyrim.   Which could explain why this happened, if programming wasn't his main role.
      https://fallout.fandom.com/wiki/Jon_Paul_Duvall

      I did put serious consideration into asking Arthmoor about it, as he usually has no qualms about completely rewriting vanilla scripts in USSEP.  But ultimately, for a < 2k file it was just easier to do this.
  9. waeq17
    waeq17
    • premium
    • 55 kudos
    Thank you for this! I really appreciate this and your other mods.