Skip to content

Creating Enemies

Cromha edited this page Apr 30, 2024 · 10 revisions

Introduction

An enemy is an entity that can be encountered in any map point. Note that by creating an enemy, you're not creating an specific enemy, you're just creating a type of enemy. Enemies are found in the enemies.yaml file. Enemies are categorized in lists in the lists.yaml file. To make enemies spawn, you'll need to specify in a map point the number of enemies that spawns and what category of enemies spawns. So technically, you can't make a specific enemy, unless this enemy has his own category, like for bosses in the vanilla data. Find more information about creating map points under the Creating Map Point page.

Extra Data

In order to make the enemy display correctly on the player's diary, you'll need to create a <enemy_name>.txt file where <enemy_name> is the id name of the enemy; in the imgs/ directory of the plugin. In this file, you'll put the ascii art of that enemy with, if you want, yaml data color codes.

Explanation

An example of an enemy definition:

Cromha Minion:
  plural: Cromha Minions
  damage:
    min damage: 2
    max damage: 4
    critical chance: .14
  health:
    min spawning health: 6
    max spawning health: 9
    max health level: 9
  agility: .87
  inventory:
  - Wooden Stick
  - Raw Wood
  - Knife
  - Healing Potion
  description: "Fast and agile, the definition of a Cromha's Minion"

And the full syntax:

<enemy id>:
  plural: <plural name(str)>
  damage:
    min damage: <minimum damage(int)>
    max damage: <maximum damage(int)>
    critical chance: <critical hit chance(float)> # a percentage
  health:
    min spawning health: <minimum health(int)>
    max spawning health: <maximum health(int)>
    max health level: <max health(int)>
  agility: <agility(float)>
  inventory:
  - <item id(str)>
  description: <description(str)>

Full explanation of all attributes:

  • plural // The plural of the enemy name to show when your encounter multiple of this enemy
  • damage.
    • min damage // the minimum amount of damage that this enemy can deal to the player.
    • max damage // the maximum amount of damage that this enemy can deal to the player.
    • critical chance // the percentage of chance the enemy has to deal a critical hit
  • health
    • min spawning health // the minimum amount of health this enemy can have when spawning.
    • max spawning health // the maximum amount of health this enemy can have when spawning.
    • max health level // this is a deprecated attribute, you can leave any integer here.
  • agility // the more it's higher, the more the enemy has a chance to dodge the player attack. You often see values around .6/.8 for small enemies, around .4/.1 for big enemies and bosses and around 1/1.2 for fast enemies like Wargs or ghosts-like enemies.
  • inventory // the items that this enemy has a chance to drop when it is defeated.
  • description // a small description of the enemy that is shown on the player diary.
    • min spawning health // the minimum amount of health this enemy can have when spawning

_For more battle fights statistics explanation, check the Battle Fights Stats wiki page. Note that enemies dealt damage can vary a bit, depending on the game elapsed time in game; check the Gameplay Guide combat header to know more about it. _

Clone this wiki locally