SKYRIM
Fight or fly by kuertee
Skyrim » Combat
Added: 15/04/2012 - 02:27PM
Updated: 30/11/2014 - 02:17PM

803 Endorsements

0.806 Latest version

25,418 Unique D/Ls

34,827 Total D/Ls

156,405 Total Views

Uploaded by kuertee

Description

Last updated at 14:17, 30 Nov 2014 Uploaded at 14:27, 15 Apr 2012

Fight or fly



Version: 0.806
Date: 30 November 2014
Author: kuertee
Source: http://skyrim.nexusmods.com/mods/15223
Requirements:

* Skyrim 1.9
* Skyrim Script Extender http://skse.silverlock.org/



Note that a copy of this document exists in the Skyrim\Data\Docs folder.



Short description

Actors will flee when they start to lose a fight. You can loot NPCs that
yielded by conversing with them.



Updates since last release (0.804)

0.806, 30 November 2014:

* New feature: Added blood-thirsty fueds between The Companions and
Silver Hand factions. Previously, blood-thirsty fueds in regards to the
Silver Hand faction were only against the player and their teammates
ONLY if the player is a werewolf.
* Bug fix: Some of the quest-critical NPCs listed in the "Gameplay
changes" section were getting processed. They shouldn't.
* Bug fix: After looting a surrendered actor, their items were getting
replenished.
* Bug fix: MCM - sometimes the MCM data was not getting re-initialised
between version updates. You may need to reset the mod via the console
(i.e. with "setpqv kuFOF2Q resetNow 1") if you find the MCM
unresponsive.



Updating

1. Simply deactivate and uninstall the previous version then install
and activate this version. Note that you do not need to stop the mod
in-game. If you do, you will lose your accumulated mod-specific data.
Let the new version back-up the data of its old version, clean-up the
old data (i.e. zero-out) by stopping itself, restart itself and
restore the data of the old version.
2. If you have Sky UI's MCM, you can check the settings in Sky UI's
MCM wihtin the game.
3. Or check the settings in "Data\Ini\kuerteeFightOrFly.ini". If you
change any of it, execute your changes by typing {bat
"ini\kuerteeFightOrFly.ini"} (without the brackets) in the console.
4. After the update is finished, the message "kuFOF v0.805" will
appear.



Gameplay changes

Actors will flee when they start to lose a fight. You can loot NPCs that
yielded by conversing with them.

Dragons, the undead (except vampires), summoned creatures and automatons
never yield.

Detailed below is how the mod behaves during some quests.

Note that some quest targets (mainly Bounty targets and repeatable
Radiant quest targets) will complete the associated quest when their
targets yield.

Quest Mod behaviour
Ill Met by Moonlight (DA05), The Mind of Madness (DA15), Waking Nightmare
(DA16) All effects of Fight or Fly are disabled.
Bounty: Bandit Boss (BQ01), Bounty: Forwsworn (BQ02), Bounty: Giant
(BQ03), Animal Extermination (CR01, CR02), Trouble in Skyrim (CR05),
Striking the heart (CR08), during brawling (DGIntimidateQuest), Revenge,
Hired Thugs (WIKill06) The targets for these quests will not surrender if
the appropriate userNPCBountyTargetsFlee, userGiantBountyTargetsFlee,
userCreatureBountyTargetsFlee is False. They will need to be killed.
However, if the relevant setting is True, the targets will surrender and
the relevant Quest will complete when they surrender.
Proving Honor (C01), Escaped Criminal (CR07), Rescue Mission (CR08),
start of Forsworn Conspiracy (MS01GuardAmbushQuest), Blood on Ice (MS11) Th
e targets for these quests will never surrender.



Details

The mod classifies all actors as one of three types: (1) combatants, (2)
ignored by the mod and (3) those that have surrendered. Each
classification can hold 30 actors. When full, new actors are added at the
start of the list, removing those that previously occupied them. This
lists are actually Quest Aliases. When actors move 5000 distant away from
the player, they are also removed from the list. Actors that were removed
from the list lose all of the mods effects on them - i.e. those who have
surrendered will stop running away and regain the default game's AI.
Also, actors that were removed from the list can be "found" and
reclassified again by the mod.

When the mod first finds an actor, they are added to either the
combatants or the ignored list.

Those in the ignored list will act with their default Skyrim AI. The mod
does not add any of its behaviours to these actors.

Those in the combatant list may yield when their health drops 25% below
their combat target's health. Combatants with ranged weapons will yield
when their health drops below 12% their combat target's health if they
are 750 distant from their target. Otherwise they will yield at 25% or
lower health. Note that each actor remembers the last highest damage they
received and takes this into consideration when determining whether they
should flee.

Some actors may fight to the death. This is determined by a random chance
that is dependent on their left-over health and their confidence. An
actor's chance of fighting to the death is: left-over health / base
health * confidence / 4 * userFightToDeathChanceFactor. By default
userFightToDeathChanceFactor is 1. You can increase the chances of an
actor fighting to the death by increasing this number.

Actors who go into their bleed-out state will yield after their bleed-out
animation is finished. At this time, they will run away from you but they
won't be activatble (i.e. you cannot converse with them) for 5 seconds.
This is Skyrim's default flee behaviour. After 5 seconds, they will
become activatable even if they still run away from. This is the mod's
own "flee" behaviour.

When an actor yields, they are removed from the combatants list and added
to the surrendered list.

When actors first yield, their Confidence is set to 0 and their
Aggression is set to 1. Deer and other non-aggressive animals have this
settings. This is how they get their flight behaviour. While in this
behaviour, you cannot activate them. (In my tests in Skyrim, from
literature about the Oblivion AI engine, and from experience with my
Oblivion mod, NPCs Yield, Confidence is the determining factor for
Skyrim's default fleeing behaviour. When actors first go into combat the
game checks the actor's Confidence. If low, then the actor will not
engage in combat and will instead flee. However, this behaviour is
triggred only when they go into combat. Hence, an Aggression of 1 is
required. If 0, then the actor will never enter combat and so their flee
behaviour is not triggered. Also during this flee behaviour, the default
game prevents you from activating the actor.)

Five seconds after they first yield, the mod sets their Confidence to 1
and their Aggression and Assistance to 0. Their Confidence at 1 prevents
them from trigerring Skyrim's default flee behaviour described above. And
Aggression and Assistance both at 0 prevents them engaging in combat. The
behaviour of running away from their attacker is from my custom Package
AI that is applied to them.

Actors who have targeted the player and who have not received damage but
have their health already at 25% or less than the player's will also be
put in the surrendered list. But only temporarily. With their Confidence
at 0 and Aggression at 1, they will get Skyrim's default fleeing
behaviour. This behaviour includes actors fleeing towards their closest
friends. This is called "grouping" in this mod. Grouping actors will
delay their true yielding behaviour for 30 seconds. If the player gets
busy with another meleer combatant (i.e. gets attacked by another actor
in melee), grouping actors will rejoin the fight (i.e. will be removed
from the surrendered list and readded into the combatants list). You can
turn off this behaviour by setting userCreaturesGroup and/or
userNPCsGroup to False.

Actors who have targeted another actor who is not the player and who have
their health already at 25% or less than their opponents will always
yield immediately because userYieldBeforeDamage is set to True by
default. Set this to False so that only actors with damaged health will
flee.

Teammates (i.e. actors with IsPlayerTeammate () as True which includes
owned horses) will yield and run away, as described above, in the first
five seconds of their surrender. After this, their Confidence, Aggression
and Assistance and all other effects of the mod are removed from them.
They are readded to the combatants list for the mod to track their health
for the possibility for their next yield.

As mentioned above, when actors are removed from any of the lists, all
the mod's effects are removed from them. This includes the restoration of
their original Confidence, Aggression and Assistance. Actors are removed
from the lists when (1) they die, (2) they move away from the player 5000
distant.



Protect from first death

When userProtectAllFromFirstDeath is True, actors are protected from
their "first" death. They truly die on their "second" death.

When damage is high, actors with low base health may die before they have
a chance to flee. Without this feature, there is no way to stop an attack
other than to kill. With this feature, fighting becomes more about
stopping the fight and less about killing.

Actors who decide to fight to the death are not protected with this
feature.

Note that actors will still try to flee before they die with this feature.

There are two methods this feature is implemented.

Protect from first death - method 0

If userProtectAllFromFirstDeath is True and
userProtectAllFromFirstDeathMethod is 0, those that yield will be put
into their bleed-out state. They are protected from death while they are
in the combatants list (i.e. during the entire time of them being in
combat). After their bleed-out state (i.e. when they are put into the
surredenred list), they are no longer protected and can be killed. With
userProtectAllFromFirstDeath set as True, you can role-play a true
good-aligned character. You don't have to "pull your punches" waiting for
your opponents to yield.

Note that since method 1 has been developed, method 0 may now be buggy. I
did try to keep the two separate, so method 0 may not be buggy. I just
don't know because I've not played with method 0 since method 1.

Protect from first death - method 1

If userProtectAllFromFirstDeath is True and
userProtectAllFromFirstDeathMethod is 1, those that die before they had a
chance to flee are simply "knocked out". They will be revived after the
value of userResurrectAfterSeconds in seconds. You can loot them while
they are knocked out. If they die or are killed after they are reived,
they will truly die.

If a quest is updated close to the time they are "knocked out", they are
likely to be a quest "kill" target and they have actually died. They
won't be revived.



Blood-thirsty fueds

Actors in these fights will never yield:

Silverhand Faction v player and teammates if player is a werewolf
Vigilants of Stendarrs v vampires and werewolves
Dawnguard Faction v vampires
Cultist Faction v player and teammates



Configuration

You can configure this mod with SkyUI's MCM or in the Console by typing
"SetPQV kuFOF2Q {mod data} {value}". Below are the various mod data that
you can change, their default values and a short description of their
effects.

userCreaturesFlee True
Creatures are actors with the ActorTypeCreature Keyword.

userEssentialsFlee True
Essentials are actors who cannot be killed.

userLastRiddenHorseFlees True
If False, your horse will not Flee. If True, after their flee behaviour
is finished, your horse will return to the fight.

userPlayerTeammatesFlee True
If False, your teammates will not Flee. If True, after their flee
behaviour is finished, your teammates will return to the fight.

userUniquesFlee True
Uniques are actors who have been tagged as unique.

userVampiresFlee True
Vampires are sentient undeads and so will flee. Set you False if you like
your vampires to be mindless undead.

userNPCBountyTargetsFlee True
userGiantBountyTargetsFlee True
userCreatureBountyTargetsFlee True
When True, the mission completes when the bounty target flees. Not all
quest targets are affected by this. A list of Quest targets and how they
behave are described in the read-me.

userYieldBeforeDamage False
When True, actors may fly before they are hurt.

userFightToDeathChanceFactor 1
userCreaturesMayFightToDeath False
userNPCsMayFightToDeath True
The chance for an actor to fight to their death is health / base health *
confidence / 4 * userFightToDeathChanceFactor. 0 = never fight to the
death.

userCreaturesGroup True
userNPCsGroup True
Grouping prevents the actor from engaging the player unless the player is
busy with at least 1 melee opponent.

userProtectAllFromFirstDeath True
All actors who may fly are protected from death until they surrender.
They may be killed when they surrender - unless they are tagged as
essential by a Quest or another mod.

userProtectAllFromFirstDeathMethod 1
Method 1 is now always set when you set userProtectAllFromFirstDeath to
True.
Method 0 is obsolete and may be buggy. Or it may not. I just don't know
because I've not had that set since developing Method 1.

userResurrectAfterSeconds 1
When userProtectAllFromFirstDeathMethod = 1, this is the number of
seconds the actor stays dead before resurrection. Note that the actual
time is determined by when the mod receives its allocated CPU time from
the engine. And the actual time before resurrection may be longer than
this value.

userApplyToRunTimeCreatedActorsOnly True
Applies to run-time created actors only. This prevents actors that were
hand-placed (which are likely quest-critical) in the Creation Kit from
fleeing. A value of True lessens the number of actors who receives the
fight-or-fly AI. However, less quests will stall when an NPC who should
die doesn't. Run-time created actors have an id that starts with "FF".

userNonCombatClassAlwaysFlee True
Actors with a non-combat class always fly. If False, the value of
userApplyToRunTimeCreatedActorsOnly may prevent these actors from getting
the AI.

userAnimalsYieldBeforeDamage True
When True, animals may fly before they are hurt.

userOnlyPlayerCombatantsFlee False
When True, only combatants against you and your teammates flee. All other
combatants don't.

userUseActivateLootButton True
userUseActivateLootButtonWhen true, a 'Give me...' button is presented
when you activate a yielded actor. It's much faster than going into the
Dialogue Menu.

A configuration file (data\ini\kuerteeFightOrFly.ini) is provided with
the relevant console commands. If you want to change any of the default
values above, change them in the INI file then run the file by typing
{bat "ini\kuerteeFightOrFly.ini"} (without the brackets) in the console.
You only need to do this when you want to change the values of the
property. Your changes will be saved in your game.

Also, when configuring with the INI file, you'll need to run this INI
file after Stage 5 of the main Quest. This is after the prologue - after
you leave the cave under Helgen. Or after leaving the hut of Arthmoor's
Live Another Life.



Install

1. Use Wrye Bash
(http://skyrim.nexusmods.com/downloads/file.php?id=1840) to install
this mod. Just drag the package (which is a normal ZIP file) into Wrye
Bash's Installers tab. However, the package is only a normal ZIP file,
so if you know the game's mod file structure, install it manually.
2. For compatibility with Paradise Halls, download the package for and
install "kuerteeFightOrFly ParadiseHalls.esp" after
"kuerteeFightOrFly.esp" in your load-order.
3. Change your settings within the game in Sky UI's MCM or check the
settings in "Data\Ini\". If you change any of it, execute your changes
by typing in the console {bat "ini\kuerteeFightOrFly.ini"} without the
brackets.
4. Activate the mod.



Uninstall

1. In the console, type "SetPQV kuFOF2Q uninstallNow True." Or with
Sky UI's MCM, set the uninstallNow toggle to True then exit the menus.
2. Wait for a message confirming the uninstallation. Save the game.
3. Deactivate the mod with Wrye Bash. If you installed this manually,
simply delete all the files you installed. (Wrye Bash keeps track of
files used, so installing/uninstalling the mod with it is 100%
simpler.)
4. Don't forget to also deactivate "kuerteeFightOrFly
ParadiseHalls.esp" and uninstall its package.



Troubleshooting

* You can reset the mod by typing {SetPQV kuFOF2Q resetNow True}
(without the brackets) in the console. Or with Sky UI's MCM, set the
resetNow toggle to True then exit the menus.
* When it resets it will ask you either reset all of its data or
continue with the current data. Resetting all its data will remove all
your configurations and set the mod as if you have first installed it.
* You can check all the mod's data by typing {SQV kuFOF2Q} in the
console. You can check if your configurations were set in the mod
properly with this.
* If you find that your changes (with the command SetPQV or from
executing the INI) do not appear in the mod, check the command again
for spelling errors. Then try again.
* If you find that resetting (with resetNow) and uninstalling (with
uninstallNow) don't seem to work, the mod may have been suspended. It
is best to simply start-over (i.e. reinstall the mod) after a "clean"
save.



Creating a clean save:

1. If you can, uninstall the mod from the console with {SetPQV kuFOF2Q
uninstallNow True} or by setting uninstallNow to True in the MCM then
exiting the MCM.
2. Wait for the mod to confirm the uninstallation. It may take a
minute. If no confirmation appears, then simply continue to the next
step.
3. Save the game manually from the console by typing {save
uninstalledMod}.
4. Uninstall all the mod's files (*.ESP, *.PSC, *.PEX) from the game
folders. Make sure that none of the mod's Scripts are left. A mod
manager like Wrye is best used for this.
5. Load the "uninstalledMod" save.
6. Save the game manually again from the console by typing {save
cleanSave}. Because all of the mod's files were removed, all of its
data will be "zeroed" in this game.
7. Play from this game.



Starting from a downloaded saved-game

(Thanks to Restutitor Orbis for this suggestion on how to jump-start my
mods when playing from a downloaded saved game.)

"Starting another character from a DLed saved game file in Helgen, I came
upon an easier solution than warping into the LAL prison cell.
If you have LAL but are starting a character in Helgen, just use a bat
file with these 2 console commands or just type them in after the ~:
setstage arthlalstartquest10
setstage arthlalstartquest20
This ends the LAL quest and re-enables the MQ101 update that you are
supposed to get when you complete your escape, but was initially disabled
by LAL.
That way you can do the vanilla MQ without switching to the LAL beginning
if you want to."
-Restutitor Orbis



Script logging

* As a last resort, you can also enable script logging and investigate
the "Documents\My Games\Skyrim\Logs\Script\Papyrus.0.log" file and/or
send them to me. Contact me first either on TESNexus or the official
Bethesda forums.
* To enable script logging, set bEnableLogging, bEnableTrace and
bLoadDebugInformation in the Skyrim.INI file. More information about
this is in this thread in the official Bethesda Creation Kit Forum:
http://forums.bethsoft.com/topic/1345130-having-papyrus-trouble-here-are-
some-things-to-try/.
* Then you can set the mod's specific log operations by setting
debugMode to 1 in its MCM.
* Play the game for 5 minutes or so - enough time for the game to
capture enough events.
* If your logs contain "Suspended stack count is over our warning
threshold, dumping stacks:", then your game is suffering badly. I've
written a guide on how to clean your game and recover from it in
Bethesda's official forums:
http://forums.bethsoft.com/topic/1481687-suspended-stack-count-is-over-ou
r-warning-threshold/.
* Then send the the "Documents\My
Games\Skyrim\Logs\Script\Papyrus.0.log", "Documents\My
Games\Skyrim\Logs\Script\User\kuFOF2Qs.0.log" to kuertee@gmail.com.



History

0.804, 20 April 2014:

* Bug fix: The soul-trapped detection is now detected by checking the
player's Soul Trapped General Statistics. If an actor dies very near
the time that is updated, it's likely that they were soul trapped. This
is not as accurate as checking the actor itself. But that method causes
the problem described below.
* Bug fix: The soul-trapped detection in the last update was causing
the Dumping Suspended Stacks problem. If you find that the mod doesn't
update by itself when installing this new version, your game may be
suffering from this problem. Restart from a clean save. Force it, if
required. Details in this document.
* Bug fix: When playing with the "protect from first death" option,
actors were still getting revived near the time a quest is updated.
This shouldn't happen.

0.803, 10 April 2014:

* Bug fix: Passive animals, like foxes, that should be ignored were
getting processed as if they were fliers. That's the reason why they
were getting aggressive before being calmed. Fixed now.
* Tweak: Followers are considered as vampires or werewolves if the
player is a vampire or werewolf for the blood-thirsty fueds check.
* Bug fix: When moving between "load spaces", combatants were losing
their status - causing them to re-attack you again when you return to
their area. Their status should be retained for a day, before their
status is cleared.
* Bug fix: Soul trapped actors will not get resurrected when "protect
from first death" is on.
* Bug fix: Reanimated actors will not get resurrected or receive the
yielded behaviour.
* Bug fix: Head gear are lootable from those who yielded.

0.802, 30 March 2014:

* Tweak: All actors that are not followers are removed from the list
when moving between "load doors". This should prevent the mod from
processing actors that will be removed from active memory when loading
finishes. This should lessen the times when the mod stalls.
* New feature: When userUseActivateLootButton is set, a "Give me..."
button is presented when you activate a yielded actor. It's much faster
than going into the Dialogue Menu.
* Tweak: Moving between aliases generally slowed down the script
engine. In this version, actors who start out as combatants will not be
moved into a flier alias when they group or yield. Instead, the
grouping and yielding functions will run on their combatant alias. This
makes for a much fluid operation of the mod. Note that actors may still
start out as a flier (e.g. non-combat class actors) or as an ignored
(e.g. those with their confidence at 0).
* Tweak: Actors you leave when moving between "load doors" will retain
their status for one game day. This will make actors left behind in an
exterior cell retain their yielded status you when you re-exit the
interior cell.
* Bug fixes: Many bug fixes in regards to the timing of different
Events processed in the mod. With Scripts all running asynchronously,
and Events able to run a process even if it conflicts with another that
is already running, a lot of work has gone into the code to streamline
these processes so that no Events do not interfere with others.
However, the code contained bugs, of course. This version much better
compared to previous versions. E.g. actors shouldn't be classified as
both combatant and flier - which sometimes happened in previous
versions.
* Bug fixes: Many bug fixes in regards to the "protect from first
death" feature. E.g. actors shouldn't return to combat after
resurrection - unless their native Script (which I have no control
over) makes them so.
* Tweak: When an actor dies (or "truly" dies when the "protect from
first death" feature is enabled), any actors that yielded to them are
returned as combatants. This will make, for e.g., soldiers that yielded
return as combatants after you killed those they surrendered to.
* Tweak: Mode 0 of the "protect all from first death" feature is now
disabled. When that feature is set, mode 1 will always be active.
* Tweak: Run-time created actors will run away from you even if they
yielded to another actor who is not your teammate. Previously, they
were not "fearful" of you because they yielded to another actor. They
didn't really do anything when you activated them, so the behaviour
felt weird. They run away from you in this version. A much better
behaviour.
* Tweak: Flee behaviour. Actors who have yielded to you or a teammate
will now voice their surrender and jog away from you. Previously, they
simply jogged away.
* Tweak: Animals that you loot will not be resurrected.
* Tweak: Player enemies that are allowed to yield before damage
(userYieldBeforeDamage and userAnimalsYieldBeforeDamage in the MCM),
will immediately be classified as a flier if their health is less than
25% the player's. Previously, the mod waited for the actors to enter
combat and evaluate their AI with their combatant. Most times, this
occurs too late and you'll notice, for e.g., wolves attacking the
player even if they have no chance of surviving.
* Tweak: Removed trainers to Alteration, trainers to armours and
trainers to Enchanting from non-combat class designations.
* Bug fix: Add ActorTypePrisoner to non-combatant list. The PrisonerJob
was in the list but I noticed that prisoners being led off by the
soldiers were still engaging in combat. I'm assuming that they do not
have the Prisoner class in their base record. I'm also assuming that
they are tagged with the ActorTypePrisoner in their base record.
* Bug fix: Looting of worn gear from the "Give me..." dialogue option
is now allowed.
* Bug fix: After resurrection, some actors were getting left disabled.
* Bug fix: The "Give me..." dialogue option was disappearing from
yielded actors a few seconds after they yield.
* Bug fix: Vampire check on player was failing.
* Bug fix: Sometimes, the check for bloodthirsty fueds wasn't working.
It was being overidden by the "resurrect" function. Fixed now.

0.801, 9 February 2014:

* Bug fix: Better detection of invalid actors (i.e. actors not in
active memory). Previously, some invalid actors were not getting
removed from aliases.
* Bug fix: The resurrection code was getting triggered twice on actors
that die before the mod initialises their combatant data.
* Tweak: Some actors were still getting resurrected even if they died
soon after a quest status is updated. Increased the time buffer from 5
seconds to 10 before and after a quest status is updated when no actor
is resurrected.

0.8, 23 January 2014:

* Bug fix: Decapitated actors are no longer resurrected.
* Bug fix: After fleeing, the actor was reacquired as a new combatant,
putting them in a combatant-flier loop until either they die or the mod
stopped reacquiring them.
* Bug fix: The userProtectAllFromFirstDeath is now forced as default
which can be changed by you after this version. The previous version
was picking up the value from the previous version which was 0.
* Bug fix: Blood thirsty feuds now include: Cultists vs the player's
team, and Vigilants of Stendarr v the player's team while the player is
in werewolf form.

0.713, 31 December 2013:

* New feature: Protect from first death method 1: no combatants are
added to the Essentials lists with this method. Instead, combatants are
resurrected when no quest completion is triggered and after a number of
seconds has passed. On resurrection, you'll see the actor "blink" out
then back in. This is intended. Otherwise, you'll see their clothes
"blink" out then in as the mod "fixes" their inventory. Resurrected
actors get their inventory reset. Items you looted while they are
"dead" (or knocked out), will reappear. The mod "fixes" their inventory
"off screen" to ensure that their inventory is as it should. This is
now the default. Set userProtectAllFromFirstDeathMethod to 0 to
re-enable the previous method of making combatants "Essential" actors.
* New feature: When userProtectAllFromFirstDeathMethod = 1,
userResurrectAfterSeconds (default 1 second) is the number of seconds
the actor stays dead before resurrection.
* New feature: When userApplyToRunTimeCreatedActorsOnly = True (the
default), the AI is applied to run-time created actors only. This
prevents actors that were hand-placed (and may be quest-critical) in
the Creation Kit from fleeing. A value of True lessens the number of
actors who receives the fight-or-fly AI. However, less quests will
stall when an NPC who should die doesn't. Run-time created actors have
an id that starts with "FF".
* New feature: When userNonCombatClassAlwaysFlee = True (the default),
actors that don't have a combat class will never fight and will always
fly. Set userNotCombatClassAlwaysFlee to False so that they enter
combat and fight and fly as normal. Note, however, that most townsfolks
are hand-placed in the CK and the value of
userApplyToRunTimeCreatedActorsOnly may prevent them from getting the
AI.
* New feature: userAnimalsYieldBeforeDamage = True (the default). When
True, animals may fly before they are hurt.
* New feature: userOnlyPlayerCombatantsFlee = False (the default). When
True, only combatants against you and your teammates flee. All other
combatants don't.
* Bug fix: Sometimes actors would fight to the death even if they
shouldn't.

0.705, 22 October 2013:

* Tweak: Previously, the MCM checking if the mod has been suspended
waited for the ping-back only 60 seconds. This is sometimes not enough
time - causing the MCM to report that the mod was not found. In this
version, the MCM allows the mod to return its "ping" in 5 minutes.
That's an excessive amount of time for this function. However, the mod
not being able to ping the MCM back within that time suggests that the
mod has truly stalled. It may need to be restarted from a clean-save.

0.704, 28 July 2013:

* Tweak: Animals were ignoring the "userYieldBeforeDamage" option since
the last couple of versions.

0.703, 10 July 2013:

* Tweak: The giant that the Companions are attacking when you first
entering Whiterun will never flee.
* Bug fix: Previously, creatures that were not animals (e.g. Falmer,
Reiklings, etc.) were getting classed as "magical creatures". In this
version magical creatures are now classed with IsCommandedActor (),
HasKeyword (MagicNoReanimate) or HasKeyword (NoSoulTrap).
* Tweak: Only 5 actors at a time are added to the list (of 30)
combatants - this decreases the length of time the mod is "busy" while
it classifies and adds the actors into their correct aliases.
* Tweak: You can now change user settings before the main quest is at
stage 5 (e.g. before leaving Helgen).
* Bug fix: Fixes to the MCM's ping-back code. This will be the last
time this bug will resurface - I hope. I found another instance when
the RegisterForModEvent () for the ping-back is not registered or loses
its registration in the previous version.

0.701, 30 June 2013:

* New feature: "Get away from here!" dialogue option. When selected,
the NPC will move away from the area. When the NPC gets beyond 10000
units distance away from the player, they are killed (without affecting
the player's kill-stat) and removed from the game. Note that, because
it cannot be done yet, there is no check whether the NPC holds a quest
object or not. So use this only when you're sure it is safe to do so.
* Tweak: Those who surrendered now speak the generic "I surrendered"
voice files when you converse with them.
* Tweak: When determining whether animals will fight to the death, half
of their Confidence is used - rather than all of it. This should make
those with a Confidence of 4 (e.g. wolves) flee from (or not even
engage) high-level prey - similar to earilier versions of this mod.
* Bug fix: Detection of vampire NPCs.
* New feature: Bloodthirsthy fueds: Vigilants of Stendarr and
Dawnguards will never surrender to Vampire NPCs. And vice-versa.
* Tweak: When playing with "protect from first death", you can now kill
actors who are in bleed-out mode. Previously, you cannot because they
are tagged as "essentials". In this version, they are still tagged as
essentials but the mod detects hits that they receive. Hits from the
player received during this time will kill them. However, there is
still a delay between when you strike them and when they die. They will
die just not immediately after you hit them. This is purely because the
command KillEssential () doesn't seem to work. So my mod has to move
them out of the essentials list first before my mod can force the Kill
() function on them.
* Tweak: Changed the way actors are found which should prevent them
getting reacquired as new combatants when they had already surrendered
and were getting moved into the fliers list of Aliases.
* Tweak: The main package and the MCM can now be merged manually (with
TES5Edit). Removing the reliance on GetFormFromFile () from the MCM
discovery code made this possible. In this new version, SendModEvent ()
is used by the main package and the MCM to "ping" each other.

0.683, 31 March 2013:

* Tweak: Recompiled with Skyrim's 1.9 patch and SkyUI's 3.4 patch.
* Bug fix: NPCs were getting classed as "magical creatures" causing
them to be ignored by the mod. This was a major bug that I missed after
releasing the last fix which addressed dwarven automatons. Thanks to
Elgar for finding and reporting it.

0.682, 3 March 2013:

* Bug fix: Dwarven automatons that don't have the ActorTypeDwarven
Keyword are getting affected by the mod - i.e. they are getting put in
the Essentials list and are fleeing. In this version, the mod also
checks against the DwarvenAutomatonFaction.

0.681, 21 February 2013:

* Bug fix: When using Protect from first death feature, ome combatants
stayed as an essential - making them unkillable. This was a previous
bug that I thought I fixed. Seems like I missed one more cause of it.
This latest fix should prevent this from happening. However, if it does
happen again, simply set userProtectAllFromFirstDeath to False and
report the bug, please.
* Bug fix: The default for userFightToDeathChanceFactor in the MCM was
incorrect at 2. Changed it to the correct value of 1.

0.680, 21 February 2013:

* New feature: This mod was rebuilt from scratch at v0.677, 24 January
2013. Read the Updating from v0.67 section for instructions on how to
update the mod from versions prior to 0.677. Those who installed the
pre-release version of 0.677, update as normal as described in the
Updating from v0.677 section.
* Bug-fix: The actors others surrendered to would sometimes be put in
the surrendered lists making them flee until a new actor replaces them
when that list is filled up and is restarted from the beginning.
* Bug-fix: Mages who are in bleed-out mode would be incorrectly
classified as unarmed combatant resulting in them not yielding. The
game doesn't register their spells as equipped while in bleed-out mode
while it does so for those with weapons.
* Bug-fix: Previously, vampires were getting ignored by the mod even
with userVampiresFlee set to True.
* Bug-fix: Only actors with full health will "group".
* Tweak: Better differentiation between creatures, giants, the undead
and vampires.
* Compatibility: When both Dawnguard and Arthmoor's When Vampire
Attacks mod are installed, the vampire raiding party never yields.
* Tweak: Actors who already have their Confidence at 0 will be ignored
by the mod. Confidence is the determining factor on whether an actor
engages in combat or flees. Most animals in the PreyFaction (e.g. deer,
rabbit, etc.) have Confidence at 0. Horses commanded to Flee from
combat (a feature from my Horse Command mod) have their Confidence at 0.
* Tweak: Removed the 5 seconds period when you can't converse with
actors that run away.
* Tweak: When userProtectAllFromFirstDeath is True, Actors who
bleed-out only has one iteration of the Script (about one or two
seconds) of being Essential. They are made killable soon after. In
v0.677, these Actors would be an Essential for 3 seconds or more which
sometimes amounted to 5 seconds - which is too long.

0.677, 24 January 2013:

* New feature: Rebuilt the mod from the ground up.
* New feature: userProtectAllFromFirstDeath: Default is True. All
actors who may fly are protected from death until they surrender. They
may be killed when they surrender - unless they are tagged as essential
by a Quest or another mod.
* New feature: userNPCBountyTargetsFlee, userGiantBountyTargetsFlee,
userCreatureBountyTargetsFlee: Default True for all. When True, the
mission completes when the bounty target flees. Not all quest targets
are affected by this. A list of Quest targets and how they behave are
described in this read-me.
* New feature: SkyUI's MCM (Mod Config Menu) support. The configuration
tool is a separate download from my mod's Nexus files section. It
requires Sky UI's beta 3 version or better which can be downloaded from
Sky UI's thread in Bethesda's official Skyrim mods forum:
http://forums.bethsoft.com/forum/183-skyrim-mods/

0.67, 21 Aug 2012:

* Compatibility: Further refined the tracking of actors so that the
closest actor is not pinged constantly. This was remnant of the same
bug that the previous version fixed but for multiple actors around the
player. Thanks to dubstyles for finding this bug.
* Compatibility: Disabled fleeing during the Forsword Conspiracy Quest
when you need to be imprisoned.
* New feature: By default unique and essential actors never flees.
Unique actors are those that have the "Is Unique" flag checked in the
CK. They are generally named actors. Essential actors are those that
are attached to a Quest Alias that have their "Is Essential" flag
checked in the CK. These actors do not die. In this version, you can
set it so that essential or unique actors do flee. Set
userEssentialFlees to True. And/or userUniqueFlees to True.
* New feature: You can disable this mod's effects on animals. Animals
are those in factions CreatureFaction and PredatorFaction or
PreyFaction. By default, animals are affected. You can turn this off by
setting userCreatureFlees to False. This is useful if you have a
wildlife mod that has its own behaviours for animals.

0.666, 10 July 2012:

* Compatibility: Increased the stages when the mod is disabled during
the DA16 Quest - Waking Nightmare. Previously, the mod was only
disabled during stage 50 - the library battle.
* Compatibility: Refined the tracking of actors so that they are not
pinged constantly. Constant pinging may have caused their idle
animation constantly repeat itself.
* Compatibility: The mod now ignores actors who are busy acting out a
scene. In previous versions, the scene would be affected and so will
never complete. An example of this bug is when Sinding in Falkreath
cell will never move towards the player to activate his Quest. In this
version, actors in a scene are ignored until they leave the scene.
* Bug-fix: Actors who bleedout (i.e. fall to their knees due to low
health) will now yield. Previously, the mod ignored them and so even if
they seem to yield, they actually have not. In this version, the mod
now applies its behaviours to these actors.
* Tweak: Some NPCs became aggressive again after you left them and then
returned through load doors. This version tweaks the code to minimise
this from happening. It still happens because the mod takes a second or
two to find the actors after going through load doors.
* Tweak: Applied WarriorWithin's fight-to-the-death formula that takes
into account the actor's Confidence for when userAlwaysYield is False.
* Tweak: Also, from WarriorWithin's suggestions, I've increased the
number of actors that will never yield. In this version actors with
these VoiceTypes are ignored by the mod: CrAtronachFlameVoice,
CrAtronachFrostVoice, CrAtronachStormVoice, CrDragonPriestVoice,
CrDragonVoice, CrDraugrVoice, CrDwarvenCenturionVoice,
CrDwarvenSphereVoice, CrDwarvenSpiderVoice, CrIceWraithVoice,
CrSkeletonVoice, CrUniqueAlduin, CrUniqueOdahviing,
CrUniquePaarthurnax, CrWerewolfVoice, FemaleUniqueGhost,
MaleUniqueGhost, MaleUniqueGhostSvaknir.

0.661, 19 June 2012:

* Compatibility bug-fixes: My previous checks to prevent the mod
running during the quests DA15 - The Mind of Madness and DA16 - Waking
Nightmare didn't really work. This should fix those.
* Compatibility tweak: Actors in an active Scene do not get the AI
until the Scene finishes.
* Tweak: Moved the IsUnique () and IsEssential () check to the Aliases
Conditions from the Script.

0.66, 11 June 2012:

* Tweak: "Action: Loot" dialogue option is now "Give me...".
* New feature: Group AI. In this version, low-level melee NPCs will
fall back and wait until you a high-level melee combatant attacks the
player or for 30 seconds. If a high-level melee combatant attacks the
player within 30 seconds, the low-level NPCs will join the fight.
Otherwise, they will flee after 30 seconds. In previous versions, their
fight or fly behaviours had a one-off check against the player being
busy with another melee combatant. However, this a one-off check and
they flew if the player wasn't busy. In this version, they will wait
for 30 seconds and fly if no melee combatant engages the player. Note
that this behaviour is the normal Flee Package. Generally, this will
make them run to a friendly Actor. This is not, however, always the
case.

0.65, 2 June 2012:

* Compatibility tweak: The mod is disabled during parts of DA15 - The
Mind of Madness quest and DA16 - Waking Nightmare.
* New feature: Change userAlwaysYield (default = True) to False to give
an actor a chance to fight to the death. The chance is the actor's
health/base health. You can change this chance by setting
userFightToDeathChanceFactor (default = 1). Read Details on how to set
these variables.
* New feature: Chance userYieldBeforeDamage (default = True) to False
to prevent actors from yielding before they get damaged. Read Details
on how to set this variable.
* Bug-fix: Dragons. There were bugs in the previous versions which made
dragons flee.

0.64, 27 May 2012:

* Tweak: Preventing yielded NPCs from attacking again. Previously,
there was a delay in applying the AI that prevents them from reentering
combat. In this version, the only delay happens when you go through a
"load door" and enter an area with actors who previously surrendered.
It may take a second for the Ai to be applied to these actors. This is
enough time for them to take a swing at you. After this delay, they
will acquire the behaviour and not attack again. I'm not sure if I can
remove this delay. I already reset the quest that applies the behaviour
(via alises) when the player loads a new area. The Skyrim game engine
will then apply the behaviours when the quest gets its alloted CPU time
slice - this is what causes this delay.
* Tweak: Followers (including your last ridden horse) who flee to you
will only return to combat immediately if they cannot die (i.e. they
are tagged as essential). Otherwise, they will continue to flee until
they are safe. Previously, if they are close to you, they will fight to
the death - resulting in their deaths.
* Tweak: This version uses GetRace () == DragonRace to prevent the mod
from applying the flee behaviours to dragons. Previously, only
IsInFaction (DragonFaction) was used. This version uses both.

0.63, 18 May 2012:

* Tweak: Folowers (including your last ridden horse) will attack again
IF they flee to you. Previously, they only attacked again after their
10 seconds of fleeing is over - even if you are nearby.
* Tweak: NPCs will not flee against those who have less than 25% of
their health. Thanks for the suggestion, Leeira!
* Tweak: NPCs that yielded to non-players will now act like those that
yielded to the player. Previously, they were different AI code. But the
behaviour for those that yielded to non-players didn't really work. In
this version, they will act as if they yielded to you. They will get
the Action: Loot dialogue option.
* Bug-fix: My previuos bug-fix for werewolves didn't really work. In
this version, no one will ever yield to a werewolf. It's not ideal but
it's the only way to keep the werewolves attacking. Some missions
(particularly C03: The Silver Hand and DA05: Ill Met By Moonlight)
required the werewolves to kill everyone. However, they only attack
those that are attacking them. So those that yielded to werewolves tend
to stay living and so prevented the mission from progressing. In this
version, actors attacking werewolves will never yield.

0.62, 18 May 2012:

* Bug-fix: Werewolves will ignore those who yield. This will make C03:
The Silver Hand and DA05: Ill Met By Moonlight compatible with this
mod. Thanks magodelaoscuridad for the heads up!

0.61, 13 May 2012:

* Bug-fix: Choosing Action: Loot from the dialogue menu was buggy in
the previous version. Fixed.

0.6, 13 May 2012:

* Tweak: Unlike in previous versions, actors who have surrendered will
not reenter combat and will run away from you. You can still converse
with them to loot them.
* Tweak: Surrender animations during conversations.
* Tweak: This mod doesn't bug-out the prologue mission anymore.
However, it doesn't actually start in-game until after you escape from
Helgen.

0.54, 23 April 2012:

* Tweak: Player's last ridden horse will reset their flight behaviour
preventing them from continually fleeing after combat.

0.53, 22 April 2012:

* Tweak: Newly reporgrammed. This mod doesn't need Actor events package
anymore.
* Tweak: Animation of surrendered NPCs when you loot them. There are no
recorded audio, so you may not see the subtitles unless you have
ShadeMe's Fuz Roh D'oh (universal silent voice file replacer):
http://www.skyrimnexus.com/downloads/file.php?id=14884. It needs SKSE.

0.52, 18 April 2012:

* Tweak: Enemies with health Tweak: Enemies with health < 25% of the
player's health flee immediately only if the player has no high-level
enemies. Basically, low-level enemies will engage in combat if another,
but is high-level, engages the player in combat. Previously, low-level
enemies flee immediately.
* Tweak: Also, low-level (base health Tweak: Also, low-level (base
health < 25% the player's) ranged enemies against the player will not
immediately flee if the player is engaged in melee combat with another.
* Bug-fix: NPCs who yield to other NPCs do not get the Action: Loot
dialogue option.

0.51, 17 April 2012:

* Bug-fix: Previously, teammates who have yielded will continually
yield even long after combat.
* Bug-fix: Previously, actors became aggressive after the player leaves
their area.

0.5, 15 April 2012:

* Initial release.



Credits

kuertee in http://www.bethsoft.com/bgsforums/



Tools Used

Creation kit - http://www.creationkit.com



Licensing/Legal

You can do whatever you want with this mod but all I ask in return is
that you give me credit. I would also like to be contacted when you
include this mod in part or in full in a public release.