Jump to content

Need Help: Auto-Re-Enabling NPCs per Script


Tragicgmxnet

Recommended Posts

Hi Folks!

I´ve got a little question in writing a script as titled above...

 

Everybody knows the problem about dying NPCs by some uninteresting reason...

And we know, if we leave the cell for too long the game first disables and then deletes most corpses

If that happens, the whole NPCs is moved out of the game

(Mr. Burke for example, if you kill him inside Moriaty´s)...

The stupid thing about it is, that this could happen to NPCs without being noticed and some day i wondered where all megaton-settlers have gone :)

 

So I started working withe the GECK and tagged all NPCs that are "in danger" (like Settlers, Scavengers or people refering to unmarked quests) as "Quest Items". This stopped the game from removing their corpses.

 

But that worked only on living NPCs.

Starting a new game is not the way to solve the problem about bringing back already removed corpses. :-)

 

I wrote a new script and added it to certain NPCs

Upon loading a cell It checked the NPCs for being enabled/disabled

If "disabled" they were auto "enabled" again

 

But I got it running on "disabled" NPCs only and some of the missing ones seem to have been already "markedfordelete" or "deleted" and completely removed :-(

I Changed the scirpt again and again, but failed to bring them back the same easy way.

 

Can somebody help me please?

Link to comment
Share on other sites

I am not sure if all of your assumptions about how the game handles dead people are correct. Cipscis might have useful insights into the matter.

 

I believe that markfordelete is intended to reduce savegame bloat, so if you are correct about your assumptions then it may be that your savegames do not allow calls to objects that have been removed from history. It sounds as though your work may have made a difference for a new game, but I am not sure if that is something that can be inserted into an existing game so that removed entities can be brought back into existence. And even if you were able to do so, would it turn into a bug that crashes your games?

Link to comment
Share on other sites

Let me give you an example

 

[spoiler alert!]:

 

-> The Brotherhood member wearing the medical power armor in Old Olney Sewers.

-> The Wasteland Wanderer, wearing the unique leather armor...

-> Or Mr. Crowley from the "shoot em in the head" quest? If the player has sold him the special keys he starts wandering the wastelands towards Fort Independence. You can kill him now to get the keys back...

If you accidently enter the same cell without taking notice, they can be killed by some reason.

 

...And much more...

 

Three ingame days later all corpses are removed from the game, making it impossible to obtain the items.

 

 

Well, there´s nothing that I´m absolutely sure of how the game handles corpses...

But I think some of my thoughts should be correct , because I´ve tried it so often now...

 

First Level: "disabled" Corpses

 

With "GetDisabled" I can check certain NPCs per Script for being disabled (that was my first step!)

then "getDead" returning = 1 if the NPCs is dead (My second step)

"getdeadcount" returning = 0 showed me if the actor belongs dead, or returning = 1 if he died by other reason (That was my third step)

---> and if the actor died by other reason:

with the "GetCauseofDeath" command returning = 0, I checked if the actor was killed by something else then me (my fourth step).

 

I´ve made it to let the game "re-enabled" corpses by that easy scirpt on next cell load, if less then three ingame days have passed.

Then the NPCs were tagged as a "Quest Items" and the corpse never disappeared again.

 

Ready to be looted at any time!

 

Next Level; the "deleted" corpses

 

Already "deleted" NPCs can be brought back into game useing "enable", "resurrect" AND "moveto XXX" on them by console.

And if I mark them to "respawn" using the GECK (but thats not solving the problem, because they are now brought back to life agian and again, including new inventory which would turn items into nonunique).

 

And here I failed in combinating a "doOnce resurrect" or "any-other-way-respawn-them-and-move-them-right-in-front-of-my-feet-command" with my enable-script :(

 

..But don´t you think if we can resurrect these NPCs per console, there could be a script doing the work once, too?

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...