Heroes 1&2 Saved Game - hex editing (Cheats)

The old Heroes games developed by New World Computing. Please specify which game you are referring to in your post.
User avatar
HeroesIIftw
Leprechaun
Leprechaun
Posts: 15
Joined: 24 Sep 2007

Heroes 1&2 Saved Game - hex editing (Cheats)

Unread postby HeroesIIftw » 25 Sep 2007, 15:28

Heroes of Might and Magic II savegame editing

added: Bad luck, funny since I don't think bad luck is normally possible, I've never found a way to achieve it...

I got sick of how you couldn't really cheat in Heroes 1 when you felt like it (only the reveal map one worked), so I started messing with saved game editing. I carried my work over to Heroes II as well. This stuff works, and the game doesn't brand you a cheater on the high score list :devil:.

A nice picture showing savegame in the XVI 32 hex editor: http://i5.photobucket.com/albums/y181/F ... ingGIF.gif

Well, I was messing around lots with Heroes II savegames in a hex editor, and decided to note down my findings, so they'd be useful to me in the future. After that, I decided I might as well share the info :P

Some of the methods aren't perfect, but require educated/lucky guesses,
for instance resource editing :P

Once I got the methods down, this became a pretty fast way to cheat if I felt like doing so :devil: ... and hopefully the same is true for you, if you choose to employ these methods, or improve upon them.

What I figured out:

-Editing current army, all creature types and amounts

-Editing all resources, and gold in the possession of a player

-Editing a hero, stats, morale, luck, artifacts, spells

What I wish I knew:

-Editing secondary skills, this seems to be handled strangely in saved game files. Can only edit basic/advanced/expert values.

-Editing towns, giving them buildings, changing the 'already built in this town today' toggle.

-Editing who owns what on the map, like castles/mines/etc.

So here it is, you will need a hex editor, heroes 2, and... well, you'll need to know how to use a hex editor.


Intro


#1 Rule: Always BACK UP your save first. Save game as 'backup' for example. I couldn't count how many times I've created a game crashing save file with trial-and error :P

#2 Rule: Don't ever push backspace in xvi32. It'll completely erase a byte of data from existence, screwing up the whole save file.

Using this will require at least some knowledge of using a hex editor.
Otherwise, it will be a slight or long learning process, depending on you. :P

XVI 32 is pretty easy to use, and provides translations from hex to english.
Refer to the XVI 32 help files and tutorials to learn how to use it.

The most useful things I've found in XVI 32 are:


File->Reload Quick way to re-open the file if you know you just messed up pretty good. Make sure you don't say yes to the save file prompt if you just messed up :P

Search->Find . You can search for text strings like your hero's name, which is conveniently stored in the save game file. You can also search for the resource hex string, etc. etc. I suggest using search->count instead.

Search->Count Just like find, except it tells you HOW MANY times that data is present. This way you can be sure you are changing the right data. Make sure you have 'Direction: Down' and 'Scope from: Begin' checked, so it scans the whole file. Scope from cursor will search up or down from the currently highlighted bit, depending what direction you have selected.

Tools->Decode number . Will decode the currently selected byte in the editor. Telling you what it is in hex. It tells you it in 1 Byte, then 2, 3, 4, and 8 bites. I.E. it will tell you 64 is 100, 64 00 is 100, 64 00 00 is 100, etc.

Tools->Encode number . Here you can type a number you want to put into the editor, and it will convert it into hex. Don't try to convert a number too high for the amount of bytes, IE putting a number > 256 for 1 byte. That will generate an error, and possible overwrite data in the editor, messing up your save. You then have to fix the data, or re-load it in the editor. The safest thing to do with encode, is to click 'here' on output. It will show you the hex value in the box, instead of overwriting data. Overwrite at current address is dangerous, unless you know what you're doing.

Edit->Block mark Click once to mark a byte of data. Click another byte of data, and 'block mark' again, and the first byte and the last byte you clicked will be highlighted in red. I find this useful for editing a single hero, as you can 'block mark' right after the hero name, and right before the next hero name, to make sure you edit within the right hero. You can also copy or delete, among other actions with the selected block, although I don't like to mess with that.


Terminology


Might not be proper, but this is how I understand these terms, and use them.

Byte: 1 unit of data, for example 00 or FF. 3 Bytes would be 00 00 00.

String: Any mostly-grouped section of bytes. For example 01 03 04 06 for a hero’s attack/defense/spell power/knowledge is a ‘string’.

My favorite xvi32 hex values for Heroes of Might and Magic

((I’ve been told XVI 32 shows hex backwards, but this is how they work in XVI32 anyway, so don’t worry about that.))

Hex / Real number

63 / 99 (Good for stats!)
64 / 100
C8 / 200
FF / 255
E8 03 / 1,000 (Good for resources or creatures)
20 A1 07 00 / 500,000 (Good for gold or movement points)


Getting Started


Open up your save game in XVI32.


Editing Resources


This isn't as easy as Heroes 1 Resources.

Resources are stored in this order:

Wood Mercury Ore Sulfur Crystals Gems Gold.

They are 4 bytes each. Ex: 01 00 00 00 = 01 Resource.

You may have to screw with a marketplace
to make numbers that stick out in the hex. I suggest going:

Wood 2 Mercury 3 Ore 4 Sulfur 5 Crystals 6 Gems 7 Gold whatever.

A string of 2 3 4 5 6 7 then 9870 or whatever gold really sticks out.

That, for example, will show up as 02 00 00 00 03 00 00 00 04 00 00 00 05 00 00 00 06 00 00 00 07 00 00 00 8E 26 00 00 (In one huge long string in the savegame hex somewhere)

I suggest against setting insanely high numbers for any particular resource. In heroes 1, the game behaved really strangely when I put my gold near or above a million, trying to sell me -5000 peasants when there were only 12 available...

500-5000 resources and 500,000 gold works particularly well.


Hero Movement


There are 8 Bytes before the hero's exp. They are for your hero's
movement points. I think it's supposed to be max movement and
current movement, 4 bytes each. So like, 01 00 00 00 01 00 00 00
would mean you have 1 max movement point, and 1 movement point
currently.

The easiest way to spot this is to save the game at the start of your turn, so that your max movement and current movement are the same. Then it will look something like this:

Max move Current move Hero exp
63 00 00 00 63 00 00 00 32 00 00 00

However, edited max movement points don't refill
to the edited value after you wait a day, they go back to what
they should be :(. So make the value insanely high, and use
up all those points before you give up your turn.


Hero Exp


Right after movement points, you got your hero exp.
I think it's 4 bytes, pretty much self explanatory after that.

Find out your hero’s exp in game, and then find that value in the editor to easily pinpoint your movement points <- of your exp, and give yourself a place to start looking -> towards your hero's attack/def/sp/knowledge string :P


Hero Stats


Hero stats is the first string after hero's exp.

If I recall, they are only 1 byte each, meaning 255 is the maximum you can set.

01Attack-02Defense-03Spell Power-04Knowledge-????-05Morale-06Luck
Stat String example : 01-02-03-04-??-05-06

I find 99 of each primary stat works fine, as does 3 morale or luck.

If you put a value for morale/luck of 128 or higher, {80 in hex} you will have -3 morale or -3 luck. I don't know how to get just -1 or -2 of either one.

Units

Search for a text string, and type your hero's name in, it is
case sensitive! Somewhere after his name you'll notice your units
somewhere if you follow the next paragraph's steps, and aren't dumb.

You're gonna have to find what you have from this list, and note
the number of the creature as well. There will be 1 byte per
creature, for a total of 5 bytes. That is followed by quantity
of creatures in each stack, which is 2 bytes each.

Example: 00 01 FF FF FF 01 00 05 00 = 1 Peasant, 5 Archers.

FF = No Creature present.

Knight

00 = Peasant
01 = Archer
02 = Ranger
03 = Pikeman
04 = Veteran Pikeman
05 = Swordsman
06 = Master Swordsman
07 = Cavalry
08 = Champion
09 = Paladin
0A = Crusader

Barbarian

0B = Goblin
0C = Orc
0D = Orc Chief
0E = Wolf
0F = Ogre
10 = Ogre lord
11 = Troll
12 = War Troll
13 = Cyclops

Sorceress

14 = Sprite
15 = Dwarf
16 = Battle Dwarf
17 = Elf
18 = Grand Elf
19 = Druid
1A = Greater Druid
1B = Unicorn
1C = Phoenix

Warlock

1D = Centaur
1E = Gargoyle
1F = Griffin
20 = Minotaur
21 = Minotaur King
22 = Hydra
23 = Green dragon
24 = Red dragon
25 = Black Dragon

Wizard

26 = Halfling
27 = Boar
28 = Iron golem
29 = Steel golem
2A = Roc
2B = Mage
2C = Archmage
2D = Giant
2E = Titan

Necromancer

2F = Skeleton
30 = Zombie
31 = Mutant Zombie
32 = Mummy
33 = Royal Mummy
34 = Vampire
35 = Vampire Lord
36 = Lich
37 = Power Lich
38 = Bone Dragon

Neutral

39 = Rogue
3A = Nomad
3B = Ghost
3C = Genie
3D = Medusa
3E = Earth Elemental
3F = Air Elemental
40 = Fire Elemental
41 = Water Elemental


Spells

49 Slots behind your first artifact for spells. Either 00 or 01.

01 = Have the spell
00 = Don't have the spell.

I'm not gonna bother with which space is which spell, too much trouble ><.

Spell book is #51 in hex for artifacts. So there should be
51 FF FF FF FF+ lots of F's if you don't have any other artifacts.

Artifacts

The Artifact string is 14 bytes long, and starts just after the last spell byte.
The easiest way to locate it is to buy a spell book. Your artifact string will then read 51 FF FF FF FF... total of 13 FF’s if you only have a spell book and no other artifacts. Otherwise it will be 51 followed by ## for each artifact, and then FF for each remaining blank space.

So, remember 51 is your spell book, then count your blank spaces. If you have artifacts already, it’ll be even easier, because you can look up their hex value in the table below, and use that to help you pinpoint your artifact string in your savegame.

Here’s the artifacts. Complete list, to my knowledge.

FF = No artifact in this slot

00 = Ultimate book of knowledge (+12 Knowledge)
01 = Ultimate sword of dominion (+12 attack)
02 = Ultimate cloak of protection (+12 defense)
03 = Ultimate wand of magic (+12 spell power)
04 = Ultimate shield (+6 attack and defense)
05 = Ultimate staff (+6 spell power and knowledge)
06 = Ultimate crown (+4 all attributes)
07 = Golden goose (10,000 gold/day, cumulative per goose.)
08 = Arcane necklace (+4 spellpower)
09 = Casters bracelet (+2 spellpower)
0A = Mages ring (+2 spellpower)
0B = Witchs broach (+3 spellpower)
0C = Medal of valor (+1 morale)
0D = Medal of courage (+1 morale)
0E = Medal of honor (+1 morale)
0F = Medal of distinction (+1 morale)
10 = Fizbin of misfortune (-2 morale)
11 = Thunder mace (+1 attack)
12 = Armored hauntlets (+1 defense)
13 = Defender helm (+1 defense)
14 = Giant flail (+1 attack)
15 = Ballista of quickness (catapult fires 2x per round)
16 = Stealth shield (+2 defense)
17 = Dragon sword (+3 attack)
18 = Power axe (+2 attack)
19 = Divine breastplate (+3 defense)
1A = Minor scroll of knowledge (+2 knowledge)
1B = Major scroll of knowledge (+3 knowledge)
1C = Superior scroll of knowledge (+4 knowledge)
1D = Foremost scroll of knowledge (+5 knowledge)
1E = Endless sack of gold (+1000 gold/day)
1F = Endless bag of gold (+750 gold/day)
20 = Endless purse of gold (+500 gold/day)
21 = Nomad boots (+movement on land)
22 = Travelers boots (+movement on land)
23 = Lucky rabbits foot (+1 luck)
24 = Golden horseshoe (+1 luck)
25 = Gamblers lucky coin (+1 luck)
26 = Four leaf clover (+1 luck)
27 = True compass (+movement on land and sea)
28 = Sailors astrolabe (+movement on sea)
29 = Evil eye (1/2 cost to cast curse spell)
2A = Enchanted hourglass (+2 turn duration on your spells)
2B = Gold watch (double effectiveness of hypnotize)
2C = Skullcap (1/2 cost of all mind influencing spells)
2D = Ice cloak (1/2 damage from cold)
2E = Fire cloak (1/2 damage from fire)
2F = Lightning helm (1/2 damage from lightning)
30 = Evercold icicle (+50% offense cold spell damage)
31 = Everhot lava rock (+50% offense fire spell damage)
32 = Lightning rod (+50% offense lightning spell damage)
33 = Snake ring (1/2 cost bless spells)
34 = Ankh (1/2 cost resurrect and animate spells)
35 = Book of elements (x2 effect on all summoning spells)
36 = Elemental ring (1/2 cost summoning spells)
37 = Holy pendant (curse immunity for all troops)
38 = Pendant of free (will hypnotize immunity for all troops)
39 = Pendant of life (death immunity for all troops)
3A = Serenity pendant (berserk immunity for all troops)
3B = Seeing eye pendant (blind immunity for all troops)
3C = Kinetic pendant (paralyze immunity for all troops)
3D = Pendant of death (holy spell immunity for all undead troops)
3E = Wand of negation (dispel immunity for all troops)
3F = Golden bow (no range penaltys for distance/terrain)
40 = Telescope (+1 sight range for hero, only works 1 time)
41 = Statesmans quill (surrender for 10% of the price of your troops)
42 = Wizards hat (+10 turn duration on your spells)
43 = Power ring (+2 spell point regeneration per day)
44 = Ammo cart (unlimited shots for all your shooters)
45 = Tax lien (you lose 250 gold/day)
46 = Hideous mask ('wandering' creatures will never offer to join you)
47 = Endless pouch of sulfur (+1 sulfur/day)
48 = Endless vial of mercury (+1 mercury/day)
49 = Endless pouch of gems (+1 gem/day)
4A = Endless cord of wood (+1 wood/day)
4B = Endless cart of ore (+1 ore/day)
4C = Endless pouch of crystal (+1 crystal/day)
4D = Spiked helm (+1 attack +1 defense)
4E = Spiked shield (+2 attack +2 defense)
4F = White pearl (+1 knowledge +1 spell power)
50 = Black pearl (+2 knowledge +2 spell power)
51 = Magic book (spell book, needed to learn spells)

Price of Loyalty artifacts below, the game probably crashes if you use these without the expansion, I wouldn’t know for sure, because I have gold edition.

52 = Dummy 1 (Black pearl graphic, says 'error, artifact 82')
53 = Dummy 2 (Black pearl graphic, says 'error, artifact 83')
54 = Dummy 3 (Black pearl graphic, says 'error, artifact 84')
55 = Dummy 4 (Black pearl graphic, says 'error, artifact 85')
56 = Spell scroll (Spell) (Lets the hero cast the spell on the scroll)
57 = Arm of the martyr (+3 spell power, undead morale penalty, a.k.a. -1 morale)
58 = Breastplate of anduran (+5 defense)
59 = Broach of shielding (-2 spellpower, 1/2 damage from armageddon/storm)
5A = Battle garb of anduran (+5 defense,attack,spell power, max morale, max luck, town portal spell)
5B = Crystal ball (your heroes near the holder can see detailed monster/hero/castle info)
5C = Heart of fire (50% damage from fire, 2x damage from cold)
5D = Heart of ice (50% damage from cold, 2x damage from fire)
5E = Helmet of anduran (+5 spell power)
5F = Holy hammer (+5 attack)
60 = Legendary scepter (+2 all attributes)
61 = Masthead +1 luck (+1 morale in sea combat)
62 = Sphere of negation (no spellcasting in combat for anyone)
63 = Staff of wizardry (+5 spell power)
64 = Sword breaker (+4 defense +1 attack)
65 = Sword of anduran (+5 attack)
66 = Spade of necromancy (increases necromancy skill)
67 = crashes the game, dont go past 66 :P

The End ;)
Last edited by HeroesIIftw on 27 Sep 2007, 17:59, edited 4 times in total.

User avatar
HeroesIIftw
Leprechaun
Leprechaun
Posts: 15
Joined: 24 Sep 2007

Heroes I savegame editing

Unread postby HeroesIIftw » 25 Sep 2007, 15:32

Heroes of Might and Magic 1 save game editing

Yeah, I did it in heroes 1 before I moved on to 2. This ones only 14 Years late.

This one was written for myself, and I haven't edited it. Use stuff I explained in the heroes II editing here, as the save games are amazingly similar.

Resources

Open up heroes 1 savegame file in XVI32. Do a search 'count' text
string for Player 1, or whatever player you might be.

Wood Mer Ore Sul Cry Gem Gold
On easy, the resource string should be 30/ 10/ 30/ 10/ 10/ 10/ 10000
on other difficulties, you're gonna have to check at the start.

Hero Editing

Open up heroes 1 savegame file in XVI32. Do a search 'count' text
string for your current heroes name. It'll be 2 matches. Capitaliza-
tion counts.

Movement

The 4 bytes before exp are your max movement, and current movement.
They're 2 bytes each. At the beginning of the game, they should
both be the same. Just go back 4 spaces from your exp and type
FF 7C FF 7C for 32,000 movement points, thats over 29x the max with
a fast army and two boots + compass on land =P. It'll go back to
normal movement on your next day, so use them wisely.

EXP

Right after Max movement, current movement is your EXP.
It's 4 bytes, ## ## ## ##.

Hero Stats

Hero stats is the first string after hero's exp.
ATtack - DEfense - SPell power - KNowledge - ? - MOrale - LUck

AT DE SP KN ?? MO LU
Knight goes 01-02-01-01-01-00-00 at level 1.

ARMY

After that should be lots and lots of 00's, on a new game at
least. Then you hit your army. The first 5 bytes are the
creature types, 1 Byte each, if it's 'FF' thats an empty spot.
The next 10 bytes is the amount in those stacks, the amount is
2 bytes each, for example 64 00 for 100.


(Real #) Hex # = Creature

(00)00 = Peasant
(01)01 = Archer
(02)02 = Pikeman
(03)03 = Swordsman
(04)04 = Cavalry
(05)05 = Paladin

(06)06 = Goblin
(07)07 = Orc
(08)08 = Wolf
(09)09 = Ogre
(10)0A = Troll
(11)0B = Cyclops

(12)0C = Sprite
(13)0D = Dwarf
(14)0E = Elf
(15)0F = Druid
(16)10 = Unicorn
(17)11 = Phoenix

(18)12 = Centaur
(19)13 = Gargoyle
(20)14 = Griffin
(21)15 = Minotaur
(22)16 = Hydra
(23)17 = Dragon

(24)18 = Rogue
(25)19 = Nomad
(26)1A = Ghost
(27)1B = Genie

Spells

Right after the last 2 Bytes for army size, you hit your first
combat spell. There are 29 spells, going from 0-28. Remember,
it's in hex, so to get all spells fill in: 00 01 02 03 04 05 06
07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 14 15 16 17 18 19 1A 1B 1C.
DON'T PUT combat spells in the last 10 spell slots, and DONT PUT
ADVENTURE SPELLS
in ANYTHING BUT the LAST 10 SPELL SLOTS! If you do
then you get combat spells in the adventure menu, and adventure
spells while you're in combat, which makes them useless.


Right after the last spell, you get into the amount of times you
can cast each spell. It's 29 slots again,
make sure ya count it right, or you'll dip into the artifact slots. Max cast amount is uncertain, 99 works good (hex 63), if you go too high, it'll be as if you used up the spell, and you won't have it.

[Spells]

`Combat`

00 - Fireball
01 - Lightning bolt
02 - Teleport
03 - Cure
04 - Resurrect
05 - Haste
06 - Slow
07 - Blind
08 - Bless
09 - Protection
0A - Curse
0B - Turn undead
0C - Anti-Magic
0D - Dispel Magic
0E - Berzerker
0F - Armageddon
10 - Storm
11 - Meteor Shower
12 - Paralyze

`Adventure`

13 - View Mines
14 - View Resources
15 - View Artifacts
16 - View Towns
17 - View Heroes
18 - View All
19 - Identify Hero
1A - Summon Boat
1B - Dimension Door
1C - Town gate

Artifacts

Right after spell cast amounts, you get into your first artifact
slot. There are 14 artifact slots.

00 - Ultimate Book of Knowledge (+12 Knowledge)
01 - Ultimate Sword of Dominion (+12 Attack)
02 - Ultimate Cloak of Protection (+12 Defense)
03 - Ultimate Wand of Magic (+12 Spell Power)
04 - Arcane Necklace of Magic (+4 Spell Power)
05 - Caster's Bracelet of Magic (+2 Spell Power)
06 - Mage's Ring of Power (+2 Spell Power)
07 - Witch's Broach of Magic (+3 Spell Power)
08 - Medal of Valor (+1 Morale)
09 - Medal of Courage (+1 Morale)
0A - Medal of Honor (+1 Morale)
0B - Medal of Distinction (+1 Morale)
0C - Fizbin of Misfortune (-2 Morale, untradable)
0D - Thunder Mace of Dominion (+1 Attack)
0E - Armored Gauntlets of Protection (+1 Defense)
0F - Defender Helm (+1 Defense)
10 - Giant Flail (+1 Attack)
11 - Ballista of Quickness (Catapult fires 2x per round)
12 - Stealth Shield (+2 Defense)
13 - Dragon Sword of Dominion (+3 Attack)
14 - Power Axe of Dominion (+2 Attack)
15 - Divine Breastplate of Protection (+3 Defense)
16 - Minor Scroll of Knowledge (+2 Knowledge)
17 - Major Scroll of Knowledge (+3 Knowledge)
18 - Superior Scroll of Knowledge (+4 Knowledge)
19 - Foremost Scroll of Knowledge (+5 Knowledge)
1A - Endless Sack of Gold (+1000 Gold/Day)
1B - Endless Bag of Gold (+750 Gold/Day)
1C - Endless Purse of Gold (+500 Gold/Day)
1D - Nomad Boots of Mobility (+Movement over land)
1E - Traveler's Boots of Mobility (+Movement over land)
1F - Lucky Rabbit's Foot (+1 Luck)
20 - Golden Horseshoe (+1 Luck)
21 - Gambler's Lucky Coin (+1 Luck)
22 - Four Leaf Clover (+1 Luck)
23 - True Compass of Mobility (+Movement over land and sea)
24 - Sailor's Astrolabe of Mobility (+Movement over sea)
25 - Spell Book (Learn spells from mage guilds)


Return to “Heroes I-IV”

Who is online

Users browsing this forum: No registered users and 16 guests