In order to use cheat codes, you must first enable the cheat console. To enable the cheat console for all game profiles, locate the autoexec_a1.cfg file in your game folder\profiles directory. Open this file with Notepad. Add the following line as the last line in the file: setvar dev_console_password = schwinge-des-todes
The end of the file will now look something like this:
NOTE: If you're still having trouble activating the console, you may need to add the following line to your input_a1.cfg file (located in My Documents/My Games/Heroes of Might and Magic V/Profiles/YOUR_PROFILE):
bind show_console '`'
While playing, press the tilde (`) key to bring up the cheat console. Use the following cheat codes in the cheat console.
Add experience to a hero
Open the game console and enter add_exp #. Replace the # with the amount of experience.
Add money
Open the game console and enter add_money # Sets all resources except gold to # and sets gold to #*1000. So add_money 100 gives 100 of all resources and 100000 gold. Replace the # with any number.
Add skills, perks or abilities
Add skills, perks or abilities. You can use either the name or ID number. Example: add_skill Sorcery or add_skill 8 will both give Sorcery. See list below for all 150 skills along with IDs (from the original HOMM5).
Use the following names or IDs with the add_skill cheat. When using the name, use only the name itself and not the prefix (example: Sorcery not Skill_Sorcery).
Open the game console and enter show_hero_mp. Shows detailed movement point stats for currently selected hero - exact quantity, stats for currently plotted path.
Lose Mission
Open the game console and enter @Loose()
Morale and and luck
Open the game console and enter set_hero_luck_morale X Y. Replace the X with the number of luck and Y with the number of morale.
Sets all your resources to zero
Open the game console and enter clear_money.
Sets gold to # and zeroes out other resource
Open the game console and enter add_gold #. Replace the # with any number.
Spy on other players
Open the game console and enter show_player_money #.Replace the # with the number of the player.And it outputs the resource quantities of specified player into console.
Will fill all hero army slots
Open the game console and enter add_army town nTownID, bUpgrade Will fill all hero army slots with 10 creatures of town id specified. Second param is 0 or 1 which controls whether creatures are from upgraded dwellings or not.
Town IDs:
HEAVEN = 0
PRESERVE = 1
ACADEMY = 2
DUNGEON = 3
NECRO = 4
INFERNO = 5
Example: add_army 5, 0 will fill all hero army slots with 10 basic inferno creatures. add_army 4, 1 will fill hero army slots with 10 upgraded Necro creatures.