H4: Is this possible?

The old Heroes games developed by New World Computing. Please specify which game you are referring to in your post.

Moderator: Moderators

User avatar
Dalai
Equilibris Team
Equilibris Team
Posts: 1073
Joined: 06 Jan 2006
Contact:

Postby Dalai » Dec 4 2006, 12:13

Metathron wrote:I've tried your simple way, Dalai, but to no avail.

Hmmm.... :|
I'll investigate it further, no time for it now.
I have three files I made for myself and for some Equi-development experiments, you can use them as-is. It's 1024*768 (only!) screens from all three versions: Original, TGS, WOW

Warning: it also contains Russian fonts, so it is strongly not recommended to use if you have other than English or Russian version of the game.
"Not a shred of evidence exists in favour of the idea that life is serious." Brendan Gill

User avatar
Metathron
Round Table Hero
Round Table Hero
Posts: 2704
Joined: 29 Jan 2006
Location: Somewhere deep in the Caribbean...
Contact:

Postby Metathron » Dec 4 2006, 15:01

Hey, those work! I looked inside the .pak files and I think I extracted those very same files last time I tried, so I can only guess the problem was that they were not named skin.h4r but new_mod.h4r like you suggested in an earlier post.

Anyhow, thanks a bunch, Dalai. It is refreshing to be able to change the main menu screen once in a while.

Now perhaps I'll even try Hellspawn's method for changing the music score, though I doubt I'll be successful.
Jesus saves, Allah forgives, Cthulhu thinks you'd make a nice sandwich.

User avatar
TheUndeadKing
Swordsman
Swordsman
Posts: 588
Joined: 04 Dec 2006
Contact:

Postby TheUndeadKing » Dec 4 2006, 21:12

(To change both the main menu AND the music!) Here's what you need to do:

1. Use this program:
http://www.celestialheavens.com/homm4/u ... 32.006.zip

2. Extract this file from heroes4.h4r:
bitmap_raw.menu.main.1024.raw

3. Extract this file from music.h4r:
sound.main_menu.mp3

4. Create a new text document and type (or copy) these:

[H4R File List]
new.h4r
2
sound.main_menu.mp3
bitmap_raw.menu.main.1024.raw
[End]

(Note: If you copy-paste the script above, you will also need to remove the added "spaces" at the end of each line.)

Then click on File > Save As... and save the document as "new.h4l".

5. Copy these three files (2, 3, 4) into the same folder.

6. Open the extractor (1) and click Options > Build a h4l file. Then select the "new.h4l" file you just created (4). This will create a new file named "new.h4r". Copy this file into your Heroes 4\Data folder.

Note: Rename "new.h4r" to "new_mod.h4r" for the Equilibris mod.

Voila! Enjoy your new menu & music! :)
Last edited by TheUndeadKing on Feb 2 2009, 5:09, edited 1 time in total.
"I saw the angel in the marble and carved until I set him free..." - Michelangelo

User avatar
Willow
Leprechaun
Leprechaun
Posts: 36
Joined: 06 Jan 2006
Location: Cape Town, South Africa

Postby Willow » Dec 9 2006, 11:55

I finally managed to get my custom music to work following Hellspawn's instructions :D Thx Hellspawn!

User avatar
HellSpawn
Peasant
Peasant
Posts: 74
Joined: 06 Jan 2006

Postby HellSpawn » Dec 9 2006, 17:54

No problem..
If you have any more questions, you can send me message.

WhiteAvatar
Leprechaun
Leprechaun
Posts: 10
Joined: 13 Dec 2006

Postby WhiteAvatar » Dec 13 2006, 14:38

You have to be a computer programmer geek to do this:

You have to copy graphic files of the screen you want to the game dir.
Then rename them to the original game names, and then you can play with a new start up screen.

Computers work logicaly, if you want to change the intro screen
just search with explorer for .BMP or .Gif. or .JPG files, until you find a match
then you have the name of that file
then replace it with your own screen
and give it the name of the original file
simple

Greetings from the nerds and hackers Heroes IV Beer-community.

Edited out the "fix" for illegal game/ Pitsu

User avatar
Akul
Round Table Hero
Round Table Hero
Posts: 1543
Joined: 06 Jan 2006

Postby Akul » Dec 13 2006, 19:33

You... don't get it, do you?

Do you think that you are the only one who can do that? If that was so simple, nobody, but really nobody, would ask for help.

The files are in no Picture Format.
I am back and ready to... ready to... post things.

User avatar
Metathron
Round Table Hero
Round Table Hero
Posts: 2704
Joined: 29 Jan 2006
Location: Somewhere deep in the Caribbean...
Contact:

Postby Metathron » Jan 13 2007, 16:36

TheUndeadKing's method is probably the easiest and most practical method to change the background and music. Works like a charm with as little sweat as possible. :-D
Jesus saves, Allah forgives, Cthulhu thinks you'd make a nice sandwich.

User avatar
TheUndeadKing
Swordsman
Swordsman
Posts: 588
Joined: 04 Dec 2006
Contact:

Postby TheUndeadKing » Jan 13 2007, 19:16

Thanks for the feedback, Metathron. Glad I could help. ;)

My method is indeed the easiest, unless you want to use your own custom music. It (only) works perfectly fine with H4 tracks. The problem with my method is, you still have to edit the mp3 file if you want to use your own custom music tracks (I'm also looking for an "easy" method for this, too.)
"I saw the angel in the marble and carved until I set him free..." - Michelangelo

User avatar
Metathron
Round Table Hero
Round Table Hero
Posts: 2704
Joined: 29 Jan 2006
Location: Somewhere deep in the Caribbean...
Contact:

Postby Metathron » Feb 1 2009, 19:14

I am trying TUK's method on my new computer, and it won't work for some reason. When I try to do this:

6. Open the extractor (1) and click Options > Build a h4l file. Then select the "new.h4l" file you just created (4).


it gives me an "Error in the lst file!" message.

Any ideas why?

I extracted the Gathering Storm wallpaper and music this time, not the originals, so maybe that could be the reason?
Jesus saves, Allah forgives, Cthulhu thinks you'd make a nice sandwich.

User avatar
TheUndeadKing
Swordsman
Swordsman
Posts: 588
Joined: 04 Dec 2006
Contact:

Postby TheUndeadKing » Feb 2 2009, 5:04

It's because of the "space" characters, that's why. I didn't know the extractor was sensitive to space characters. :disagree: The solution to your problem is fairly simple:

When you copy-paste the script above ([H4R File List] blah blah...), you will notice some empty spaces at the end of each line in the text document. Delete them. Then save the document as "new.h4l". The rest of the steps should be the same.
"I saw the angel in the marble and carved until I set him free..." - Michelangelo

AKuHAK
Leprechaun
Leprechaun
Posts: 12
Joined: 03 Jul 2011

Postby AKuHAK » Dec 9 2011, 22:08

I found a way how to add any music file into H4. I'm not sure about link posting but here is my light "mod" which replaces grass theme with "Wandering" theme and main menu theme with my so-called "remix" (i just paste together main menu themes from all three versions of game and fix differences in volume level - starts of course with Gathering Storm theme).

http://depositfiles.com/files/4g3h3xvvx - just put this into Data folder.


Step 1
So if you have any mp3 file (CBR 128 kbit/s, joint stereo, ms stereo, 2ch, 44,1 kHz). Open it into hex editor. Get the full file size by pressing Ctrl+A in hex format (e.g. my sound.main_menu.mp3 has 3E1AE0). Write it somewhere in reverse 4 byte format (e.g. 3E1AE0 -> 00 E0 1A 3E).

Step 2
Then open your file in some kind of audio editor (im using adobe audition) and write down samples number (in my example - 11218176 samples). Then multiply this value on 4 (e.g. 11218176 * 4 = 44872704). Convert it into hex (44872704 dec = 2ACB400 dec) and finally write it in reverse 4 bytes hex (2ACB400 -> 00 B4 AC 02)

Step 3
Return into hex editor and add such 13 bytes into beginning of file (header).
01 00 00 10 02 44 AC 00 00 00 B4 AC 02 01 00 E0 1A 3E 00
01 00 - ??
00 10 - 16-bit (per sample)
02 - stereo
44 AC 00 00 - 44100 Hz (Sampling rate)
00 B4 AC 02 - sample count*4 which we get in step 2
01 00 - ??
E0 1A 3E 00 - exact mp3 size which we get in step 1
Last edited by AKuHAK on Oct 6 2018, 11:26, edited 2 times in total.

User avatar
cuc
Peasant
Peasant
Posts: 64
Joined: 06 Jan 2006
Location: Camelot

Postby cuc » Dec 10 2011, 6:21

Good job, AKuHAK! You solved all the music problems in one swoop!

Admins, would you host AKuHAK's small mod file on CH itself? Files uploaded to Depositfiles are not permanent, and I think he has made a valuable contribution.

AKuHAK wrote:Step 3
Return into hex editor and add such 13 bytes into beginning of file.

By "add", do you mean "replace the first 13 bytes", or "insert 13 bytes"?

AKuHAK wrote:P.S. By the way there is in official heroes 4 OST disk track called "13 - The Mountain Song". Can somebody tell me where in the game it is used?

It's part of the grass.mp3 file in game.

AKuHAK
Leprechaun
Leprechaun
Posts: 12
Joined: 03 Jul 2011

Postby AKuHAK » Dec 10 2011, 9:25

cuc wrote:
AKuHAK wrote:Step 3
Return into hex editor and add such 13 bytes into beginning of file.

By "add", do you mean "replace the first 13 bytes", or "insert 13 bytes"?
I mean insert 13 bytes. Any files in heroes4 has such "first inserting bytes" - campaigns, bitmaps, text files and so on. But all of them has different so-called checksums (i know only for music, campaigns, and bitmaps).
cuc wrote:
AKuHAK wrote:P.S. By the way there is in official heroes 4 OST disk track called "13 - The Mountain Song". Can somebody tell me where in the game it is used?

It's part of the grass.mp3 file in game.
Yes but as i know all tracks are part of the original grass theme :D But thanks for fast answer.

User avatar
Irv1n3
Leprechaun
Leprechaun
Posts: 9
Joined: 21 May 2011

Postby Irv1n3 » Dec 10 2011, 12:07

AKuHAK wrote:Yes but as i know all tracks are part of the original grass theme :D But thanks for fast answer.


Wandering from the official OST is unused in the game ;)
http://www.youtube.com/watch?v=vyckwhnqCkg

I think we have to remember (or read for the first time) this interesting topic : http://www.celestialheavens.com/forums/viewtopic.php?t=11812

AKuHAK
Leprechaun
Leprechaun
Posts: 12
Joined: 03 Jul 2011

Postby AKuHAK » Dec 24 2011, 11:15

new version of heroes resource editor

http://depositfiles.com/files/70aaxhioe
this is mh4 v0.96

User avatar
Duzeom_
Conscript
Conscript
Posts: 235
Joined: 07 Mar 2011

Postby Duzeom_ » Mar 16 2012, 9:53

Is this possible to change and/or add new prologues/epilogues images and voices in H4?

User avatar
jeff
Moderator
Moderator
Posts: 3713
Joined: 06 Jan 2006

Postby jeff » Mar 16 2012, 20:25

Duzeom_ wrote:Is this possible to change and/or add new prologues/epilogues images and voices in H4?


I don't know of any, but it would sure be nice if the Equilibris team could do something along the lines of their face tool. I would definitely use new images.
Mala Ipsa Nova :bugsquash:

AKuHAK
Leprechaun
Leprechaun
Posts: 12
Joined: 03 Jul 2011

Postby AKuHAK » Sep 11 2014, 20:12

Links is dead so here is new link
https://yadi.sk/d/3kdw7Df_bRu5o

Slavax
Leprechaun
Leprechaun
Posts: 13
Joined: 02 May 2015

Re: H4: Is this possible?

Postby Slavax » Sep 24 2015, 22:08

Hello everybody and sorry for necro-posting. I just tried to convert that new H4 map from Ubi into a new menu, but i have a problem. After making a .h4r file and putting it into Data folder, Main Menu becomes black. I am using Equilibris 3.51 and here are the menu graphics: http://www7.zippyshare.com/v/tqypyt6E/file.html. Programs that I used: GIMP (editing graphics), mh4 (making a .h4r file), ResEdit2 (extracting original menu graphics as .bmp). Anybody can help me?


Return to “Heroes I-IV”

Who is online

Users browsing this forum: No registered users and 5 guests