Dynamic Encounters

Last updated for version `1.8.0-BETA-7`

*Main article:* Enemies

**Dynamic Encounters** is a new system that will spawn random Enemies in your nearby area who are actively hunting you down.

1. Firstly, this initial version of the dynamic spawn system is somewhat of a beta feature, you can turn it off if it's causing any problems or it's too difficult for you.
2. Second, I'm trying to keep this system as clean and simple as possible, so that things don't linger around longer than needed and eat performance/memory. This may mean it isn't perfect as to where/when things spawn/despawn, but it should be efficient on your game.
3. Third, I'm trying to keep it balanced, adaptive, and actually fit in with the game itself. I don't want it to just be some random spawn thing that is stuck on top.

## General

This system is somewhat considered a beta at first..

* can be disabled in the Horizon Holotape options
* "ON (Casual)", allows slower spawns without disabling them completely
* This system is adaptive, and scales based on your progress and/or Player Threat Level and some randomization
* Threat depends on amount of ammo and healing items you carry and time since your last Death. If Revival Mode (*Alternate Death Mode*) is off, your death-related threat level is zero.
* Active Companions and Combat Pets EACH add a significant amount of Threat
* Being inside of Power Armor adds a significant amount of threat

There are 2 separate categories of spawns: Predators and Death Squads:

### Predators

* consist of animals, creatures, and common enemies
* will spawn more enemies based on your Threat Level

### Death Squads

* usually consist of faction-based enemies
* will usually only start appearing once you've pissed off a faction
* will spawn more enemies based on how many of that faction you have killed

## Appearance

Dynamic encounters shouldn't occur at all until after you reached Level 3 and will spawn less frequently below level 10 (the time within attacks is also longer). The option can be disable anytime in the Horizon Holotape.

In general, Enemies spawn further away from you, and also have a more randomized distance. The system will attempt to not spawn enemies too close to the player. Enemy spawn locations can come from different directions, individually or as a group. A group of enemies usually spawns together from 1 general location. When packs are large enough (6+), they have a random chance to split up at 2 locations for a pincer attack.

Enemies and their corpses, that are in range, will remain until the next spawn cycle, so you should have plenty of time to loot them.

When you exit a "safe area" the encounters shouldn't just immediately want to attack you. Enemies that are too far away from the player, will be removed.

Spawns should reliably spawn at better distances, and not as often. The spawn locations aren't guaranteed to be perfect spots. Every once in awhile some NPCs spawn in weird places or spots they won't reach the player.

## Behavior

All spawns have a large bonus to perception, and can see through stealth much easier than standard enemies. As soon as they spawn, they will begin to path in your direction. They will not engage in combat with you, unless they actually spot you. If any enemies fail to ever reach you, they will be removed before the next spawn.

📝 **Note:** Predators and Death Squads are supposed to be actively hunting you down, they're not passive spawns.

## Types

* Animals: mole rats, mongrels, wolves, rad-rats, yao guai
* Insects: bloatflies, radroaches, stingwings, bloodbugs, crickets, ants
* Creatures: radscorpions, deathclaws, mirelurk hunters (a new smaller type)
* Factions: raiders, gunners, triggermen, children of atom, BOS, RR, minutemen, institute, rust devils
* Humanoids: super mutants, feral ghouls

The DLC enemies above can spawn in the Commonwealth; if you don't have the DLCs, they are replaced by vanilla types

### Sub-Types

Most sub-types of enemies will now spawn at all levels which adds much more variety at any level.

* Common sub-types may spawn more often than uncommon types.
* Sub-types of enemies are no longer vastly different in difficulty, however many have different strengths and weaknesses.
* XP for sub-types is normalized better, but varies based on their specific difficulty and legendaries still give double XP.
* Most NPCs who are immune to radiation, were given 9000 rad resists too, just in case some types of effects didn't properly check the immunity.
* "Boss" type enemies will no longer spawn with weaker sub-types.
* Some enemies that are supposed to be rolled as Legendary, no longer have a chance to roll non-legendary types, which was reducing your chance of seeing legendary enemies.

## Safe Area and Spawn Events

Spawn Events can only occur outdoors and won't trigger while you're,

* inside of a settlement. or near Diamond City and Goodneighbor.
* near certain vendors/doctors (includes Far Harbor and Nuka World).
* already in combat.
* in a dialog scene.
* low on health, below 5% or you're knocked out.

1. ↑ 1.0 1.1 1.2 1.3 1.4 Keep in mind, they can spawn before you are actively meeting one of these requirements

### Extra Spawn Chance

Some enemies have a small chance to spawn an "extra" enemy with them:

* Raider + Attack Dog
* Minuteman + Guard Dog
* Brotherhood + Guard Dog
* Super Mutant + Mutant Hound
* Rust Devil + robot
* Yao Guai + Young Yao Guai
* Deathclaw + Young Deathclaw

This is intended to simulate: Human animal relationship or the mother animal showing her youngling how to hunt.

### Boss

Boss enemies unlock based on certain conditions being met, such as killing a certain amount of a faction and also have random chance, depending on the NPC type. Usually only 1 boss enemy can spawn per pack of NPCs. Boss enemies aren't always necessarily "bosses", they can be different based on the type of NPC spawn, and a certain amount of enemies you have killed:

* Raiders can spawn an "Raider Overlord" or a raider in Power Armor.
* Triggermen can spawn a "Triggerman Kingpin".
* Gunners can spawn a high-ranking Gunner or Gunner Sentry Bot.
* Super Mutants can spawn a "Minigun Boss".
* Vicious Dogs can spawn with an Alpha dog, killing the alpha dog, will demoralize the pack.

## Ambush Warnings

One can be warned by an ambush:

* Awareness 1
* Perception 7 (The message will display after all the enemies have spawned)
* MAX (M.A.X.I.N.E.)

## Developer Notes

💾 **Developer Note:** This is for players who want to manually make their own ESP override patch.

### Appearance

Dynamic encounters can be changed using a global variable if you want to make your own patch tweak.

### Custom Threat Multiplier

* The global variable "PlayerThreatLevelMultiplier" is created to allow you to tweak how much threat you get (for stuff like dynamic encounters)
* The allowed range for this is 0.25 to 5.0 (default is 1.0)
* This can allow players to make the dynamic encounters harder if you choose to not use the alternate revival system
* It's not recommended to change this value unless you absolutely know what you're doing!

As usual, if you want to change the defaults, make your own ESP with the override, never edit Horizon directly

## Technical Issues

🌀 *The content below transcludes to Technical Issues.*
* Ambush Warning from Awareness 1 doesn't work.
* The script of the dynamic encounter AI is programmed (very agressive) in such a way that the NPC targets/sees the player at all times. As a result, objects won't stop the AI from losing sight. The "Caution" status only disappears when the player moves far enough away from NPC(s).
* Occasionally spawns appear close to vanilla FO4 random encounter locations, or near a, not yet cleared location inhabited (or re-populated) by NPCs. As a result, the AI fights against each other, but the XP for killed "dynamic encounter" is credited to the player.

## See Also

* Enemies
* Modding Horizon