History by Sheltem the Dark

Heroes of Might and Magic V cheats

Edit Summary: Hand-written Russian version.

Heroes of Might and Magic V was released without traditional cheat codes. Instead it has a hidden developer console, unlocked by editing configuration files; the cheats are typed into it.[1] The same method works in Hammers of Fate and Tribes of the East, only the file names differ.[1][1][1]

How to unlock the console

  1. In the profiles folder inside the game folder, add this line as the last line of the Startup section of the start-up file (in Heroes V and Hammers of Fate, after the mainmenu line): setvar dev_console_password = schwinge-des-todes. The file is autoexec.cfg for Heroes V, autoexec_a1.cfg for Hammers of Fate and autoexec_a2.cfg for Tribes of the East.[1][1][1][1][1][1][1]
  2. Bind a key to the console: add bind show_console '`' to input.cfg (input_a1.cfg for Hammers of Fate, input_a2.cfg for Tribes of the East) in your own profile under My Documents\My Games, not in the game folder. Editing the copy in the game folder instead is a common mistake. The key is the one to the left of 1.[1][1][1][1]
  3. Load a single-player map, open the console and type enable_cheats. It has to be entered again in every game; one forum post also lists cheats 1 as a way to enable cheats on all single-player maps.[1][1][1][1]

An early instruction on our forum spelled the command “eneble_cheats”; the correct spelling is enable_cheats.[1][1] Patches usually rewrite the configuration files, so the lines have to be added again after updating.[1] One Steam user reports that in the Steam version the console only appeared after editing the profile files in My Documents.[1]

Cheats do not work in multiplayer, including hot-seat.[1][1][1]

Console commands

CommandEffect
enable_cheatsTurns cheat mode on for the loaded map; enter it again in every game[1][1][1][1]
add_all_spellsThe selected hero learns every spell, regardless of skills[1][1][1]
add_gold NSets your gold to N and sets all other resources to zero[1][1]
add_money NSets every resource to N and gold to N×1000 (it sets the amount, it does not add to it)[1][1]
clear_moneySets all resources to zero[1][1][1]
add_exp NThe selected hero gains N experience[1][1][1]
set_hero_luck_morale X YSets the selected hero's luck to X and morale to Y[1][1]
show_player_money NShows player N's resources in the console[1][1]
show_hero_mpShows the selected hero's movement points and the cost of the path[1][1][1]
add_army T, UFills the hero's army with every creature of town T (0 Haven, 1 Sylvan, 2 Academy, 3 Dungeon, 4 Necropolis, 5 Inferno); U is 0 for basic and 1 for upgraded creatures[1][1][1]
add_skill NGives skill or ability number N (for example 15 is Necromancy); repeating it raises the level[1][1][1]

Age of Heroes notes that patch 1.2 disabled the plain commands (all but the script ones below) in the name of fair multiplayer. Later guides add the enable_cheats step, and Tribes of the East players on our forum report that the commands work after it.[1][1][1][1] Sources also disagree on how many creatures add_army gives per slot: 10, or 100 since patch 1.1 according to Age of Heroes.[1][1]

Script commands

Commands that start with @ call the game's map-script functions and work in single-player games. Heroes, creatures, skills and spells are referred to by their internal script names or numbers.[1][1]

CommandEffect
@Win()Wins the current mission[1][1]
@Loose()Loses the current mission (spelled “Loose” in the game)[1][1]
@AddHeroCreatures("Name", CREATURE, N)Adds N creatures of one type to the named hero[1]
@GiveHeroSkill("Name", SKILL)Gives a skill or ability to the named hero[1]
@TeachHeroSpell("Name", SPELL)Teaches the named hero one spell[1]
@ChangeHeroStat("Name", STAT, N)Adds N to one of the hero's stats[1]
@SetPlayerResource(P, R, N)Sets resource R of player P to N[1]
@OpenCircleFog(0, 0, 0, 9999, PLAYER_1)Reveals the surface map (a third argument of 1 reveals the underground)[1]

Some sites also list @ClearFog() and @Dragons(). Players on our forum got a “Value was NIL” error for both in Tribes of the East, so do not rely on them.[1][1][1]

See also: Official game description, Where to buy Heroes of Might and Magic V.

Cheats in other Heroes games

Heroes I, Heroes II, Heroes III, Heroes IV, Heroes VI, Heroes VII, Olden Era.