User:TechAngel85/Sandbox

From Step Mods | Change The Game


Short Description

Immersive Citizens - AI Overhaul is a script-free plugin for The Elder Scrolls V: Skyrim.

Its main objective is to greatly improve the Artificial Intelligence (AI) of friendly NPCs (citizens) present in Skyrim in order to make them act and react like true humans, thereby increasing in-game immersion.

Long Description

Introduction

[font=Times New Roman][size=3]
[center][size=6][b]Introduction[/b][/size][/center]
Immersive Citizens - AI Overhaul is a plugin whose main objective is to greatly improve the Artificial Intelligence (AI) of friendly NPCs (citizens) in order to make them act and react like true humans, thereby increasing in-game immersion. Concretely, this plugin deeply overhauls the AI used by the citizens when they are in a “standard state” and in a “combat state”. The “alert state” is left untouched. To explain, an NPC is in a “standard state” when he is unaware of a hostile, a “combat state” when he has detected a hostile, and an “alert state” when he is aware of a hostile but cannot locate it.

Combat State

[center][b][size=6]Description[/size][/b][/center]
[color=#6aa84f][b][size=6]Combat State[/size][/b][/color]

This is the first plugin to edit the root AI used by NPCs when they are in combat.

[color=#cc4125][size=5][b]Survival Instinct[/b][/size][/color]
Survival instinct gives almost all the citizens of Skyrim the ability to properly evaluate danger and respond to it appropriately while under attack. In short, if a citizen is attacked and has no chance of winning against his opponent, he'll run away inside a hideout.

Primarily four parameters determine whether or not a citizen has a chance of winning:
[list]
[*]the current level of the citizen
[*]the current health of the citizen
[*]the resistance of the citizen to physical damages (armor & armor spells)
[*]the level of the opponent
[/list]
The hideout is chosen randomly, and the number of hideouts citizens have access to depends on the size of the city in which they live. Hideouts can be a citizen's home, the local temple, the castle of the Jarl, a mine, the barracks, etc.

[color=#e69138][size=4][b]The basic rules[/b][/size][/color][/size][/font]
[list]
[*]If a citizen is attacked by an opponent who is 10 levels or more above them, the citizen will flee.
[*]If the citizen's health is lower than a specific percentage, they’ll run away. At the moment, I use 4 percentage thresholds: 50, 40, 30 and 20. These thresholds are assigned according to the citizen's resistance to physical damages. For example, a citizen wearing a cloth outfit will flee once his health goes under 50%, while a citizen wearing full heavy armor and a shield will only flee once his health dips below 20%.
[/list]
Additional Notes: 

[list]
[*]Your follower(s) won’t use the “Survival Instinct” feature.
[*]“Survival Instinct” will only be used by friendly and unique NPCs (citizens).
[*]Citizens will be able to properly evaluate danger regardless of the type of opponent (the player included) even if the opponent has been added by another plugin (Skyrim Immersive Creatures, Elemental Dragons, etc.).
[*]The citizens added by unofficial plugins (3DNPC, Inconsequential NPCs, etc) will also use the “Survival Instinct” feature.
[/list]
[color=#e69138][b]The special rules [/b][/color][/size]
On top of the rules cited above, special rules have been assigned to NPCs according to their personalities and their social rank. These rules have priority over the basic rules.

[color=#f9cb9c][b]Civilian:[/b][/color] The NPCs assigned in the civilian category never try to riposte when attacked. If they are attacked, they’ll flee and try to alert the guards. An NPC falls in this category if he meets the following requirements:
[list]
[*]is 10 levels inferior to the maximum level
[*]is unarmored
[*]is unarmed (a dagger doesn't count)
[/list]
[color=#f9cb9c][b]Strategist:[/b][/color] The NPCs assigned in the strategist category perform a tactical retreat for a few seconds once they lose half of their health. During this move, they'll keep their distance while healing themselves and refreshing their protective spells. Once they have finished temporizing, they go back to fight. An NPC falls in this category if he meets the following requirements:

[list]
[*]is a member of the College of Winterhold
[*]has a mana pool higher than 63
[/list]
[color=#f9cb9c][b]Cautious:[/b][/color] The NPCs categorized as cautious will flee when attacked by an impressive opponent, even if they have a higher level. Furthermore, these NPCs will flee any opponent who is more than 5 levels higher than them (instead of 10). For information, the following creatures are listed as being impressive: dragon, giant, giant spider and mammoth. An NPC is considered cautious if he meets any one of the following requirements:
[list]
[*][font=Times New Roman][size=3]is a member of the Thieves Guild[/size][/font]
[*][font=Times New Roman][size=3][font=Times New Roman][size=3]is a member of the Dark Brotherhood[/size][/font]
[*][font=Times New Roman][size=3]wears a cloth outfit (or is naked) and has no knowledge of protective spells[/size][/font]
[/list]
[font=Times New Roman][size=3][color=#f9cb9c][b]Fearless:[/b][/color] The NPCs falling in the fearless category fight to the death, regardless of their opponent, their health, and their chance of success. An NPC is considered fearless if he meets any one of the following requirements:[/size][/font]
[list]
[*][size=3][font=Times New Roman]is under the influence of a frenzy spell[/font][/size]
[*][size=3][font=Times New Roman]is dead (reanimated citizens will fight until they turn to ash)[/font][/size]
[*][font=Times New Roman][size=3]is a member of the inner circle of the Companions[/size][/font]
[/list][list]
[*][font=Times New Roman][size=3]is a member of the Imperials[/size][/font]
[*][font=Times New Roman][size=3]is a member of the Stormcloaks[/size][/font]
[/list][font=Times New Roman][size=3][color=#f9cb9c][b]
Khajiit merchant:[/b] [/color]Unlike the other citizens of Skyrim, the Khajiit merchants will stay outside cities when they decide to flee. If they are near a city, they will hide inside a guard tower (Solitude, Riften), inside a city wall (Whiterun, Markarth, Windhelm), or inside a mine (Dawnstar). If they decide to flee while they were traveling to their next destination, they'll flee in the direction of their destination.[/size][/font][font=Times New Roman][size=3][b]
[color=#f9cb9c]
Sleeping agent:[/color][/b] The vampires and Forsworn who hide among the citizens of Skyrim will act as civilians unless they're attacked by the Dragonborn or if the time has come for them to show their true nature.[/size][/font]
[font=Times New Roman][size=3]
Screenshots are available [url=http://www.nexusmods.com/skyrim/images/503897/?]here[/url] and a video is available here: [url=http://www.nexusmods.com/skyrim/videos/3898/?]Video 1[/url]

[color=#cc4125][size=5][b]Combat style [/b][/size][/color]
[color=#e69138][size=4][b]Warrior[/b] [/size][/color]
Defensive combat styles have been assigned to citizens fitting the warrior category. When defending themselves, they rely upon counterattacks to survive. For example, most times an NPC will bash his opponent (their probability of success is quite high) who tries to perform a power attack or a series of regular attacks against him. Once the opponent is staggered, he will only perform one or two regular attacks to make sure his opponent won't have the time to block.

[size=4][b][color=#e69138]Sorcerer & Thief (archer) [/color][/b][/size]
The mages and archers will get out of a melee as soon as possible. They’ll stay at range behind cover and will not pursue their opponent.

Standard State

[color=#6aa84f][size=6][b]Standard State [WIP][/b][/size][/color]
[color=#cc4125][size=4][b]
[size=5]Human behavior[/size][/b][/size][/color]
The AI of each named NPC is customized according to his personal stories, social rank, personality, and relationships. To keep the description as short as possible, I won’t describe the AI of each NPC. Instead, I’m going to describe the general concepts that I used as well as the templates that I designed and used as a starting point.
[color=#e69138][b]
[size=4]Basic behaviors (shared by all NPCs)[/size][/b][/color]
The NPCs will now eat between 2 and 3 times per day and will sleep at least 6 hours per day. The sleep & meal times vary between each NPC. Here are the sleep schedules they can have:
[/size][/font][list]
[*][font=Times New Roman][size=3]the schedules to go to bed: between 9 pm and 3 am[/size][/font]
[*][font=Times New Roman][size=3]the schedules to wake up : between 5 am and 9 am[/size][/font]
[/list][font=Times New Roman][size=3]These schedules are mainly assigned according to the job of the NPC. Thus, an Innkeeper will go sleep around 3 am while a stallholders will start to sleep around 9 pm.
[size=4]
[color=#e69138][b]Specific behaviors[/b][/color][/size]
According to their personal stories, social ranks, jobs, personalities, and relationships, some NPCs will regularly perform specific or unique activities. Here some examples of specific activities (most of them are associated with a job). [/size][/font][font=Times New Roman][size=3]

[color=#f9cb9c][b]Hunter:[/b][/color] The NPC will hunt game (deer, horker, hare and fox) in the areas around his city/village. This will occur around 3 times per week during the morning hours. During his hunt, he will check different areas and as soon as he finds a prey, he'll try to kill it. If he succeeds, he'll loot the corpse (pelt, meat, and alchemy components). He’ll stop his hunt once he's looted a specific amount of meat, or when he runs out of time. Screenshots are available [url= http://www.nexusmods.com/skyrim/images/500710/?]here[/url] [/size][/font][font=Times New Roman][size=3]and a video is available here: [url=https://www.youtube.com/watch?v=oBT5zAGhjNs]Video[/url]
[color=#f9cb9c][b]Priest of Kynareth:[/b][/color] The priests of Kynareth will pray to their goddess several time per day. They will also organize praying sessions with believers. When they aren't praying, they'll clean the temple and heal the wounded. Sometimes they'll go to the market before it closes. Screenshots are available [url=http://www.nexusmods.com/skyrim/images/452741/?]here[/url].[/size][/font][font=Times New Roman][size=3]
[color=#f9cb9c][b]Priest of Arkay:[/b][/color]  The priests of Arkay will pray several time per day in front of their altar. They will also bless the dead. Another part of their duty consists of cleaning their temple as well as the graves. You might also find them at the market before it closes. Screenshots are available [url=http://www.nexusmods.com/skyrim/images/502535/?]here[/url].[/size][/font][font=Times New Roman][size=3]
[color=#f9cb9c][b]Rambler:[/b] [/color]Some NPCs will stroll outside their city/village for diverse reasons:
[/size][/font][list]
[*][font=Times New Roman][size=3]to enjoy the view of some landscapes[/size][/font]
[*][font=Times New Roman][size=3]to loot some alchemy components[/size][/font]
[*][font=Times New Roman][size=3]to travel to another village/city.[/size][/font]
[/list][font=Times New Roman][size=3][color=#f9cb9c][b]Lover:[/b][/color] NPCs having a romance between themselves will meet regularly in low-populated areas. If it is a forbidden romance, they will meet outside their city/village. Screenshots are available [url=http://www.nexusmods.com/skyrim/images/501079/?]here[/url].[/size][/font][font=Times New Roman][size=3]
[color=#f9cb9c][b]Horse rider:[/b][/color] NPCs will use a horse if they have to travel long distances. Therefore, several horses have been added near the stables. Screenshots are available [url=http://www.nexusmods.com/skyrim/images/456014/?]here[/url]. Video available [url= http://www.nexusmods.com/skyrim/videos/3056/?]here[/url].[/size][/font][font=Times New Roman][size=3][b]
[color=#f9cb9c]Swordsman:[/color][/b] NPCs using their swords to make their living will train themselves regularly in the art of fighting. Some will use their weapons against practice dummies (unless they use two-handed weapons) while others will have a sparring partner. Screenshots are available [url=http://www.nexusmods.com/skyrim/images/457449/?]here[/url] and [url=http://www.nexusmods.com/skyrim/images/498155/?]here[/url].[/size][/font][font=Times New Roman][size=3]
[b][color=#f9cb9c]Servant:[/color] [/b]Servants will perform all the tasks that you expect them to do. They'll cook between 2 and 3 times per day and clean the house of their employer daily. Sometimes they'll chop wood and carry firewood near their employer's fire pit. During the morning hours, they will go to the market to buy some food.[/size][/font][font=Times New Roman][size=3]
[color=#f9cb9c][b]Lumberjack:[/b][/color] The lumberjack will use the sawmill daily. If there are several lumberjacks for one sawmill, there will be a turnover. They will also chop wood with an axe and dispatch the firewood to the surrounding houses. Sometimes they will fix wooden walls.[/size][/font][font=Times New Roman][size=3][b]
[color=#f9cb9c]Farmer:[/color] [/b]Farmers will work daily in the field. If a farmer works on a farm possessing several fields, he’ll choose randomly a field on which to work. If there are chickens, he’ll feed them daily. If there are cows, he'll bring them water daily (some animations have been restored). If there is a grain mill, he'll use it regularly, and sometimes he’ll tan an animal's hide or seal barrels containing foods. Screenshots are available [url=http://www.nexusmods.com/skyrim/images/497877/?]here[/url].[/size][/font][font=Times New Roman][size=3][b]
[color=#f9cb9c]Beggar:[/color][/b]Beggars will spend most of their time at the market asking for charity. When the market is closed, you’ll find them drinking or sleeping in marginalized areas.[/size][/font]
[font=Times New Roman][size=3]
Additional Notes: 
Some of the templates described above have been combined and assigned to several NPCs. For example, if an NPC owns a farm and a sawmill, he will act both as a lumberjack and a farmer. 
Let’s take a more specific example with Uthgerd: she will act as a swordsman, a rambler, and a horse rider. She will also perform more general activities during her free time. In short, each NPC will have a unique behavior and will act differently day after day.[color=#e69138][size=4][b]

Free time[/b][/size][/color]
To humanize the citizens of Skyrim, every day they’ll choose randomly one or several activities to perform from a predefined list. Each NPC will use a customized list. The longer an NPC lives in a big city, the higher the number of activities to which he is given access. Here are some examples of activities:
[/size][/font][list]
[*][font=Times New Roman][size=3]shopping at the market or at a general goods store or at a specialized store[/size][/font]
[*][font=Times New Roman][size=3]praying at the local temple[/size][/font]
[*][font=Times New Roman][size=3]drinking at the local tavern[/size][/font]
[*][font=Times New Roman][size=3]resting at home[/size][/font]
[*][font=Times New Roman][size=3]praying or standing in front of a grave[/size][/font]
[/list][font=Times New Roman][size=3]In short, each day, the NPCs will act differently. Screenshots are available [url=http://www.nexusmods.com/skyrim/images/460110/?]here[/url] and [url=http://www.nexusmods.com/skyrim/images/500610/?]here[/url][b], [/b]video available here: [url=https://www.youtube.com/watch?v=WfoVRV0eRb4]Video [/url][color=#cc4125][size=4][b][size=5][color=#e69138][size=4]
[/size][/color][/size][/b][/size][/color][size=4][font=Times New Roman][color=#e69138][b]
Enhanced Social Interaction[/b][/color][/font][/size]
[color=#f9cb9c][b]Random conversations[/b]: [/color]To improve the social interaction between NPCs, I’m restoring all the conversations recorded but not implemented in game. For each city/village, the number of unique conversation will be increased by about 100%. 
Videos available here: [url= http://www.nexusmods.com/skyrim/videos/3184/?]Video 1[/url] | [url= http://www.nexusmods.com/skyrim/videos/3279/?]Video 2[/url] | [url= http://www.nexusmods.com/skyrim/videos/3242/?]Video 3[/url].
[color=#f9cb9c][size=4][b][size=3]Family[/size][/b][/size][/color][color=#f9cb9c]: [/color]At least 1 time per day, the members of the same family will meet to have a meal unless tension exists between them or some of them live in different cities. Screenshots are available [url=http://www.nexusmods.com/skyrim/images/457234/?]here[/url] and [url=http://www.nexusmods.com/skyrim/images/500350/?]here[/url]. [size=4]
[b][color=#e69138][color=#f9cb9c][size=3]Behavior NPC dependent[/size][/color][/color][/b][/size][color=#f9cb9c]:[/color] Some NPCs will change their behavior around other NPCs. This is especially true for children or NPCs having group activities. Thus, if an NPC dies, the behavior of some other NPCs may change.
[font=Times New Roman][color=#f9cb9c][size=3][size=4][b][size=3]NPC greetings[/size][/b][/size][/size][/color][/font][color=#f9cb9c]:[/color] The probability for a citizen to engage in conversation with you has been drastically reduced except in cases where it’s a part of their job or disposition. In practice, only the merchants, beggars, and messengers will engage regularly in conversation with you. So when you see Nazeem, you won’t feel the need to kill or run away from him anymore.
[font=Times New Roman][size=3]Additional Note: 
This feature applies to all guards from any city/village and any official DLC.[/size][/font]

[color=#e69138][size=4][b]Weather influence[/b][/size][/color]
In Skyrim, the weather is sorted in 4 categories:
[/size][/font][list]
[*][font=Times New Roman][size=3]Pleasant[/size][/font]
[*][font=Times New Roman][size=3]Cloudy (foggy weathers also fall in this category)[/size][/font]
[*][font=Times New Roman][size=3]Rainy[/size][/font]
[*][font=Times New Roman][size=3]Snowy (sandstorms also fall in this category)[/size][/font]
[/list][font=Times New Roman][size=3]
The citizens will adapt their activities according to these 4 categories of weather.
[b]
[color=#f9cb9c]Take shelter:[/color][/b] If it’s raining or snowing, the citizens will stop their outdoor activities unless they can continue under a shelter, or if their work mustn’t be delayed. Otherwise, they’ll perform an activity taking place inside a building (a shop, a temple, a tavern, their home, etc.). The activity is chosen randomly from a predefined list. Each NPC will use a list customized according to his personal stories, social rank, personality, and relationships. 
[color=#f9cb9c][b]Go Home:[/b][/color] This feature has been developed for the unofficial NPCs such as 3DNPC, Inconsequential NPCs, etc. During snowy or rainy weather, these NPCs will also stop their outdoor activities. However, contrary to the official NPCs, they’ll just go back to their homes or to the local inn (if they are homeless). Note that the NPCs won’t use this feature if they have one of the following jobs:
[/size][/font][list]
[*][font=Times New Roman][size=3]Miner[/size][/font]
[*][font=Times New Roman][size=3]Lumberjack[/size][/font]
[*][font=Times New Roman][size=3]Blacksmith[/size][/font]
[*][font=Times New Roman][size=3]Ferryman[/size][/font]
[*][font=Times New Roman][size=3]Carrier[/size][/font]
[/list][font=Times New Roman][size=3]
[font=Times New Roman][size=3]Video available here: [url=https://www.youtube.com/watch?v=pYXJVJdogyA]Video[/url][/size][/font]
Note also that some official NPCs will use this feature temporally until I rebuild completely their AI. For more information, check the "Modifications overview" section below.
[size=4]
[color=#e69138][b]Quest-givers' behaviors[/b][/color][/size]
When an NPC gives you a quest, he'll continue to lead a normal life. For now, this applies only to the following quests:
[/size][/font][list]
[*][font=Times New Roman][size=3]The Golden Claw[/size][/font]
[*][font=Times New Roman][size=3]Trouble in Skyrim, Stealing Plans, Striking the Heart, and all the radiant quests given by the Companions[/size][/font]
[*][font=Times New Roman][size=3]The Blessings of Nature[/size][/font]
[/list][font=Times New Roman][size=3]
This will prevent the appearance of non-immersive situations. One of the most infamous is Lucan Valerius maintaining “The Riverwood Trader” 24/7 until the “The Golden Claw” quest is completed.

[color=#cc4125][size=5][b]Miscellaneous[/b][/size][/color]
[color=#f9cb9c][b]Opening time for shops:[/b][/color]
[/size][/font][list]
[*][font=Times New Roman][size=3]The market: between 6 am and 5 pm (closed during snowy or rainy weather)[/size][/font]
[*][font=Times New Roman][size=3]The Drunken Huntsman: between 8 am and midnight.[/size][/font]
[*][font=Times New Roman][size=3]General goods vendor: between 8 am and 8 pm[/size][/font]
[*][font=Times New Roman][size=3]Apothecary: between 8 am and 8 pm[/size][/font]
[*][font=Times New Roman][size=3]Fletcher: between 8 am and 8 pm[/size][/font]
[*][font=Times New Roman][size=3]Blacksmith: 6 am and 6 pm (if he works outdoor), otherwise between 8 am and 8 pm [/size][/font]
[/list][font=Times New Roman][size=3][b][color=#f9cb9c]Heimskr:[/color][/b] Instead of annoying you from 5 am to 8 pm, Heimskr will only annoy you between 2 pm and 6 pm. Screenshots are available [url= http://www.nexusmods.com/skyrim/images/457212/?]here[/url].
[b][color=#f9cb9c]Guard:[/color][/b] I didn’t spend a lot of time on the guards. For now, you’ll find some guards spending their money at “The Bannered Mare” at night.

[color=#6aa84f][size=6][b]Bug fix[/b][/size][/color]
This mod can be seen as an Unofficial AI fix, but on top of that it also fixes a huge amount of navmeshes, scenes and other bugs that caused NPCs to stop moving. I’ll publish later a list containing all the bugs that I’ve fixed (once I find the time and the motivation). [/size][/font]

Modifications Overview

[font=Times New Roman][size=3][font=Times New Roman][size=3][center][b][size=6]Modifications Overview[/size][/b][/center][font=Times New Roman][size=3]

With some exceptions mentioned above, this plugin only affects the NPCs which are friendly and unique (named).[/size][/font]

[size=3][font=Times New Roman][size=3][font=Times New Roman][size=3][color=#e69138][b][size=4]Official NPCs[/size][/b][/color][/size][/font][/size][/font]
[/size]For now, the AI of citizens has been improved in the zones and factions shown below. The color code shows the features which have been implemented for each area and each faction. 
[color=#93c47d]Green:[/color][font=Times New Roman] [size=3][font=Times New Roman][size=3]Survival Instinct, Combat Style, Basic Behavior, Specific Behavior, Free Time, Take Shelter &  [/size][/font][/size][/font]Social Interaction
[color=#ffe599]Yellow:[/color] Survival Instinct, [font=Times New Roman][size=3][font=Times New Roman][size=3][font=Times New Roman][size=3][font=Times New Roman][size=3]Combat Style [/size][/font][/size][/font][/size][/font][/size][/font] & Go Home
[color=#999999]Grey:[/color] The AI of NPCs haven't been modified yet.

[b]Cities:[/b][color=#ffe599]Dawntar[/color] | [color=#ffe599]Falkreath[/color] | [color=#ffe599]Markarth[/color] | [color=#ffe599]Morthal[/color] | [color=#ffe599]Raven Rock[/color] | [color=#ffe599]Riften[/color] | [color=#ffe599]Solitude[/color] | [color=#93c47d]Whiterun[/color] | [color=#ffe599]Windhelm[/color] | [color=#ffe599]Winterhold[/color]
[b]Towns:[/b] [color=#ffe599]Dragon Bridge[/color] | [color=#ffe599]Ivarstead[/color] | [color=#ffe599]Karthwasten[/color] | [color=#93c47d]Riverwood[/color] | [color=#ffe599]Rorikstead[/color] | [color=#ffe599]Shor’s Stone[/color] | [color=#ffe599]Skaal Village[/color]
[b]Settlements:[/b] [color=#ffe599]Darkwater Crossing[/color] | [color=#93c47d]Honningbrew Meadery[/color] | [color=#ffe599]Kolskeggr Mine[/color] | [color=#ffe599]Kynesgrove[/color] | [color=#ffe599]Left Hand Mine[/color] | [color=#ffe599]Nightgate Inn[/color] | [color=#ffe599]Old Hroldan Inn[/color] | [color=#ffe599]Soljund’s Sinkhole[/color] | [color=#ffe599]Stonehills[/color] | [color=#ffe599]Tel Mithryn[/color] | [color=#ffe599]Whistling Mine[/color]
[b]Strongholds:[/b] [color=#999999]Dushnikh Yal[/color] | [color=#999999]Largashbur[/color] | [color=#999999]Mor Khazgur[/color] | [color=#999999]Narzulbur[/color]   
[b]Farms and Mills:[/b] [color=#ffe599]Anga’s Mill[/color] | [color=#93c47d]Battle-Born Farm[/color] | [color=#93c47d]Chillfurrow Farm[/color] | [color=#ffe599]Half-Moon Mill[/color] | [color=#ffe599]Heartwood Mill[/color] | [color=#ffe599]Hlaalu Farm[/color] | [color=#ffe599]Holly frost Farm[/color] | 
[color=#ffe599]Katla’s Farm[/color] | [color=#ffe599]Loreius Farm[/color] | [color=#ffe599]Merryfair Farm[/color] | [color=#ffe599]Mixwater Mill[/color] |[color=#6aa84f] [color=#93c47d]Pelagia Farm[/color][/color] | [color=#ffe599]Salvius Farm[/color] | [color=#ffe599]Sarethi Farm[/color] | [color=#ffe599]Snow-Shod Farm[/color] | [color=#ffe599]Solitude Sawmill[/color]
[b]Faction:[/b] [color=#93c47d]Companions[/color] | [color=#999999]Dark Brotherhood[/color] | [color=#999999]Dawnguard[/color] | [color=#93c47d]Khajiit Caravan[/color] | [color=#999999]Thieves Guild[/color] | [color=#999999]Volkihar Vampire Clan[/color][/size][/font]

[font=Times New Roman][size=3][font=Times New Roman][size=3][color=#e69138][b][size=4]Unofficial NPCs[/size][/b][/color][/size][/font][/size][/font]
If you use one or several plugins which add friendly and unique NPCs, the following features will be implemented in these NPCs: "Survival Instinct" & "Go Home". Note that, like 'Wet & Cold" or "Run for Your Lives", my plugin will handle a limited number of additional NPCs. Here are the limitations:
[/size][/font]
[list]
[*][font=Times New Roman][size=3]For the additional NPCs assigned to official places, the limitation [font=Times New Roman][size=3]is 50 extra NPCs per official cities/towns/settlements. [/size][/font][/size][/font]
[*][font=Times New Roman][size=3]For the [font=Times New Roman][size=3]additional NPCs assigned [/size][/font]to new places, [font=Times New Roman][size=3]the limitation is 100 extra NPCs per hold (region). For a reminder, Tamriel is subdivised in 9 hold.[/size][/font][/size][/font]
[*][font=Times New Roman][size=3][font=Times New Roman][size=3]Note that if you install on an old save a mod which adds extra NPCs while my plugin is already active in this save, those extra NPCs won't use the features "Survival Instinct" & "Go Home".[/size][/font][/size][/font]
[/list][font=Times New Roman][size=3][font=Times New Roman][size=3]

Impact

[center][font=Times New Roman][size=3][font=Times New Roman][size=3][b][size=6]Impact on gameplay
[/size][/b][/size][/font][/size][/font][/center][font=Times New Roman][font=Times New Roman][font=Times New Roman][font=Times New Roman][color=#e69138][b][color=#f9cb9c]

[color=#e69138][size=4]A third way to play thief[/size][/color][/color][/b][/color][/font][/font][/font][/font]
[/size][/font]By default, in Skyrim, there are two efficient ways to burgle a house: either you sneak in discreetly, or you kill its occupant. My plugin adds a third option.

Indeed, with my "Survival Instinct" feature, the player will also be able to perform "violent robberies" or extortion. All you need to do is beat the house's occupant until he decides to flee. Even if the beaten citizen decides to flee to a corner of his house, the bounty on your head that you will get by stealing his valuables in front of him will be ridiculously low compared to the value of the stolen items. However, keep in mind that if you beat an NPC while a guard is nearby, the guard will try to arrest you. Therefore, you will need to either bribe the guard or analyze the patrol routes used by the guards before you act.

Compatibility

[center][size=6][b]Compatibility[/b][/size][/center]
[/size][/font][font=Times New Roman][size=3][color=#e69138][b]
[size=4]Interaction with plugins also editing the AI[/size][/b][/color]
My plugin is compatible with almost everything, even with the plugins which modify the AI. For example, let’s say you use the following list of mods: Wet & Cold, Holidays, Run for Your Lives, When Vampires Attack, Sleeping Innkeepers, Enhanced Skyrim Factions: The Companions Guild and my plugin. 

Whatever your load order, the game engine will use the modifications done on the AI by these plugins according to this order of priority (from top to bottom):

[color=#f9cb9c][b]1[/b][/color]   [b]Run For Your Lives & When Vampires Attack[/b], [color=#6aa84f]condition:[/color] A vampire or a dragon is on the move and the NPCs are out of combat.
[b][color=#f9cb9c]2[/color]   Wet & Cold[/b], [color=#6aa84f]conditions:[/color] The “go home” feature has been activated in the MCM menu and it’s raining or snowing      
[b][color=#f9cb9c]3[/color][/b]   [b]Holidays[/b], [color=#6aa84f]condition:[/color] Active only during specific dates
[b][color=#f9cb9c]4[/color][/b]   [b]Immersive Citizens – AI Overhaul[/b], [color=#6aa84f]condition:[/color] none
[b][color=#f9cb9c]5[/color]   Enhanced Skyrim Factions – The Companions Guild[/b], [color=#6aa84f]condition:[/color] none
[color=#f9cb9c][b]6[/b][/color]   [b]Sleeping Innkeepers[/b], [color=#6aa84f]condition:[/color] none

As I’ve already overhauled the AI of all members of the Companions, this means that the game engine will never use the AI modifications done by the mod “Enhanced Skyrim Factions: The Companions Guild”, but it will still use all the other features from this mod.

If you have “Wet & Cold” installed, the game engine will use my feature “weather influence” only if you deactivate the “go home” feature in the “Wet & Cold” Configuration Menu.
[b][size=4]
[/size][font=Times New Roman][size=3][color=#e69138][size=4][b]Interaction with "Touring Carriages" [/b][/size][/color]
[/size][/font][/b]If you use my plugin along with "Touring Carriages", you will get fewer error messages from "Touring Carriages" because I fixed several navmesh bugs. When you use a carriage, all the NPCs (monsters included) will regard you as a friend. The carriage driver as well as the followers will be also regarded as friend by all the NPCs. So when you use a carriage, the carriage driver won't flee if a hostile is prowling around.
Once you leave the carriage, this friendship ends, therefore the carriage driver can can be attacked, and, if necessary, he can flee. 

[font=Times New Roman][size=3][b][font=Times New Roman][size=3][color=#e69138][size=4][b]Interaction with "Follower Overhauls" such as UFO, AFT & EFF[/b][/size][/color][/size][/font][/b][/size][/font]
If you use UFO or EFF, your follower(s) won’t use the “Survival Instinct” feature.
If you use AFT, you have the possibility to turn on/off the feature "Survival Instinct" for your follower(s). With AFT, "Survival Instinct" is activated by default. To disable it or to reactivate it, talk to your follower(s), go in the tweak menu, then in the combat menu, choose a combat style to disable it or choose 'None' to reactivate it. 
[b][size=4]
[color=#e69138]Incompatible plugins[/color][/size][/b]
My plugin is compatible with almost everything. The only mods that may cause issues are mods which edit the architecture of cities or the architecture of interior rooms. Here are the 3 categories of mods which will cause troubles without a compatibility patch:   
[/size][/font][list]
[*][font=Times New Roman][size=3]The mods adding new houses or walls in the following areas: [/size][/font][font=Times New Roman][size=3]Dragon Bridge[/size][/font][font=Times New Roman][size=3], Whiterun[/size][/font][font=Times New Roman][size=3] & Windhelm's Docks[/size][/font]
[*][font=Times New Roman][size=3]The mods moving the position of houses or walls in the following areas: [font=Times New Roman][size=3]Dawnstar, Dragon Bridge[/size][/font][font=Times New Roman][size=3], Riverwood[/size][/font][font=Times New Roman][size=3], Whiterun, [/size][/font][font=Times New Roman][size=3]Whiterun's outskirt[/size][/font][font=Times New Roman][size=3] & Windhelm's Docks[/size][/font][/size][/font]
[*][font=Times New Roman][size=3]The mods which remove or add furniture, such as tables or chairs, in the following houses:[/size][/font][font=Times New Roman][size=3] Shop,[/size][/font][font=Times New Roman][size=3] Inn[/size][/font][font=Times New Roman][size=3], Jorrvaskr[/size][/font][font=Times New Roman][size=3], Dragonsreach[/size][/font]
[/list][font=Times New Roman][size=3]
[font=Times New Roman][size=3]So, it means that mods such Dawn of Skyrim, Beautiful Whiterun, Towns and Villages Enhanced - Whiterun or Perfect Whiterun are fully compatible.[/size][/font]

[font=Times New Roman][size=3]A compatibility patch is available for the following mods:
[/size][/font][list]
[*][font=Times New Roman][size=3]Cutting Room Floor[/size][/font]
[*][font=Times New Roman][size=3]Open Cities Skyrim[/size][/font]
[*][font=Times New Roman][size=3]Provincial Courier Service[/size][/font]
[*][font=Times New Roman][size=3]Realistic Room Rental Enhanced (you don't need a compatibility patch for the basic version)[/size][/font]
[*][font=Times New Roman][size=3]Enhanced Lights and FX (only required if you use ELFXEnhancer.esp)[/size][/font]
[*][font=Times New Roman][size=3]Enhanced Lighting for ENB[/size][/font]
[/list]

Here is the list containing mods which are incompatible and not supported:
[/size][/font][list]
[*][font=Times New Roman][size=3]Better Jorrvaskr [/size][/font]
[*][font=Times New Roman][size=3]Breezehome TNF - Elianora's Flavour (the only Breezehome mod which is not compatible, so TNF done by goatk is compatible)[/size][/font]
[*][font=Times New Roman][size=3]ETaC - complete[/size][/font]
[*][font=Times New Roman][size=3]Immersive Settlements (Immersive Whiterun/Dawnstar/Dragon Bridge)[/size][/font]
[*][font=Times New Roman][size=3]JK's Skyrim [/size][/font]
[*][font=Times New Roman][size=3]The Useless Shop and Interior Overhaul[/size][/font]
[*][font=Times New Roman][size=3]Riverwood reborn / [font=Times New Roman][size=3] Riverwood reborn 2[/size][/font] /  [font=Times New Roman][size=3] Riverwood Redux[/size][/font][/size][/font]
[*][font=Times New Roman][size=3]Skyfall Estate - Buildable Edition / [font=Times New Roman][size=3] Skyfall Estate - Multiple Adoption Friendly[/size][/font][/size][/font]
[*][font=Times New Roman][size=3]SkyFix - Riverwood Redeveloped[/size][/font]
[*][font=Times New Roman][size=3]Skyrim Bridges (use Skyrim Better Roads instead)[/size][/font]
[*][font=Times New Roman][size=3]Skyrim Radioactive [/size][/font]
[*][font=Times New Roman][size=3]Thornrock [font=Times New Roman][size=3][font=Times New Roman][size=3](I recommend Elysium Estate[/size][/font])[/size][/font][/size][/font]
[*][font=Times New Roman][size=3]Whiterun Outskirts Market[/size][/font]
[/list][font=Times New Roman][size=3]
[font=Times New Roman][size=3][b][size=4][color=#e69138]TES5Edit[/color][/size][/b][/size][/font]
If you're used to doing your own compatibility patches with TES5edit, don't try to do a compatibility patch involving my plugin for the following type of entries:
[/size][/font][list]
[*][font=Times New Roman][size=3]Navmesh[/size][/font]
[*][font=Times New Roman][size=3]Quest[/size][/font]
[*][font=Times New Roman][size=3]Scene[/size][/font]
[*][font=Times New Roman][size=3]Story Manager Quest Node[/size][/font]
[/list][font=Times New Roman][size=3]Due to the way TES5edit displays the information stored in these entries, it's impossible to do a functional compatibility patch involving these entries. For information, the compatibility patches for OCS, RRR, CRF & PCS have been made with the Creation Kit.[size=3]

Installation

[center][b][size=6]Installation & Load Order[/b]

[b][color=#f9cb9c]Requirements[/color][/b]
Skyrim 1.9.32.0.8 or greater
Dawnguard
Dragonborn

[b][color=#f9cb9c]Installation[/color][/b]
You can use any mod installer such as NMM, WB or MO.
For a manual install, download the main file and the compatibility patches (if needed), then extract the file(s) into your Skyrim data directory: ...\Steam\SteamApps\common\Skyrim\data 

Additional Notes:
[list]
[*][color=#ff0000]The first time that you load my plugin, the first loading screen will be frozen for some time (it takes around 30 seconds for me). If you have a low rig, it will take more times. Once this step is over, the loading screen duration will return to normal.[/color]
[/list]
[list]
[*]I recommend to start a new game, because an essential fix that I performed is not retroactive. This fix has been done to solve the following bug: by default, a dragon doesn't regard most of the citizens as an enemy; therefore, it'll ignore most of the citizens when it attacks a city. As a result, most of the citizens will ignore the dragons, which is rather weird.
[*]If you use plugins which add extra citizens, the install order as well as the load order doesn't matter. Before starting a new game, make sure that my plugin as well as the plugins which add extra citizens are activated.
[*]If you use "Cutting Room Floor" & "Touring Carriage", uninstall the TC-CRF patch and install my compatibility patch for "Cutting Room Floor".
[*]If you use Wet & Cold" and you want to use my feature "Weather Influence", don't forget to disable the "go home" feature in the MCM Menu dedicated to Wet & Cold.
[/list]

[b][color=#f9cb9c]Load order[/color][/b]
If you don't know how to use TES5edit to optimize your load order, I recommend you put this plugin near the bottom of your load order or at the very bottom. Here are the following constraints you must respect:

- My plugin must be positioned above:
[list]
[*]Realistic Lighting Overhaul
[*]Enhanced Lights and FX
[*]Enhanced Lighting for ENB
[/list]
- My plugin must be positioned below: 
[list]
[*]any plugin which edits Breezehome, Honeyside, Vlindrel, Hall Hjerim or Proudspire Manor
[*]any plugins which don't require Dragonborn to work (the only execptions are RLO, ELE & ELFX).
[*]Deadly Dragons
[*]Inconsequential NPCs
[*]Requiem
[*]Touring Carriages
[*]Whiterun Mansion
[/list]
Additional notes: 
[list]
[*]If you use "Open Cities Skyrim" or Provincial "Courier Service", I recommend to position them right above my plugin.
[*]If you use a plugin which is not listed as being incompatible and which edits one or several navmeshes that I've also modified, my plugin has to be the conflict winner. You don't need do to do a compatibility patch.
[/list]

Troubleshooting

[center][b][size=6]TroubleShooting[/size][/b][/center]

I strongly recommend to use USKP as well as UDGP and UDBP. My plugin has been made and tested with those plugins, so I don't know how it may work without them. 
The use of  Multiple Floors Sandboxing" is not recommended as that plugin performs harmful modifications (more detail is available in the FAQ) which will cause issues (with or without my plugin); besides that, that plugin loses its interest if you use my mod. 
[b][color=#f9cb9c]I'm stuck at the loading screen when I try to load your plugin 
The loading screen started to freeze as soon I installed your mod[/color][/b]
The first time that you load my plugin, the initial loading screen can take really long. Once this step is over, the loading screen duration will return to normal. This issue will be fixed today or tomorrow.

[color=#f9cb9c][b]My game crashes (CTD) before I reach the main menu[/b][/color]
Either you don't meet the requirements (you don't have Dragonborn or Dawnguard or use a pirated version of Skyrim), you have installed a compatibility patch that you don't need, or your plugin load order is wrong. Start [url=http://www.nexusmods.com/skyrim/mods/25859/?]TES5edit[/url], select all your plugins and press OK. If a plugin is missing or if your load order is wrong, TES5edit will give you an error message as well as the name of the missing plugin or the name of the poorly sorted plugin.

[color=#f9cb9c][b]Most NPCs gather in some areas, then they stop to move and remain there for several hours or forever.
Most NPCs don't enter their home or don't leave their home.[/color][/b]
This happens when the game engine uses broken navmeshes; as a result, the pathfinding algorithm is stuck in an infinite loop while the NPCs are waiting for an answer from it. Either it's caused by a single plugin or by a conflict between 2 plugins. Hopefully it's reversible as soon as you remove the culprit.
[list]
[*]First, make sure that you have respected my recommendations about the load order: my plugin should be at the very bottom or almost.
[*]Then, check if you don't use a plugin listed as being incompatible such as "Breezehome TNF - Elianora's Flavour".
[*]If you use "Multiple Floors Sandboxing", uninstall it
[*]If the issue persists, remove the plugins which edits the architecture of the area in which the issue occurs
[/list]
[color=#f9cb9c][b]The citizens don't talk to other NPCs or have stopped taking to other NPCs[/b][/color]
This bug is present in Skyrim by default. Without SKSE, it is probably impossible to fix it. However, most of the time, I've been able to prevent it from appearing. 

[color=#f9cb9c][b]Some citizens aren't afraid when a dragon attacks their city.[/b][/color]
By default, a dragon doesn't regard most of the citizens as an enemy and will ignore most of the citizens. As a result, most of the citizens will ignore the dragons. I've found a way to fix this bug, but the fix isn't retroactive. You need to start a new game to fix this problem.
Also, if you use the plugin "Deadly Dragons", don't forget to put it above my plugin in your load order.

[color=#f9cb9c][b]The bards still sing for ages (in short they don't go to sleep)[/b][/color]
I tried countless times to fix that without editing the scripts involved, but I failed. For now, you need to ask him to stop singing by talking to him.

[color=#f9cb9c][b]Vilkas and Kodlak are still statics[/b][/color]
This is how their AI have been designed by Bethesda when those 2 NPCs are involved in the quest "Take Up Arms". That quest is automatically activated once you start a new game. You have 2 options: either you join the Companions by completing this quest or you wait until I improve this terrible quest design.

[color=#f9cb9c][b]Aela stands in front of a dummy without hitting it or Anoriath uses no arrow while aiming at prey.[/b][/color]
This bug is caused by a plugin such as "Equipping Overhaul".  If you use "Equipping Overhaul", the NPCs will have problems when they want to switch weapons. This happens especially with archers when they switch their bow to a dagger or vice versa. So, this bug occurs with or without my plugin. In the worst case, Aela will stand in front of a dummy for 2 hours (ig). If you use the console command resetinventory on her, she won't be stuck anymore in a fight stance. The same command works also for Anoriath.

[color=#f9cb9c][b]Some NPCs uses their torches while they are in a room.[/b][/color]
I didn't touch the way the NPCs use their torch. This is caused by a plugin such as "Immersive NPC in the dark". 

[b][color=#f9cb9c]I can't challenge Uthgerd in a hand to hand duel.[/color][/b]
The dialogue to challenge her will only show if Uthgerd is in the Bannered Mare. This has been done on purpose, because if you challenge her outside the Bannered Mare, the brawl script won't work correctly. 

FAQs

[center][size=6][b]FAQ[/b][/size][/center]

[b][color=#f9cb9c]Do you use scripts / is it script-intensive?[/color][/b]
No, this plugin uses no scripts.
[b][color=#f9cb9c]What time scale is safe to use?[/color][/b]
The AI has been designed to use the default time scale (20). It will work with any values between 0 and 20 (I don't see the point to increase the value unless to perform tests); however, I don't recommend to go under 10 because, beyond that, there are boring downsides. For example, if you use a value of 10, the time between the dragon attacks is increased by 2, the conversations between the citizens will need twice more time to reset, the citizens will need twice more time to leave their house after an attack, etc. Moreover, a lot of quests or mods (such as "Holiday" from Isoku) use the clock in game.
Note that some people claim that glitches occur by using values below X. In my opinion, it's misinformation spread by people who don't know how the AI works. 
[color=#f9cb9c][b]
Is it interesting to keep the following mods:
[color=#fce5cd]When Vampires Attack: [/color][/b][/color]Honestly, I don’t see the point to use both it and this mod.
[color=#fce5cd][b]Guard Dialogue Overhaul: [/b][/color]It depends. If you like to interact with the guards, yes. Otherwise, no.
[color=#fce5cd][b]Sleeping Innkeepers[/b]: [/color]Yes, until I edit all the Innkeepers.
[color=#fce5cd][b]Run for Your Lives:[/b][/color] Due to the way Bethesda has established the relationships between the citizens and the dragons, I don’t specially recommend to uninstall “Run for Your Lives” unless you start a new game. By default, a dragon doesn't regard most of the citizens as an enemy; therefore, he'll ignore most of citizens, so the citizens won't enter in a combat state and will just look at the fight. I managed to completely fix this problem if you start a new game while this problem is partially fixed if you install my mod on a old save. By partially fixed, I mean that the fix will only apply to the dragons which appear through a official random encounter.
[color=#fce5cd][b]No NPC greeting:[/b] [/color]The more my plugin will be updated, the less it will be interesting to keep "No NPC greeting".
[color=#f9cb9c][b][color=#fce5cd]Multiple Floors Sandboxing:[/color][/font] [/b][/color]No, the AI present by default as well as my AI have been designed by using the default value of fSandboxCylinderTop & fSandboxCylinderBottom. 
When an NPC uses a "sandbox" procedure, he will try to use any furniture in the radius area even if the furniture is located in an inaccessible area (a locked room for example or an area not covered by navmeshes). When an NPC tries to use furniture, the NPC sends a request to the pathfinding algorithm. If the furniture is
located in an inaccessible area, the pathfinding won't find any solution; as a result, the NPC will stop moving (waiting for a solution from the pathfinding algorithm) until his current AI package is discarded. In some cases, if you use the wait menu, the NPC will teleport to a test cell.
Due to the way I've designed the AI, the NPCs won't try to use furniture located in inaccessible areas. However if you increase fSandboxCylinderTop & fSandboxCylinderBottom, this bug will be back in some areas.
[color=#f9cb9c][b][color=#fce5cd]Artificial Intelligence Limit Increaser:[/color] [/b][/color]No, according to my tests, this plugin is useless. A city such as Whiterun contains more than 80 NPCs and the AI of all of them is functional (with the default game settings) whatever the context. If you have NPCs that don't move, read the troubleshooting section.

[color=#f9cb9c][b]Will you do a compatibility patch for ETaC?[/b][/color]
Yes, but right now I'm lacking too much sleep to do it.

[color=#f9cb9c][b]Will you do a compatibility patch for JK's Skyrim?[/b][/color]
It will be smarter and easier to increase the compatibility of JK's Skyrim rather than to try to make a compatibility patch.

[color=#f9cb9c][b]Will you do a compatibility patch for x?[/b][/color]
No clue. All I can tell you is that I can't do a compatibility patch for mods such as "Skyrim Radioactive" & "The Useless Shop and Interior Overhaul" because they contain deleted navmeshes. It's easy for me to fix them, but I'm not the author of these mods so I won't do it unless I have their permission.

[color=#f9cb9c][b]What are the main differences between your mod and the mod called "AI Overhaul project"? [/b][/color]
Here are the main differences:
[list]
[*]For now, my mod improves the AI of [b][color=#ff0000]574[/color][/b]NPCs (without counting the unofficial NPCs) while "AI Overhaul project" only edits [color=#ff0000][b]76[/b][/color] NPCs and doesn't support the unofficial NPCs.
[*]My mod improves the AI used by the NPCs when they are in combat while "AI Overhaul project" doesn't touch the AI used in combat.
[*]With my mod, the citizens act differently when it's raining or when it's snowing, while with "AI Overhaul project" the NPCs act the same way whatever the weather.
[*]My mod restores a lot of random conversations while "AI Overhaul project" doesn't.
[*]"AI Overhaul project" doesn't have something comparable to my feature "Specific Behavior".
[*]Contrary to "AI Overhaul project", my mod is compatible with almost everything, due to the fact that I use quest aliases to inject my AI, while "AI Overhaul project"edits the entries related to NPCs.
[/list]
[color=#f9cb9c][b]Why isn't x compatible with your mod?[/b][/color]
A mod isn't compatible either because he:
[list]
[*]breaks connections between navmeshes
[*]corrupts navmeshes or adds corrupted navmeshes
[*]adds a deleted flag to navmeshes (this is really annoying because it prevents me to do compatibility patches)
[*]removes essential fixes that I've done on some navmeshes
[*]performs drastic changes on the architecture of cities/villages (an AI is designed according to a city architecture)
[/list]
[b][color=#f9cb9c]Why is X compatible with your mod while Y isn't compatible?[/color][/b]
Because they have not been done in the same way.
[/size][/font]