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: How can i open campaigns maps?
Thread: How can i open campaigns maps? This thread is 3 pages long: 1 2 3 · «PREV
NimoStar
NimoStar


Responsible
Legendary Hero
Modding the Unmoddable
posted May 05, 2022 02:47 PM
Edited by NimoStar at 14:49, 05 May 2022.

Quote:
The game is set up to read a serie of pre-named h4r files, like heroes.h4r, storm.h4r and new.h4r
Notice there are several h4r files and also more than just 2 for the expansions. Game is set to read them all, but in an order, meaning you can add new stuff or overwrite certain stuff by adding it to a new filr, which is last in line in reading order.

If you dont rename the campaign maps, but keep their initial file name, they should overwrite the campaign file.
If you extract it, edit it, and remove the campaign name pary, you can place it in your Map Folder, as you say yourself, and read it as stand alone campaign from the map list - all maps included. None of these will act as mods, as you dont create a new exe file. Hope this helps answering some of the confusion.


But you can also make a new exe and make it read from CMP.h4r, for example, if you want to make an independent campaign pack. This can be easily done with hex edit.

Only thng s, the is not much benefit to be ganed from this, as you can also normally launch H campaigns. Only benefit would be n any edts to the .exe you could put in, and in the edditional files and changes you could include in the .h4r.

This would make your custom campain work as a minimod.

As such "mod" would not override anything nor change the base game.

If I were the guys that are doing the Chronicles I would choose this and distribute it with a custom H4R and custom EXE, and launche the campaigns from the campaign menus.
____________
Never changing = never improving

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


Honorable
Famous Hero
posted May 05, 2022 06:22 PM
Edited by iliveinabox05 at 18:32, 05 May 2022.

BlackVuk said:
Welp that is easy peasy for sure. But how that works?
How will game read those edited maps?
As a mod? as a standalone scenario? This needs tutorial for sure. Too much presumptions even on some things you'd find it logical.

It won't do me as a standalone scenario, or a separate mod, would kill my vibe playing custom stuff. I mean, in case of scenario for example, putting maps back in the container would even be unnecessary, just slap in the scenario folder then.

I am of confusion.


Michael (Karmakeld) answered you, but I'll just reiterate since sometimes reading it with different wording can sometimes help.

The game has the h4r filenames hardcoded in the exe's. The last one read in is new.h4r (new_mod.h4r for Equilibris). new.h4r and new_mod.h4r are not normal game files. new.h4r was likely something used for easy debugging of new assets or updates before including them in the main h4r files, so we can take advantage of that.

There are no other edits needed, such as to the exe. Once you include the new.h4r file, the game will read it.

So I mentioned before, but I'll do it again since it can sometimes be hard to follow, but you have 2 options for what you want to do:

Option 1. Extract the maps and make your edits, then put them in the maps folder and play them as single scenario files. You will just load H4 and select New Game -> Single Scenario and search for your edited campaign map.

Option 2. Extract the maps and make your edits, then package them in new.h4r (or new_mod.h4r for Equilibris), and drop them in the data folder.

This method will override the game campaigns so that you can actually play your edited campaigns via the campaign selection menu.

For example, lets say you updated Waerjak's campaign. Then you would load up H4, select New Game -> H4 Campaigns, which would bring up the campaign selection menu for the H4 campaigns. Then select Waerjak's campaign to play, and you will be playing the updated campaign with your changes.

It really just comes down to how you want to play your updated campaigns. Both methods are super easy once you stop trying to extract and repack all of heroes4.h4r

I didn't have time last night, but when I do find some time I'll try to get you some screenshots or at least a step-by-step how to.

NimoStar said:
If I were the guys that are doing the Chronicles I would choose this and distribute it with a custom H4R and custom EXE, and launche the campaigns from the campaign menus.


We're definitely going to have an h4r with all of the mod assets for the Chronicles campaigns, but we're not going to be messing with the exe's, at least not specifically for these campaigns. But it is the plan to have the campaigns all playable through the campaign menus with new splashscreens (and campaign selection backgrounds), portraits, voiceovers, etc.

It will just be an h4r file that the player will need to rename to new.h4r and place in the data folder for the mini mod.

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


Responsible
Legendary Hero
Modding the Unmoddable
posted May 05, 2022 09:56 PM
Edited by NimoStar at 22:00, 05 May 2022.

I think that is harder and less user friendly thann just distributing ChroniclesH4.exe and make it read the h4r instead of asking the player to potentially overwrite other h4r or rename it.

Example:
* Equilibris doesn't use new.h4r
* Greatest Mod doesn't use new.h4r
* Ultimate doesn't use new.h4r (Nor do they use new_mod for that matter, I'm actually using up all h4r slots)

In fact, if you are overwriting original assets for the campaign, ytou force players to delete/move the new.h4r if they want to play the original campaigns, is that not so?

So they need to intervene in game files to do it which as you see, isn't very straightforward for the end user.

So distributing a new exe is the only good solution that does not alter the original game but allows independent launch.
____________
Never changing = never improving

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


Honorable
Famous Hero
posted May 05, 2022 10:23 PM

NimoStar said:
I think that is harder and less user friendly thann just distributing ChroniclesH4.exe and make it read the h4r instead of asking the player to potentially overwrite other h4r or rename it.

Example:
* Equilibris doesn't use new.h4r
* Greatest Mod doesn't use new.h4r
* Ultimate doesn't use new.h4r (Nor do they use new_mod for that matter, I'm actually using up all h4r slots)

In fact, if you are overwriting original assets for the campaign, ytou force players to delete/move the new.h4r if they want to play the original campaigns, is that not so?

So they need to intervene in game files to do it which as you see, isn't very straightforward for the end user.

So distributing a new exe is the only good solution that does not alter the original game but allows independent launch.


That's your opinion Your methodology works for you, but it doesn't work for everyone.

I've also mentioned repeatedly that you use new_mod.h4r for Equilibris, so yes, new.h4r (renamed to new_mod.h4r, or just a copy renamed so) works just fine for Equilibris.

Simply swapping a file in / out takes zero time. I personally have some 10 additional h4r files in my data folder that I swap in and out for my new.h4r depending on what I'm working on at the time.

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

Tavern Dweller
posted May 06, 2022 12:45 AM

First of all. Thank you iliveinabox05 for your patience.
NimoStar and karmakeld.

I finally managed to do everything correctly.

The thing that made me confused was new.h4r and new_mod.h4r, I thought those names are just placeholders, not actual required names that game exe read as a separate container, like you said "that we can exploit" so the game read it and just overwrite previous data from campaigns.

I assumed since we change stuff inside container we just create entirely new container with edited stuff , then we rename like original container, and the original container moved somewhere else.

It was so painful for me to add up everything up file by file just for one map.

I am playing this game since release, and yet, I am new to this community in every sense, and I didn't had any knowleage prior. Altho future google seachers may find this specific topic helpful and mayhaps bring shy people here to join us.
And another thing that caught me eye is how spoiled we are by the paradox and their game engines.
Very mod friendly. You have these values, defines, folders for texture and go ham on it.

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


Honorable
Famous Hero
posted May 06, 2022 12:54 AM

BlackVuk said:
First of all. Thank you iliveinabox05 for your patience.
NimoStar and karmakeld.

I finally managed to do everything correctly.



Glad to hear it! Now you can enjoy the campaigns with your updates

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

Tavern Dweller
posted July 10, 2022 06:23 PM

I tried for several hours last night but I just don't get it:

How do I EXTRACT the map files from the heroes4.h4r-file to edit them? They are extracted as .h4d-files which can't be opened by the editor.

I want to extract the original campaigns for editing by using the H4Resource-mod.
____________

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


Legendary Hero
posted July 10, 2022 08:58 PM

Just rename to correct extension. Its simply normal H4 map! Only h4d is added instead campaign end!

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


Honorable
Famous Hero
posted July 11, 2022 01:21 PM

Nocturne said:
I tried for several hours last night but I just don't get it:

How do I EXTRACT the map files from the heroes4.h4r-file to edit them? They are extracted as .h4d-files which can't be opened by the editor.

I want to extract the original campaigns for editing by using the H4Resource-mod.


Using the resource editor, you have to extract them one at a time. They will be extracted as .h4c files.

Please list the steps you are using to extract so I can better help you.

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

Tavern Dweller
posted July 11, 2022 07:40 PM

iliveinabox05 said:
Nocturne said:
I tried for several hours last night but I just don't get it:

How do I EXTRACT the map files from the heroes4.h4r-file to edit them? They are extracted as .h4d-files which can't be opened by the editor.

I want to extract the original campaigns for editing by using the H4Resource-mod.


Using the resource editor, you have to extract them one at a time. They will be extracted as .h4c files.

Please list the steps you are using to extract so I can better help you.


Thanks that worked!
____________

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


Honorable
Famous Hero
posted July 11, 2022 08:58 PM

Nocturne said:
Thanks that worked!


Good deal, glad I could help!

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


Legendary Hero
posted July 12, 2022 10:20 AM

So if you have h4d you must only rename h4d and you have campaign.

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


Honorable
Famous Hero
posted July 12, 2022 12:35 PM

baronus said:
So if you have h4d you must only rename h4d and you have campaign.


Campaigns are packed differently in h4r files. There are some additional bytes that get added to the beginning so just changing h4d to h4c will still result in the map not being openable by the editor.or game.

The resource editor only removes those leading bytes and updates the extension to h4c if you extract the maps one at a time.

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

Tavern Dweller
posted July 13, 2022 07:38 PM

iliveinabox05 said:
baronus said:
So if you have h4d you must only rename h4d and you have campaign.


Campaigns are packed differently in h4r files. There are some additional bytes that get added to the beginning so just changing h4d to h4c will still result in the map not being openable by the editor.or game.

The resource editor only removes those leading bytes and updates the extension to h4c if you extract the maps one at a time.


Yes, I tried this but as stated, they can't be opened if you simply rename them. Unpacking them 1 by 1 worked, however.

Now, the final question is, how do I package them up again?
____________

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


Honorable
Famous Hero
posted July 13, 2022 08:29 PM
Edited by iliveinabox05 at 20:31, 13 Jul 2022.

Nocturne said:
Yes, I tried this but as stated, they can't be opened if you simply rename them. Unpacking them 1 by 1 worked, however.

Now, the final question is, how do I package them up again?


Ah sorry, I was responding to Baronus where you quoted me

As far as packing them back up, if you're using the resource editor, you'll need to select File->New and choose h4r container.

Now you should have a new h4r in the window. Next, select File->Add and select the h4c files you would like to pack. Hit save or open or whatever the file chooser dialog gives you to finish your selection.

Finally, select File->Save and name your h4r file. If you are using the WoW version of H4, then you want to name it new.h4r, otherwise name it new_mod.h4r for Equilibris.

Last step is to drop your new.h4r or new_mod.h4r into the Data folder, which will override the campaigns from the other h4r folders, and you can then play your modified campaigns directly from the campaign selection.

The resource editor doesn't yet support modifying existing h4r containers beyond adding additional files to them, and modifying the h4r containers that come with the game is probably not the best idea, though they are easily replaceable if you mess something up.

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

Tavern Dweller
posted September 05, 2022 03:15 PM

Thanks for the great advice, it worked just fine and I got lost in the chaos campaign hence the lack of reply. Hope you had a great summer!

Now I'm trying to edit the Storm campaigns, but the Resource Editor cannot find them... I have extracted them so they are openable with the standard map editor just like before, but when I open them in the resource editor, nothing appears and I can't apply the scouting scripts. So, the file opens, but there is nothing there.
____________

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


Honorable
Famous Hero
posted September 05, 2022 04:35 PM

Nocturne said:
Thanks for the great advice, it worked just fine and I got lost in the chaos campaign hence the lack of reply. Hope you had a great summer!

Now I'm trying to edit the Storm campaigns, but the Resource Editor cannot find them... I have extracted them so they are openable with the standard map editor just like before, but when I open them in the resource editor, nothing appears and I can't apply the scouting scripts. So, the file opens, but there is nothing there.


Ah if you're looking to modify the maps using an editor, you're looking for the H4 Advanced Options Map Editor. The resource editor is more for modifying resource files, not the maps themselves.

If you're already able to use the resource editor, then you don't need to do anything other than download the advanced editor and you should be able to fire it up right away.

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

Tavern Dweller
posted September 05, 2022 05:25 PM
Edited by Nocturne at 18:18, 05 Sep 2022.

iliveinabox05 said:
Nocturne said:
Thanks for the great advice, it worked just fine and I got lost in the chaos campaign hence the lack of reply. Hope you had a great summer!

Now I'm trying to edit the Storm campaigns, but the Resource Editor cannot find them... I have extracted them so they are openable with the standard map editor just like before, but when I open them in the resource editor, nothing appears and I can't apply the scouting scripts. So, the file opens, but there is nothing there.


Ah if you're looking to modify the maps using an editor, you're looking for the [url=http://heroescommunity.com/viewthread.php3?TID=47048&PID=1548628#focus]H4 Advanced Options Map Editor[/url]. The resource editor is more for modifying resource files, not the maps themselves.

If you're already able to use the resource editor, then you don't need to do anything other than download the advanced editor and you should be able to fire it up right away.


They wont open in the Advanced Map Editor.

EDIT: I solved it! Turns out I needed to open and save them in the regular editor first. I can now open them in the Advanced Editor.
____________

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


Honorable
Famous Hero
posted September 06, 2022 03:37 PM

Nocturne said:
They wont open in the Advanced Map Editor.

EDIT: I solved it! Turns out I needed to open and save them in the regular editor first. I can now open them in the Advanced Editor.


The advanced editor can open some H4 / TGS maps, but there is still some of the format that I never got around to reversing.

When I reversed .h4c files, I did so using WoW maps, so yes, as you found, converting your maps to WoW format by opening and saving them in the H4 editor will then allow you to for sure open them using the advanced editor

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Jump To: « Prev Thread . . . Next Thread » This thread is 3 pages long: 1 2 3 · «PREV
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.1057 seconds