You are on page 1of 18

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.
Patching or upgrading the game usually rewrites the config files that enables cheating. You will have to reedit these files manually, as explained below. 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 Activating Ability to Cheat Addendum The @ Commands 2. Adding Skills The simple way (disabled in 1.2) The @ Variant: @GiveHeroSkill() Skill Names / Numbers Chart 3. Adding Creatures Adding a complete army (disabled in 1.2) The @ Variant: Adding Specific Creatures, Variable Amounts Removing Specific Creatures Creature Names / Numbers Chart 4. Adding War Machines Adding a specific War Machine Removing War Machines War Machines Names / Numbers Chart 5. Adding Spells Adding all spells at once (disabled in 1.2) Adding Individual Spells to Heroes Spell Names / Numbers Chart 6. Adding Artifacts to Heroes Adding a specific Artifact Artifact Names / Numbers Chart 7. Hero Names Chart 8. Miscellaneous Modifications Adding Experience (disabled in 1.2) Changing Hero Stats Clearing Resources (disabled in 1.2) Adding Gold Only (disabled in 1.2) Adding Gold and Resources (disabled in 1.2) Adding Specific Gold and Resources Seeing Movement Points Revealing the Map Instant Win and Lose

You can discuss this guide and ask more about the cheats in the Heroes Community dedicated forum. Thanks to Curio for creating these pages! converted to PDF by Lifemare
Age of Heroes is copyrighted 1999-2008. Unauthorised reproduction is prohibited. In-Game Advertising. Webmaster.

A C T I VAT I N G A B I L I T Y

TO

C H E AT

To enable the console in-game, you'll first have to edit 2 text files (open them with Notepad or some better text editor - not Word!). H5, HoF and ToE each have their own files, so make sure you edit the correct ones. Applying patches will most likely reset the input.cfg file, and you'll have to make sure the hotkey is still assigned.

Unlocking the console


The console requires a specific password to be unlocked. The file in which to add it depends on your game version (GAME_FOLDER is the game's installation folder):

GAME_FOLDER/profiles/autoexec.cfg GAME_FOLDER/profiles/autoexec_a1.cfg GAME_FOLDER/profiles/start.cfg

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

setvar dev_console_password = schwinge-des-todes

Assigning the console's hotkey


Now, you need to bind a specific key to open the console. Here, we suggest the upper left key (above Tab, left to 1, below Escape). It has the tilde ( ` ) symbol on english keyboards. It bears another symbol in other languages, but it doesn't matter: it is the key. Alternatively, you might prefer to use another (less confusing) key, like 'F12'. Just check that it isn't used for something else. The file to edit this time is in My Documents/My Games:

Heroes of Might and Magic V/Profiles/YOUR_PROFILE/input.cfg Heroes of Might and Magic V/Hammers of Fate/Profiles/YOUR_PROFILE/input_a1.cfg Heroes of Might and Magic V - Tribes of the East/Profiles/YOUR_PROFILE/input_a2.cfg

Add this line in the "Common section" (in the beginning of the file):

bind show_console '`'


Again, this binds your upper left key to the console, whatever symbol it has on it.
Important: A common error when the console does not open is to edit the wrong input.cfg file: you should edit the one in your profile in "My Documents/...", NOT the one in "GAME_FOLDER/ profiles/".

While you're editing your input.cfg file, you may want to add this binding as well:

bind hide_interface 'CTRL' + 'I'


It allows to completely hide the interface by pressing Ctrl+I (press again to show it back). Useful to take beautiful screenshots (with the PrintScreen key).

ADDENDUM
Due to the massive amount of posts at Heroes Community forums' Curio's Cheating Guide thread, regarding problems with unlocking the console, i've decided to add this section to the PDF, compiled from various sources found there. In case the solutions offered on the previous page don't work on your particular version of the game, the following alternatives are at your disposal. 1. After adding the console_password to your autoexec file, copy it to one of the following locations:

My Documents\My Games\Heroes of Might and Magic V\Profiles\ My Documents\My Games\Heroes of Might and Magic V\Profiles\YourProfile\

2. Instead of adding the bind show_console line to the beginning of the Common Section, add it after: // obsolete, but strictly need for compability with some interfaces 3. If you're on a non-US keyboard avoid using special characters as ''. Choose anything else, aslong as it's not in use. Key combinations work great too, try something like:

bind show_console 'CTRL' + 'Q'


4. In case none of the above worked for you try adding the console_password to both autoexec and start.cfg as described, and modifying both input files (in game folder and documents folder).

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

the simple commands like add_skill the @ commands like @GiveHeroSkill()

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 text 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 alphabetical order. The racial absolute abilities are displayed in bold and listed last in the corresponding skill.

A D D I N G C R E AT U R E S
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 HEAVEN PRESERVE ACADEMY DUNGEON NECRO INFERNO # 0 1 2 3 4 5 (no, it is not HAVEN) (no, it is not SYLVAN)

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.

A D D I N G WA R M A C H I N E S
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 Ammo Cart Ballista Catapult First Aid Tent Code constant WAR_MACHINE_AMMO_CART WAR_MACHINE_BALLISTA WAR_MACHINE_CATAPULT WAR_MACHINE_FIRST_AID_TENT Numeric code 4 1 2 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:

Note: There are also codes for the special ability that have to be activated in combat, 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.

A D D I N G A RT I FA C T S
Adding a specific Artifact
For example:

TO

H E RO E S

@GiveArtefact("Calid", 28); OR @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:

@GiveArtefact("Name", #); OR @GiveArtifact("Name", #);


The # can be 1 to 73; either have fun experimenting, or refer to the following chart! Note that textual codes also exist, like ARTIFACT_ANGEL_WINGS or ARTIFACT_ENDLESS_SACK_OF_GOLD.

Removing a specific Artifact


For example:

@RemoveArtefact("Calid", 28);
...removes a Bag of Endless Gold from Grawl (only one is removed if he has several). So, the code is:

@RemoveArtefact("Name", #);
Note that artEfact can only be written with an "E" in this command.

Artifact Names / Numbers Chart

(1) This "artifact" is the portrait of the Haven campaign heroine Freyda, daughter of Godric, as seen through the cutout 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).

M I S C E L L A N E O U S M O D I F I C AT I O N S
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 Experience Attack Defense(1) Spell Power Knowledge Luck Morale Movement Points(2) Mana Points(2) Maximum Movement Points Explicit code STAT_EXPERIENCE STAT_ATTACK STAT_DEFENCE STAT_SPELL_POWER STAT_KNOWLEDGE STAT_LUCK STAT_MORALE STAT_MOVE_POINTS STAT_MANA_POINTS # Code variant 0 1 2 3 4 5 6 7 8 9
(1) yes, it's STAT_DEFENCE with a capital C. (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. 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. For example:

@SetPlayerResource(1, 2, 50);
...gives red player 50 mercury. In single player scenarios and campaign missions, you are always PLAYER_1, regardless of colour. The next two tables show how the colours correspond to player numbers in the game, for your single player, custom games; and the resource codes in the game:
Player Red Blue Green Yellow Orange Teal Purple Brown # 1 2 3 4 5 6 7 8 Resources Wood Ore Mercury Crystal Sulfur Gems Gold # 0 1 2 3 4 5 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. Refering to the colours that correspond to player numbers on the last page, the code is:

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

Instant Win and Lose


@Win() @Loose()
These are self-explanatory.
Note: it's not a typo - it is indeed spelled "Loose."

You might also like