Heroes of Might and Magic Community
visiting hero! Register | Today's Posts | Games | Search! | FAQ/Rules | AvatarList | MemberList | Profile


Age of Heroes Headlines:  
5 Oct 2016: Heroes VII development comes to an end.. - read more
6 Aug 2016: Troubled Heroes VII Expansion Release - read more
26 Apr 2016: Heroes VII XPack - Trial by Fire - Coming out in June! - read more
17 Apr 2016: Global Alternative Creatures MOD for H7 after 1.8 Patch! - read more
7 Mar 2016: Romero launches a Piano Sonata Album Kickstarter! - read more
19 Feb 2016: Heroes 5.5 RC6, Heroes VII patch 1.7 are out! - read more
13 Jan 2016: Horn of the Abyss 1.4 Available for Download! - read more
17 Dec 2015: Heroes 5.5 update, 1.6 out for H7 - read more
23 Nov 2015: H7 1.4 & 1.5 patches Released - read more
31 Oct 2015: First H7 patches are out, End of DoC development - read more
5 Oct 2016: Heroes VII development comes to an end.. - read more
[X] Remove Ads
LOGIN:     Username:     Password:         [ Register ]
HOMM1: info forum | HOMM2: info forum | HOMM3: info mods forum | HOMM4: info CTG forum | HOMM5: info mods forum | MMH6: wiki forum | MMH7: wiki forum
Heroes Community > Heroes 4 - Lands of Axeoth > Thread: Removing the horribly music theme
Thread: Removing the horribly music theme
Fortress_fan
Fortress_fan

Disgraceful

posted November 03, 2006 08:38 PM

Removing the horribly music theme

Is there some way to remowe the horribly music theme of Heroes IV? I like many parts of the game, but the music is extremely bad. The only good ones is the different town-themes. The adventure map-themes is a real pain, only the sandy theme and perhaps the sea theme is worth lisening to. However, I can't see any open files to edit, must I haxx into the code (witch I canno't) to change the themes?
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
wog_edn
wog_edn

Promising

The Nothingness
posted November 03, 2006 09:09 PM

Hmm, you could just turn off the sound on your computer... or turn off sounds inside game.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Fortress_fan
Fortress_fan

Disgraceful

posted November 03, 2006 09:18 PM

Quote:
Hmm, you could just turn off the sound on your computer... or turn off sounds inside game.
Of course I could, but it is any way to mod it in (it is terribly easy in Heroes III).
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
wog_edn
wog_edn

Promising

The Nothingness
posted November 04, 2006 01:39 AM

Yeah, in H3 you can even change music...

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
metos
metos


Known Hero
God of Shadows
posted November 04, 2006 09:50 AM

I changed H3 tower music to h5 academy music. Tower's was terrible IMO.I dunno how to change h4 musics though.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
gratefullydead
gratefullydead

Disgraceful

posted November 10, 2006 02:38 AM

what me and my buddies do is just turn the in-game music off and just lpay our own music out of windows media player the best music to play with heroes IV is definately blind guardian theyre a kickass band but anything with kind of a folky feel goes great with this game id also suggest flogging molly or the dropkick murphys

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
RSVP
RSVP

Tavern Dweller
posted October 03, 2007 12:10 AM bonus applied.

Tips for editing HOMM4 sound and music

***Couldn't start a new thread, so I'll post this here:

Just thought I'd post some successes I've had altering the HOMM4 .h4r sound and music files, and to see if anyone else has any insights.

All this was born out of annoyance with certain music and sound effects in HOMM4, which I suspect kept more than a few of us from playing it.


Editing Utilities:

mh4.win32.006 (.h4r extractor/repacker, found at http://www.celestialheavens.com/viewpage.php?id=157 or http://www.celestialheavens.com/homm4/usefulfiles/mh4.win32.006.zip )

XVI32 hex editor ( http://www.softpedia.com/get/Programming/File-Editors/XVI32.shtml )


The key to replacing the existing sounds and music in the HOMM4 .h4r files seems to be in the bit/hex strings at the start of each separate music or sound file in the .h4r archives.


For example, all of the mp3 files extracted from music.h4r (under \Data in the HOMM4 folder) start with this hex pattern:

01 00 00 10 02 44 AC 00 00 00

This can be viewed by simply loading the mp3 file into XVI32 and looking at the first row (after extracting them with mh4 first).

Here are the starting patterns of several of the music files:

01 00 00 10 02 44 AC 00 00 00 56 26 02 01 00 73 CD 31 00 town death

01 00 00 10 02 44 AC 00 00 00 34 B1 02 01 00 8A 5E 3E 00 combat5

01 00 00 10 02 44 AC 00 00 00 2A A6 02 01 00 CD 5E 3D 00 combat6

01 00 00 10 02 44 AC 00 00 00 88 1A 03 01 00 A4 E6 47 00 c1

01 00 00 10 02 44 AC 00 00 00 20 13 00 01 00 10 BB 01 00 c lose

01 00 00 10 02 44 AC 00 00 00 94 79 01 01 00 3A 2B 22 00 snow

01 00 00 10 02 44 AC 00 00 00 88 73 01 01 00 24 9F 21 00 swamp

01 00 00 10 02 44 AC 00 00 00 88 03 02 01 00 24 A7 2E 00 town might

01 00 00 10 02 44 AC 00 00 00 38 6C 01 01 00 BC F5 20 00 order

01 00 00 10 02 44 AC 00 00 00 64 A0 01 01 00 62 AE 25 00 rough

01 00 00 10 02 44 AC 00 00 00 7C 52 01 01 00 8E A1 1E 00 credits

01 00 00 10 02 44 AC 00 00 00 EE A6 01 01 00 DF 45 26 00 town life

01 00 00 10 02 44 AC 00 00 00 FE 5E 09 01 00 E3 A1 D9 00 grass

01 00 00 10 02 44 AC 00 00 00 D6 0E 00 01 00 B3 57 01 00 c win


The last part of each string is different for each file, and seems to correlate to the minute:second or byte length of each file (not sure exactly how).

In order to replace the files you want, take the new music file you wish to substitute and open it with XVI32.  Then find the existing music file with the closest duration/filesize to your new mp3 and insert its corresponding hex string at the start of the new mp3.

After doing so, it's simply a matter of renaming the new mp3 to match the existing music file it is replacing, and then rebuilding the .h4r using mh4 once all your new music is hex-edited and renamed.



Editing the sound effects is a little trickier.  The sounds are stored in \Data\heroes4.h4r, an almost 600MB file.

The mh4 utility has the option to dump a text list of the file it has open.  Here is an example entry in the dump file:

[File 17302]
Name=sound.adv_object.decorative.chicken.h4d
Path=M:\Assets\audio
Type=sound
Offset=592831913
Size=119070
Pre1=283729
Pre2=1013619405
Extra1=0
Extra2=3


XVI32 can also be used to view and edit the raw .h4r files.  In the case of heroes4.h4r, the data consists of 17523 entries in gzip format, each starting with the following hex pattern:

1F 8B 08 00 00 00 00 00 00 0B


The "Size=" row of the dump file entry lists how many bytes is taken up by each gzip entry.  "Pre1=" is the size when the gzip entry is unzipped.  "Offset=" is where in the heroes4.h4r file each entry can be found.

At first I tried extracting the sound files separately, but found that they weren't quite in mp3 format, despite their file extension.  Trying to do the same unpack/edit/repack trick as with music.h4r also doesn't work, since several hundred entries are "null" in the original heroes4.h4r file and repacking it with mh4 will crash the game.

So instead, the best I've been able to do is copy the hex blocks for an existing (less annoying) sound over the blocks of another, subject to one constraint: the "Size=" entry of the copied sound must be less than or equal to the one being replaced, since the "Offset" entry is referred to elsewhere in the .h4r file.


For example, in the case of the adventure map chicken sound, I replaced it with the similarly-sized rainbow sound:

[File 17181]
Name=sound.adv_object.rainbow.h4d
Path=M:\Assets\audio\adv_object\new\
Type=sound
Offset=585944979
Size=105149
Pre1=121833
Pre2=1011984482
Extra1=0
Extra2=3


In XVI32, I scrolled to the offset of the rainbow sound, then used Edit->Block <n> chars (using Size=105149 as n), then Ctrl+H (clipboard copy hex string).  Next I scrolled to the chicken offset, and used Edit->Clipboard->Paste from hex string.  Finally I did another Edit->Block <n> chars with the same size, and then block-deleted them (to remove an equal portion of the old sound and keep the original file size).

This seems to work since each entry is a self-contained gzip item, and the game just ignores the extra data at the end of each item after the above steps.

One warning, working with heroes4.h4r takes some time loading and saving such a large file.  Of course, back up everything before you start editing.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
sprawler
sprawler


Hired Hero
posted September 16, 2008 10:16 AM

Hey i unpacked the music files replace the migt town muisc with my own renamed it and changed the begining of the hex string to some like this

01 00 00 10 02 44 AC 00 00 00 88 03 02 01 00 24 A7 2E 00 town might

and packed it to again ,when i enter the town of migt there is silence no music (in my options music is on if you ask)

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
mr48
mr48


Adventuring Hero
Legatus Legionis
posted September 18, 2008 12:59 AM

Why not just turn off the music in the game and play your own music in the background? Why make things complicated?

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Valdemera
Valdemera

Tavern Dweller
posted September 24, 2008 05:53 PM



Heretic. I personally think the music is awesome, I usually listen to it even when I don't play.
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Roorii
Roorii

Tavern Dweller
posted October 05, 2008 03:23 PM

[quoteI like many parts of the game, but the music is extremely bad.

Whoa whoa WHOA.
Those are fighting words where I come from pal.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
RSVP
RSVP

Tavern Dweller
posted February 18, 2009 01:18 AM

Quote:
Hey i unpacked the music files replace the migt town muisc with my own renamed it and changed the begining of the hex string to some like this

01 00 00 10 02 44 AC 00 00 00 88 03 02 01 00 24 A7 2E 00 town might

and packed it to again ,when i enter the town of migt there is silence no music (in my options music is on if you ask)



A few things to check:

-Be sure to remove "town might" at the end of the hex string, it was just part of the list I made.

-What is the filesize/duration/bit-rate of your new music compared with the original "town might" mp3?

-Does the new music still play normally outside HOMM4 with the added hex string info?

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
toby
toby


Hired Hero
Working on my dream mod.
posted August 21, 2010 12:25 AM

I tried to extract Heroes IV sounds, but failed. I opened "heroes4.h4r" with mmarchive, and when I try to open a sound file with a player, it doesn't work. It has some kind of protection. Can you help me?

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
RSVP
RSVP

Tavern Dweller
posted August 22, 2010 09:47 AM
Edited by RSVP at 10:19, 22 Aug 2010.

Quote:
I tried to extract Heroes IV sounds, but failed. I opened "heroes4.h4r" with mmarchive, and when I try to open a sound file with a player, it doesn't work. It has some kind of protection. Can you help me?


Turns out only some of the sound files are in mp3 format.  Luckily the ResEdit utility found here can extract the non-mp3 ones correctly:

http://www.celestialheavens.com/h3maparchives/wog.tools/resedit.rar

The author of that utility figured out the trick to converting the unknown format sounds to a .wav file - appending these 59 bytes of hex data to the beginning of the extracted raw file:

52 49 46 46 B1 78 00 00 57 41 56 45 66 6D 74 20 12 00 00 00 01 00 02 00 80 3E 00 00 00 FA 00 00 04 00 10 00 00 00 66 61 63 74 04 00 00 00 00 00 00 00 64 61 74 61 7F 78 00 00 00

In text it shows as:

RIFF±x  WAVEfmt      €>   ú      fact       datax  

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
toby
toby


Hired Hero
Working on my dream mod.
posted August 22, 2010 11:38 AM

Thanks for the reply, I figured it out meantime, with the same program, but the extracted files sounds kinda different from the game.
____________
[url=http://heroescommunity.com/viewthread.php3?TID=33579] Heroes HD Remake Mod[/url]

[url=http://heroescommunity.com/viewthread.php3?TID=33597] Heroes IV unit conversion tutorial[/url]

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
xxkilo
xxkilo

Tavern Dweller
posted December 04, 2011 06:36 PM


Quote:
Yeah, in H3 you can even change music...


Hi everyone,
you guys say that it's easy to modify the music and sound in heroes 3. how do you do it? I want it without music or sound fx so that I can play my music in the background.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Jump To: « Prev Thread . . . Next Thread »
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.0480 seconds