Any way to fix this?

Official forum of the Wake of Gods mod to Heroes of Might and Magic III.
Sass Drake
Leprechaun
Leprechaun
Posts: 11
Joined: 25 Sep 2009
Location: Valinor

Any way to fix this?

Unread postby Sass Drake » 08 Nov 2010, 20:29

Is there any way to fix this with hex editor? I could figure out which is "monster" address if I find out what data is in sequence with X/Y/Z coordiantes.

Image

User avatar
Salamandre
Genie
Genie
Posts: 1032
Joined: 13 May 2006
Location: France
Contact:

Unread postby Salamandre » 08 Nov 2010, 23:29

Yes, it can be deleted in hex editor, I have a tutorial for that, but it requires to add ERM codes when loading game. If you know ERM, then I will post the tutorial if requested.

I don't know a way to find that object except adding code to delete it.

Sass Drake
Leprechaun
Leprechaun
Posts: 11
Joined: 25 Sep 2009
Location: Valinor

Unread postby Sass Drake » 08 Nov 2010, 23:45

^That ERM script is going to be inserted in savegame extracted from GM1 archive or h3m file? I don't understand you clearly.

EDIT: It seems that object coordinates are not stored in X/Y/Z format so post link for that turorial, please.

User avatar
Salamandre
Genie
Genie
Posts: 1032
Joined: 13 May 2006
Location: France
Contact:

Unread postby Salamandre » 09 Nov 2010, 20:29

You need to add an ERM code in the save, and this script will remove the object. Here is Jim Vogan's hex edit tutorial:

Hex-Editing Heroes 3 Saved Games, by JHV

Programs used:

Windows Explorer (file browser)

CMD - Windows system program which opens a DOS window to type in DOS commands,
with 32-character filename formats (long file names with embedded blanks). This program
operates in 32-bit Windows systems. There may be a new version with a different name
in 64-bit systems - I don't know. (COMMAND is the old 16-bit system version which
uses the 8.3 filename format.)

HHD Free Hex Editor - free demo version of a commercial hex-editor program, downloadable
from the internet. lacks some features of the commercial version, including a global
find/replace function, but is good enough. (Has a quirk: when you edit an original file and use Save As to save the edited version under a new name, the original file is also resaved
with the edits.)

IZARC - free file-compression program downloadable from the internet. Handles .gz (gzip)
compressed files, among other compression formats.

WinRar - commercial file-compression program, downloadable from the internet for about $35
(circa 2009). Handles .gz and .rar compression formats, among others. (IZARC and 7zip
can open and extract from .rar compressed file archives, but will not add to one or create
a new one; WinRar will, which is how WoG update files are created - .wog = .rar.)

(On the other hand, WinRar can open and extract from a .gz archive, but will not add to one,
whereas IZARC will.)

Heroes 3 File Format:

Heroes 3 map files (.h3m) are compressed files in the .gz format. Opening a .h3m file and extracting the contents (e.g., extract from Deadlift.h3m to Deadlift) produces a file in which ASCII text can be found and edited by a hex editor. Heroes 3 saved-game files (e.g., .gm1) also appear to be compressed in the .gz format, but some give errors when you try to extract the contents into an editable form. "Ice Arrow" saved games do not give de-compression errors, and can be extracted by either IZARC or WinRar. "Deadlift" saved games do give an error. IZARC will not do the extraction when an error is encountered, but WinRar will, and the extracted file can be recompressed and played with no apparent ill effects.

Mechanics of Editing Process (Windows operating system):

Find the file to be edited in Windows Explorer, e.g. "Deadlift.gm1" in ../../Program Files/
3DO/Heroes 3 Complete/games.

Right-click on the filename and select the top menu item, "Open". A small window pops up to say that Windows does not know what program to use to open the file, and asks whether you want to
use the Web to find a program, or select the program from a list. Choose "select from a list".

Choose WinRar from the list, but uncheck the box under the list which says "Always use this
program to open this type of file". (Some may elect to leave the box checked so as not to
have to go through the two windows every time a saved game is opened, but then it will be more difficult to use IZARC on the saved game - six of one, half-a-dozen of the other.)

(WinRar will always allow you to extract the game file, despite detecting compression errors;
IZARC will not, otherwise we could use IZARC for everything and leave the box checked the
first time we opened a saved game.)

Extract the single file contained in the game-file archive. WinRar (or IZARC) will display a
default file string for the extracted file which will be the same file string as the saved game except without the .gm1 suffix, e.g. .../Heroes 3 Complete/games/Deadlift. Delete the ending characters so the file string ends with games. Otherwise a new folder called Deadlift will be created for the contents, as a subfolder under games.

Using this procedure creates a file "Deadlift" (no suffix) in the games folder. Start the "HHD
Free Hex Editor" program and use it to open the file.

Got to the Edit menu in the top bar of the program window and select Find. A window will pop up for you to type in the string of hex codes or characters to be searched for. On the right
side of the window, two boxes will be checked: codes and symbols. Uncheck the box marked
"Codes". This will allow you to type ASCII characters in the right column of the window,
e.g., ZVSE. Then click the "Find" button. The editor will find the start of the first ERM
script (if this is a WoG game). The hex editor displays the file in lines of hex codes (on the
left side) and their equivalent ASCII characters on the right side. Either side can be
edited by typing new codes or characters (symbols) over the existing ones.

WARNING: when you resave the edited file under a new name, e.g. "Deadlift1", the original file
gets resaved also (with the changes) - perhaps due to some autosave procedure which I am
so far unable to disable (perhaps I need to buy the full commercial version).

After editing, reopen the .gm1 file, this time with IZARC. Select the "Add to" function and choose the edited file (e.g. Deadlift1) as the file to be added. Having recognized that the
archive is in .gz compression format, IZARC will create a .gz archive with the editted file in it (only). That is, the result of "adding" Deadlift1 to Deadlift.gm1 will be a new file called
Deadlift.gz which contains the file Deadlift1 in gzip compressed form (and not the original
file Deadlift which is contained in Deadlift.gm1).

From the Start menu, select Run, and type in cmd as the file to be run. This will open a DOS window. Change directory (you will proably start in "My Documents") to the Heroes game folder, using the CD (change directory) and DIR (display current directory) DOS commands. Example:

CD .. (go up one directory)
CD .. (go up again - these two could be combined into CD ../..)
DIR (check where you are - should see Program Files listed as a subdirectory of the current
directory)
CD Program Files
CD 3DO
CD Heroes 3 Complete
CD games

Or just:
CD ../../Program files/3DO/Heroes 3 Complete/games
if you are feeling lucky.

Rename Deadlift.gz to Deadlfit1.gm1:

RENAME Deadlift.gz Deadlift1.gm1

(Note the DOS commands are not case-sensitive.)

You should see the file Deadlift1.gm1 in your Windows Explore window, and be able to load it as a saved game in Heroes 3.

Jim Vogan, April 2010

Sass Drake
Leprechaun
Leprechaun
Posts: 11
Joined: 25 Sep 2009
Location: Valinor

Unread postby Sass Drake » 09 Nov 2010, 21:20

and this script will remove the object
Script you are about a post, will it, when is triggered, remove all MONs or I will have to add manually all coordiantes in ERM script?

User avatar
Salamandre
Genie
Genie
Posts: 1032
Joined: 13 May 2006
Location: France
Contact:

Unread postby Salamandre » 09 Nov 2010, 22:58

You have to insert a script in the saved game with the command : on load game delete the object at x/y/z. Or you can assign the script to be triggered when clicking on some icon etc, your choice.

Example of load game script:


ZVSE

!?GM1;
!!UN:Ox/y/z;

Sass Drake
Leprechaun
Leprechaun
Posts: 11
Joined: 25 Sep 2009
Location: Valinor

Unread postby Sass Drake » 09 Nov 2010, 23:39

Thanks fort he help, but it seems that I now have problems with hex editing. After inserting script, wog crashes with message "inaccessible address at..." when I attempt to load edited save.

User avatar
Salamandre
Genie
Genie
Posts: 1032
Joined: 13 May 2006
Location: France
Contact:

Unread postby Salamandre » 10 Nov 2010, 07:59

Upload your save (not edited!) and original map, I will fix it.

Sass Drake
Leprechaun
Leprechaun
Posts: 11
Joined: 25 Sep 2009
Location: Valinor

Unread postby Sass Drake » 10 Nov 2010, 14:58

http://rapidshare.com/files/429978454/forfixing.rar

I have included coordinates off all MON orbs so you don't have to search for them. Also, upload your hexedited save so I could check where I have made hexedit mistake. Regards and thank you very much.

User avatar
Salamandre
Genie
Genie
Posts: 1032
Joined: 13 May 2006
Location: France
Contact:

Unread postby Salamandre » 10 Nov 2010, 21:22


User avatar
Salamandre
Genie
Genie
Posts: 1032
Joined: 13 May 2006
Location: France
Contact:

Unread postby Salamandre » 10 Nov 2010, 21:43

Edited
Last edited by Salamandre on 10 Nov 2010, 21:48, edited 1 time in total.

Sass Drake
Leprechaun
Leprechaun
Posts: 11
Joined: 25 Sep 2009
Location: Valinor

Unread postby Sass Drake » 10 Nov 2010, 21:45

Thanks.

If anyone know adventure map objects memory locations and data structure of attributes, post it please.

EDIT: It worked. ORBs are removed when i right-clicked on next hero button. :)

EDIT2: I alreadsy figured out.
Last edited by Sass Drake on 10 Nov 2010, 21:49, edited 2 times in total.

User avatar
Salamandre
Genie
Genie
Posts: 1032
Joined: 13 May 2006
Location: France
Contact:

Unread postby Salamandre » 10 Nov 2010, 21:48

Ops, I forgot what I added as code. It works, you just have to click with right mouse button on next hero box. It will delete all red bubbles.

Sass Drake
Leprechaun
Leprechaun
Posts: 11
Joined: 25 Sep 2009
Location: Valinor

Unread postby Sass Drake » 11 Nov 2010, 19:50

Except adding script for removing bubbles, have you changed anything else in ERM code?

User avatar
Salamandre
Genie
Genie
Posts: 1032
Joined: 13 May 2006
Location: France
Contact:

Unread postby Salamandre » 12 Nov 2010, 10:03

Of course not, only added coordinates and remove objects.

Sass Drake
Leprechaun
Leprechaun
Posts: 11
Joined: 25 Sep 2009
Location: Valinor

Unread postby Sass Drake » 12 Nov 2010, 10:14

Great. I will continue to play it tommorow (finally weekend :D)

popay55
Lurker
Lurker
Posts: 1
Joined: 28 Jun 2015

Unread postby popay55 » 28 Jun 2015, 06:49

Hy ;)
Have a question for you mods;

I started a game with my friend online, it's giant map (Hota) ..
we played it one night and we (i) saved it ..
now we both realised that we would have too much creatures to buy on map but not enough gold to buy them all even if we discover everything .. so we practictly need to edit that saved game and change any city (already owned or not, random or not it doesn't matter) on map from for example Castle to Rampart (so that we can have 10% gold each week) .. and that way we can buy all army when the time is right..

hope you understand what i'm asking, if not i will try to explain it better :)


thank you very much in advance


Return to “Wake of Gods”

Who is online

Users browsing this forum: No registered users and 0 guests