Making a corpse permanent?

Post » Wed Dec 04, 2013 5:04 pm

I've been trying to make a handy item for dead thrall usage that when placed on any corpse will force it to persist, but nothing I've done has been able to make it work. I figured the easiest way to do this would be to make a persistent item and place it on the corpse, but nothing I've done so far has been able to force it. I'm spawning the necromancy stone I made in the CK and placing it on the corpse, leaving the building, doing some stuff to test, and coming back. I've confirmed things like the events I'm adding running, but nothing seems to work.

Things I've tried so far with no success:

-a script on the stone that references something in the editor

-setting the stone to receive updates

-making the stone an alias to a quest I added, adding the stone to your inventory starts the quest

It'd also be nice to be able to have markers as part of a quest to all placed necromancy stones, but at this point I would be happy if they worked at all and cut my FPS in half

User avatar
Monika Fiolek
 
Posts: 3472
Joined: Tue Jun 20, 2006 6:57 pm

Post » Wed Dec 04, 2013 2:07 pm

This might help you with what you seek

http://www.uesp.net/wiki/Skyrim:Permanent_and_persistent_items

It seems that all you have to do is give the NPC an item that is Persistent in the world, and then the corpse will not go away. I think the article is talking about putting something on a corpse in the game to accomplish this, but it could just as easily be modded in.

User avatar
natalie mccormick
 
Posts: 3415
Joined: Fri Aug 18, 2006 8:36 am

Post » Wed Dec 04, 2013 6:54 am

Yes that's what I'm trying to do, but that doesn't help me. I know I need a persistent item but what I'm having trouble with is creating a custom one in the creation kit. The ones that are in the game are mostly due to quests and can stop being persistent, there's a limited quantity, and you likely want to keep them.

User avatar
lisa nuttall
 
Posts: 3277
Joined: Tue Jun 20, 2006 1:33 pm

Post » Wed Dec 04, 2013 11:15 am

Quest Items are made through the Quest/Reference Alias system. Or alternatively just make reference aliases and point them directly at your corpse. You might also be able to make them persistent by storing them in an Actor variable.

User avatar
Soraya Davy
 
Posts: 3377
Joined: Sat Aug 05, 2006 10:53 pm

Post » Wed Dec 04, 2013 9:52 am

I've tried making a quest alias but I've got a question about it - does an alias have to be towards a specific item, or can it be all items of a certain type?

ie, can I reference "Necromancy Stone" or do I have to reference a single necromancy stone? I don't want to have a set limit on how many corpses you could activate or such, it would limit the functionality and confuse players when you ran out of aliases to use

I tried storing the corpse in an actor variable but it still disappeared, maybe because the item the script was on disappeared? Maybe I could try storing the stone itself inside one of it's variables to keep it alive, I'll give that a try

User avatar
Betsy Humpledink
 
Posts: 3443
Joined: Wed Jun 28, 2006 11:56 am

Post » Wed Dec 04, 2013 1:26 pm

You'd probably want to store the variable in a quest. Objects get weird when they transition in and out of containers.

For reference aliases, you would need an alias for each quest item/corpse. These don't have to be filled right away.

And yes you will be limited by how many reference aliases/variables you create (an array can have up to 255 indices). Why anyone would need that many is beyond me. Keeping a ton of actors persistent can also be bad for performance. I only keep track of 20 in my mod before I start deleting stuff.

User avatar
Undisclosed Desires
 
Posts: 3388
Joined: Fri Mar 02, 2007 4:10 pm

Post » Wed Dec 04, 2013 9:34 am

Alright so I'm re-attempting the alias method but the whole reference system is extremely confusing - I have no idea what fill type I want to use, or how to even set the alias. Naturally I want to be able to set any corpse to be an alias to prevent it disappearing, not one that pre-exists in the game. I can't seem to find any option to make an array of aliases either, would I have to make the 20 or so aliases one by one manually? Then on top this how do I even know when a script attached to a quest activates? When it reaches a stage it's bound to maybe? This is all getting so out of hand for just wanting to make a corpse persistent, I never imagined this would be so hacky for something so simple

User avatar
Flutterby
 
Posts: 3379
Joined: Mon Sep 25, 2006 11:28 am

Post » Wed Dec 04, 2013 7:16 am

It looks overwhelming the first time you try making an alias, but I promise it will be simple :smile:

Use the default options when you make a new alias - don't change anything, except for the "Optional" flag - which you want to tick. (this way the alias can remain empty at first without causing any problems)

Also, if you left your quest with all the default options and didn't change anything when you made it (start game enabled, etcetera), all will work smoothly - any script you attach to the Quest will recieve its OnInit() event and begin running immediately when the game is first loaded. (just make sure the script extends Quest, of course) - you dont need to worry about any of the other tabs, like stages or whatnot - just the alias and scripts tabs will be all you need.

Now make yourself a few aliases, all with the optional flag ticked. Doesn't really matter what you name them.

You can then use those aliases by setting up an alias array as a property in your script, which is probably the easiest way to do it. Something like:

ReferenceAlias[] property myAliasArray auto

Then you can fill that array in the creation kit when you click the properties button for the script, and it's a simple matter of adding each of your newly created aliases to the array.

To actually fill an alias in your script, just do this:

myAliasArray[3].forceRefTo(myDeadBody)

After using that command, the corpse will remain in the alias forever, unless you remove it.

You can also do this from any other script if you prefer, in case you don't want to make a quest script - for instance, you could make the alias array a property on a magic effect, or something, instead. And it will work just as well, as long as you fill the array property in the CK script properties window.

User avatar
James Rhead
 
Posts: 3474
Joined: Sat Jul 14, 2007 7:32 am

Post » Wed Dec 04, 2013 3:53 pm

Thanks, those are some awesome tips! The whole system makes a lot more sense now, with any luck I should be able to get this to work now

Edit: after these tips I was able to get it working, with all the functionality I needed. I still want to figure out how to do quest markers and such but that's not necessary I guess, just useful. So far you can:

-make a necromancy stone at a smelter with a human heart and dragon bone

-place the stone on any corpse, essential or not, to make it stay forever

-remove the stone and the body will disappear normally

User avatar
Ana
 
Posts: 3445
Joined: Sat Jul 01, 2006 4:29 am


Return to V - Skyrim