Despawning Dead Creatures

Post » Sat Dec 03, 2011 7:56 am

Hi everyone,

I'd like to make a small mod that despawns certain types of creatures when they die. I was wondering what the best way of doing this is, in terms of something I can put into the creatures' scripts. It would be even better if I could make the conjuration desummoning animation play too... It would be preferable if the creatures were removed entirely from the save file (at least after a period of time passes), since having them just sitting there being invisible could cause problems once there are heaps of them around, I imagine.

Does anyone know how to do this? I've examined some scripts from CreaturesX, but I'm not clear on the best method.
User avatar
Nice one
 
Posts: 3473
Joined: Thu Jun 21, 2007 5:30 am

Post » Sat Dec 03, 2011 10:25 am

Not sure what you mean by de-spawn....
Do you want the creature to just vanish on death?
You could simply Disable the creature OnDeath.

You cannot remove references from a save file from within the game. Only third party editing programs can do that (like TESAME or Enchanted Editor, etc)
Your save file will still keep track of that creatures death.
User avatar
brian adkins
 
Posts: 3452
Joined: Mon Oct 01, 2007 8:51 am

Post » Sat Dec 03, 2011 9:35 pm

Ah that makes sense, thanks.
User avatar
Allison C
 
Posts: 3369
Joined: Mon Dec 18, 2006 11:02 am

Post » Sat Dec 03, 2011 8:55 pm

You cannot remove references from a save file from within the game. Only third party editing programs can do that (like TESAME or Enchanted Editor, etc)


short DoOnce

if ( GetDisabled == 1 )
if ( DoOnce == 0 )
SetDelete
set DoOnce to 1
return
endif
endif

if ( OnDeath == 1 )
Disable
Return
endif


Adding that to the creature wouldn't work?
User avatar
Spaceman
 
Posts: 3429
Joined: Wed May 23, 2007 10:09 am

Post » Sat Dec 03, 2011 4:41 pm

Adding that to the creature wouldn't work?

If you're asking if that would delete it from the save file (which is what OP wanted and what you seem to be responding to) it won't.
You cannot remove information from a save file with scripts.
You can delete the creature from the game, but your save file is remembering that the creature was killed. See? The game will never forget that the event happened.

Even after 72 game hours when corpses are erased, your save files still keeps count of each death.
The game will reset some info after 72 hours, but it doesn't forget what you've done.
Open your ess with EE and you can see this. It counts everything you've killed, people you've talked to, cells you walked through. etc
User avatar
City Swagga
 
Posts: 3498
Joined: Sat May 12, 2007 1:04 am

Post » Sat Dec 03, 2011 10:59 am

If you're asking if that would delete it from the save file (which is what OP wanted and what you seem to be responding to) it won't.
You cannot remove information from a save file with scripts.
You can delete the creature from the game, but your save file is remembering that the creature was killed. See? The game will never forget that the event happened.

Even after 72 game hours when corpses are erased, your save files still keeps count of each death.
The game will reset some info after 72 hours, but it doesn't forget what you've done.
Open your ess with EE and you can see this. It counts everything you've killed, people you've talked to, cells you walked through. etc


Ahhh alright, thank you for explaining that in more detail. I was under the assumption SetDelete would delete the creature, object, NPC, etc. completely from your save file. It is good to learn this, thank you!
User avatar
Nancy RIP
 
Posts: 3519
Joined: Mon Jan 29, 2007 5:42 am


Return to III - Morrowind