Introduction

This guide contains information on how to create mods for Conquest of Elysium 5, to change aspects of the game or to add new content.

General Information

With the help of a simple text editor it is possible to create new weapons, units and entire classes. It is also possible to modify existing weapons, units, classes, spells and magic items.

Conquest of Elysium 5 mods are text files with a series of commands that the game interprets and uses to alter the desired objects. The file extension for CoE5 mods is .c5m. The mod files must be located within a subdirectory of the mods directory of CoE5, which you may open from the main menu. Everything in a mod (including the .c5m file) must be placed in a subdirectory with the same name as your mod. The .c5m file must also have the name of your mod plus '.c5m' at the end. The mod name must not include any spaces or special characters.

With the help of a paint program you will also be able to add new graphics to units or terrain. All images must be saved as Targa (.tga) or PNG (.png) images. TGA image files must have 24- or 32-bit color and be uncompressed or RLE. If the image is saved as a TGA file that doesn’t have any transparent pixels, black (0,0,0) will be replaced with a fully transparent color and magenta (255,0,255) will be replaced by a shadow color. In this manual image files are often written as "image.tga", but a PNG file can be used instead.

Mod Mechanics

Regardless of content, all CoE5 mods have a similar structure. All modding commands must be saved in a text file with the .c5m (Conquest of Elysium 5 mod) extension. The c5m file must be located within a subdirectory of the CoE5 mod directory.

It is possible to have many mods enabled at once. For instance you can enable a mod that turns Dwarves into giants at the same time as a mod that adds a new Elf nation. A game created when a mod is active will automatically activate this mod for all players participating in that game. There will be an error message for any player who hasn’t downloaded the mod. Two mods should never try to modify the same thing. This can result in different behavior on different computers.

Mod commands are executed from the beginning of the file to the end of the file. Make sure that commands that are prerequisites for others appear before the commands that require them. For example, modding a new weapon must be done before assigning it to a new monster (or an existing monster) or the mod will crash.

Mod Syntax

Mods commands are mainly a text command followed by numbers and perhaps some text (e.g. naming something).

A hash-sign (#) indicates a comment and anything after it will be ignored.

The mod commands sometimes have a vertical line (|) among their arguments. This line means OR. So use either the argument on the left side of the line or the one on the other side, not both.

When a mod command has an argument inside brackets like [<value>], it means that it is an optional argument that can be omitted (also, never write the brackets [] when using the command).

An argument of <0-1> means 0=disabled, 1=enabled. Usually you always want to use a 1 here, unless you want to disable an already existing ability.

Make sure to have correct UPPER/lower-case letters for filenames. The Linux filesystem is case sensitive and mods won’t work if they are mixed up.

Many commands take a monster name as an argument. This name can also have an offset before the monster name if you don’t want to select the first or sometimes a random one. This offset is written like <offset>:"monster name". Offset starts at 0 for the first monster. To summon the second monster named spearman you would write like this:

addstring "1:spearman"

Minimal Mod for Steam Workshop

Mods can be uploaded to the Steam Workshop which will allow other users to download and enjoy them. This example creates a minimal mod called "orcking" that is ready to be published on the Steam Workshop. Once the mod is ready it can be uploaded by selecting mods from the main menu and right clicking on the mod, there will be an "Upload mod to Steam Workshop" button there.

Files

mods/orcking                (just a directory)
mods/orcking/orcking.c5m    (the actual mod file with the commands)
mods/orcking/orcbanner.tga  (mod banner for CoE, 256*64 sized TGA or PNG file)
mods/orcking/banner.png     (256*256 pixels large png file with banner for steam)
mods/orcking/coe5ws.txt     (visibility information for steam)

orcking.c5m

This is a simple ASCII text file with the following contents.

icon                "orcbanner.tga"
description         "This is a very simple mod that creates a new Orc King class."
newclass
setclassname        "The Orc King"
addstartunits       "Goblin" 10
addstartunits       "Goblin Archer" 10
setmaincom          "Goblin Shaman"
addstartcom         "Goblin Chieftain"
addstartunits       "Goblin Spearman" 5

orcbanner.tga

This contains a banner image that will be shown in CoE5. It must be a 256*64 pixels large image.

banner.png

This contains a banner image that will be shown on steam. It must be a square shaped png image, 256*256 pixels is a suitable size.

coe5ws.txt

This file determines who can see the mod on steam. The value of Visibility can be one of these three: private/friends/public.

Visibility="public"

Mod Info

This gives some basic information about the mod that can be shown to the user when choosing what mods to enable. The first two Mod Info commands are required for all mods.

Required Commands

icon "image.tga"

Icon shown when selecting the mod in CoE5. It should be a 256*64 large TGA or PNG image.

description "text"

A text description of the mod.

Optional Commands

modprio <prio 1-9>

Sets when this mod should be loaded in relation to other mods. Default is 5 and lower numbers are loaded first. Usually you don’t need to use this command.

Maps

Mods can also include premade maps, enabling modders to create map packs that can be uploaded to the workshop. The map file must be placed in the same folder as everything else in the mod.

mapfile "mapfile.coem"

The filename of the map. A single mod can contain many maps.

Fonts & Translation

Fonts can also include ttf fonts, enabling modders to use special fonts for translation mods. The font file must be placed in the same folder as everything else in the mod. To get hold of all translatable strings you should play the game with the "--dumpstrings" start option. That will create a file called "transtrings.txt" that contains all strings (text snippets) encountered while playing that hasn’t been translated by any currently enabled mod. Sometimes the strings will contain something like "%s" or "%d". This will be replaced by another string or number later, these special characters must be present in the translated version as well.

fontfile <font nbr 0-2> "fontfile.ttf"

The filename of the font. Font nbr 0 = standard, 1 = fancy (used for headers), 2 = long texts (for descriptions).

translation "from" "to"

Translates all occurrences of the "from" text to the "to" text.

Weapon Modding

These commands can be used to modify or create new weapons.

Start Commands

newweapon "weapon name"

This command creates a new weapon.

selectweapon "weapon name" | <nbr>

Selects an existing weapon for modification. There may be several different weapons with the same name, in which case you should use the weapon number for selecting the desired weapon. You can see existing weapon numbers in game by pressing ctrl-i when inspecting a unit.

Basic Commands

trgrank <nbr>

Sets the battlefield row where the weapon hits. See the Target Ranks (trgrank) table for the possible values. The default value is 1.

range <nbr>

The maximum range of the weapon. This should be 1 for melee weapons. A normal bow has range 5.

init <nbr>

Initiative value for the weapon, default is 2. Some common initiative values are these 1=spell, 2=fist/dagger/bow, 3=club/axe, 4=sword, 6=spear.

dmgtype <nbr>

Sets the damage type for the weapon. Table Damage Types (dmgtype) contains the list of possible damage types. The default value is 3 (piercing damage).

dmg <nbr>

Sets the damage for the weapon. The default value is 0, which makes the weapon a natural weapon whose base damage is determined during monster modding. Note that damage types 12 and 13 require a bitmask value for their special effects. The special afflictions and benefit effects are listed in table Special Afflictions and table Special Benefits.

aoe <nbr>

Sets the area of effect for the weapon in squares. The default value is 0 (a single monster). A value of x will hit up to x monsters near the target. There are also many special values that can be used for other kind of areas. See Table Area of Effects (aoe). Those that are written as e.g. 30xx must be written as a 4 digit number e.g. “aoe 3005” for a cone of 5 squares.

Example creating a new ranged weapon
newweapon           "Magic Javelin"
range               6
init                7
dmgtype             3
dmg                 8
arrow
flymode             1
flylook             1
flysound            19

Sound & Visuals

look <look>

Sets the visual effect that occurs where the weapon strikes down, e.g. a fiery explosion for a fireball. See the Visual Effects (look) table. The default is no visual effect.

sound <sound>

The sound effect when the weapon strikes down. See table Sound Effects (sound).

flymode <flymode nbr>

Set this if a projectile should be visible for a ranged attack. See Fly modes (flymode) table. Those marked with an asterisk (*) behave like normal for aoe 1 effects, but with larger aoe they still only create one flying graphical effect. Fireball uses this effect to create a single flying fireball, but with a larger aoe explosion. If using a sprite (flymode 1) then the look value will be used to set the sprite used. See the table Fly Sprites (flyspr) for possible sprites to use.

flylook <look>

The visual effect (see table Visual Effects (look)) of the flying projectile, ranged weapons only. If flymode is 1 a fly sprite (see table Fly Sprites (flyspr)) should be used instead of a look number.

flysound <sound>

The sound effect when the projectile starts flying, ranged weapons only. -1 = none.

sndvol <dvol>

dvol -50 = half volume, 100 = double volume.

reloadsnd <sound>

Sound when reloading, -1 = none.

yellow

set color of damage numbers

blue

set color of damage numbers

purple

set color of damage numbers

Chained Weapons

next

If the target is wounded by the weapon, it will also be hit by the next weapon, i.e. the weapon defined next in the mod after this weapon. This command can only be used for new weapons, so you must have created one with the newweapon command.

nextwep "weapon name" | <nbr>

Like 'next' but the additional strike will come from a named weapon that has already been created.

nextalways

Like next, but will take effect even if no damage was inflicted on the target.

nextalwayswep "weapon name" | <nbr>

Like 'nextalways' but the additional strike will come from a named weapon that has already been created.

nextdmg <dmg>

Sets the damage of the chained weapon.

Special Attributes

clearwspec

Clears all special attributes of the weapon.

drain

Draining damage that will heal the attacker

oneshot

The weapon can only be used once per battle.

reload1

It takes 1 combat round to reload this weapon.

reload2

It takes 2 combat rounds to reload this weapon.

reload3

It takes 3 combat rounds to reload this weapon.

easymr

Passing an easy magic resistance check negates the effects of this weapon.

mr

Passing a normal magic resistance check negates the effects of this weapon.

hardmr

Passing a hard magic resistance check negates the effects of this weapon.

an

The weapon ignores armor.

shieldneg

The weapon ignores shields.

strresist

The effects of this weapon can be resisted by a successful strength check.

holykill

The weapon causes double damage against undead & demons

undkill

The weapon causes double damage against undead only

affectundead

The weapon only affects undead.

nostr

The weapon is unaffected by damage bonuses from any source

drown

Water breathers are immune to this weapon.

affectanimal

The weapon only affects animals.

reanimate

A victim killed by the weapon becomes a Soulless.

undead

The weapon does not affect Undead units.

morale

A morale check vs 1d10 negates the effects of this weapon.

hardmorale

A morale check vs 1d20 negates the effects of this weapon.

mutate

A victim killed by this weapon becomes a monster of the type that immediately follows the killer in the monster list. For example, units killed by a Doppelganger become Doppelspawn, which is the next unit in order from Doppelganger.

replicate

A victim killed by this weapon becomes the same type of monster as the killer.

ethereal

The weapon does not affect Ethereal beings

mind

The weapon does not affect Mindless beings.

inanimate

The weapon does not affect Lifeless beings.

large

The weapon does not affect monsters that are 2x2 tiles or larger in size on the battlefield.

huge

The weapon does not affect Huge beings.

affecthuman

The weapon only affects units with the res_convert attribute.

flying

Flying and Floating units are immune.

arrow

The effects of this weapon can be negated by the Air Shield attribute.

mundane

Being Ethereal protects against this weapon. Ethereal units have a 75% chance to be unaffected by the weapon. Most weapons such as swords and spears are mundane.

sweep

The weapon can continue to kill multiple targets.

fullsweep

The attack will hit all adjacent units. The primary target takes full damage and all subsequent targets take a cumulative -1 damage (so the second target takes full damage -1, the third target takes full damage -2 etc).

lob

Use this command for arrows, sling stones and other weapons with an arcing trajectory.

rangepen

Damage penalty at long range. All normal range weapons like bows and slings have this.

onlyenemy

This weapon will not affect friendly troops

onlyfriend

This weapon will only affect friendly troops

ghoulify

Humanoids killed by this weapon will become ghouls

scatter

A missile weapon with this attribute may deviate one square

poison

Poison resistance helps against this attack even though the weapon is not poison.

dispossess

Victim becomes a dispossessed spirit

affectmale

This weapon will not affect females

stone

Stone beings are immune to the weapon.

stonekill

x2 dmg vs stone beings and stone walls

wallkill

x5 dmg vs walls and boats

flying2

Flying units have 75% chance of evading this attack

targterr

Weapon can target terrain

soft

Armor is doubled vs this weapon

tree

Tree/bushes/fungus are immune to this weapon

Weapon Modding Numbers

Target Ranks (trgrank)
 0   self
 1   front row enemy
 5   border square (for summoning)
 6   border square, but not behind walls (for summoning)
 7   target a square (for summoning)
 8   a rear enemy
 9   any enemy
-9   a friendly unit
Fly modes (flymode)
1 = use a sprite instead of particles
2 = standard
3 = fast
4 = faster
5 = line
6 = standard*
7 = line*
8 = slow line
9 = meteor
Fly Sprites (flyspr)
0       Arrow
1       Javelin
2       Sling stone
3-6     Spinning blade
7       Ballista bolt
8-11    Spinning axe
12      Web
13      Vine arrow
15-19   Fire bola
20      Web
25-28   Black Vortex
31      Spikes
32      Boulder
33      Stone
34      Shard
35      Spike
Area of Effects (aoe)
0     Single target
xx    Nbr of nearby squares
-xx   Nbr of random squares
997   Circle around unit
998   All friendly units
999   All enemy units
10xx  Beam, xx squares
20xx  Narrow cone, xx squares
30xx  Cone, xx squares
40xx  Wide cone, xx squares
50xx  Far beam, xx squares
70xx  Far crack, xx squares
9rxx  Chain lightning, xx targets, r = max distance
9997  25% of all squares
9998  All units
9999  All squares
Damage Types (dmgtype)
1   slash
2   blunt
3   pierce
4   fire
5   cold
6   shock
7   magic
8   fear
9   poison
10  acid
11  release (for magic mirrors)
12  special affliction
13  special benefit
14  charm
15  polymorph
16  sleep
17  paralyze
18  summon
19  enslave (like charm but decommanderized)
20  swallow
21  mirror image
22  corrupt (charm vs morale)
23  banish
24  petrify
25  animate (dmg: 1=tree, 2=fungus)
Sound Effects (sound)
1    Spear
8    Sword
9    Whip
11   Heavy Blow
13   Crossbow
14   Bow
15   Sling
16   Fire
18   Life Drain
19   Javelin
22   Fear
24   Lightning
27   Thunder Strike
29   Blessing
31   Magic Enchantment
32   Pain
39   Frost
40   Shatter
44   Luck
46   Blowpipe
57   Summoning
66   Wind
68   Small Fire
88   Water
89   Water
96   Breath Weapon
97   Sleep
104  Spell Flysound
105  Tail Sweep
114  Horn
Visual Effects (look)
  1   Pain
  2   White Dust
  3   White Flare
  4   Horror Mark
  5   Fear
  7   Poison Cloud
  8   Poison Cloud
  9   Charm
 10   Charm
 11   Sleep
 12   Cold
 13   Sleeping
 14   Burning
 15   Summoning
 16   Ben
 17   Water
 18   Iron Storm
 19   Sun Flare
 20   Bolt of Unlife
 21   Iron Bolt (fly)
 22   Briar Cage
 23   Dark Purplish
 24   Huge Lightning
 25   Small Lightning
 26   Wind
 27   Earth
 28   Stellar Bolt
 29   Words of the Void
 30   Mind Burn
 31   Soul Slay
 32   Dimension Shift
 33   Lashes of Death
 34   Blood Burst
 35   Pillar of Fire
 36   Shooting Thorns
 37   Syllable of Death
 38   Purify
 39   Darkness
 40   Smite
 41   Blood Boil
 42   Dehydration
 43   Sailor's Death
 44   Stone Skin
 45   Iron Skin
 46   Strength
 47   Smokeless Flame
 48   Confusion
 49   Acid Splash
 50   Rain of Blood
 51   Golden Flare
 52   Harm
 54   Color Spray
 55   Divine Flames
 56   Small Flame
 57   Phantasmal Flame
 58   Drag Lightning
 59   Drag Chasm
 60   Poison Bolts (fly)
 61   Venom (line)
 62   Poison Cloud (fly)
 63   Poison Breath (fly)
 64   Poison Breath (fly)
 65   Fireball (fly)
 66   Flame (line)
 67   Blood (line)
 68   Flame
 69   Flame Smoke
 70   Phantasmal Bolts (fly)
 71   Phantasmal Ray (line)
 72   Bolts of Light (fly)
 73   Ray of Light (line)
 74   Drain Life (line)
 75   Soul Drain (line)
 76   Bling Circle
 77   Bane Fire
 78   Bane Smoke
 79   Death Gaze (line)
 80   Golden Gaze (line)
 81   Black Gaze (line)
 82   Fear
 83   White Flare
 84   Meteor
 85   Meteor Smoke
 86   Meteor Shower
 87   Meteor Shower Smoke
 88   Frost (fly)
 89   Freeze (line)
 90   Frost
 91   Frost Smoke
 92   Blizzard
 93   Frost Smoke
 94   Icicle (fly)
 95   Fiery Breath (fly)
 96   Smoke Breath (fly)
 97   Icy Breath (fly)
 98   Frost Smoke Breath (fly)
 99   Acid Breath (line)
100   Acid Breath (line)
101   Summon Shade (line)
102   Summon Shade (line)
103   Purple Summon Circle
104   Blood Demon (line)
105   Blood Summon (line)
106   Blood Summon Circle
107   Symbol of Light (line)
108   Hypno Ray (line)
109   Frozen Heart (line)
110   Hail Storm
111   Combustion (line)
112   Combustion Smoke
113   Poison Dart (fly)
114   Poison Mist (fx)
115   Paralyze (line)
116   Disintegrate (line)
117   Confusion (line)
118   Cloud of Death (fly)
119   Cloud of Death
120   Sleep (line)
121   Hold (line)
122   Enslave (line)
123   Web (fly)
124   Finger of Death (line)
125   Purple Dust
126   Wither (fly)
127   Disease (fly)
128   Decay (fly)
129   Bolt of Unlife (fly)
130   Black Cloud (fly)
131   Black Smoke
132   Strength Sap (line)
133   Dark Red Smoke
134   Weakness (fly)
135   Dark Power (line)
136   White Dust
137   Wild Growth
138   Acid Rain (fly)
139   Acid Rain (fly)
140   Invulnerability
141   Death Spell (fly)
142   Death Spell
143   Chill of the Dead (fly)
144   Chill of the Dead
145   Chill of the Dead
146   Shade of Death
147   Tendrils of Death (line)
148   Acid Mist (fly)
149   Charm (line)
150   Storm Wind (fly)
151   Lightning (line)
152   Orb Lightning
153   Thunder Strike
154   White Dust
155   Thunderhead
156   White Dust
157   Curse (line)
158   Curse
159   Confusion (fly)
160   Curse of the Frog Prince
161   Maws of the Earth
162   Reddish Flame
163   Acid Dart (fly)
164   Acid Dart (fly)
165   Small Flame
166   Flame Smoke
167   Small Cold
168   Poison Cloud (bg)
169   Poison Cloud (bg)
170   Pain (line)
171   Harm
172   Lashes of Pain (line)
173   Illusory Attack (line)
174   Illusory Attack (fly)
175   Sunbeam (line)
176   Sunlight
177   Banishment
178   Luck
179   Luck
180   Awe
181   Blessing
182   Bloodletting
183   Lashes of Fire (line)
184   Vengeance (line)
185   Lashes of Death (line)
186   Shock (fly)
187   Shock
188   Sparks (fly)
189   Air Shield
190   Incinerate
191   Smoke
192   Strange Hymn (fly)
193   Strange Hymn
194   Words of the Void (fly)
195   Tendril of Darkness (line)
196   Dehydration (line)
197   Torrent of Water (fly)
198   Entangle
199   Entangle (fly)
200   Shooting Thorns (fly)
201   Barkskin
202   Curse of Wood (fly)
203   Putrid Cloud (fly)
204   Putrid Cloud (fly)
205   Putrid Cloud
206   Putrid Cloud
207   Lesser Smite
208   Vafur Flames (bg)
209   Vafur Flames (bg)
210   Mind Tentacles (fly)
211   Earth Meld
212   Mass Command (line)
213   Disease Cloud (bg)
214   Energy Beam (line)
215   Paralyzing Scream (fly)
216   Defile (line)
217   Desert Wind (fly)
218   Desert Wind
219   Black Cloud (fly)
220   Black Cloud
221   Animate Tree (line)
222   tracer (tracer)
223   Poison Goo (fly)
224   Boulder Drop
225   Boulder Impact
226   Vafur Air (bg)
227   Vafur Rainbow (bg)
228   Desolation Cloud (bg)
229   Vafur Death (bg)
Special Afflictions
2^0   1              Disease
2^1   2              Curse
2^2   4              Decay
2^3   8              Sleep
2^4   16             Paralyzation
2^5   32             Burn
2^6   64             Stun
2^7   128            Bleeding
2^8   256            Earth Grip
2^9   512            Entanglement
2^10  1024           Imprison in Ice
2^11  2048           Weakness
2^12  4096           Transform into Tree
2^13  8192           Insanity
2^14  16384          Horrormark
2^15  32768          Horrormark – Great
2^16  65536          Summoning Sickness
2^18  262144         Confusion
2^19  524288         Turn into Gold
2^20  1048576        Lost an Eye
2^21  2097152        Lost the Other Eye
2^22  4194304        Chest Wound
2^23  8388608        Never Healing Wound
2^24  16777216       Battle Fright
2^25  33554432       Feeblemind
2^26  67108864       Blindness
2^27  134217728      Temporary Insanity
2^28  268435456      Death wish (+1 rank)
2^29  536870912      Debilitating wound
2^30  1073741824     Festering wound
2^31  2147483648     Afraid
2^32  4294967296     Stuck in net
2^34  17179869184    Stationary, cannot move on world map permanently
2^35  34359738368    Exhausted, -1 str, 1 dmg when attacking, chance to not move
2^36  68719476736    Petrified
2^38  274877906944   Slimed, 50% chance of not attacking, temporary
2^40  1099511627776  Ghost shackles
2^43  8796093022208  Frozen, can get this after taking cold damage
Special Benefits
2^0  1             Invulnerability
2^1  2             Armor +1
2^2  4             Fire Resistance
2^3  8             Cold Resistance
2^4  16            Poison Resistance
2^5  32            Shock Resistance
2^6  64            Magic Resistance +2
2^7  128           Luck
2^8  256           Etherealness
2^9  512           Strength / Damage +2
2^10  1024         Fire Shield (3)
2^11  2048         Air Shield
2^12  4096         Regeneration
2^13  8192         Awe (+1)
2^15  32768        Gone Berserk
2^16  65536        Blessed
2^17  131072       Armor +2
2^18  262144       Pierce Resistance
2^19  524288       Slash Resistance
2^20  1048576      Blunt Resistance
2^21  2097152      Displaced
2^22  4194304      Non-Magical Invulnerability
2^23  8388608      Swamp Soul (Witch ritual)
2^24  16777216     Stygian Bath, Trolls receive permanent non magical invulnerability, others lesser effect
2^25  33554432     Stygian Paths, moves fast in death realm
2^26  67108864     Twiceborn (Necromancer ritual)
2^27  134217728    Twiceborn  (cast on a graveyard)
2^28  268435456    The simulacrum
2^29  536870912    The original, will revive as the simulacrum
2^30  1073741824   Quickness
2^31  2147483648   Primal animal (increased stats)
2^32  4294967296   Twist fate
2^33  8589934592   Wind Guide, +1 range +1 dmg for missiles
2^34  17179869184  Lucky Strike, x2 dmg for next strike
2^36  68719476736  Promise of the Ancestors (Barbarian ritual)

Magic Item Modding

These commands can be used to modify or create new magic items.

Start Commands

newitem "item name"

This command creates a new magic item.

selectitem "item name"

Selects an existing magic item for modification.

Basic Commands

name "item name"

Set the name of the magic item. Not necessary if you created a new one with newitem.

descr "item description"

Not necessary, as most magic items don’t have descriptions.

spr "image.tga"

Sets the sprite for the magic item. It should be centered in a 32x32 or 64x64 pixel large image. The drawn item should not be larger than 40x40 pixels however, so if put in a 64x64 image it should be surrounded by black.

rarity <rarity>

Sets how easy it should be to find this item. 0=common, 1=rare, 2=rare & unique, 3=impossible to find as a random item. Default is 0.

type <item type>

Sets the magic item type. Default is 7 = misc item. See table Magic Item Types

itemwep "weapon name"

Sets the weapon stats of the magic item to those of the weapon with this name. Only use this together with type 1 magic items.

Special Commands

armor <value>

Armor value, default 0.

protection <value>

Protection bonus, default 0.

hp <value>

Hit Point bonus, default 0.

combatsum <mode> "summoning string"

Mode -1 = will summon on the first round of combat, 1 = will summon on all rounds of combat. Summoning string is very similar to the summoning strings used for ritual summoning. E.g. "2d4*Deer & 2*wolf" would summon 2-8 deer and 2 wolves. Commanders cannot be summoned in battle.

combatspell <mode> "spell name"

Mode -1 = spell will be auto cast on the first round, 1 = unit can cast this spell (like a wand), 2 = spell will be auto cast each round. The spell name is simply the name of the combat spell to be cast, e.g. "Fireball".

Copy & Clear commands

copyspr "item name"

Uses the sprite from this magic item.

copystats "item name"

Copies all stats except the name from this magic item.

Monster Commands for Magic Items

These commands are exactly the same as the monster command with the same name, look at monster modding for information on how to use them. They can be used for magic items too.

lucky
diseaseres
human
undead
demonic
animal
inanimate
holy
acutesenses
spiritsight
badsight
stealth
foreststealth
invisible
sleepres
charmres
bluntres
slashres
pierceres
ethereal
shield
largeshield
magicshield
noheal
berserker
fastheal
noleader
regeneration
nonmaginvul
swallowres
banishsurv
unaging
coldblood
snowstealth
clumsy
nozoc
unimportant
rearpos
frontpos
nocombat
treelook
female
desertstealth
classcost
leadership
localleadership
burnforest
awe
slavehunt
armytrainer
poisonexpl
fireexpl
shardexpl
motherspawn
eatvillage
gold
iron
trade
relics
hands
fungi
herbs
weed
lifeforce
fireaura
coldaura
shockaura
poisonaura
poisonspikes
eatdead
eatdeadcap
scry
scrycost
digest
incorporate
hpoverflow
absorbdead
airshield
extraeyes
look
vengeance
gatherherbs
gatherfungus
gathersacr
gatherhands
gatherweed
gathergems
gatheranygems
seegems
gatherrelics
saner
sensedead
reformloc
hideanimals
mirror
revertmirror
phantasm
releasephant
releaserate
troll
allrit
displaced
riverdmg
iceprot
melt
dmgonterr
dmgonterrbonus
voidsanity
planeshift
aipowcom1
aipowcom2
aipowcom3
releasespell
fear
goldcarrier
ironcarrier
rebate
makeruin
meleeambush
poisoncloud
mirrorammo
affres
forestheart
spread
seduceaura
fireres
coldres
shockres
poisonres
acidres
tangleres
coldheal
localironbonus
localgoldbonus
goldbonus
ironbonus
tradebonus
neverturn
thrallhunt
putridexpl
farsight
changetemp
likestoburn
reanimate
spellrange
diseasecloud
mindexpl
limitgold
limitiron
reformdestroy
deployoutside
hadesres
stonebeing
acidblood
noeyes
makecolony
trample
tramplexsize
maptele
healonterr
autoastrology
twistfate
desolator
desolcloud
colonyterr
colonymsg
satyrspawn
harpyspawn
centspawn
minospawn
diseaseshield
darkbless
defiler
scourgedefiler
petriaura
combustionaura
varregen
mirrorimages
confusionaura
tunnelmove
wanderrest
wandermaxdist
kobold
goblin
expendable
dragon
lairgoldpen
siegetunnel
evasion
chopforest
primable
primifier
madcultist
primalcult
awakentrees
awakenfungus
fungus
limittrade
primal
sitepopboost
pickupanimals
slimeshield
airbreather
terraformfrom
terraformto
terraformch
sleeper
snowsleeper
deepsleeper
flying
huge
immobile
slow
fast
swamp
desert
water
float
mountain
noland
wateronly
swamp1
swamp2
desert1
desert2
deadforest1
deadforest2
mountain1
mountain2
jungle1
jungle2
money1
money2
horror
forest1
forest2
stupid
temple1
temple2
coastal
loner
south1
south2
passwall
battlefast
wall
stationary
winteridle
snow
nonruin1
teleport
aggressive
tunnel
north1
gates1
void2
citadel2
semistupid
desert3
mines1
stray
ancforest1
battleslow
battleslow2
followstupid

Magic Item Modding Numbers

Magic Item Types
weapon   1
helm     3
armor    4
glove    5
boots    6
misc     7

Monster Modding

These commands allow the modifying of existing monsters and creating new monsters. At most about 3000 new monsters can be created by mods.

Start Commands

selectmonster "monster name" [<offset>]

Selects the monster that will be affected by the following modding commands. The selected monster is referred to as the active monster. The selectmonster command always selects the first monster of that name in the monster list. If there is more than one monster with the same name (e.g. longdead) the offset value can be used to select them. Leave the offset out if you only want to select the first monster. The default value of the offset is 0. The offset used by this command cannot be set to a negative value, unlike the offset for the lookslike command. Offset value 1 means the command selects the (first + 1) monster of that name, i.e. the second monster. Offset 2 selects the third monster of the same name etc. Note that this command cannot use the "1:spearman" syntax.

newmonster "monster name"

Creates a new monster. This new monster will be affected by the following modding commands until the next active monster is set. The monster can have the same name as another monster.

Basic Commands

name "monster name"

This command renames an existing monster. It is not needed when creating a new monster.

spr1 "image.tga"

The file name of the normal image for the monster. This command sets the attack sprite to this image as well.The image should be 32x32 or 64x64 for normal sized monsters and 128x128 for huge monsters. A human being should be about 34 pixels tall and there should be 2 pixels of free space between his feet and the bottom of the image.

spr2 "image.tga"

The file name of the attack image for the monster. If this is not set, then spr1 will be used for this image too. This command must come after the spr1 command.

descr "text"

Description of the monster. The ^ character will be replaced with a newline.

hp <nbr>

The maximum number of hit points for the monster. A normal human soldier has 6 hit points and an elite heavily armored soldier has 10 hit points. An ogre has 25 hit points, a troll has 56 hit points and giants, dragons and other huge monsters can have well over a 100 hit points.

mr <nbr>

The magic resistance of the monster. Animals have a magic resistance of 2, a normal human has 4 and a more susceptible human has 3. Apprentice mages have a magic resistance of 6, full mages have 8 and master mages have 9. Some highly magical beings may have even higher magic resistance and they can almost never be affected by magic that is resistible.

str <nbr>

The strength of the monster. A normal human soldier has a strength of 4, an elite human soldier has 5, a troll has 8 or 9 and giants and dragons have 10 to 12.

armor <nbr>

This command sets the monster’s armor value, which represents its natural protection or the armor it is wearing. Normal human troops have an armor value of 0. Medium armored human troops have an armor value of 1. Heavily armored human troops like Heavy Infantry have an armor value of 2 and very heavily armored troops like Knights and High Lords have an armor value of 3. Extremely tough monsters like dragons may have an armor value of 4 or more.

mor <nbr>

The morale of the monster. A normal human soldier has a morale of 4, an elite human soldier has 5 or 6 and powerful monsters can have a morale of 8 or more. Very fearless monsters may have a morale of 15. Setting the morale to 99 makes the monster Mindless and it will be completely unaffected by fear or any other effects that influence morale.

rank <nbr>

Sets the default deployment rank for the monster. -1 = back, 0 = mid, 1 = front

Copy & Clear Commands

copystats "monster name"

Copies the attributes, weapons, graphics and other properties of the specified monster. The command does not copy the name of the monster, however.

copyspr "monster name"

Copy the sprite of another monster.

clearspec

Removes all special abilities from the active monster. The special abilities are things like Fire Immunity, Regeneration, etc. This command does not clear movement abilities. Use the clearmove command for that.

clearmove

Removes all movement attributes from the active monster.

clearweapons

Removes all weapons from the active monster.

Attacks

Weapon number can be used to select the weapon instead of name if needed. Weapons that can be replaced by items (e.g. Broadsword or Spear) have fixed damage values and the damage value set by mod command becomes a damage bonus for the monster.

Note that for weapons that do special effect damage (damage type 12) or special benefit damage (damage type 13), the damage value in the weapon commands is a bitmask value that specifies what effect or effects take place.

The asterisk damage notation of means variable damage and the # means the weapon uses a bitmask to create a special effect.

Special weapon properties such as Drain, Strikes Rear, Strikes Anywhere, Negates Shields etc are intrinsic properties of the weapon and must be assigned by weapon modding before the weapons are given to a monster.

meleeweapon <dmg> "weapon"

Equips the monster with a melee weapon of this name that has a base damage of <dmg>.

meleeweaponbonus <dmg> "weapon"

Equips the monster with a melee weapon of this name that has a base damage of <dmg>. This weapon will be used in addition to any other attacks the monster has.

meleeweaponspec <dmg> "weapon"

Equips the monsters with a special melee weapon. Any normal melee attacks after this one will not be used if this attack was used. Normally used for lances.

meleeweaponlong <dmg> "weapon"

This command is deprecated and should no longer be used.

meleeweapon50s <dmg> "weapon"

Equips the monster with a melee+skip attack that has 50% chance of being used. If it is used the next attack will be skipped.

rangedweapon <dmg> "weapon"

Equips the monster with a ranged weapon of this name that has a base damage of <dmg>.

rangedweaponbonus <dmg> "weapon"

Equips the monster with a ranged weapon of this name that has a base damage of <dmg>. This weapon will be used in addition to any other attacks the monster has.

rangedweapon25 <dmg> "weapon"

Equips the monster with a ranged weapon of this name that has a base damage of <dmg>. This weapon has a 25% chance of being used in melee combat.

rangedweapon50 <dmg> "weapon"

Equips the monster with a ranged weapon of this name that has a base damage of <dmg>. This weapon has a 50% chance of being used in melee combat.

rangedweapon50s <dmg> "weapon"

Equips the monster with a range+skip weapon that has 50% chance of being used in melee (100% at range). When used the next weapon will be skipped.

rangedweapon50x <dmg> "weapon"

Equips the monster with a range+skip weapon that has 50% chance of being used in melee or range. When used the next weapon will be skipped.

siegeweapon <dmg> "weapon"

Equips the monster with a siege weapon of this name that has a base damage of <dmg>. This weapon will be used in locations that allow sieges, like cities and castles. Siege weapons are used in the first ten rounds of combat before any normal attacks are made.

assassinweapon <dmg> "weapon"

Equips the monster with an assassination weapon of this name that has a base damage of <dmg>. This weapon will be used to make an assassination attempt on an enemy before normal combat (including siege weapons) begins. Assassination attempts can only be used by the attacker and cannot be used against summoned creatures the summoner fails to control.

prebatweapon <dmg> "weapon"

Equips the monster with a prebattle effect weapon of this name that has a base damage of <dmg>. This weapon will be used before any normal combat (including assassination) begins.

Combat Spells

These commands set the spell casting abilities of the monster. Spell casting abilities work exactly like weapons, with the difference that the spell to be cast is selected randomly from the spells the monster has memorized. Each spell has the role of a weapon when cast.

Magic paths are listed in the Table Magic Paths (path). Spell casting level is a value from 1 to 3. There are no higher spell casting levels.

spellweapon <path> <level>

Equips the monster with a Cast Spell weapon in the magic path specified. This spell weapon only has a 25% chance of being successfully used in melee combat.

spellweaponbonus <path> <level>

Equips the monster with a bonus Cast Spellweapon in the magic path specified. This spell weapon can be used in melee without penalty.

spellweapon50 <path> <level>

Equips the monster with a limited Cast Spell Weapon in the magic path specified. This spell weapon has only a 50% chance of being used on any given combat round.

spellweapon50s <path> <level>

Equips the monster with a limited Cast Spell+skip weapon in the magic path specified. This spell weapon has only a 50% chance of being used on any given combat round. If it is used the next weapon will be skipped.

spellweaponsingle <path> <level>

Equips the monster with a limited Cast Spell Weapon in the magic path specified. Only one of the single spell weapons will be used per combat round if the monster has several

more1spells <nbr>

The monster starts with more or fewer level 1 spells when it spawns.

more2spells <nbr>

The monster starts with more or fewer level 2 spells when it spawns.

more3spells <nbr>

The monster starts with more or fewer level 3 spells when it spawns.

spellrange <value>

Value = +range for battle spells

Movement

These commands determines how fast the monster can move over different map terrains as well as how it will move in combat.

flying

Monster can fly.

huge

Monster is giant sized. This also makes it a 3x3 square monster on the battlefield.

immobile

Monster is immobile (cannot move in battle).

stationary

Monster is stationary (cannot move on world map).

slow

Monster is slow on world map.

fast

Monster is fast.

battlefast

Monster is fast, but in battles only.

swamp

Monster has swamp move.

desert

Monster has desert move.

mountain

Monster has mountain move.

snow

Monster has snow move.

water

Monster can enter water squares.

float

Monster is floating.

noland

Monster cannot move on land.

wateronly

Same as water & noland. The monster will be aquatic.

passwall

Monster can move through walls.

wall

Monster has wall climbing.

teleport

Like flying, but the monster will teleport around in combat.

battleslow

Monster is slow in battles.

battleslow2

Monster is very slow battles.

tunnel

Monster can tunnel on the world map.

shipmove

Monster is a ship. Movement will cost 1 AP for everyone in the same square.

Behavior

Most of these commands determine how a monster will try to act when it is independent owned. But it will also determine how player owned creates with the Stupid tag acts. Terrains ending in 1 (e.g. swamp1) means the monster loves this terrain type and will never leave it for a non-loved terrain. If it ends in 2 (e.g. swamp2) the monster likes the terrain type and may leave it, but not go more than 1 square away from it.

swamp1

Loves swamps.

swamp2

Likes swamps.

desert1

Loves deserts.

desert2

Likes deserts.

desert3

Hates deserts.

deadforest1

Loves dead forests.

deadforest2

Likes dead forests.

mountain1

Loves mountains.

mountain2

Likes mountains.

jungle1

Loves jungles.

jungle2

Likes jungles.

savanna2

Likes savanna and farms.

money1

Loves gold producing squares.

money2

Likes gold producing squares.

horror

Likes to kill sentient people, also isn’t scared of the void.

ancforest1

Loves ancient forests.

forest1

Loves forests (including ancient forests).

forest2

Likes forests (including ancient forests).

temple1

Loves temples.

temple2

Likes temples.

south1

Loves the south.

south2

Likes the south.

north1

Loves the north.

gates1

Loves gateways.

void2

Likes the void.

nonruin1

Loves stuff that can be turned into ruins, but is not yet a ruin.

mines1

Loves mines.

stray

Can stray away from loved and liked terrains.

stupid

Cannot be controlled by players and will move automatically like an independent unit.

semistupid

Will move automatically like an independent units unless it is controlled by a player commander.

followstupid

Doesn’t move independently, but follows other stupid units.

coastal

Loves the coast, like a giant crab.

loner

Moves independently of the player and not in groups.

aggressive

Likes to attack enemies.

likesterr <terrain nbr>

Likes this terrain. Can only be one of these commands per monster and terrain nbr cannot be zero.

lovesterr <terrain nbr>

Loves this terrain. Can only be one of these commands per monster and terrain nbr cannot be zero.

hatesterr <terrain nbr>

Hates this terrain. Can only be one of these commands per monster and terrain nbr cannot be zero.

wander <objective>

Will try to fulfill an objective if it is a commander. See table Objectives for possible values.

indwander <objective>

Only wander if owned by Independents

infwander <objective>

Only wander if owned by Inferno

celwander <objective>

Only wander if owned by Celestials

hadeswander <objective>

Only wander if owned by Hades

wander2 <objective>

Try to fulfill this objective if the first one was not possible

infwander2 <objective>

Try to fulfill this objective if the first one was not possible

celwander2 <objective>

Try to fulfill this objective if the first one was not possible

hadeswander2 <objective>

Try to fulfill this objective if the first one was not possible

maxsinners <value>

Will gather sinners when owned by Inferno (value=amount before returning)

maptele

Can teleport on world map when it is a wandering monster.

wanderrest <chance>

A chance for wandering monsters to rest a turn instead of going on a mission. Dragons have about 85 in this ability.

wandermaxdist <value>

Maximum distance for raid missions for wanderers. Dragons have about 6 in this ability.

pickupanimals <0-1>

Picks up all animals in the same square and brings them along.

wanderattack <player number>

Pause wander to attack this faction if adjacent (-1=all factions, -2=player factions)

winteridle

Monster will not move in the winter if it is in a cold part of the map.

Ritual Power

power <pow nbr>

pow nbr 0 means the last created ritual school, -1 = the one before that, etc. Positive numbers are existing ritual powers from CoE5, see the pow nbr table.

classcost <nbr>

to alter cost of all rituals made by this unit, 50=50% more expensive

mastery <nbr>

for monsters that can level up, nbr 1=become next monster on leveling, -1=previous monster, etc.

libmastery <library level>

For monsters that can level up in a magic library, a value of 2 = magic library or better required, 3 = academy of high magic required. A mastery command is also required on the monster, to determine what monster it will level up to.

allrit <value>

knows all rituals of this school (see the Ritual Schools table, -1=all ritual schools)

rebate <value>

gives rebate on rituals with fx_rebatefx??

gatherherbs

A commander with this ability will enable the player to gather herbs.

gatherfungus

A commander with this ability will enable the player to gather fungus.

gathersacr

A commander with this ability will enable the player to gather sacrifices.

gatherhands

A commander with this ability will enable the player to gather Hands of Glory.

gatherweed

A commander with this ability will enable the player to gather weed.

gathergems

A commander with this ability will enable the player to gather gems of individual types.

gatheranygems

A commander with this ability will enable the player to gather gems.

seegems

A commander with this ability will enable the player to see what type of gems mine produce.

gatherrelics

A commander with this ability will enable the player to gather relics.

gatherlifeforce

A commander with this ability will enable the player to gather lifeforce.

ctrlchance <nbr>

Chance of controlling this monster when it is summoned,

montag <nbr>

Sets the monster tag value referenced by other modding commands.

Monster Spawning

motherspawn <0-7>

Spawns as one of a few special spawners in the game. 1 = mother of monsters, 2 = teotls of war (spawns d2 jaguars or 1 ozelotls, not on homeplane), 3 = teotls of rain (spawns d3 toad warriors, not on homeplane), 4 = bloody mother (spawns d2 jaguars or d3 serpents, not on homeplane), 5 = teotls of night (spawns d3 bats or 1 ozelotls, not on homeplane), 6 = teotls of underworld (spawns 2d3 longdead, not on homeplane), 7 = teotls of sky (spawns d3 bats or d3 eagle warriors, not on homeplane)

spawnmon <value>

Spawns next monster. value/100 = monsters per turn

spawnoffs <value>

To spawn something other than the next monster

spawnmonaway <value>

Spawns next monster, but not on homeplane. value/100 = monsters per turn

spawn1d6mon <value>

Spawns 1d6 of the next monster. value = chance

spawn2d6mon <value>

Spawns 2d6 of the next monster. value = chance

split <value>

Value = dmg required in % for splitting into next monster (like a slime).

reform <value>

Value = chance in percent of reforming to previous monster each month (like a slime).

satyrspawn <value>

Bonus for dryad queen auto spawns.

harpyspawn <value>

Bonus for dryad queen auto spawns.

centspawn <value>

Bonus for dryad queen auto spawns.

minospawn <value>

Bonus for dryad queen auto spawns.

Terrain Altering

terraformfrom <value>

Changes this terrain into something. Use next two commands to setup that and how often.

terraformto <value>

Terraforms to this terrain (default plain).

terraformch <value>

Chance of terraforming square (default 100).

makecolony <terrain nbr>

Has a chance of turning a standard terrain into ‘terr’ and then die.

colonyterr <value>

Terrain to build colonies in (default -87).

colonymsg <value>

1 = everyone will get a message when a colony is created.

Shapechanging

growhp <nbr>

Monster will grow to the previously created monster if it reaches this amount of HP or more.

shrinkhp <nbr>

Monster will shrink to the next created monster if it reaches this amount of HP or less.

firstshape <0-1>

Monster will become next monster if it is slain. Use for main shape of two shape monsters like Oni.

secondshape <0-1>

Monster will revert to previous monster after combat. Use for secondary shape of two shape monsters like Oni.

growtime <value>

Will grow into next monster after about value turns

growoffs <value>

To become other than next monster

growterr <terrain nbr>

The growth will only occur if unit is located in this terrain. Negative terrain numbers can be used.

landshape <value>

Will become monster with offset value when on land

watershape <value>

Will become monster with offset value when in the sea

elysiumshape <value>

Will become monster with offset value when in Elysium

celestialshape <value>

Will become monster with offset value when on the celestial plane.

skyshape <value>

Will become monster with offset value when on the sky plane.

agarthashape <value>

Will become monster with offset value when on the agartha plane.

infernoshape <value>

Will become monster with offset value when on the inferno plane.

hadesshape <value>

Will become monster with offset value when on the hades plane.

aztlanshape <value>

Will become monster with offset value when on the aztlan plane.

primalshape <value>

Will become monster with offset value when on the primal plane.

elementalshape <value>

Will become monster with offset value when on the elemental plane.

voidshape <value>

Will become monster with offset value when on the void plane.

Immortality and Other Planes

immortal

The monster is immortal on its home plane. This command should not be used for beings with Other Planar Immortality.

immortalap <nbr>

AP cost of reforming its body after dying.

reformloc <terrain nbr>

respawn terrain for immortals (-1 = anywhere, 1000=home)

reformdestroy <value>

chance to destroy location on immortality respawn (default 0)

homeplane <plane nbr>

Other Planar Immortality. Will return to this plane if slain outside it and be indep controlled again.

planeshift <plane nbr>

can go to/from other plane, 1=hades, 2=inferno

noplanecamo <plane nbr>

does not use fx_lookslike when in plane = value

banishsurv

This monster will be flung to another plane when banished, instead of being destroyed.

hadesres <value>

resistance to the effects of hades

revertowner <player number>

Monster will revert to being owned by this faction after its player owner has been defeated. Use player number 24 to revert to a standard independent.

primal <value>

1 = this monster can be summoned by "Call Primal Being".

primable <value>

By default all animals can be made into primal animals. -1 = monster cannot be turned into a primal variant, 1 = can be turned into a primal variant.

primifier <value>

Will turn this number of animals into primal animals each month.

Healing and Sanity

noheal

Monster never heals.

fastheal

A fast healing unit will be fully recovered from any non-fatal damage in at most two months. Battle afflictions are also healed, but it can take a few more months.

coldheal <value>

heals value hp/month when it’s cold

regeneration

A unit with regeneration will heal 5 percent of its hit points each combat round until it is killed. Battle afflictions are also healed, but they will take at least one month to heal. A regenerating creature that is killed will continue to regenerate unless its negative hit points are more than half of its maximum hit points.",

varregen <value>

Like regeneration, but this many percent per round instead of 5.

saner <value>

regains this amount of sanity per month

voidsanity <value>

reduces insanity gains (like armor)

eatvillage <0-1>

1 = can eat a village to restore sanity, like a vampire.

minorstartaff <chance>

Chance of starting with a minor affliction. Chances >100 can give more than one affliction.

healonterr <terrain nbr>

Will heal faster when located on this terrain, will also heal monsters with noheal.

startinsanity <value>

Commanders will start with about this much insanity. It has no effect on non-commanders.

Stealth and Scouting

acutesenses

Monster has acute senses.

spiritsight

Monster has spirit sight.

badsight

Monster has bad eye sight and will miss 20% of all attacks.

stealth

Monster is stealthy.

foreststealth

Monster is stealthy in forests.

invisible

Monster is invisible.

hideanimals <0-1>

Animals following this commander gains forest stealth.

farsight <0-1>

Can see further on the world map.

snowstealth

Monster is stealthy in snowy locations.

desertstealth

Monster is stealthy in deserts.

terrstealth <terrain nbr>

Monster is stealthy in this terrain.

terrstealthinv

Monster gets invisible instead of just stealthy in the terrstealth terrain.

Monster Types

human

is a human

female

is a female

undead

is an undead being. Undead beings are affected by banishment.

demonic

is a demon. Demons are affected by banishment.

animal

is an animal

inanimate

is an undead being

troll

is a troll

coldblood

is coldblooded

stonebeing

monster is made of stone

setcreator <0-1>

used by monsters that get their name from their creator

statue <0-1>

statues get part of their name from their creator, e.g. Statue of Anselm

expendable <0-1>

Is an expendable unit (can be used payment for certain rituals/recruitments).

kobold <0-1>

Is an expendable kobold (counts as expendable unit, but comes with a different ability description).

goblin <0-1>

Is an expendable goblin (can be used payment for certain rituals/recruitments).

dragon <0-2>

1=dragon, 2=elder dragon.

madcultist <0-1>

Mad cultist might decide to open a gate to Inferno.

primalcult <0-1>

Primal cultists might decide to open the primal gate.

fungus <0-2>

1 = is a fungus, 2 = is an animated fungus.

ship <0-1>

Is a ship.

Mirror Commands

mirror <value>

1=is small mirror, 2=is large mirror, 3=silver, 4=gold

revertmirror <value>

revert to mirror when empty. 1=small mirror, 2=large mirror, 3=silver, 4=gold

phantasm <value>

1=phantasmal warrior, 2=phantasmal animal, etc.

releasephant <value>

mirror releases this type of phantasms (has phantasm = value)

releaserate <value>

bonus to the number of phantasms released

mirrorammo <value>

default number of images for this type of mirror (def 20)

releasespell <value>

making an attack drains one mirror charge (fx_mirror)

Income Commands

gold <nbr>

Gives extra income per month of this resource.

iron <nbr>

Gives extra income per month of this resource.

relics <nbr>

Gives extra income per month of this resource.

hands <nbr>

Gives extra income per month of this resource.

fungi <nbr>

Gives extra income per month of this resource.

herbs <nbr>

Gives extra income per month of this resource.

weed <nbr>

Gives extra income per month of this resource.

lifeforce <nbr>

Gives extra income per month of this resource.

trade <nbr>

Gives this number of extra trade points

localironbonus <percent>

att% bonus to iron income in this square (only works in mines)

localgoldbonus <percent>

att% bonus to gold income in this square (only works in mines)

limitgold <value>

value = amount of gold per month, but max the value of the square

limitiron <value>

value = amount of iron per month, but max the value of the square

limittrade <value>

value = amount of extra trade per month, but max the original trade value of the square.

goldbonus <percent>

Percentage bonus to gold income for entire nation.

ironbonus <percent>

Percentage bonus to iron income for entire nation.

tradebonus <percent>

Percentage bonus to trade income for entire nation.

lairgoldpen <value>

Gold inc penalty in percent for this monster’s lair.

goldcarrier <value>

spoils of war when defeating this monster.

ironcarrier <value>

spoils of war when defeating this monster.

Resistances and other Damage Mitigations

fireres <value>

Offers resistance to fire. Value 100 = completely resistant.

coldres <value>

Offers resistance to cold. Value 100 = completely resistant.

poisonres <value>

Offers resistance to poison. Value 100 = completely resistant.

shockres <value>

Offers resistance to shock. Value 100 = completely resistant.

acidres <value>

Offers resistance to acid. Value 100 = completely resistant.

diseaseres

Disease resistance.

lucky

Lucky units evade 50% of all attacks.

sleepres

Sleep resistance.

charmres

Charm resistance.

bluntres

Blunt resistance (half damage).

slashres

Slash resistance (half damage).

pierceres

Pierce resistance (half damage).

ethereal

Is ethereal.

shield

Equips the monster with a regular shield (0-1 protection).

largeshield

Equips the monster with a large shield (0-2 protection).

magicshield

Equips the monster with a magic shield (0-3 protection).

nonmaginvul

Invulnerable to non-magical weapons.

awe <value>

Monster has awe. Monsters usually have between 1 to 4 in this ability.

displaced <value>

25% chance of missing per rank away from target

affres <value>

value = chance of not receiving battle affliction

twistfate

Starts every battle with the Twist Fate buff.

mirrorimages <value>

Starts every battle with this amount of mirror images.

airshield <percent>

Air Shield with this chance of negating incoming missile attacks.

tiny

Tiny units are missed 50% of the time by normal attacks.

tangleres <0-1>

Immunity to tangle vines.

Special Attributes

startitem "item name"

Starts with this item.

holy

Sacred, takes advantage of bless effects.

berserker

Can go berserk.

noleader

Cannot command any unit even if monster is a commander.

allitemslots

Has the full set of item slots.

weaponslots

Only has weapon and misc slots.

noslots

Has no item slots at all.

nobootslots

Has no boot slots.

miscslots

Has only 2 misc slots.

swallowres

Immune to swallow attacks (used for castle gates).

size1x1

Monster only takes up a single square on the battlefield.

size2x2

Monster takes up 2x2 squares on the battlefield. (The huge movement ability gives a 3x3 size token on the battlefield).

unaging

Immune to aging effects like decay.

clumsy

Misses more than usual (soulless have this ability).

nozoc

No Zone of Control (castle gates have this ability)

nocombat

Non combatant, will not participate in combats.

unimportant

Battles can be won without killing this unit.

alone <dmg>

Will take damage each month another monster of the same type is in the same square.

frontpos

Rank+, deploys further towards the front.

rearpos

Rank-, deploys further back.

leadership <nbr>

Gives this amount of extra morale to units under his command.

localleadership <nbr>

Gives this amount of extra morale to nearby friendly units.

burnforest <nbr>

1 = can start forest fires, 100 = auto burns forests.

randomitem <percent>

Percent is the chance of the monster starting with a random magic item.

randomweapon <percent>

Percent is the chance of the monster starting with a random magic weapon.

randommisc <percent>

Percent is the chance of the monster starting with a random magic misc item.

randomrare <percent>

Monster will start with a random magic item. Percent is the chance of a rare item being allowed.

indepitem <percent>

Like randomitem, but only for indeps (all indep nations).

slavehunt <die>

Can create slave warriors. The amount of slaves is an open ended die.

armytrainer <nbr>

Units in the same square will get this amount of XP each month.

lookslike <offset>

Offset to monster it looks like. This is used by e.g. werewolves in order to look like some other unit when they are inspected.

poisonexpl <dmg>

Poison explosion on death. A giant mushroom has this ability with dmg 10.

fireexpl <dmg>

Fire explosion on death.

shardexpl <dmg>

Shard explosion on death.

nametype <nametype>

Sets the type of random name this monster should get. See Table Nametypes.

unique <nbr>

This is a unique monster, there can only be one of it in the entire world.

fireaura <dmg>

Fire strikeback (std dmg = 3)

coldaura <dmg>

AN cold strikeback (std dmg = 2)

shockaura <dmg>

AN cold strikeback (std dmg = 3)

poisonaura <nbr>

Poison strikeback (std dmg = 4)

aihold <nbr>

1 = AI will hold these units in siegable locations and only recruit them there

eatdead <chance>

Chance of eating a corpse and reproducing.

eatdeadcap <chance>

Chance of eating a corpse and reproducing, capped at one per square and month.

scry <nbr>

Can scry for 3 AP, attr=radius*10 (5=1square, 15=9 squares).

scrycost <nbr>

Scrying cost this amount of gold.

digest <dmg>

Gives this amount of dmg per round to units in stomach.

incorporate <dmg>

Steals this amount of HP per round from units in stomach.

hpoverflow <nbr>

1 = HP overflow is allowed even after the battle.

absorbdead <nbr>

Can absorb dead and get HP from it. Nbr is the maximum dead absorbed per month. Gains 3 HP/dead.

extraeyes <nbr>

Monster has this number of extra eyes. Use -1 to create a cyclops with one eye.

noeyes

monster has no eyes and needs no eyes to be effective

sensedead <0-1>

1 = can sense the number of corpses of all types in current square

riverdmg <value>

takes an value damage when passing a river

iceprot <value>

+value armor in cold climate

melt <value>

takes value dmg per month when not cold

dmgonterr <terrain nbr>

Takes 1 point of dmg per month when in this terrain. A single unit can only have one dmgonterr ability. If it has more than one, only the one highest terrain nbr will take effect.

dmgonterrbonus <value>

Adds to the damage of the dmgonterr ability

aipowcom1 <value>

unit wants to be led by com with this power at level 1+

aipowcom2 <value>

unit wants to be led by com with this power at level 2+

aipowcom3 <value>

unit wants to be led by com with this power at level 3+

fear <value>

causes fear: 1=fear, 2=dread, 3=terror

makeruin <value>

value = chance of turning current square into a ruin if possible

meleeambush <value>

Will start in melee combat when ambushing

poisoncloud <value>

spreads poison cloud, value = radius + 1

poisonspikes <dmg>

AN poison strikeback

acidblood <perc>

AN acid strikeback, 50=50% of incoming damage

forestheart <0-1>

takes control of nearby forests

spread <value>

unit will position itself spread out among the other troops

seduceaura <value>

attacker within this range might get seduced instead

neverturn <value>

never draw facing the other way

aigoldrally <value>

Hint that AI should go to recruitment loc when having lots of gold

thrallhunt <value>

can create thralls (vampire)

ainofollower

AI hint to always use this commander as a leader (not a subcommander)

putridexpl <value>

Putrid cloud upon death (value magic dmg + disease(MR))

aimaxshop <value>

ai won’t buy more than this amount at the same place

maxsum <value>

the maximum amount that can be summoned in a single battle

changetemp <value>

makes square value degrees hotter

likestoburn <value>

value% chance of wanting to burn a forest (wandering indep commanders only)

reanimate <value>

reanimates automatically if possible, value = max amount / month

diseasecloud <value>

spreads disease cloud, value = radius + 1

mindexpl <0-1>

1 = explodes in Mental Agony on Death

deployoutside <0-1>

setup this unit outside fort in battles. The monster probably needs to be small (1x1 square) and few in numbers for the deployment to work properly, there is not much space left outside the walls before coming too close to the enemies.

treelook

sprite will be rotated and scaled randomly, like a random tree

trample <dmg>

Can trample smaller unit for this amount of damage.

tramplexsize <value>

Extra size regarding trampling. A size one trampling unit needs tramplexsize 1 to be able to trample anyone at all.

autoastrology

Superior Astrologist.

desolator <value>

Drain value lifeforce from current square each month (like scourge lord pillar).

desolcloud <radius>

Spreads desolation cloud (exhaustion).

diseaseshield <0-1>

Disease strikeback (MR negates).

darkbless <0-1>

Has the dark blessing of a scourge lord

defiler <range>

Needs to drain lifeforce to cast spells, range=max drain range.

scourgedefiler <value>

Needs to drain lifeforce to cast spells of the defilement path, range=max drain range.

petriaura <range>

Causes petrification like gorgon

combustionaura <radius>

Puts nearby units on fire

confusionaura <radius>

Confuses nearby units (easy MR negates)

tunnelmove <dmg>

Tunnel teleporting in combat like a Purple Worm.

siegetunnel <chance>

Chance of emerging inside fort when storming.

drawsize <percent>

Draw the unit this amount of percent larger when shown on his unit token. Can be negative for smaller as well. Use this command to easily fine tune the units size to fit nicely in it token. Don’t use any large values as the resizing is not done everywhere in the game.

evasion <0-1>

25% chance to evade attacks.

chopforest <value>

1=can chop down forests.

awakentrees <radius>

Will awaken nearby trees & bushes in combat.

awakenfungus <radius>

Will awaken nearby mushrooms in combat.

sitepopboost <value>

Will boost indep generation at current site (100 = +100%).

slimeshield <0-1>

Slime strikeback

transport <value>

Is a ship and can transport value amount of size 1 units.

airbreather <value>

This wateronly unit will not drown on land

vassal <0-1>

Is a vassal knight and will get part of yearly consription.

sleeper <chance>

Chance of starting a battle asleep if defending.

snowsleeper <chance>

Chance of starting a battle asleep if defending and it is snowy.

deepsleeper <value>

Must receive at least 1-value dmg in one hit to wake up.

Monster Modding Numbers

Nametypes
0   Misc male
1   Abysian (Dominions 3)
2   Anglo-Saxon male
3   Anglo-Saxon female
4   Germanic male
5   Undead
6   Roman male
7   Greek male
8   Greek female
9   Pangaea male
10  Pangaea female
11  Early Persian male
12  Early Persian female
13  Egyptian male
14  French & Spanish
15  Old Nordic male
16  Old Nordic female
17  Deep Ones
18  Roman female
19  Misc female
20  Egyptian female
21  Chinese male
22  Chinese female
23  Mesoamerican male
24  Mesoamerican female
25  African male
26  African female
29  Indian male
30  Indian female
31  Early Germanic male
32  Early Germanic female
33  Japanese male
34  Japanese female
35  Amazon
36  Sauromatian
37  Celtic male
38  Celtic female
39  Angelic
40  Demonic
41  Inuit
42  Gaelic (Tir na n'Og) male
43  Gaelic (Tir na n'Og) female
44  Nature beasts
45  Wooden beasts
46  Russian male
47  Russian female
48  Middle Eastern male
49  Rephaite
50  Middle Eastern female
51  Pale Ones male
52  Pale Ones female
55  Ancient Forest
56  Scourge Lord
57  Kobold
Ritual schools (pow nbr)
 1 = necro
 3 = demon
 4 = witch
 5 = druid
 6 = baron
 7 = bakemono
 8 = baal
 9 = hoburg
10 = clock
11 = enchanter
12 = mictlan
13 = spirit
14 = shaman
15 = agartha
16 = reveller
18 = warlock fire
19 = warlock water
20 = warlock air
21 = warlock earth
22 = troll
23 = rylle
24 = void
25 = priest
26 = illusion
27 = monk
28 = dvala
29 = rune smith
30 = councilor
31 = senator
32 = empress
33 = warpriest
34 = bloodpriest
35 = skypriest
36 = rainpriest
37 = nightpriest
38 = deathpriest
39 = nekromant
40 = fire giant
41 = frost giant
42 = mountain giant
43 = storm giant
44 = sea giant
45 = dark emperor
46 = god emperor
47 = dryad queen
48 = scourge lord
49 = cloud lord
50 = renatus
51 = kobold
52 = kobold red
53 = kobold blue
54 = kobold white
55 = kobold green
56 = alchemist
57 = governor
58 = crystal amazon
59 = garnet amazon
60 = jade amazon
61 = onyx amazon
Negative terrain numbers
-1 = anywhere
-2 = temples
-3 = libraries
-4 = mines
-5 = mountains
-6 = forests and jungles
-7 = mountains, forests and jungles
-8 = villages and smaller human settlements
-9 = fortified citadels
-10 = forests, jungles and swamps
-11 = forests
-12 = greater mines
-13 = farms
-14 = human settlements
-15 = ancient forests and old battlefields
-16 = village size settlement
-17 = near water areas
-18 = temples and pyramids
-19 = gold and silver mines
-20 = swamps and bogs
-21 = outdoors areas
-22 = capital locations
-23 = citadels
-24 = villages and smaller settlements
-25 = the north
-26 = the mid
-27 = the south
-28 = towns and cities
-29 = hamlets or larger
-30 = gem deposits and crystal forests
-31 = fortified locations
-32 = villages or larger settlements
-33 = somewhat important squares
-34 = blessable squares
-35 = citadels and graveyards
-36 = infernal citadels
-37 = hades citadels
-38 = forests and jungles
-39 = magic locations
-40 = hamlets
-41 = hamlets, tent villages and villages
-42 = land locations
-43 = underwater locations
-44 = elemental plane of fire
-45 = elemental plane of water
-46 = elemental plane of air
-47 = elemental plane of earth
-48 = fire citadels
-49 = water citadels
-50 = air citadels
-51 = earth citadels
-52 = ice citadels
-53 = void gateways
-54 = second suns
-55 = damned capitals
-56 = level 2 libraries
-57 = level 3 libraries
-58 = gold income locations
-59 = non mines
-60 = non forest citadels
-61 = forge location
-62 = ancient forests and any sacred grove
-63 = ancient forests and sacred groves
-64 = farms and hamlets
-65 = any sacred grove
-66 = groves of gaia and primal forests
-67 = forests and ancient forests
-68 = capitals or fallen capitals
-69 = any normal location
-70 = graveyards
-71 = flat terrains
-72 = kokytos
-73 = pandemonium
-74 = inferno
-75 = abyss
-76 = void plane
-77 = celestial plane
-78 = hades plane
-79 = unsiegable locations
-80 = stonehenges or ancient forests
-81 = ruby locations
-82 = sapphire locations
-83 = diamond locations
-84 = emerald locations
-85 = forests, jungles, swamps and caves
-86 = not on sky plane
-87 = terrains suitable for ant hills
-88 = ruby locations and towers
-89 = sapphire locations and towers
-90 = diamond locations and towers
-91 = emerald locations and towers
-92 = trade locations
-93 = ports
-94 = temples and fortified locations
-95 = citadels and settlements
-96 = lakes
-97 = ancient forests and similar
-98 = Elysium plane
-99 = forest like locations
-100 = forest or jungle like locations
-101 = snowy location
-102 = near fresh water
-103 = plain-like terrains
-104 = hills and coal mines
-105 = non-void
-106 = sky plane
-107 = deep earth gem deposits
-108 = castles suitable for the Baron
-109 = buildings of power
-110 = desert-like terrains
-111 = iron producing terrains
-112 = non-iron producing terrains
-113 = cities
Magic Paths (path)
 1   Infernal Magic
 2   Elemental Magic
 3   Pyromancy
 4   Hydromancy
 5   Storm Magic
 6   Geomancy
 7   Hedge Magic
 8   Unlife
 9   Dark Magic
10   Foul Magic
11   Blood Magic
12   Crystal Sorcery
13   Garnet Sorcery
14   Jade Sorcery
15   Onyx Sorcery
16   White Magic
17   Spiritism
18   Fortune Magic
19   Solar Magic
20   Mysticism
21   Serpent Magic
22   Golden Magic
23   Iron Arcana
24   Kuro Do
25   Prayers
26   Enchantment
27   Frost Magic
28   Dark Prayers
29   Wizardry
30   Shamanism
31   War and the Sun
32   Night
33   Rain
34   Bloody Mother
35   Nahualli Magic
36   Command
37   Black Magic
38   Necromancy
39   Druidism
40   Witchery
41   Troll Magic
42   Void Magic
43   Illusionism
44   Sage Magic
45   Dwarf Magic
46   Maladies
47   Beast Wards
48   Warrior Wards
49   Paladin Magic
50   Famine Magic
51   High Arcana
52   Moon Magic
53   Silver Arcana
54   Forest Magic
55   Alchemy
56   Gold Arcana
57   Metal Arcana
58   Sky
59   Death
60   Tree Magic
61   Astrology
62   Defilement
63   Bile Magic
64   Divine Magic
65   Sidhe Magic
Objectives
1   walk randomly on same plane
2   crusade
3   inquisition/saint
4   rider
5   angel
6   devil
7   ghost
8   visit citadels & settlements
9   dragon
10  merchant
11  celestial angel
12  primal gods
13  wild hunt
14  vassal
15  orchard of souls
16  pirate captain
17  teleporting horror
18  hunt enemy armies if on home plane
19  hunt player squares if on home plane
Plane Numbers
-2  Elysium like planes (sky, agartha, elysium)
-1  All planes
 0  Elysium
 1  Celestial
 2  Sky
 3  Agartha
 4  Inferno
 5  Hades
 6  Aztlan
 7  Primal
 8  Elemental Planes
 9  The Void

Class Modding

These commands are used to modify and create new playable classes. A maximum of about 150 new classes can be added by mods.

Start Commands

selectclass <class nbr>

Selects the class to be modified. The selected class is referred to as the active class. Class numbers are listed in Table Class numbers.

newclass

Creates a new class. The new class is automatically assigned a class number from the range of free numbers.

Basic Commands

setclassname "class name"

Sets name for the class (e.g. "Dwarf Queen" or "Necromancer" or “Baron”) This command must be the first command after creating a new class.

classdescr "text"

Sets the description for the class. The text must be on one line. The ^ symbol may be used for paragraph breaks.

classabdescr "text"

Sets the description for the ability section of the class. The text must be on one line. The ^ symbol may be used for paragraph breaks.

hometerr <terrain nbr>

Sets the home terrain (home citadel) for the class. This terrain must be a citadel or the player will lose immediately when the game begins. This command is mandatory for a new class.

Special Start Location

clearstartterr

Clears the starting terrain list for the class. This means any additional farms, hamlets, mines etc that the class would start the game with.

addstartterr <terrain nbr>

Adds extra terrain types that the class starts with when the game begins, such as extra farms, hamlets or mines.

likesnorth <value>

A value from -10 to 10 indicating the willingness to have a northern start location.

likessouth <value>

A value from -10 to 10 indicating the willingness to have a southern start location.

likescoast <value>

A value from -10 to 10 indicating the willingness to start near the coast.

startplane <plane>

Starting citadel should be on this plane. If you use this command you should also use the "createcit" command and the terrain set as hometerr should be set to a gateway/pit/spire terrain. The hometerr terrain will be created in Elysium as a portal to the other plane.

createcit <terrain nbr>

This is the citadel terrain for classes with a different start plane.

Starting Units

clearstartunits

Clears the starting army for the active class.

setmaincom "monster name"

Sets the main commander for the class. For example, the main commander for the Baron class is Baron and the main commander for the Barbarian class is Barbarian Leader. If the main commander does not appear in the recruitment list for the class, he cannot be replaced if lost.

addstartcom "monster name"

Adds a starting commander to the class. All starting units added after the commander will appear already assigned to that commander’s squad at the beginning of the game. The main commander should not be added as a startcom.

addstartunits "monster name" <nbr>

Adds <nbr> monsters to the starting army for the class. Use this command multiple times to assign several different types of monsters (for example spearmen and archers).

Recruitment List

These commands govern the recruitment list of a class. A recruitment list can have a maximum of 128 units on it.

clearrec

Clears the recruitment list for the active class.

addunitrec "monster name" <chance> <nbr> <gold> <gold die> <iron>

Adds a monster to the recruitment list for the active class. The chance is a percentage chance that this unit can be recruited each month. The gold die is an open ended die that will be added to the base gold cost of the unit.

addmercrec "monster name" <chance> <nbr> <gold> <gold die> <iron>

This command works like addunitrec, but the recruitment is mercenary and listed in green color. Mercenaries can only be recruited once and do not count against recruitment limits.

addcomrec "monster name" <chance> <gold> <gold die> <iron>

Adds a commander to recruitment list.

recxcost <resource type> <amount>

The previous entry in recruitment list will get an additional cost of a special resource (not gold or iron). See table Resource Types for resource types.

templerec

The previous entry in the recruitment list will have increased chance of occurring, depending on the number of temples owned.

libraryrec

The previous entry in the recruitment list will have increased chance of occurring, depending on the number of libraries owned.

reclimiter "string"

This will alter the requirements for the last added recruitment. string can be something like "+Baron" to require a Baron, "-Baron" to require the Baron to not be alive or "=Dwarf Worker" to require dwarf workers to be upgraded into the new troops.

stdtroops

Adds standard troops to recruitment list. Standard troops are spearmen, swordsmen, archers, crossbowmen, heavy infantries and catapult. Standard troops also include the chance of recruitment offers from Captain (20%) and Scout (10%).

nostdtroops

Standard troops are not available to the class.

recwizchance <bonus>

This command sets an extra chance for recruitment offers from human wizards. The default value is 0.

recherochance <chance>

This command sets an absolute value for the chance for recruitment offers from human heroes. The default value is 1.

recasschance <chance>

This command sets an absolute value for the chance for recruitment offers from human assassins. The default value is 2.

townbonusdescr "text"

This text will be shown as a description of the bonus for owning towns.

libbonusdescr "text"

This text will be shown as a description of the bonus for owning libraries.

templebonusdescr "text"

This text will be shown as a description of the bonus for owning temples.

humancost <value>

cost multiplier (100=normal) for human recruitment at special locations (castles, desert palaces), 999=impossible

mercpricemult <value>

value 2 = mercs will be twice as expensive

mercboost <value>

value 100 = mercs will be twice as frequent, -50 = half as frequent

recterr <terrain nbr>

The previous entry in the recruitment list can only be recruited in this terrain.

Income Modifiers

goldbonus <percent>

Percentage bonus to gold income. For example, a bonus of 25 means that the class will have a 25% bonus on all gold income like the Baron.

ironbonus <percent>

Percentage bonus to iron income. For example, a bonus of 25 means that the class will have a 25% bonus on all iron income like the Baron.

tradebonus <percent>

Percentage bonus to trade income. For example, a bonus of 50 means that the class will have a 50% bonus on all trade income like the Senator.

Special Attributes

aiclass <value>

-1=AI players will never get this class by random choice, 0=normal, 1=this class can only be played by AI players

classforestcit <0-1>

Can use ancient forests as citadels, like the Troll King.

classwoodencit <0-1>

Can use watch towers as citadels, like the Senator.

classminecit <0-1>

Can use mountain mines as citadels, like the Dwarf Queen.

classcitterr <terrain nbr>

Can also use this terrain as citadels. There can only be one classcitterr per class, but it can be combined with the 3 previous commands.

reqterr <terrain nbr>

The class requires at least one square of this terrain to be present on a map to play. This must be a terrain type that is normally present on maps. There can only be one reqterr per class.

classtune <sound>

Sets the class specific tune to this sound number. Tune sound numbers are 125-150 (class specific tunes) and 155-168 (general tunes).

otherplanar

Will enable the class to survive without owning a citadel in Elysium. Note that all classes will survive when owning their start citadel, even if it is not in Elysium.

Class Modding Numbers

Class numbers
1  baron
2  necro
3  demon
4  witch
5  priestess
6  bakemono
7  barbarian
8  senator
9  agartha
10  druid
11  hoburg
12  warlock
13  mictlan
14  troll
15  enchanter
16  beholder (non-playable)
17  archmage (non-playable)
18  goblin king (non-playable)
19  cultist
20  dwarf
21  priest
22  illusionist
23  markgraf
24  dryad queen
25  scourge lord
26  cloud lord
27  kobold
28  maharaja
Resource Types
0      gold
1      iron
2      herbs
3      fungus
4      sacr
5      hands
6      weed
7      fire
8      water
9      air
10     earth
11     trade
12     relics
13     lifeforce
14     human corpses
15     gems
16     expendable units
17     corpses
18     goblins

Terrain Modding

These commands allow the modding of world map terrain types. To find out what number a certain type of terrain has, press ctrl+i in the game and it will show the number of the terrain in that square.

Start Commands

selectterr <terrain nbr>

Select the terrain to be modified. Select a low number to alter an existing terrain or select a number between 500 - 999 to create a new terrain. Press ctrl-i in game on a terrain to see what number it has.

Basic Commands

spr "image.tga"

Sets the image file for the terrain square.

name "name"

Name of the terrain type.

gold <nbr>

Gold income for the terrain when owned.

iron <nbr>

Iron income for the terrain when owned.

trade <nbr>

Trade value of the terrain when owned.

herbs <nbr>

Herb income for the terrain when owned.

fungus <nbr>

Fungus income for the terrain when owned.

weed <nbr>

Weed income for the terrain when owned.

sacr <nbr>

Sacrifice income for the terrain when owned.

dead <nbr>

The location starts with <nbr> * d6 corpses in it.

hands <nbr>

Hands of Glory income for the terrain when owned.

gems <nbr>

A bitmask value that determines the gem income of the location. See the Gem Income Bitmask table. Note that you can add multiple 1 income values together to create a higher income value of a certain type of gem. Maximum income for a single gem type is 7.

pop <nbr>

A value indicating the size of humanlike population. Farm = 5, City = 50.

lifeforce <nbr>

Sets amount of lifeforce that can be drained from the square * 10. A plain has 10 and a forest 30. Negative values means square drain lifeforce with this radius (Pillar of Power has a value of -1).

apcost <nbr>

Action Point cost for moving through the terrain.

Clear Commands

clearspec

Clears the special attributes of the selected terrain.

clearfort

Clears the fort attributes of the selected terrain.

Special Attributes

citadel

The terrain functions as a citadel when owned.

batmap <batmap nbr>

Associates the terrain with a certain battle map. See table Battle Maps. This is usually used for fortified locations, but villages also have a battle map.

walls

The location has walls in battle and is a siegable location.

woodengate

The fort has a wooden gate

irongate

The fort has an iron gate

enchantedgate

The fort has an enchanted gate

bramblegate

Bramble gate

barricade

Wooden barricade gate

earthbarricade

Earth barricade gate

cloudgate

Cloud gate

magicwalls

Ethereal units cannot pass through walls at this fort

burnable

The terrain can be burned like forest.

water

The terrain is water and cannot be passed, unless it is frozen or the monsters moving through it are amphibian or aquatic.

cave

The terrain counts as a cave.

nostdrec

Standard class based recruitment lists are not available in this terrain. Instead, there are other units available for recruitment specific to the terrain.

ownable

The terrain can be claimed for ownership if it provides income the player can use.

smoke

Pixels with a certain pink color (245,0,255) will produce smoke. Pixels with color (235,0,255) will produce flames and smoke.

goldboost

The terrain provides a global boost to gold income when owned.

ironboost

The terrain provides a global boost to iron income when owned.

tradeboost

The terrain provides a global boost to trade points when owned.

harvest

Structures with this command get double gold income during bumper harvest events. Farms have this attribute.

invisible

The sprite will not be drawn, instead the look of the terrain will be procedurally generated. Not a useful command for modding.

visible

Makes sure that the sprite is drawn as terrain and nothing else. Necessary to modify the look of procedurally drawn terrains like forests, mountains and villages.

forest

The terrain counts as forest for the purposes of abilities like Forest Stealth.

swamp

The terrain counts as swamp for the purposes of abilities like Swamp Move.

mountain

The terrain counts as a mountain for the purposes of abilities like Mountain Move.

desert

The terrain counts as a desert for the purposes of abilities like Desert Move.

deepspawn

Hybrid fishermen can appear here.

melts

A hint to the AI that the terrain melts after the winter. Frozen lakes and rivers have this attribute. Not a useful command for modding.

nostart

Players cannot start in this type of terrain. Other squares can be overwritten by a start citadel from a player.

woodencitadel

Can be used as citadel by the Senator

forestcitadel

Can be used as citadel by the Troll King.

useable

There is a special power inherent to the terrain that can be activated by commander actions.

rare

The terrain is a rare special terrain. It is sometimes deployed at a random place in Elysium by the random map generator.

unique

This terrain is unique and can only be placed once by the random map generator.

mine

The terrain counts as a mine.

farsight

The terrain gives increased vision range when there are units present there. Watchtowers and some citadels have this attribute.

nosight

The terrain does not provide vision into adjacent squares when owned. Forests and swamps have this attribute.

temple

The terrain counts as a temple.

el

Terrain starts as converted to the worship of El.

settlement

Defines the terrain as a human settlement. Hamlets, villages, towns etc have this attribute.

void

The terrain is part of the void. It is possible to both walk, swim and sail here.

voidret

The terrain is connected to the Void. Use for Pyramids and other such structures.

library1

Library level +1.

library2

Library level +2.

hoburg

All starting corpses here will be small size.

snowok

Income in this terrain is not affected by snow.

desertok

Terrain will survive surroundings being turned into desert.

invseason

Seasons are reversed in this terrain.

spreadcold

The terrain square spreads cold around it, turning nearby squares snowy.

tempimmune

The terrain will not be transformed into a wasteland when it gets too hot

ritrebate <percent>

All rituals cast on this location will be cheaper.

bonusrelics <value>

Get this number of extra relics from this location. By default the amount of relics is one less than the amount of sacrifices earned.

nosnowpen

No movement penalty from snow.

farvis

Can be seen from far away.

seepast

Far horizon (like sea).

port

Ships can enter this terrain.

realport

Ships can be recruited here.

misty

Mist emanates from here.

mistrare <chance>

Will reduce the amount of mist produced. Rare is the chance in percent that mist will be produced.

anchored

Dimensionally anchored location.

hardfly

Difficult to fly here, costs 2 AP.

nevercold

This square will never get cold.

ug

This is an underground terrain.

town1

One town point.

town2

Two town points.

cityname

This terrain should start with a random city name.

nodrown

No one will drown in this terrain. Fishes can be on land and vice versa here. Used for frozen water tiles.

destroyto <terrain nbr>

Turns into this terrain when destroyed or burned up. Usually this command is not needed and it the terrain will be turned into something appropriate depending on its attributes.

Terrain Modding Numbers

Gem Income Bitmask
2^0   1           Ruby, income 1 (fire)
2^3   8           Sapphire, income 1 (water)
2^6   64          Diamond, income 1 (air)
2^9   512         Emerald, income 1 (earth)
2^12  4096        Random gem, income 1
2^15  32768       Random gem B, income 1
2^18  262144      Use dice for income
2^19  524288      Keep old gem income if another terrain is transformed into this one
Battle Maps
lowwall           1
lowwalln          2
highwall          3
highwalln         4
greatwall         5
widewall          6
widewalln         7
citadel           8
palisade          9
palisaden         10
outpost           11
stonetower        12
woodentower       13
witchtower        14
natcavefort       15
natcavefortwide   16
cavefort          17
cavefortwide      18
dwarfcity         19
cloudwall         20
cloudcastle       21
earth             22
flamewall         23
bramble           24
bridge            25
towerbridge       26
corkscrewtowers   27
port              28
agarthafort       29
jerusalem         30
monasteryn        31
ford              32
kingscastle       33
academy           34
darkcitadel       35
ziggurat          36
bronzecastle      37
town              38
city              39
village           40
lionvillage       41
junglevillage     42
coastville        43
cloudtower        44
tentvillage       45
hobvillage        46
capital           47

Terrain Group Modding

These commands can be used to create new terrain groups, i.e. negative terrain numbers that corresponds to a bunch of terrains. They have a negative number from -1000 to -1199, a name e.g. "castles and temples" and finally a number of terrains that fulfills the requirement for this terrain group.

Start Commands

selectterrgroup <terrgroup nbr>

Select the terrain group to be modified. The number must be between -1000 and -1199. The numbers between -1 and -999 are reserved for standard CoE5 and cannot be modified.

Basic Commands

setname "name"

Sets the name for the terrain group, e.g. "forests and temples".

addterr <terrain nbr>

Adds a terrain to this group. Negative numbers cannot be used here. By default a terrain group is empty.

remterr <terrain nbr>

Removes this terrain from the group.

addallforests

Adds all different forest terrains to the group. Jungles are not included.

addalljungles

Adds all different jungle terrains to the group.

addallsettlements

Adds all different human settlement terrains to the group.

invert

Inverts the contents of the group. Very useful when making a group that should contains all terrains but one.

Ritual Modding

These commands are used to modify existing rituals or construct new schools of rituals and the individual rituals within that school.

Start Commands

newritpow

Creates an entire new school of rituals called a ritpow. This should be the first command when creating a new batch of rituals.

newritual "name"

Create a new ritual with this name. This should be the first command for each new ritual.

selectritual "name" [<offs>]

The optional value offs can be used to select a ritual other than the first one with this name. 0=the first one, 1=the second ritual with this name.

Basic Commands

ritpow <pow nbr>

Sets the ritpow used. If command is not used, the latest created newritpow will be used. Existing ritpow numbers can be found in the Ritual schools (pow nbr) table.

level <1-9>

The level of the ritual. Usually the level is between 1 (apprentice level) and 3 (master level).

cost <resource type> <amount>

Adds a resource cost to the ritual. E.g. cost 4 10 to add a cost of 10 sacrifices. A single ritual can have at most 4 different costs. See table Resource Types for resource types.

terr <terrain nbr>

Restrict ritual to this terrain only. Negative numbers can be used for special terrain combinations.

Clear & Copy Commands

copyritual "name"

Copies all stats and abilities (except pow nbr and name) from another ritual to the current one.

clearritspec

Removes all special attributes from a ritual. This is only useful when modifying existing rituals.

Summoning Commands

addstring "string"

Adds some text data to a ritual. Most often used to set what is summoned by a summoning ritual, but it depends on what effects are in the ritual. All addstring commands will be processed before any other commands for the ritual, so it does not matter where in the ritual you place them.

summoning

The ritual will summon the monsters specified in a random "string". Use addstring to add up to 15 strings with monsters. The string should be written like these examples:"1d6*Goblin", "c*Captain & 2d6*spearman & 2d4+2*Archer", "Purple Worm". The c* indicates a commander and 2d6 means two 6-sided dice will determine the number of monsters summoned. Dice cannot be combined with commanders.

farsummon

Like summoning, but it will occur at target location instead of at the caster’s location.

sum0chance <percent>

Use with summonings. Percent = chance of first "string" to be used instead of a random string among the others.

sum1chance <percent>

Use with summonings. Percent = chance of second "string" to be used instead of a random string among the third and later.

sum2chance <percent>

Same but one higher.

sum3chance <percent>

Same but one higher.

sum4chance <percent>

Same but one higher.

sum0snow <percent>

Works like sum0chance, but it can only succeed if there is snow at the target location.

defctrl <percent>

Default control chance for summonings. Can be overridden by monster’s own ctrlchance.

varcost <percent>

Set variable sacrifice amount (50=50-150%, 100=0-150%)

raisedead

Raises humanoid corpses from the dead.

raiseanimals

Raises animal corpses from the dead.

specpow <value>

Makes a druid summoning, 1=minor, 2=major

setplayer <player nbr>

Following summons will be owned by this player. Default owner is the current player. Player -1 resets the owner to the default.

Example summoning ritual that summons a random group of monsters
newritual           "Summon Jellies"
level               1
cost                3 25
addstring           "1d3+1*Slime Mold"
addstring           "1d2*Swamp Thing"
addstring           "1d2*Ochre Jelly"
summoning

Transformation Commands

promotion <nbr of units>

Promote existing units to another monster type. Use addstring to add promotion pairs, the first string sets a source unit and the second one the destination units. Multiple of these pairs can be added to a single ritual.

transformtarg <1-2>

Will transform target into the unit type set by addstring. Value 1 = standard (use this), 2 = transform into following unit if level is high enough.

promplayer <player number>

Promoted units will be owned by this player instead. Use this command before the promotion command.

Mastery Commands

These commands are usually used for different mastery rituals. They will grant new spells and upgrade the caster to a new monster type.

newrit <1-9>

Grants a new ritual of this level.

gainrit <offset>

Learns the ritual that is offset numbers away. E.g. offset 1 = learn the following ritual when casting this one.

rebatelvl <1-9>

This ritual will be half price if caster is this level or higher.

levelup <1-9>

Will level up if caster is below this level. Leveling up means becoming a new monster determined by the mastery monster command.

levelupmon <1-9>

Like levelup, but the new monster type is set by the addstring command. Set the new monster type in the addstring command.

newspell1 <path nbr>

Learns one new level 1 combat spell from this path.

newspell2 <path nbr>

Learns one new level 2 combat spell from this path.

newspell3 <path nbr>

Learns one new level 3 combat spell from this path.

forgetrits

Forgets all known rituals.

Example mastery ritual that levels up from lvl 1 to lvl 2
newritual           "Mastery"
level               1
cost                3 150
free
newrit              2
levelup             2
soundfx             57
rebatelvl           2

Casting Restrictions

levelreq <1-9>

Caster must be exactly this level to use this ritual and cannot have another power at higher level.

resrestrict <res nbr>

Caster cannot have this resistance bitmask. Useful values are 2^4 for undead, 2^20 for immortal and 2^26 for ethereal.

resreq <res nbr>

Caster must have this resistance bitmask.

benrestrict <ben nbr>

Caster cannot have this beneficial bitmask

fxreq <fx nbr>

Unit must have 1+ in this fx to learn and cast this ritual. This command is probably not useful for modding.

nomonworldreq [<limit>]

Monsters in addstring "(-)…​" in the world must be fewer than limit. Default limit is 1.

nomonplayerreq [<limit>]

Monsters in addstring "(-)…​" in the world and owned by the current player must be fewer than limit. Default limit is 1.

nomonmasteryreq

Monsters in addstring "(-)…​" must not be in the world and owned by the current player unless level is higher than ritual requires

nomonelysiumreq

Monsters in addstring "(-)…​" must not be in elysium/sky/agartha. Monster in addstring "(+)…​" will disable following minuses if monster fulfills same requirement. This applies for all nomon… commands.

nomonreq

Monsters in addstring "(-)…​" must not be at current location.

nomonhomereq

Monsters in addstring "(-)…​" must not have their home at current location.

fewmonreq <max>

The monsters in addstring "(-)…​" must not be more than max at current location.

minmonreq <min>

The monsters in addstring "(&)…​" must be at least 'min' in number at current location.

monworldreq [<min>]

At least min number (default 1) of the monsters in addstring "(&)…​" must be in the world. The min attribute is optional and can be omitted.

monplayerreq [<min>]

At least min number (default 1) of the monsters in addstring "(&)…​" must be in the world and owned by the current player. The min attribute is optional and can be omitted.

enchherereq <ench nbr>

This type of Enchantment must be active where there ritual is cast.

nonearby1req <terrain nbr>

This terrain cannot be within 1 square when casting the ritual (a 3x3 square area).

nonearby3req <terrain nbr>

This terrain cannot be within 3 squares when casting the ritual (a 7x7 square area).

nonearby5req <terrain nbr>

This terrain cannot be within 5 squares when casting the ritual (a 11x11 square area).

nonearby7req <terrain nbr>

This terrain cannot be within 7 squares when casting the ritual (a 15x15 square area).

nonearby99req <terrain nbr>

This terrain cannot be anywhere on the same plane when casting the ritual

nearby1req <terrain nbr>

This terrain must be within 1 square when casting the ritual (a 3x3 square area).

nearby3req <terrain nbr>

This terrain must be within 3 squares when casting the ritual (a 7x7 square area).

nearby5req <terrain nbr>

This terrain must be within 5 squares when casting the ritual (a 11x11 square area).

nearby7req <terrain nbr>

This terrain must be within 7 squares when casting the ritual (a 15x15 square area).

nearby99req <terrain nbr>

This terrain must be somewhere on the same plane when casting the ritual

noportalreq <0-1>

Location where ritual is cast mustn’t contain a portal

maxcast <value>

Ritual cannot be cast more than this number of times per player

planereq <plane nbr>

Can only be cast on this plane. See table Plane Numbers.

nofxherereq <fx nbr>

Cannot be a unit with this fx at the current location.

nofortreq <fort part>

There cannot be a fort with this fort part here.

fortreq <fort part>

There must be a fort with this fort part here.

hasportalreq <portal nbr>

Player must own a portal of this number.

eventvarreq <var>

This event variable must be 1 or higher for ritual to be castable.

noeventvarreq <var>

This event variable must be 0 or lower for ritual to be castable.

homereq < -1 or 1>

Caster can only cast this in his home province. -1=cannot.

homecitreq < -1 or 1>

Can only cast this in the player’s home citadel. -1=cannot.

Ritual Learning Difficulty

free

always start with this ritual in addition the others

start

will start with this ritual(s), no others

nostart

never start with this ritual (or learn from mastery)

rarestart

reduced chance of starting with this ritual

notforpoor

units with more expensive rituals can’t get this one

nexttoo

receives next ritual too when receiving this one

afterprev

must know previous ritual before learning this one

noundead

undeads never know this ritual

nodemon

demons never know this ritual

nofemale

females never know this ritual

gathergems

will start gathering gems when knowing this ritual

Cost Modifications and Effect Boosts

apcost <nbr>

Extra Action Points cost for the rituals.

rebatefx25 <fx nbr>

Units with this fx nbr get 25% rebate

rebatefx50 <fx nbr>

Units with this fx nbr get 50% rebate

rebateterr20 <terrain nbr>

Ritual cost is 20% cheaper in this terrain

rebateterr50 <terrain nbr>

Ritual cost is 20% cheaper in this terrain

terrboost <terrain nbr>

Adds 1 to number of summoned monsters when done in this terrain

terrscale50 <terrain nbr>

+50% number of summoned monster when done in this terrain

sacrscale

Summoning amount scales with sacrifice production of target square

Targeting Commands

These commands sets the Target Location or Target Unit for the ritual. By default these targets are the caster and his square. This is fine for normal summoning and mastery rituals and usually only more exotic rituals that targets squares or units far away have any need to change this.

chooseterrloc <terrain nbr>

Player will choose target location for ritual.

randterrloc <terrain nbr>

Sets loc to a random terrain of this type on active plane.

randomloc <1-5>

1=random land loc, 2=many dead (excluding present), 3=rand enemy com, 4=rand enemy citadel, 5=home citadel

randnewloc <terrain nbr>

Like previous, but try to find an unknown location first.

newlocplanes <terrain nbr>

Like randnewloc but will go to other planes if necessary (but not hades)

chooseloc <1-5>

Player choose target location. 2=deviate to many dead, 3=empty mirror req, 4=empty gold mirror, 5=horror mark deviation

planeloc <plane nbr>

Shift target loc to same position but on another plane (neg = toggle between this plane and elysium).

setplane <plane nbr>

Following randomloc etc. commands will be restricted to this plane

choosefxtarg <fx nbr>

Player will choose a target unit that has this fx nbr.

mirrortarg <mirror size>

Set targ to an empty mirror unit, attr = size for mirror, -1=any size

montarg <1>

Sets targ unit to a random unit at target location among the type added by addstring.

ritmaxrange <range>

Limits the maximum range of any following choose…​ rituals. The range is in number of squares.

Affect Target Location

scryloc <radius*10>

Scry in a circle around target location.

scatterscry <nbr of squares>

Scry in a scattered way around target location.

squarespec <ss bitmask>

Adds special square flags to square. The only useful values are 2^14 (16384) converted to El, 2^16 (65536) poison fog, 2^17 (131072) strange mist.

reducetown

Reduces settlement at target location one step in size.

destroyterr

Destroys any valuable terrain at target location.

alterloc <terrain nbr>

Changes target square to this terrain.

makeportal <portal nbr>

Connect this square to other portals of the same number. Portal nbr 1000 is special and will create a unique number.

centerloc

Center map on target location.

trollifyloc

Transform forest at target location into a troll forest.

squareench <ench nbr>

Puts an enchantment at target location.

planeswap <plane nbr>

Swaps target square with corresponding square on this plane.

portalroom <terrain nbr>

Creates a portal to a location around this terrain.

movehome

Moves home citadel location to target square.

putcorpses <nbr>

Creates a number of human corpses in the target square (as if a fight involving humans had taken place there). Add 10000 to nbr in order to make the number of corpses scale with the sacrifice amount used.

Affect Target Unit

teleportloc <1-2>

Teleport target unit to target location. Attribute value 2 means the caster’s entire army is teleported to the target location.

selectfx <fx nbr>

Sets mod-fx-nbr to this value. Used by next command.

setfx <value>

Gives target unit a fx of type mod-fx-nbr and sets it to this value.

fillmirror <images>

Puts a number of images into a mirror, -1 = fill to default value (mirrorammo)

killtarg <dmg>

Gives between 1 and <dmg> amount of damage to target unit. Use a value of 9999 for autokill.

updatehome

Updates home for target unit to where he stands. This is used to make some immortals resurrect in the correct place.

bentarg <ben nbr>

Gives a beneficial bitmask to the target unit. See table Special Benefits. Particularly useful values for rituals are 2^26 to get the twiceborn effect or 2^24 to get the Stygian Bath effect. Note that most ben effects are temporary any will disappear after battle or during the turn and will be useless for rituals.

afftarg <aff nbr>

Gives an affliction bitmask to the target unit. See table Special Afflictions.

bentargall <ben nbr>

Like bentarg, but also affects all the target’s followers.

setvar <nbr>

Set the generic modding variable to this value.

bentargvar <ben nbr>

Like bentarg, but the unit will only be affected if he is located in the terrain in the generic modding variable.

cureoneaff <chance>

Has this chance of curing one affliction on the target unit.

insanity <value>

Gives insanity to the target unit. Negative value can be used to cure insanity. Only works if target is a commander.

ritequipall

Gives all items in "|…​" strings to the target unit. E.g. use addstring "|Ring of Protection" if you want the target unit to receive a ring of protection.

Special Commands

soundfx <sound>

Play this sound effect.

transformtarg <mode>

Target unit will be transformed into one of the monsters added by addstring. Normally you want to use mode 1. Mode 2 will transform the units into higher monsters if they have higher skill level than necessary to cast the ritual.

gainbless <percent>

Percent chance of gaining a bless effect.

gaindarkbless <percent>

Percent chance of gaining a dark bless effect.

ornext <percent>

This ritual will have one of two possible effects. The first effect will consist of the following command, the next effect will consist of the remaining commands. Percent is the chance of the first effect happening.

ornext2 <percent>

This ritual will have one of two possible effects. The first effect will consist of the two following commands, the next effect will consist of the remaining commands. Percent is the chance of the first effect happening.

ornext3 <percent>

This ritual will have one of two possible effects. The first effect will consist of the three following commands, the next effect will consist of the remaining commands. Percent is the chance of the first effect happening.

ornext4 <percent>

Like the other ornext commands.

ornext5 <percent>

Like the other ornext commands.

castertarg

Sets target unit to caster.

closewin

Closes the ritual window after the ritual has completed.

failplayer <player nbr>

Failed summons will be owned by this player.

centercaster

Center map on caster.

unfollowtarg

Removes all followers from the target, should he be a commander that is commanding any units.

simulacrum

Creates a simulacrum.

enchreqterr <terrain nbr>

Enchantment will be auto dispelled if it is outside this terrain.

forgetcurrit

Caster will forget this ritual after casting it.

Event interaction

seteventvar <var>

set this event variable to 1

cleareventvar <var>

set this event variable to 0

addeventvar <var>

increases the value of this event variable by 1

subeventvar <var>

decreases the value of this event variable by 1

AI hints

aiwhere <terrain nbr>

restricts the AI to only cast ritual in this terrain

aialways <chance>

AI will always (if chance = 100 try to cast this ritual, but not make any long time plans for it. chance=999 is special and means the AI will also make plans for the ritual.)

airare <chance>

Reduces the chance of the AI trying to use this ritual. Chance is the chance of casting the ritual and can be from 1-99. -1 is a special value meaning never cast it.

aiweakonly <troop strength>

AI commander will only cast this ritual if his troop strength is below this value. One spearman gives 10 troop strength points.

aionlyplane <plane nr>

AI will only cast ritual when on this plane

aitarg <value>

For long range rituals. 1=try to target squares with enemy commanders, 2=try to target valuable squares with corpses in

ainothere <terrain nbr>

AI will not cast ritual in this terrain

ainotclose1 <terrain nbr>

AI will not cast ritual if close to this terrain, radius=1

ainotclose2 <terrain nbr>

AI will not cast ritual if close to this terrain, radius=2

ainotclose3 <terrain nbr>

AI will not cast ritual if close to this terrain, radius=3

ainotnearhome <mindist>

AI should not cast this ritual close to home (mindist = nbr of squares away)

aiapprspam <chance>

AI will dedicate apprentices to stay at home and only spam this ritual. Chance is 0-100

ainosimul

No more than one commander may plan to cast this ritual at once

airestrig <value>

AI will always try to cast this ritual if it has at least this many of the primary resource for the ritual

aimaxcast <value>

An AI player will never cast this ritual more than this number of times in a game

Sound Sample Modding

This command can be used to modify or create new sound samples. These can then be used as sound effects for weapons and rituals in the mod.

sample <sound> "sample.sw"

Sets a sample file (sample.sw) as a certain sound effect number (sound). The sound effect number can be between 0 and 249, high numbers (170+) will create new samples and low number will replace the old samples that already occupies those numbers. The sample file should have the .sw (mono) or .sw2 (stereo) extension and be saved as a signed 16-bit 22050 Hz sample.

sampleismusic <sound>

Turns this sample into one a class specific tunes. That means it will loop into a background tune when it has finished playing. If you create a sample as a class specific tune, this must be used on that sample to keep the music playing. If used on a background tune it will remove that tune from the loop of background music.

sampleisloopmusic <sound>

Turns this sample into one of the background tunes. That means it will loop into another background tune when it has finished playing.

Misc Modding

For those commands that do not fit into one of the usual categories.

playercolor <player> <red> <green> <blue>

Sets the default color for a player. Each color value is between 0 and 255.

Events

Events are composed of one start command, usually one or more triggers, one or more actions and finally the end command.

The trigger determines when the event will happen and the action determines what will happen as the result.

Events can be added both to mods and to custom map files.

Event Start & End

playerevent

Once for each player every turn, occurs in home citadel by default

squareevent

For each player and each square in the world every turn

endevent

All events must end with this command

Event Triggers

Restricts when the event can occur. Note that all triggers can be inverted by writing - instead of +.

+squareowner <player>

True if target square is owned or occupied by this player.

+armyowner <player>

True if square is occupied by this player.

+turnnbr <turn nbr>

True if the current turn number is this turn nbr. Games start at turn 0 and any turn 0 events are executed before each player can player their first turn. But events are also run once before the game has started for anyone at turn -1.

+minturnnbr <turn nbr>

True if the current turn number is this turn nbr of greater.

+chance <percent>

Trigger has percent chance of being true.

+player <player>

True if current player has this player number.

+class <player> "class name"

True if this player is this class.

+humanplayer <player>

True if this player is a human player (not an AI player).

+aiplayer <player>

True if this player is an AI player. Only real AI players are valid, not the different independent factions.

+hascom <player> "commander’s name"

Also sets target unit.

+hascomhere <player> "commander’s name"

Also sets target unit.

+ownsloc <player> <terr nbr>

True if player owns this terrain anywhere in the world.

+ownsloctarg <player> <terr nbr>

True if player owns this terrain anywhere in the world. Also sets target location to this place.

+terrain <terr nbr>

True if target square is of this terrain.

+season <0-3>

0=summer, 1=autumn, 2=winter, 3=spring.

+seasondelay <1-3>

3=early (guaranteed to only happen once per season, 2=mid, 1=late).

+varequal <var> <value>

var = 0-9999, true if variable equals value.

+varlesser <var> <value>

True if the variable is less than value.

+vargreater <var> <value>

True if the variable is greater than value.

+hasunit <player> "monster name"

True if player has this kind of unit somewhere in the world. Also sets target unit (player -1 = any player)

+hasunithere <player> "monster name"

True if player has this kind of unit at current square. Also sets target unit (player -1 = any player)

+hasitem <player> "item name"

True if player has this kind of magic item somewhere in the world. Also sets target unit to wielder (player -1 = any player)

+hasitemhere <player> "item name"

True if player has this kind of magic item in current square. Also sets target unit to wielder (player -1 = any player)

+squarename “square name”

True if square has this name. e.g. “Crab Harbor” or “The Old Tower”

+plane <planenr>

True if target square is on this plane. See table Plane Numbers. The special values -1 (all planes) and -2 (Elysium-near planes) can also be used.

+mincorpses <nbr>

True if at least this many corpses of any type are present in the square.

+minhumancorpses <nbr>

True if at least this many human corpses are present in the square.

+minhumanoidcorpses <nbr>

True if at least this many humanoid corpses (humans, hoburghers, giants) are present in the square.

+minanimalcorpses <nbr>

True if at least this many animal corpses (of any type) are present in the square.

+hasaffunithere <player> <aff>

True if player has a unit in the current square that has all the afflictions in the aff mask. See table Special Afflictions. Also sets target unit (player -1 = any player)-

+squareactivated

True if active square is in its activated state. Terrains like Stone Henges can be (de)activated and their status can be checked with this trigger.

+varvarequal <var1> <var2>

var = 0-9999, true if variable 1 equals variable 2.

+varvarlesser <var1> <var2>

var = 0-9999, true if variable 1 is lesser than variable 2.

+varvargreater <var1> <var2>

var = 0-9999, true if variable 1 is greater than variable 2.

Event Actions

Basic actions

addresources <player> <resource type> <amount>

Adds an amount of resources to a player. See table Resource Types for resource types.

message <to player> "text"

Sends a text message to a player.

Affect target location

newunits <player> "monsters"

also sets target unit

promoteunits <player> <max amount> "from monster" "to monster"

also sets target unit

alterterrain <terrain nbr>

changes the terrain of the current location

killsquare

kills everyone in target square

namesquare “square name”

Sets name of square, e.g. “Crab Harbor” or “!2The Old Forest” or “!!The Old Tower”

removecorpses <nbr>

Removes this many corpses from target location. Nbr must be a positive value.

removehumanoidcorpses <nbr>

Removes this many humanoid corpses from target location. Nbr must be a positive value.

removeanimalcorpses <nbr>

Removes this many animal corpses from target location. Nbr must be a positive value.

holdit <0-1>

1=Any independent units on this square will hold and not move away. This holdit flag is cleared if the square is conquered or if any unit is spawned on it.

Change where the target location is

setloc <x> <y>

Move target location to a fixed location. Cannot be used on squareevents.

randloc <planenr> <terr nbr>

Move target location to a random location. See table Plane Numbers. The plane special values -1 (all planes) and -2 (Elysium-near planes) can also be used. Negative terrain numbers can also be used for special group of terrains. Cannot be used on squareevents.

scatterloc <radius>

Makes target location deviate a bit, can result in the same square. Cannot be used on squareevents.

targunitloc

Set target location to the place where the target unit is.

Affect target unit

comname "commander name"

Gives a new name to the target unit. Only works if the target is a commander.

newitem "item name"

Gives a specific magic item to the target unit.

randitem <rare chance>

Gives a random magic item to the target unit. Rare chance is the chance of being eligible for a rare magic item. It will always be an item that the target unit has appropriate equipment slots for.

randmisc <rare chance>

Gives a random magic misc item to the target unit. Rare chance is the chance of being eligible for a rare magic item.

killunit <dmg>

Hits the target unit with this amount of damage. Use 9999+ for a purge that will disregard any special abilities the target might have (including immortality).

gainxp <xp>

Gives XP to the target unit. XP can be negative to remove XP.

promote <commanderize> "monster"

commanderize 0 = do not alter commander status, 1 = turns a non commander into a commander

makestationary

Makes target unit stationary on world map.

makeblind

Makes target unit blind.

makediseased

Makes target unit diseased.

makenhwound

Gives target unit a never healing wound.

cureoneaff

Cures one affliction.

changeowner <player>

changes ownership of unit to this player

makeaff <aff>

Gives an affliction to target unit. See table Special Afflictions.

makeben <ben>

Gives a special benefit to target unit. See table Special Benefits. Particularly useful values are 2^26 to get the twiceborn effect or 2^24 to get the Stygian Bath effect. Note that most ben effects are temporary any will disappear after battle or during the turn and will be useless for events.

makeminoraff

Gives a random minor affliction to target unit.

Set variables

setvar <var> <value>

var = 0-9999, sets a variable to a value

addvar <var> <value>

var = 0-9999, adds a value to a variable

copyvar <var1> <var2>

var = 0-9999, copies variable 1 to variable 2

All variables are set to zero when the game begins.

Special Values

Where a "player" number is required one of these numbers can be used.

Player numbers
0-23 = player number
  24 = Independents
  25 = Special monsters
  26 = Horrors
  27 = Hades
  28 = Inferno
  29 = Celestial
  30 = Kingdom/Empire
  -1 = everyone (only for messages and a few triggers)
  -2 = event player (current player)
  -3 = square owner
  -4 = army owner

Updating a Mod

Updating a mod might break old saved games using that mod unless you take some special care.

Any new units have to added after all previous units and any new classes after all other classes and so on. If updates are done in this way, saves should remain compatible. Adding a new unit in the middle of a mod will shuffle around all the ones behind it and break any saved games.