Heroes and Might and Magic V: Cheat Commands

Since the game was released without traditional cheat codes, the following is achieved by manipulating the game's script. To my knowledge and fair amount of testing, the commands covered should work as intended.

It goes without saying that these are intended to be used by individuals in a single player environment as a means to explore the game's mechanics, fool around, have some fun, and help players that may be stuck or frustrated. They should not be used to gain an advantage in multiplayer environments, competitive or casual, unless all players are made aware and are in agreement. For the sake of fair play and in consideration of fellow players, please act honorably.

Note: for the reason of multiplayer honesty, version 1.2 of the game (and presumably beyond) has disabled all the codes that are NOT @ Commands (the @ Commands never worked in multiplayer, but always did for single player). As a result, unless your game version is pre-1.2, many of the cheats will no longer function. However, there is an @ equivalent for every code that no longer works.

Acknowledgements

Wrongusername for likely being the first to share some of this info.
Metathron for pointing out the error with the command add_army in my original document.

And of course Age of Heroes for hosting this!

Contents

  1. Introduction

  2. The @ Commands

  3. Adding Skills

  4. The @ Variant: @GiveHeroSkill()

  5. Skill Names / Numbers Chart

  6. Adding Creatures

  7. The @ Variant: Adding Specific Creatures, Variable Amounts

  8. Removing Specific Creatures

  9. Creature Names / Numbers Chart

  10. Adding War Machines

  11. Removing War Machines

  12. War Machines Names / Numbers Chart

  13. Adding Spells

  14. Adding Individual Spells to Heroes

  15. Spell Names / Numbers Chart

  16. Adding Artifacts to Heroes

  17. Artifact Names / Numbers Chart

  18. Hero Names Chart

  19. Miscellaneous Modifications

  20. Changing Hero Stats

  21. Clearing Resources (disabled in 1.2)

  22. Adding Gold Only (disabled in 1.2)

  23. Adding Gold and Resources (disabled in 1.2)

  24. Adding Specific Gold and Resources

  25. Seeing Movement Points

  26. Revealing the Map

  27. Instant Win and Lose

Activating Ability to Cheat

To enable the console in-game, you'll first have to edit your autoexec.cfg file, found in your game directory > profiles (open it with Wordpad or something).

Paste this as the last line, after the line mainmenu:

setvar dev_console_password = schwinge-des-todes

Now you'll be able to access the console by pressing the tilde ( ` ) key within the game (likely above your Tab button).

If you do not have a tilde key, or the tilde key does not appear to function for you, you'll have to edit your input.cfg file, found in your game directory > profiles default_profile. Open input.cfg with Wordpad, and search for the term show_console. Further along the line, you will see '`'. Change the keystroke enclosed within the single quotes to another key you can use. Save and exit.

The Commands

Until version 1.2 of the game, there used to be two types of commands:

The first, simple type of commands has been disabled in version 1.2 of the game to prevent multiplayer cheating. We kept them here for reference, if you're playing with an earlier version.

The second type of commands is the one used in the game lua scripts. They do not work in multiplayer, even in hotseat. They only work in single player mode, campaigns included.

Note that the commands have to be entered with the correct syntax, respecting lowercase and uppercase letters, parenthesis, quotes ('simple' ou "double" indifferently)... The semicolon (;) at the end of the line can be omitted, though.

When explaining each command, we will provide examples besides the generic code, and you may find it easier to understand the mechanics on examples. Note that the generic code will be written in italics, but of course, you don't have to input it in italics in Heroes 5 console...


Adding Skills

The only prerequisite you have to fill when adding abilities is that the hero already knows the corresponding skill.

All the other usual rules do not apply: you can learn advanced abilities without knowing their prerequisites, you can learn skills and abilities usually not accessible to your faction, you can learn more than 6 skills and 3 abilities per skills (they won't be visible on the skill panel, but you will get the benefits).

When you input the command to learn a skill (not an ability) that you don't know yet, you learn it at Basic level. Type the command again to learn the upper skill levels (Advanced, Expert, and Ultimate for the unique racial skills). Each time you input it, you will gain a level in the skill, until you reach the maximum.

The simple way (disabled in 1.2)

add_skill (#)

So, for example:

add_skill 15

...gives you Necromancy.

add_skill 19

...gives Pathfinding (ability of Logistics).

The @ Variant: Adding Skills

With the latest patch, version 1.2 has disabled all non-@ Command codes. Where it was once relatively easy to add_skills to any selected hero, you'll now have to tackle the more difficult syntax and chart referencing of the @ variant.

For example:

@GiveHeroSkill("Linaas", SKILL_ABSOLUTE_LUCK);
OR @GiveHeroSkill("Linaas", 124);

...gives the Sylvan hero Wyngaal his ultimate ability, Nature's Luck.

So, the code is:

@GiveHeroSkill("Name", SKILL_NAME);
OR @GiveHeroSkill("Name", #);

The SKILL_ and # codes are given in the table below.

Note: to effectively use this code, it is essential to refer to the Hero Names Chart.

Skill Names / Numbers Chart

The abilities are grouped by skills. The common skills are sorted alphabetically, after the 6 racial skills displayed first, sorted in hero aplhabetical order. The racial absolute abilities are displayed in bold and listed last in the corresponding skill.

Skill name in-game

What you input after SKILL_

# Code variant

(Demon Lord) Gating

GATING

14

Consume Corpse

CONSUME_CORPSE

58

Hellfire

DEMONIC_FIRE

59

Mark of the Damned

DEMONIC_STRIKE

60

Urgash's Call

ABSOLUTE_GATING

98

 

 

 

(Knight) Counterstrike

TRAINING

13

Benediction

PRAYER

56

Expert Trainer

EXPERT_TRAINER

57

Retaliation Strike

HOLY_CHARGE

55

Unstoppable Charge

ABSOLUTE_CHARGE

85

 

 

 

(Necromancer) Necromancy

NECROMANCY

15

Banshee Howl

DEATH_SCREAM

63

Eternal Servitude

NO_REST_FOR_THE_WICKED

62

Skeleton Archers

RAISE_ARCHERS

61

Howl of Terror

ABSOLUTE_FEAR

111

 

 

 

(Ranger) Avenger

AVENGER

16

Deadeye Shot

SNIPE_DEAD

65

Imbue Arrow

IMBUE_ARROW

66

Rain of Arrows

MULTISHOT

64

Nature's Luck

ABSOLUTE_LUCK

124

 

 

 

(Warlock) Irresistible Magic

INVOCATION

18

Dark Ritual

DARK_RITUAL

71

Elemental Vision

ELEMENTAL_VISION

72

Empowered spells

EMPOWERED_SPELLS

70

Rage of the Elements

ABSOLUTE_CHAINS

150

 

 

 

(Wizard) Artificer

ARTIFICIER

17

Consume Artifact

MELT_ARTIFACT

68

Magic mirror

MAGIC_MIRROR

69

Mark of the Wizard

MAGIC_BOND

67

Arcane Omniscience

ABSOLUTE_WIZARDY

137

 

 

 

Attack

OFFENCE

6

Archery

ARCHERY

35

Battle Frenzy

FRENZY

36

Cold Steel

CHILLING_STEEL

104

Excruciating Strike

CRITICAL_STRIKE

91

Flaming Arrows

WILDFIRE

130

Nature's Wrath

FOREST_RAGE

117

Power of Speed

POWER_OF_HASTE

143

Retribution

RETRIBUTION

76

Tactics

TACTICS

34

 

 

 

Dark Magic

DARK_MAGIC

10

Corrupted Soil

SOIL_BURN

121

Dark Renewal

PAYBACK

147

Fallen Knight

PARIAH

83

Master of Curses

MASTER_OF_CURSES

46

Master of Mind

MASTER_OF_MIND

47

Master of Pain

MASTER_OF_SICKNESS

48

Seal of Darkness

SUPRESS_DARK

134

Spirit Link

SPIRIT_LINK

108

Weakening Strike

WEAKENING_STRIKE

95

 

 

 

Defense

DEFENCE

7

Chilling Bones

CHILLING_BONES

105

Evasion

EVASION

38

Hellwrath

DEMONIC_RETALIATION

92

Last Stand

LAST_STAND

118

Power of Endurance

POWER_OF_STONE

144

Protection

PROTECTION

37

Resistance

SEAL_OF_PROTECTION

131

Stand Your Ground

HOLD_GROUND

77

Vitality

TOUGHNESS

39

 

 

 

Destructive Magic

DESTRUCTIVE_MAGIC

9

Cold Death

DEADLY_COLD

107

Fiery Wrath

ANCIENT_SMITHY

82

Mana Burst

SUN_FIRE

120

Master of Fire

MASTER_OF_FIRE

44

Master of Ice

MASTER_OF_ICE

43

Master of Storms

MASTER_OF_LIGHTNINGS

45

Sap Magic

MAGIC_CUSHION

133

Searing Fires

DEMONIC_FLAME

94

Secrets of destruction

SECRETS_OF_DESTRUCTION

146

 

 

 

Enlightenment

LEARNING

3

Arcane Exaltation

MASTER_OF_SECRETS

87

Arcane Intuition

EAGLE_EYE

27

Dark Revelation

DARK_REVELATION

140

Graduate

STUDENT_AWARD

79

Intelligence

INTELLIGENCE

25

Know Your Enemy

CUNNING_OF_THE_WOODS

114

Lord of the Undead

LORD_OF_UNDEAD

101

Scholar

SCHOLAR

26

Wizard's Reward

ACADEMY_AWARD

127

 

 

 

Leadership

LEADERSHIP

4

Artifical Glory

ARTIFICIAL_GLORY

128

Aura of Swiftness

FAST_AND_FURIOUS

141

Battle Commander

FOREST_GUARD_EMBLEM

115

Diplomacy

DIPLOMACY

30

Divine Guidance

ENCOURAGE

75

Estates

ESTATES

29

Gate Master

GATING_MASTERY

89

Herald Of Death

HERALD_OF_DEATH

102

Recruitment

RECRUITMENT

28

 

 

 

Light Magic

LIGHT_MAGIC

11

Fire Resistance

FIRE_PROTECTION

96

Guardian Angel

GUARDIAN_ANGEL

78

Master of Abjuration

MASTER_OF_ABJURATION

50

Master of Blessings

MASTER_OF_BLESSING

49

Master of Wrath

MASTER_OF_WRATH

51

Refined Mana

ELITE_CASTERS

148

Storm Wind

STORM_WIND

122

Suppress Light

SUPRESS_LIGHT

135

Twilight

TWILIGHT

109

 

 

 

Logistics

LOGISTICS

1

Death March

DEATH_TREAD

99

Familiar Ground

ROAD_HOME

73

March of the Golems

MARCH_OF_THE_MACHINES

125

Navigation

NAVIGATION

21

Pathfinding

PATHFINDING

19

Scouting

SCOUTING

20

Silent Stalker

DISGUISE_AND_RECKON

112

Swift Gating

QUICK_GATING

86

Teleport Assault

TELEPORT_ASSAULT

138

 

 

 

Luck

LUCK

5

Dead Man's Curse

DEAD_LUCK

103

Elven Luck

ELVEN_LUCK

116

Magic Resistance

RESISTANCE

31

Resourcefulness

FORTUNATE_ADVENTURER

33

Soldier's Luck

LUCKY_STRIKE

32

Spoils of War

SPOILS_OF_WAR

129

Swarming Gate

CRITICAL_GATING

90

Tear of Asha Vision

GRAIL_VISION

80

Warlock's Luck

LUCKY_SPELLS

142

 

 

 

Sorcery

SORCERY

8

Arcane Brillance

INSIGHTS

119

Arcane Excellence

CASTER_CERTIFICATE

81

Arcane Training

ARCANE_TRAINING

42

Boneward

SPELLPROOF_BONES

106

Counterspell

COUNTERSPELL

132

Erratic Mana

CHAOTIC_SPELLS

145

Magic Insight

WISDOM

41

Mana Regeneration

MYSTICISM

40

Soulfire

EXPLODING_CORPSES

93

 

 

 

Summoning Magic

SUMMONING_MAGIC

12

Banish

UNSUMMON

110

Elemental Balance

ELEMENTAL_BALANCE

84

Exorcism

ELEMENTAL_OVERKILL

149

Fire Warriors

FIRE_AFFINITY

97

Haunted Mines

HAUNT_MINE

136

Master of Conjuration

MASTER_OF_CREATURES

53

Master of Earthblood

MASTER_OF_QUAKES

52

Master of Life

MASTER_OF_ANIMATION

54

Wall of Fog

FOG_VEIL

123

 

 

 

War Machines

WAR_MACHINES

2

Ballista

BALLISTA

23

Brimstone Rain

TRIPLE_CATAPULT

88

Catapult

CATAPULT

24

First Aid

FIRST_AID

22

Imbue Ballista

IMBUE_BALLISTA

113

Plague Tent

LAST_AID

100

Remote Control

REMOTE_CONTROL

126

Tremors

SHAKE_GROUND

139

Triple Ballista

TRIPLE_BALLISTA

74

 

 


Adding Creatures

Adding a complete army (disabled in 1.2)

add_army (#), (0 or 1)

This fills all of your selected hero's slots with exactly 100 creatures from the town class you indicate. 0 or 1 sets whether these creatures are upgraded or not, 0 being basic, and 1 being the upgraded version of the creature. More times do not give you 200, 300, etc.

Note: It used to add 10 such creatures in each slot prior to the 1.1 patch.

Town names (as per how the game refers to them) and its corresponding #:

HEAVEN

0

(no, it is not HAVEN)

PRESERVE

1

(no, it is not SYLVAN)

ACADEMY

2

DUNGEON

3

NECRO

4

INFERNO

5

So, for example:

add_army 1, 0

...gives your hero 100 creatures of each basic Sylvan creature.

add_army 4, 1

...gives your hero 100 creatures of each upgraded Necropolis creature.

The @ Variant: Adding Specific Creatures, Variable Amounts

Obviously, the previous command for adding creatures can be rather maddening, in that you get every creature of a faction, and the stack sizes are only 10. What if you wanted something like 5000 Black Dragons? This code allows you to do that.

For example:

@AddHeroCreatures("Pelt", CREATURE_BONE_DRAGON, 22);
OR @AddHeroCreatures("Pelt", 41, 22);

...gives the Necromancer hero Vladimir 22 bone dragons.

So, the code is:

@AddHeroCreatures("Name", CREATURE_NAME, #);
OR @AddHeroCreatures("Name", #, #);

Note: to effectively use this code, it is essential to refer to the Hero Names Chart, and to the following Creature Names / Numbers Chart.

Removing Specific Creatures

Of course, you can just dismiss creatures through the game interface, but if we try to be exhaustive, the removal command also exists:

@RemoveHeroCreatures("Name", CREATURE_NAME, #);
OR @RemoveHeroCreatures("Name", #, #);

Creature Names / Numbers Chart

The chart is organized by faction, and then from the weakest creature to the strongest (for example, Gremlins to Colossi for the Academy faction), rather than alphabetically. The upgraded variant of each creature immediately follows its basic form.

Creature name in-game

What you input after CREATURE_

# Code (two # code variant)

Academy

Gremlin

GREMLIN

57

Master Gremlin

MASTER_GREMLIN

58

Stone Gargoyle

STONE_GARGOYLE

59

Obsidian Gargoyle

OBSIDIAN_GARGOYLE

60

Iron Golem

IRON_GOLEM

61

Steel Golem

STEEL_GOLEM

62

Mage

MAGI

63

Arch Mage

ARCH_MAGI

64

Djinn

GENIE

65

Djinn Sultan

MASTER_GENIE

66

Rakshasa Rani

RAKSHASA

67

Rakshasa Raja

RAKSHASA_RUKH

68

Colossus

GIANT

69

Titan

TITAN

70

 

 

 

Dungeon

Scout

SCOUT

71

Assassin

ASSASSIN

72

Blood Maiden

WITCH

73

Blood Fury

BLOOD_WITCH

74

Minotaur

MINOTAUR

75

Minotaur Guard

MINOTAUR_KING

76

Grim Raider

RIDER

77

Dark Raider

RAVAGER

78

Hydra

HYDRA

79

Deep Hydra

CHAOS_HYDRA

80

Shadow Witch

MATRON

81

Shadow Matriarch

MATRIARCH

82

Shadow Dragon

DEEP_DRAGON

83

Black Dragon

BLACK_DRAGON

84

 

 

 

Haven

Peasant

PEASANT

1

Conscript

MILITIAMAN

2

Archer

ARCHER

3

Marksman

MARKSMAN

4

Footman

FOOTMAN

5

Squire

SWORDSMAN

6

Griffin

GRIFFIN

7

Royal Griffin

ROYAL_GRIFFIN

8

Priest

PRIEST

9

Inquisitor

CLERIC

10

Cavalier

CAVALIER

11

Paladin

PALADIN

12

Angels

ANGEL

13

Archangel

ARCHANGEL

14

 

 

 

Inferno

Imp

FAMILIAR

15

Familiar

IMP

16

Horned Demon

DEMON

17

Horned Overseer

HORNED_DEMON

18

Hell Hound

HELL_HOUND

19

Cerberus

CERBERI

20

Succubus

SUCCUBUS

21

Succubus Mistress

INFERNAL_SUCCUBUS

22

Hell Charger

NIGHTMARE

23

Nightmare

FRIGHTFUL_NIGHTMARE

24

Pit Fiend

PIT_FIEND

25

Pit Lord

BALOR

26

Devil

DEVIL

27

Arch Devil

ARCHDEVIL

28

 

 

 

Necropolis

Skeleton

SKELETON

29

Skeleton Archer

SKELETON_ARCHER

30

Zombie

WALKING_DEAD

31

Plague Zombie

ZOMBIE

32

Ghost

MANES

33

Spectre

GHOST

34

Vampire

VAMPIRE

35

Vampire Lord

VAMPIRE_LORD

36

Lich

LICH

37

Archlich

DEMILICH

38

Wight

WIGHT

39

Wraith

WRAITH

40

Bone Dragon

BONE_DRAGON

41

Spectral Dragon

SHADOW_DRAGON

42

 

 

 

Sylvan

Pixie

PIXIE

43

Sprite

SPRITE

44

Blade Dancer

BLADE_JUGGLER

45

War Dancer

WAR_DANCER

46

Hunter

WOOD_ELF

47

Master Hunter

GRAND_ELF

48

Druid

DRUID

49

Druid Elder

DRUID_ELDER

50

Unicorn

UNICORN

51

Silver Unicorn

WAR_UNICORN

52

Treant

TREANT

53

Ancient Treant

TREANT_GUARDIAN

54

Green Dragon

GREEN_DRAGON

55

Emerald Dragon

GOLD_DRAGON

56

 

 

 

Neutrals

Air Elemental

AIR_ELEMENTAL

88

Black Knight

BLACK_KNIGHT

89

Earth Elemental

EARTH_ELEMENTAL

87

Fire Elemental

FIRE_ELEMENTAL

85

Phoenix

PHOENIX

91

Water Elemental

WATER_ELEMENTAL

86

 

 


Adding War Machines

Adding a specific War Machine

In version 1.0 of the game, it was possible to add war machines by using the @AddHeroCreatures() command. Since patch 1.1, this method does not work anymore, but there is a specific command to do just that:

@GiveHeroWarMachine("Name", WAR_MACHINE_NAME);
OR @GiveHeroWarMachine("Name", #);

For example:

@GiveHeroWarMachine("Godric", WAR_MACHINE_BALLISTA);
OR @GiveHeroWarMachine("Godric", 1);

...gives a ballista to the Haven hero Godric.

Note: to effectively use this code, it is essential to refer to the Hero Names Chart, and to the following Creature Names / Numbers Chart.

Removing War Machines

You can also remove a war machine from a hero (except his/her Catapult):

@RemoveHeroWarMachine("Name", WAR_MACHINE_NAME);
OR @RemoveHeroWarMachine("Name", #);

For example:

@RemoveHeroWarMachine("Godric", WAR_MACHINE_BALLISTA);
OR @RemoveHeroWarMachine("Godric", 1);

...removes the ballista from Godric.

War Machines Names / Numbers Chart

War Machine name in-game

Explicit code

# Code variant

War Machines

Ammo Cart

WAR_MACHINE_AMMO_CART

4

Ballista

WAR_MACHINE_BALLISTA

1

Catapult

WAR_MACHINE_CATAPULT

2

First Aid Tent

WAR_MACHINE_FIRST_AID_TENT

3

 

 

 

Note: obviously, adding a Catapult is not very useful since your heroes always have one, and the removing code doesn't work on it.


Adding Spells

Adding all spells at once (disabled in 1.2)

add_all_spells

Your selected hero learns and can use all the spells, regardless of whether you have the skills or not.

Adding Individual Spells to Heroes

Maybe you're not that big of a cheater, and would prefer to add choice spells to a hero, rather than every single one with add_all_spells .

For example:

@TeachHeroSpell("Astral", SPELL_HASTE);
OR @TeachHeroSpell("Astral", 24);

...gives the Academy hero Nur the spell Haste.

So, the generic code is:

@TeachHeroSpell(“Name”, SPELL_NAME);
OR @TeachHeroSpell(“Name”, #);

Note: if the spell name is longer than one word, it'll look something like: SPELL_MAGIC_ARROW (which is Eldritch Arrow in-game).

To properly use this, the chart in the next section is essential, as is the Hero Names Chart.

Spell Names / Numbers Chart

Say you want the spell Instant Travel, and try to input this name in caps with the above code. Strangely, you'll fail, and the console tells you that such a spell doesn't exist! What's the big deal?

The fact of the matter is, some of the in-game spell names aren't referenced by the game as that particular spell. My previous note illustrates this perfectly: to learn Eldritch Arrow, the used code is MAGIC_ARROW. Why the incongruity? It seems a lot of the renamed spells are identified by what HoMM fans are traditionally used to. Anyhow:

You want to learn...

What you input after SPELL_

# Code variant

Adventure Spells

Instant Travel

DIMENSION_DOOR

50

Summon Creatures

SUMMON_CREATURES

234

Town Portal

TOWN_PORTAL

51

Vessel of Shalassa

SUMMON_BOAT

49

 

 

 

Dark Magic

Blindness

BLIND

19

Confusion

FORGETFULNESS

17

Curse of the Netherworld

UNHOLY_WORD

21

Decay

PLAGUE

14

Frenzy

BERSERK

18

Puppet Master

HYPNOTIZE

20

Slow

SLOW

12

Suffering

WEAKNESS

15

Vulnerability

DISRUPTING_RAY

13

Weakness

CURSE

11

 

 

 

Mass Confusion

MASS_FORGETFULNESS

213

Mass Decay

MASS_PLAGUE

214

Mass Slow

MASS_SLOW

212

Mass Suffering

MASS_WEAKNESS

215

Mass Vulnerability

MASS_DISRUPTING_RAY

211

Mass Weakness

MASS_CURSE

210

 

 

 

Destructive Magic

Armageddon

ARMAGEDDON

10

Chain Lightning

CHAIN_LIGHTNING

7

Circle of Winter

FROST_RING

6

Eldritch Arrow

MAGIC_ARROW

1

Fireball

FIREBALL

5

Ice Bolt

ICE_BOLT

4

Implosion

IMPLOSION

9

Lightning Bolt

LIGHTNING_BOLT

3

Meteor Shower

METEOR_SHOWER

8

Stone Spikes

STONESPIKES

237

 

 

 

Empowered Armageddon

EMPOWERED_ARMAGEDDON

232

Empowered Chain Lightning

EMPOWERED_CHAIN_LIGHTNING

229

Empowered Eldritch Arrow

EMPOWERED_MAGIC_ARROW

223

Empowered Fireball

EMPOWERED_FIREBALL

227

Empowered Ice Bolt

EMPOWERED_ICE_BOLT

226

Empowered Implosion

EMPOWERED_IMPLOSION

231

Empowered Lightning Bolt

EMPOWERED_LIGHTNING_BOLT

225

Empowered Meteor Shower

EMPOWERED_METEOR_SHOWER

230

Empowered Stone Spikes

EMPOWEREDSTONE_SPIKES

233

Empowered Winter Ring

EMPOWERED_FROST_RING

228

 

 

 

Light Magic

Arcane Armor

CELESTIAL_SHIELD

34

Cleansing

DISPEL

26

Deflect Missile

DEFLECT_ARROWS

29

Divine Strength

BLESS

23

Endurance

STONESKIN

25

Haste

HASTE

24

Magical Immunity

ANTI-MAGIC

31

Resurrection

RESURRECT

48

Righteous Might

BLOODLUST

28

Teleportation

TELEPORT

32

Word of Light

HOLY_WORD

35

 

 

 

Mass Cleansing

MASS_DISPEL

217

Mass Deflect Missile

MASS_DEFLECT_ARROWS

219

Mass Divine Strength

MASS_BLESS

216

Mass Endurance

MASS_STONESKIN

218

Mass Haste

MASS_HASTE

221

Mass Righteous Might

MASS_BLOODLUST

220

 

 

 

Summoning Magic

Conjure Phoenix

CONJUREPHOENIX

235

Earthquake

EARTHQUAKE

41

Fire Trap

LAND_MINE

38

Firewall

FIREWALL

236

Fist of Wrath

MAGIC_FIST

2

Phantom Forces

PHANTOM

40

Raise Dead

ANIMATE_DEAD

42

Summon Elementals

SUMMON_ELEMENTALS

43

Wasp Swarm

WASP_SWARM

39

 

 

 

Empowered Fist of Wrath

EMPOWERED_MAGIC_FIST

224

 

 

Note: there are also codes for the special ability "spells," like the Necromancer's Banshee Howl. However, they cannot be directly added into your spell book with this command. Instead, you'll have to give yourself the Necromancy skill with the Adding Skills command. With the appropriate skill, the corresponding ability is placed into your spell book automatically.


Adding Artifacts to Heroes

Adding a specific Artifact

For example:

@GiveArtifact(“Calid”, 28);

...gives the Inferno hero Grawl a Bag of Endless Gold, equipped if there is space, or in the inventory if there is not.

So, the code is:

@GiveArtifact(“Name”, #);

The # can be 1 to 73; either have fun experimenting, or refer to the following chart!

Artifact Names / Numbers Chart

So you want this artifact...

# Code to input

So you want this artifact...

# Code to input

Boots slot

Necklace slot

Boots of Levitation

54

Amulet of Necromancy(1)

71

Boots of Magical Defence

27

Dragon Teeth Necklace

40

Boots of the Open Road

26

Evercold Icicle

18

Boots of the Swift Journey

24

Necklace of the Bloody Claw

17

Dragon Bone Greaves

38

Necklace of the Lion

16

Emerald Slippers

61

Necklace of Victory

19

Golden Horseshoe

25

Pendant of Conflux

67

Greaves of the Dwarven Kings

49

Pendant of Mastery

15

 

 

Sandals of the Blessed

68

Ring slots

Windstrider Boots

57

Cursed Waistband

63

 

 

Dragon Eye Ring

42

Cloak slot

Elemental Waistband

60

Bag of Endless Gold

28

Ring of Caution

65

Cape of the Lion's Mane

31

Ring of Celerity

59

Cloak of Death's Shadow

33

Ring of Lightning Protection

20

Cloak of Sylanna

62

Ring of Sar-Issus

47

Dragon Wing Mantle

39

Ring of Speed

22

Phoenix Feather Cape

32

Ring of the Broken Will

23

Sack of Endless Gold

29

Ring of the Shadowbrand

73

Sandro's Cloak

69

Ring of the Unrepentant

70

Wings of the Angel

30

Ring of Vitality

21

 

 

 

 

Cuirass (armor) slot

Shield slot

Armor of the Forgotten Hero

13

Dragon Scale Shield

37

Armor of Valor

56

Four Leaf Clover

8

Breastplate of Eldritch Might

14

Magic Scroll of (Random Spell)

52

Cuirass of the Dwarven Kings

48

Moonblade

58

Dragon Scale Armor

36

Sextant of the Sea Elves

10

Robe of Sar-Issus

44

Shackles of the Last Man

7

Scale Mail of Enlightenment

35

Shield of Crystal Ice

9

Tunic of the Carved Flesh

64

Shield of the Dwarven Kings

51

 

 

 

 

Helm slot

Weapon slot

All-Seeing Crown

12

Axe of the Mountain Lords

2

Crown of Sar-Issus

46

Dragon Flame Tongue

43

Dragon Talon Crown

41

Staff of Ensnarement

6

Helm of Chaos

66

Staff of Sar-Issus

45

Helm of Dwarven Kings

50

Sword of Might

1

Lion Crown

11

Trident of the Titans

5

Necromancer's Helm

55

Unicorn Horn Bow

4

Turban of Enlightenment

34

Wand of (Random Spell)

3

 

 

 

 

Special (unable to be equipped)

Tear of Asha

53

Freyda(2)

72

 

 

Note 1: bugged image, appears as square of white dots.

Note 2: this "artifact" is the portrait of the Haven campaign heroine Freyda, daughter of Godric, as seen through the cut-out shape of the Four Leaf Clover; its description is Freyda's biography. It is used in the last scenario of the Necromancer campaign, to symbolize the fact that you have her prisoner.


Hero Names Chart

Again, it's not as easy as it looks...it's the same situation as some of the spell names: some in-game names shown by your character do not correspond to how the game's scripting identifies them. For example, sure your lady-wizard is Nur in-game, but the game recognizes her as Astral (a former wizard of the previous HoMM games).

You know
your hero as...

What you input for
the name parameter

You know
your hero as...

What you input for
the name parameter

Academy

Dungeon

Cyrus

Cyrus

Eruina

Eruina

Faiz

Faiz

Kythra

Menel

Galib

Tan

Lethos

Dalom

Havez

Havez

Raelag

Raelag

Jhora

Sufi

Segref

Segref

Maahir

Maahir

Shadya

Kelodin

Narxes

Razzak

Sinitar

Inagost

Nathir

Nur

Sorgal

Ferigl

Nur

Astral

Vayshan

Ohtarig

Razzak

Isher

Yrbeth

Almegir

Temkhan

Timerkhan

Yrwanna

Urunir

Zehir

Zehir

 

 

 

 

Inferno

Haven

Agrael

Agrael

Dougal

Orrin

Alastor

Efion

Ellaine

Nathaniel (absurd, eh?)

Biara

Biara

Freyda

Axel

Deleb

Deleb

Giar

Giar

Erasial

Erasial

Glen

Glen

Grawl

Calid

Godric

Godric

Grok

Grok

Irina

Ving

Guarg

Guarg

Isabel

Isabell

Jezebeth

Oddrema

Klaus

Sarge

Marbas

Marder

Laszlo

Mardigo

Nebiros

Jazaz

Maeve

Maeve

Nymus

Nymus

Nicolai

Nicolai

 

 

Rutger

Brem

Necropolis

Vittorio

Christian

Deirdre

Nemor

 

 

Kaspar

Gles

Sylvan

Lucretia

Tamika

Alaron

Ildar

Markal

Berein

Anwen

Metlirn

Naadir

Muscip

Dirael

Diraya

Orson

Straker

Ergar

Ergar

Raven

Effig

Findan

Heam

Vladimir

Pelt

Gilraen

Gillion

Zoltan

Aberrar

Ossir

Ossir

 

Talanar

Nadaur

Vinrael

Elleshar

Wyngaal

Linaas

Ylthin

Itil

 

 

Miscellaneous Modifications

Adding Experience (disabled in 1.2)

add_exp (#)

Adds however much experience you specify.

So, for example:

add_exp 22000

gives your selected hero 22 000 xp.

Changing Hero Stats

For example:

@ChangeHeroStat("Heam", STAT_SPELL_POWER, 15);
OR @ChangeHeroStat("Heam", 3, 15);

...adds 15 to the Spell Power of the Sylvan campaign hero Findan.

Note: It used to set the value to 15, not add 15, prior to the 1.1 patch.

So, the code is:

@ChangeHeroStat("Name", STAT_NAME, #);
OR @ChangeHeroStat("Name", #, #);

The other stats you can edit are (with their numerical equivalents for the two # code variant):

Hero Stats

Explicit code

# Code variant

Hero Statistics

Experience

STAT_EXPERIENCE

0

Attack

STAT_ATTACK

1

Defense(1)

STAT_DEFENCE

2

Spell Power

STAT_SPELL_POWER

3

Knowledge

STAT_KNOWLEDGE

4

Luck

STAT_LUCK

5

Morale

STAT_MORALE

6

Movement Points(2)

STAT_MOVE_POINTS

7

Mana Points(2)

STAT_MANA_POINTS

8

Maximum Movement Points

-

9

 

 

 

Note 1: yes, it's STAT_DEFENCE with a capital C.

Note 2: even by modifying your Move Points (or Mana Points) to something like 9999, it will only be filled up to max. You will only be able to travel as far as your hero can normally travel before you're empty again. To travel further, you'll have to input the command again, the quickest way being the up arrow key, which cycles through your most recent commands in the console.

Also, to effectively use this code, you will likely have to refer to the Hero Names Chart.

Clearing Resources (disabled in 1.2)

clear_money

Who knows? It may come in handy...or not. All your resources are set to 0.

Adding Gold Only (disabled in 1.2)

add_gold (#)

Note: Your current gold is set to this value, but all your other resources = 0.

Adding Gold and Resources (disabled in 1.2)

add_money

This sets all your resources to 100, and your gold to 100 000.

Note: This does not add to your total. If you have more than 100 resources and 100 000 gold, the quantities are lowered to this amount.

Adding Specific Gold and Resources

@SetPlayerResource(#, 0-6, #);

This sets one specific type of resource for a specified player to reflect your given value.

For example:

@SetPlayerResource(1, 2, 50);

...gives red player 50 mercury.

The first # variable determines whose resources you are modifying (see the list of players codes below).
The 0-6 variable corresponds to the type of resource you want to set (see the list of resources codes below).
The last # variable is your given amount — however much wood, ore, mercury, crystal, sulfur, gems, or gold you want.

In single player scenarios and campaign missions, you are always PLAYER_1, regardless of colour. Here is how the colours correspond to player numbers in the game, for your single player, custom games:

Red

1

Blue

2

Green

3

Yellow

4

Orange

5

Teal

6

Purple

7

Brown

8

Here are the resources codes in the game:

Wood

0

Ore

1

Mercury

2

Crystal

3

Sulfur

4

Gems

5

Gold

6

Seeing Movement Points

The following command has been disabled in version 1.2, but there is a workaround.

show_hero_mp

This shows your hero's movement points, the number and amount of points it takes to travel your current path (if you've set one).

You can also use this more complex @command variant, which still works in version 1.2:

@print(GetHeroStat("Name", STAT_MOVE_POINTS));
OR @print(GetHeroStat("Name", 7));

Revealing the Map

For example:

@OpenCircleFog(0, 0, 0, 9999, PLAYER_1);

...reveals the above ground map for red player in a custom, single player game that is not a scenario. In single player scenarios and campaign missions, you are always PLAYER_1, regardless of colour.

@OpenCircleFog(0, 0, 1, 9999, PLAYER_1);

...reveals the underground map for PLAYER_1—the changed variable is the last of three 0s.

Here is how the colours correspond to player numbers in the game, for your single player, custom games:

Red

1

Blue

2

Green

3

Yellow

4

Orange

5

Teal

6

Purple

7

Brown

8

So, the code is:

@OpenCircleFog(0, 0, 0 or 1, 9999, PLAYER_#);

Instant Win and Lose

@Win()
@Loose()

These are self-explanatory, and no, it's not a typo--it is indeed spelled "Loose."

Cheats taken from:

http://www.heroesofmightandmagic.com/heroes5/heroes5_cheats.shtml