Enemies

All enemy scenes inherit from the res://src/EnemiesNew/Enemy.tscn scene

Managing Attributes & Rebalance

enemies have a set of attributes that define how they will behave and how strong they are. below there is a list of all the attributes an enemy will have, they share the name exact formatting as in the code:

Creatures

  • species: Defines which species a creature belongs to, examples of species: Ant, Hornet, Spider, Bison, Rabbit, Bear, Snake and so on.

  • variant: Defines a variant of a species. The default variant is A. All the other variants are stronger than the default one, and can have: More health, more attack speed, more speed, etc.

  • behaviour: Defines the behaviour of the species.

    • Fearful: They will usually avoid the player and may even try and run if the player gets too close to them. But if attacked, they may attack back.

    • Territorial: They will alert Adira if she is in their space, and they will attack the player if the player comes too close or attacks them.

    • Predatory: They will instantly attack Adira the moment they notice her. They have a good sense of smell, and can’t be sneaked upon. If the player gets close enough, they will notice Adira.

    • Reserved: The Enemy - unless attacked - minds its own business and continues to graze/do its own thing. If attacked will go into a ‘Defensive’ mood. When reserved they will walk around the level and graze.

    • Curious: The Enemy will follow the Player out of curiosity. If Adira lets them get too close, attack the animal or run away, they will attack you. If Adira keeps her distance from him and doesn't run, just walk, they will not attack her. They will just return to their original location.

    • Controlling: Used for controlling the enemies in cutscenes.

  • max_health: Max amount of health points this creature can have (For reference, Adira has 100 Health Points). When Health Points == 0, the creature will die.

  • max_poise: Max amount of poise points this creature can have (For reference, Adira has 50 Poise Points). When Poise Points == 0, the creature will enter a staggered state for 2 seconds.

  • health_damage: Determines how much damage an enemy attack will deal to the Health Points.

  • poise_damage: Determines how much damage an enemy attack will deal to the Poise Points

  • walk_speed: Defines how fast a creature will roam when they are in the "idle" state.

  • run_speed: Defines how fast a creature will sprint when they are engaging in combat or fleeing the battle.

  • weight: Defines the creature weight, to determine if then attacking, the target will be knockbacked or not. If the attacker have equal weight, the knockback will be minimal. If the attacker have way more weight, the knockback will be stronger. If the attacker have less weight there will be no knockback.

  • attack_speed: Defines how quickly a creature will initiate their next attack, after the first attack have been completed. Those attacks need to be in the same attack pattern.

  • range: Defines how far this creature attacks will reach.

  • attack_pattern: The number of attack patterns a creature have. Still in the works, may need to be reworked.

  • attach: Defines if a creature will be able to attach to the player. Example: A mosquito attacks the playing, by attaching to them, and then sucking blood, depleting Adira's Health Points. The player will need to engage in a minigame to detach the enemy.

For more information, you can check the following GDDs:

How to change enemies attributes

If you need to make heavy changes to their attributes, renaming them, adding new creatures, etc, you first need to delete every folder inside:
For creatures: res://src/CombatData/Resources/Creature/
For humans: res://src/CombatData/Resources/Human/

After that, or if you have simple changes in values, you need to follow the step-by-step guide down below:

1) To change enemy data, you have to access Enemies Spreadsheet, and change the attribute values there.

2) There are two spreadsheets in this document, one for Creatures, and the other for Humans.

3) After changing everything, you need to export the spreadsheet as a ".csv" file, with the following name structure, formatting and extension:
If creature: EnemyCreature.data.
If human: EnemyHuman.data

4) Now move the file to the folder: src/CombatData/Data

5) Next you need to run only the scene LoadEnemyDB, inside: res://src/CombatData/. Now it's done! Every resource file will be created.

AI

Enemy works with a behavior structure, with the help of a behavior manager. Each enemy can have unique behaviors & states within behaviors. Check Behavior Section for more information.