A vault-dweller zombie? Say it ain't so! Death is a normal part of every zombie apocalypse, but it doesn't have to be the end. W...

Player Death Alternative

A vault-dweller zombie? Say it ain't so!
Death is a normal part of every zombie apocalypse, but it doesn't have to be the end. Wouldn't it be fun to spawn as a new character and hunt down your now-zombified former self? If you answered 'yes', then read on.

Changing player death

When the player dies in the base game a load screen appears where you are forced to load a previous save or start a new game. To avoid this from happening you actually have to avoid the player actually dying. They way I did this is setting the player to 'essential' when Player Death Alt is enabled in the holotape. When the feature is disabled, the player is set back to normal and can die again for those that miss the lovely load screen.

When a character is marked essential and they enter a bleedout state instead of dying. Companions in the base game do this by sitting down on the ground for awhile until they eventually recover. Papyrus provides an event callback function called OnEnterBleedout that you can register for to perform any special actions when the actor enters this bleedout state. This is how I tied in the functionality to change player death that I'll describe below.

The player is bleeding out, now what?

First, we pause the script for a few seconds to allow the player to realize they have "died" and then fade out the screen to black. Then a series of things happens while the view is hidden from the player:

1. Companions are dismissed

If the player is accompanied by a companion, that companion is dismissed and will return to their home. This part of the script was modeled after the Survival mode script to return companions home if they are downed and the player abandons them and should function in the same way.

Note that Dogmeat is handled separately in the special Followers quest from other companions so this process may actually issue two separate dismiss calls (one for Dogmeat and one for the other companion). This has not been tested with multiple companion mods, but I'd be interested in hearing feedback from players using them.

2. A zombie is spawned to replace the player

A Zombie ghoul is spawned at the players bleedout location. All items the player is carrying or has equipped are transferred to this new zombie (including bottlecaps). Items currently equipped by the player will be equipped by the zombie with the exception of weapons. 

The zombie is then added to a special "Zombie Walkers" quest to track their location to aid the player in recovering their items. Note that these zombies will wander just like others if Horde Behavior is enabled. If fast travel is used by the player, they may actually travel quite some distance.

3. The player is moved

The script first tried to determine the closest settler in a player-owned settlement to the bleedout location. If a settler is found, then the player is moved to that settlers location while the settler is killed and disabled (made invisible). Then items are transferred from the settler to the player in much the same way the players items were transferred to the zombie replacement. When this process completes, the screen is then faded in from black and the player can then resume play.

Note that there is currently a couple conditions on what settlers are considered for replacement:
  • only Human or Ghoul races (eg. no robots)
  • only non-unique settlers (eg. generally this means only recruited settlers, no specials or companions)
In the event no suitable settler can be found for replacement, then a random settlement in the current world area is chosen. The player is then moved to this settlement and not given much in the way of items (eg. tattered rags). Note that the settlement moved to may or may not be owned by the player and may not even have been discovered by the player yet, so be prepared to fight or run. 

I did impose a restriction that it be within 1000000 units from the bleedout location which eliminates DLC areas if you are in the base game. Within a DLC area this restriction should keep you there.

Future

There will likely be feedback from play testing that I will as always take into consideration. This first version should be considered beta and I highly recommend saving before you try it out just to be safe.

There's a bug where sometimes the screen doesn't fade back in from black that I'm still investigating. It may have something to do with dying during VATS mode, but I'm not 100% sure yet. If this happens you can simply manually reload a previous save.

Another thing that bothers me is the endless messages that appear notifying the player that they have dropped each item in their inventory. I'm not yet sure how (or if) this can be prevented.

I played around a little bit with trying to spawn an exact clone of the player so that the zombie would look like them. This involved experimenting with spawning the player itself (id 14) and the hidden spouse version of the player actor but both cases have a lot of issues. In one case, the zombie shares an actor base with the player so things like race and essential status would be shared. Play testing the spouse version of the player was initially promising, but quickly became very buggy including invisible heads. It'd be nice to find a solution for this to apply here and for NPC Resurrection but it doesn't look good outside of using F4SE (which won't work on Xbox).

I was thinking about bringing up the character menu and allowing you to change the looks of your new character and maybe even other things like stats and name (if possible). This would really help in making your new character feel new (and the old one truly gone). I could add an option to simply randomize appearance also. On PC you can do these things via console, but these would really be value-adds on the Xbox side I think.

10 comments:

Pages (8)1234567 ยป