Fallout 3: Spawn Points & Respawning
Written by The Guild Master   
Saturday, 18 April 2009 03:17

Fallout 3: Spawn Points & Respawning

Introduction

The actual tutorial starts about half way down at the line that says "The Tutorial Starts Here", everything before that is designed to help you understand how things work and thus help you get the most out of the tutorial below it. Read the first half if you wish to know more, leap to the tutorial if you just want to get started.

Before we start, take a look at this video. This is a video of a test I ran, the first few seconds show the Enclave arriving and gate crashing my test and has nothing to do with this Tutorial other than it uses a Triggered Spawn which is what I want you to see because I explain Triggered spawns in this tutorial and want you to know what can be done with them. The fact this was caught on camera is purely accidently and very good luck on my part :D

 

 

 

Things you must known first.

This all applies to respawning in fallout 3 and opens up new options for you if you know about this stuff in advance. I have condensed it to prevent waffling, nobody likes reading tutorials for hours.

Spawn template

You will see me using the word spawn template a lot, these are items you can place in the game world to spawn things like Creatures and NPCs (not containers). NPCs and Creatures are Spawnable, as are the Lvl listed stuff in the Creatures and NPC menus, so they count too. All use Templates to update them selves or another NPC or Creature and templates can use other templates to update stuff (yes it gets confusing). So I use the term Spawn template to describe all spawnable creatures or npcs or lists of spawnable creatures or npcs that can be placed directly in the game. Once added to a cell they become References or Refs, so they should actually be called Spawn template references, but I do not use that term too often.

Encounter Zones

In Geck, under the world menu, you can find Encounter Zones which controls if an Encounter Zone resets of not.

About the PlaceAtMe Command.

This command required the mod maker to count every creature he placed out and count them back in again when they get killed in Oblivion or save game bloating occurred. This over time could destroy the players saved game. So until we know if this got fixed, avoid using it unless you did what I did in the Fighters Guild Contracts and The Elder Council mods and checked everything you placed had been killed before spawning anymore using that command. This is a safety measure, players would not be pleased if your mod destroyed their saved games.

The Disabed Item Issue.

The Disabed Item Issue from Oblivion is fixed in Fallout 3. As quest makers will tell you, in Oblivion if a mod disabled an original game item in a mod and that mod was later removed, the item remained disabled forever. Fallout 3 now enables the item again if the mod is ever removed. So the compatibility issues that did exist when one Kvatch mod disabled walls or npcs another Kvatch mod needed, cannot happen here. That bug is fixed. Deleted stuff still returns when a mod is removed as normal too.

Respawn Times.

Standard in game respawn time is just under 4 days from the time of your last visit to a cell. So you must wait in a different cell for about 4 days before the newly spawned creature will re-appear a second time. I believe the actual time is about 74 hours roughly, I need to look it up.

Disabling Spawn points crash.

The old Disable Spawn Crash Oblivion suffered from has been fixed in Fallout 3. Fallout 3 actually makes heavily use of disabled spawns so they had to fix it and this is the method needed to spawn additional bad guys on command. Deleting or changing anything in Fallout 3 without first checking what uses it is a bad idea. So now you can disable spawn points just as you would disable other things in the game and do so safely.

Disabled or Enabled Spawn Points and Spawn Times.

A disabled spawn template does remember the last time it spawned a creature so if it is enabled again within 4 days, it will not spawn a second or third creature. It must be left for a full 4 days without you entering that cell as normal. So Enabling or disabling a spawn templates makes no difference to the spawn time counter. But if you have left it 4 days, the moment you enable it, the spawn will work the instant the player appears. There is roughly a 3 to 5 second delay between enabling a spawn template and a creature appearing. This is because of the script needing about 5 seconds to run.

Fallout 3 Encounter Zones Vs Oblivion Leveled Lists.

Oblivion was probably far too random where as Fallout 3 is probably far too specific. Oblivion used leveled lists to spawn region specific baddies but in doing so, lacked any real detail which was why I started making the Cyrodiil Upgrade Mods. Where as Fallout 3 uses the same baddies everywhere but uses spawn template you place in the world to adjust them to be more unique. Also Oblivion could spawn lots of baddies but Fallout 3 needs you to place 1 baddy spawn template per baddy you want to appear.

Effectively, Fallout 3 is a very stage managed game with Encounter Zones rather than randomly spawning regions. Where as Oblivion would keep working for ever. Fallout 3 will eventually end when you have done everything leaving nothing but minor encounters to deal with.

So unlike Oblivion where you could update the whole game world by editing the lists, Fallout 3 needs you to revamp the Encounter Zones so they offer more respawning action and there are 2 ways to do that.

1) Edit the existing zones spawn templates directly which is easiest thing to do and horribly incompatible with other mods.

2) Use this tutorial to add extra spawn templates that keep on working over and over and script them to appear after each original Encounter Zone completed its original task. A harder job but a vastly more compatible way to upgrade the game. These Encounter Zones can be upgraded individually which is good because 1 mod upgrading them all at once might not be such a good idea if you want to use other mods in your game.

I dare say the quick fix brigade will go for option 1 but you Stage Managers amongst out to put on a show for the players you will now blow them away completely by using option 2. Think of a DCWorld, leave it all intact, add your own stuff to it so it repeats and bingo, the Lincon memorial gets attacked every few days by Slavers. You can do it easily by disabling your spawns until the Slaves quest is done, then enable it after that point. That is the safe, compatible way to trigger Encounter Zone Upgrades in Fallout 3.

The Tutorial Starts Here

Standard respawnable Creatures and NPCS.

The standard method of adding a respawning spawn template to Fallout 3 is to go in to the Object window, find Actors and then select something from the NPC or Creature menu and drag and drop Creature Template, NPC Template or List Template in to the world. You can drop a real NPC or Creature in this way or one of the NPC Lists or Creature Lists (spawn templates that use lists of baddies to spawn instead if 1 bad guy). Either will work but both work slightly differently and produce slightly different results.

First, I must explain the difference between placing an NPC spawn template and placing a Lvl list spawn template in to the game world to you, this applies to creatures and NPCS equally btw.

Select Creature under the Actors menu in the Object window and scroll down the list on the right until you find LvlSupermutantGun. That is a list of Super Mutants with Guns to use, the Lvl list spawn template I mentioned above. These will always respawn no matter what the respawn tick box says on the actual creatures or NPCS it chooses to use.

Click on it and have a look. Notice the ActorBase says EncSuperMutantGun, that is the list of Super mutants to use which is found in the Leveled Creatures menu right below Creatures, if you want to make your own list, you must add it to the Leveled Creatures or Leveled Characters menu and select it from here.

If you click edit next to the Actor Base, you can see what the EncSuperMutantGun looks like. If you do, you will see VarSupermutant1Gun which is basically yet another list, click on those and you will finally see the real Supermutant creatures that it can choose from on the list.

I know it is long winded but it has some massive advantages over the old system so it is good long winded system. Trust me, I could explain it here but it really needs a dedicated tutorial so this is not the place. This is complicated already to explain.

So, to summerize..

To place a randomly chosen Creature or NPC like that LvlSupermutantGun in a cell, first find one of the Lvl entries in the Creature or NPC menu that you want to use and drag and drop that in to your CELL.....Job done.

To place a Real NPC or Real Creature directly, find a real Creature or NPC from the Creature or NPC menu e.g. CrSuperMutant1GunA, and drag and drop it in to the cell. Unlike the lists you drop in to the cells, these real creatures or NPCs will only respawn if they have their Respawn Tick box, ticked.

Also both methods only spawn 1 NPC or Creature, if you want 2 or more, you must place more NPCs or Creatures. This is how Fallout 3 works. Oblivion worked a different way and was more random. Also you can only shoot at 1 target at a time so its harder to take on multiple targets in Fallout 3 than it is in Oblivion.

Trigger Based Respawning.

Triggers: Generic Trigger

The movie at the top of this tutorial is a heavily scripted trigger which works more like a quest than a randomly spawning system you may have seen in Oblivion. This first trigger I am about to explain is still much simpler than that and can be used repeatedly in thousands of areas with very few changes. So it is ideal for you lazy modders out there keep to add new Encounter Zones quickly.

First scroll down to the World Objects menu in the Object Window. Select any trigger and double click to edit it. Change the ID to MyTrigger, now go to Script and select the three dots to open up the script editor. Select NEW from the script menu and then cut and base this next script in to your script window and save it as an Object. Look for the Script Type above the script it self, it is a selection box.

scn MyTriggerScript

short doOnce
ref myself
begin onTriggerEnter player

if doOnce != 1
set myself to getself
myself.disable
set doOnce to 1
endif

end

Now close the script window and okay the Trigger window and say yes to the Create new form question as normal, we do not want to edit the original do we folks.

Next find MyTrigger in the triggers list and reopen it, go to script and using the pull down selection box, find and select your script, it is named after the name on the first line of the script which is MyTriggerScript.

Once selected, okay the Trigger window again, it is now ready to use.

Find a cell you want to update and drag and drop your new trigger in to the worldspace or game cell. After placing it, double click on it so it's Reference window appears, under 3D Data you will see Scale, which should be set to 1.000 or something. Select it and change the scale to suite your needs (make it bigger or smaller). The box will change size once you close the Reference window. 2.0 is twice the size of 1.0, where as 0.5 is half the size of 1.0.

Next select either Creature or NPC and drag and drop them in to the world as described in "Standard respawnable Creatures and NPCS" section above. The type spawn template does not matter, but you should make sure they Real NPC spawn templates have respawn ticked if you want them to keep respawning. This time, double click the spawn template reference (anything you drop in the gaming world is called a REF or Reference btw, so in this case those spawn templates references look like a big M) you dropped in the cell or world space to open its Reference window and tick Persistent Reference and Initially Disabled. Now using the 2 black arrows below Edit Base, scroll the tabs until you see Enable Parent, select it and then click the SELECT REFERENCE IN RENDER WINDOW and click on the Trigger Box you placed earlier so it lists your trigger as the monsters/npcs parent reference. Finally tick "Set Enable State to Opposite of Parent" and okay everything to close all windows. This means when the trigger is disabled, the monsters or npcs become enabled and appear in the game.

You now have a trigger that will enable 1 spawn point when the player enters it, that spawn point will remain active for the rest of the game, spawning new creatures every 4 days as normal. It is a simple trigger but demonstrates how it works, better scripting on the trigger it self will make it do even more.

Triggers: Scripted Triggers.

The other way to make a Trigger work is via a script, you can do this via quests if via object scripts and these give you greater control over what spawns and when. Here we will look at a simple Object Script method since this tutorial is not about Quests even if the system used is right out of the Quest makers hand book.

This time we need to place the Creatures and NPCs spawn template references first and name them. So drag and drop any Creatures or NPCs you need in to your worldspace or cell. Double Click on each after you place them and tick Persistent Reference and Initially Disabled just as you did above. This time in the Reference Editor ID box, give it a name and write that name down somewhere. I will call mine BobRef. Now Okay it. Name any others you placed too in the same way and write down their names too.

Now scroll down to the World Objects menu in the Object Window. Select any trigger and double click to edit it. Change the ID to MyTrigger2 so we still have our first example if you want to use it later. Now go to Script and select the three dots to open up the script editor. Select NEW from the script menu and then cut and paste this next script in to your script window and save it as an Object. Look for the Script Type above the script it self, its a selection box.

scn ztesttrigger2script

begin onTriggerEnter player
BobRef.enable
end

All this does is enable a NAMED Spawn Reference called BobRef. If you named yours differently, just replace BobRef with the name of the reference you wrote down earlier, add any others you made after that. The names must match exactly, finally add ".enable" after it and your done. You can also add ".disable" to disable a spawn template reference that is already in the game and working this way too. Any NPCs or Monsters spawned by a marker you disable will vanish when the marker is disabled.

That is your done, you now have a scripted trigger.

Fun with Scripted Triggers.

You can edit the basic script above to run only when certain quests have been completed, thus preventing extra spawn points from appearing until the player reaches a specific stage of the game. You can even make your own city and spawn friendly citizens after the player completes one of your quests or use the trigger to remove bad guys from a house after you have completed a capture building quest. It all works the same way and if you learn how to script, you can do some amazing things with this system.

Last Updated on Tuesday, 06 October 2009 23:45
 

This is the end...my friend.

Copyright © 2010 The Engineering Guild. All Rights Reserved.
Joomla! is Free Software released under the GNU/GPL License.