Vǫrðr Forge Steam page

Characters and Gameplay

Calm Characters

A calm character is a villager, a shopkeeper or an animal that is not aggressive. What it does when the player attacks it is a choice.

When attacked

Stay calm
Nothing. The default.
Fight back
It turns aggressive where it stands and attacks the player, as npc provoke makes it.
Flee
It runs from the player for five seconds after each blow, and stays where it stops.

The project's choice

Edit > Project Settings > ENEMIES > Types, under CALM CHARACTERS:

When attacked
Stay calm, Fight back or Flee. Stay calm by default.
CALM CHARACTERS at the foot of the Types page, set to Fight back.
CALM CHARACTERS at the foot of the Types page, set to Fight back.

A type's choice

On the same page, pick a type under ENEMY TYPES:

When attacked
Project, Stay calm, Fight back or Flee. Project by default, which follows the project's row. It is saved with the type in enemies.vfa.

Which choice counts

A placed character's own choice comes first, then its type's, then the project's.

One character's choice

Select the placed character. In Properties:

When attacked
Project default (or Type default when its type has a choice), Stay calm, Fight back or Flee. The first follows its type's row, else the project's. It is saved with the map.

From a script

npc onhit smith fight
npc onhit smith flee
npc onhit smith calm
npc onhit smith project
npc onhit project flee
enemydef guard onhit fight
enemydef guard onhit project

npc onhit project sets the project's choice for this run; enemydef <type> onhit sets a type's.

Killable or not

A Killable character takes the blow first, and answers if it lives. A character that is not Killable takes no damage: with Stay calm the blow passes it; with Fight back or Flee the blow reaches it and it answers.

A character that fights back is aggressive from then on and is struck like an enemy. npc calm calms it again.

The files

game.vdc holds calmhit calm|fight|flee. A type's choice is the onhit field of its row in enemies.vfa, written only when it is not Project. A placed character's own choice is saved in its row of the map.

An old project

A project with no calmhit line, whose types and characters have no choice of their own, has every character Stay calm, as before.