The Elder Scrolls V: Skyrim

The Elder Scrolls V: Skyrim

360 ratings
Run For Your Lives
2
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
959.779 KB
3 Sep, 2021 @ 3:34pm
1 Change Note ( view )
You need DLC to use this item.

Subscribe to download
Run For Your Lives

Description
A small mod that makes citizens in a village or city run indoors during a dragon or vampire attack.

This was born out of frustration at seeing the citizens all trying to be a hero and rushing headlong to their doom attacking dragons. Instead, the citizens will run to safety like smart people should when faced with the horrors of giant flying fire breathing lizards. NPCs who live in the attack location who own a home there will retreat to it. If the attack location has an inn, NPCs who don't live there will flee to the inn, along with any NPCs who live outdoors. If no inn is present the game picks a random interior from the surrounding area and those NPCs will flee there instead.

This should work for any NPCs added by mods as well, up to a limit of 150 in the area. After that, they're on their own. The NPCs chosen are first come, first serve by the game engine.

Guards, members of The Companions, Vigilants of Stendarr, and the player's followers/teammates will not run, they will stand and fight. Farm animals will not run either, because they're stupid. That includes your horse.

Spawned dragons are detected via animation events, which should allow for completely reliable detection even if the dragon never lands on something.

Hand placed dragons are detected when their combat state changes* as well as when they land on any available perch objects in the area.

* [Only after they land on the ground]

My Patreon Page: https://www.patreon.com/arthmoor

Installation Requirements

Official Skyrim patch 1.9.32.0.8 or greater.
Official Dawnguard DLC.

Debug & Status MCM requires SKSE 1.7.1 (or higher) and SkyUI 4.1 (or higher) in order to use them.
These menus are not necessary for the mod to run if you don't have SKSE and SkyUI.

Uninstall

Remove the two files from the Data folder.

This mod has no continually updating scripts so the contamination of your save game will be minimal.

Known Issues

Detection of combat start events is inherently unreliable with dragons. Every effort has been made to ensure that when a dragon lands on the ground (yes, that has to happen before a combat detection can occur) that the quest to protect NPCs from dragons will run.

The new system can only manage up to 5 dragons in a single area through alias tracking. They should cycle out as dragons are killed and the survivors trigger new registrations, but this cannot be guaranteed.

Some NPCs may insist on entering combat with a dragon. Unfortunately Skyrim's AI system may not be entirely up to the task of making them follow the orders the mod is giving them. Efforts have been made to force NPCs to stop combat when the AI packs are running. Further efforts have been put in place to prevent bleedout NPCs who insist on being stupid from dying as a result. Please do not complain about NPCs who won't cooperate. I've done all I can here.

A bad navmesh in an attack location can severely impact the ability of NPCs to clear the area. If you see any getting stuck and acting like they can't move, this is probably why. If the area is modified, you'll need to take this up with the author(s) of the mod(s) affecting the area. If the area is NOT modified (ie: totally vanilla) then please report such events so that I can pass them along to the USKP tracker to investigate.

If an attack location has more than 150 NPCs to protect, only the first 150 will fill the quest aliases. After that, any leftovers are on their own and can still be killed! 150 NPC slots is enough to protect all of Solitude running Open Cities Skyrim with 60 slots left open. That ought to be more than enough. If it's not, there's nothing more I can do. Too many aliases in a quest leads to severe degradation in performance. I had to strike a balance somewhere.

The alias fill casts a very wide net, do not be surprised if you see Khajiit from the caravans come in to seek shelter from an attack, the carriage drivers, or other NPCs who commonly live outside of a major city and have no assigned interior homes.

Compatibility

Tested and confirmed to work in all vanilla cities, towns, villages, and smaller settlements.
Tested and confirmed to work with Raven Rock and the other smaller settlements on Solstheim.
Tested and confirmed to work with all DLC added dragon types.
Tested and confirmed to work with Open Cities Skyrim.
Tested and confirmed to work with Immersive Citizens - AI Overhaul.

Should be fully compatible with all user made dragon related mods, so long as the attacking dragon has MGRitual05DragonScript attached.

Mods which alter the following scripts will not be compatible without a patch:

MGRitual05DragonScript
DragonPerchScript

Dragons Diversified requires a patch due to replacing MGRitual05DragonScript with its own. The patch can be acquired here: https://www.nexusmods.com/skyrim/mods/50844

A Note About Immersive Citizens - AI Overhaul

Several people have asked over the last few months if this mod is still needed if they are using ICAO. The answer to that question is YES.

ICAO sets up its aliases at the moment it is installed into your game. If you later install more mods that add NPCs to population areas, like Interesting NPC, Inconsequential NPCs, Cutting Room Floor, or other similar mods, then ICAO will not protect those NPCs. The only way it's at all possible to account for doing so on a consistent basis is if the protection for the NPCs is triggered on demand at the time of the event. That is what Run For Your Lives does.

If someone advises you to uninstall RFYL because you're using ICAO - don't listen to them. The advice is uninformed at best.

Troubleshooting Problems

In order to debug any problems that may occur with the mod, some information is REQUIRED - without it, there's nothing I can do. Comments reporting problems with the mod will be ignored unless this information is supplied.

In order to make this slightly easier to gather, I've updated the package with a global debug toggle that will turn on the log messages on demand.

You will obviously need to make sure your ini file has the following section:

[Papyrus]
bEnableLogging=1
bEnableTrace=1
bLoadDebugInformation=1
bWarnOnFillAliasFailure=1
bShowEventHandlingOutput=1

Enable the mod's debug log:

In MCM

Open the menu for the mod, select options, enable the "Script Debugging" option, and then close the menu. This menu will also tell you if the quest is running too.

Without MCM

Open the console with the ~ key and type:

Set ARTHRFYLDebugGlobal to 1

The Log Files

Your Payrus logs will begin tracking any and all activity generated by the system. While playing, if you run into a problem (folks running inside for no apparent reason etc) then I will need the following from that play session:

1. A copy of "C:/Users/<USERNAME>/Documents/My Games/Skyrim/Logs/Script/Papyrus.0.log"
2. A copy of "C:/Users/<USERNAME>/Documents/My Games/Skyrim/Logs/Script/Script/AliasDump/AliasDump.0.log"

Archive these files and put them on something like DropBox, or paste the contents to Pastebin.com, then provide a link to where I can get these.

One thing - don't bother if you're one of those people who has altered your Papyrus memory settings. Any logs I see in which this has taken place will be dismissed. Altering those settings is bad for the game and leads to malfunctions in scripting that can cause all sorts of unwanted behavior. If you're not using default vanilla Papyrus memory settings, I don't want to hear from you.

Disclaimer

This mod is not made, guaranteed, or supported by Microsoft, Zenimax, Bethesda Game Studios, or any of their affiliates.