FANDOM


This article is updated for Update 15.

Modding Enemies Edit

Enemies are defined in the file Enemies.txt.

In this file you can define the different enemies, their stats, appearance, and loot. At the moment you can not create your own models or animations, but you can modify enemy stats and loot, or create new ones based on the appearance of existing enemies.

Note: Every enemy must have a name and description defined in the localization file Texts.txt using the following formats:

enemies.reaper.name=Reaper
enemies.reaper.description=A Reaper, come to collect human souls to bolster the armies of hell.

Enemy Stats Edit

Define enemy stats using the following format:

enemies.entity.lich.damage=20
enemies.entity.lich.attackspeed=4
enemies.entity.lich.range=6

In the example above the lich has 20 damage, 4 attack speed and an attack range of 6.

Enemy Stat Options
Stat ID Description Comments
damage Damage per attack
attackspeed Rate of attacks
range Attack Range
accuracy Attack Accuracy
health Enemy Health
evade Evasion of attacks Optional, default 0
defense Armor Optional, default 0
walkspeed Movement Speed Survivor's movement speed is 1.0

Optional, default is 1.1

vision Enemy Vision Range in which enemy will aggro in stealth missions.

Optional, default is 7

permanentdamage Lasting damage percent Optional, default 0.4

The fraction of the damage that is deal that will be lasting damage.

On Hit Effects Edit

Enemies may have on-hit effects. These are Status Effects that are applied whenever the enemy hits a target.

enemies.entity.demon.hiteffect.rendarmor=8

In the example above whenever a demon hits its target, the target will suffer the "rendarmor" status effect for 8 seconds.

Splash Damage Edit

Enemies may deal splash damage to other units around their target:

enemies.entity.firespitter.splash.range=1
enemies.entity.firespitter.splash.damage=0.5

In the above example the firespitter deals 50% of it's damage to units within 1 tile of the target.

See Modding: Splash Damage for more information.

Auras Edit

Enemies may have auras that affect friends or foes (or both) around them.

enemies.entity.succubus.auras.bedazzled.range=2
enemies.entity.succubus.auras.bedazzled.effect.bedazzled=true
enemies.entity.succubus.auras.bedazzled.targetmode=Enemy
enemies.entity.succubus.auras.bedazzled.targettag.male=true
enemies.entity.succubus.auras.bedazzled.prefab=SuccubusAuraPrefab

In the example above the Succubus has a Bedazzled aura that affects male survivors in a range of 2 tiles, with the "bedazzled" status effect.

See Modding: Auras for more information

Enemy Spawning and Difficulty Edit

Whenever enemies are randomly generated (such as in base attacks or scavenge misisons), the types and amount of enemies are determined by the combat difficulty rating. Enemies must define their tier and amount:

enemies.entity.hellhound.level=1
enemies.entity.hellhound.amount=1.25

The level (tier) determines when this enemy may spawn.

The amount determines how many of these should spawn compared to other enemies of the same tier. In this case, 1.25 hellhounds are equivalent to a single tier 1 enemy, so when spawning 4 tier 1 enemies, 5 hellhounds would spawn instead of just 4.

For more information see Modding: Enemy Generation

Enemy Loot Edit

The loot dropped by every enemy unit killed is defined using the following format:

enemies.entity.darkangel.loot.ectoplasm=2
enemies.entity.darkangel.loot.holywords=3

In the example above, the "darkangel" enemy drops 2 "ectoplasm" items and 3 "holywords" items when killed.

See Modding: Items for defining the items themselves.

Enemy Appearance & Audio Edit

Enemy appearance and audio are defined using the following format:

enemies.entity.lich.prefab=enemy_lich
enemies.entity.lich.animation=Enemies/Lich
enemies.entity.lich.properties.attackanimation=LichAttackPrefab
enemies.entity.lich.properties.attacksound=ranged_magic_attack
enemies.entity.lich.properties.floating=0.02
enemies.entity.lich.icon=enemy_icon_lich

The following appearance definitions are required:

Property Description Comments
prefab Enemy 3D model
animation Enemy animation profile Should match the model
walkanimationspeed Speed of walking animation Doesn't affect actual movement speed.

Should match the animation profile, to prevent "gliding".

properties.attackanimation The attack effect or projectile Optional. Melee usually doesn't have any.
properties.floating How much an enemy should float Optional, default 0, no floating.

Useful for floating enemies like ghosts.

Adds vertical motion to the enemy's movement.

properties.attacksound Sound when the attack is fired Optional. Usually only ranged have this.
properties.attackmisssound Sound when an attack misses Optional. Usually only melee have this.
icon Icon to represent the enemy in the UI. Optional. Default: "enemy_icon_<id>"

In most cases all these values should be copied as is from another unit, with the exception of "properties.attackanimation" and "properties.attacksound". This way you can create an enemy that looks like a reaper, but whose projectiles look and sound like the ghost attack.

See Modding: Adding Images to Mods for more information on how to add new images.

See Modding: Adding Audio to Mods for more information on adding custom sounds.

 Tagging Enemies Edit

You may define enemy categories using tags. These are then used by biomes and map locations to determine which enemies will be present in those locations. By default, enemies are either "demon" or "human".

enemies.entity.hellhound.tags.demon=true

In this example, the hellhound is tagged as "demon". An enemy may have more than one tag.

See Modding: Map Locations for more information on using tags to specify which enemies exist in each location.