|
Thread: Modding Heroes 4 Creatures | |
|
leadcrow
Hired Hero
|
posted February 01, 2021 01:08 PM |
|
|
Modding Heroes 4 Creatures
Hello!
Does anyone know how to change creatures appearance? I tried to replace the catapult with the evil sorceress, but ingame it's a ballista on the adventure map and a mage in battle.
Also the main screen music is different...
____________
|
|
iliveinabox05
Honorable
Famous Hero
|
posted February 01, 2021 05:17 PM |
|
|
Hello there leadcrow!
For changing the appearance of a creature, you can either do things the hard way, which involves hex editing (there are a couple threads here that explain how to do it that way).
Or, you can do things the easy way and use the H4 Resource Editor. (There is some small setup involved, but it's definitely worth it)
The resource editor will allow you to open up and replace images for various types of objects.
Simply start it up, then open heroes4.h4r (or whichever h4r has the unit you would like to edit). Navigate the tree view on the left side of the panel under actor_sequence. Here you should be able to right click the name of the creature you're interested in, and then selec "extract all." This will give you h4d files for each of the sprites for the creature.
Then, you can either replace them one by one by opening up each of the h4d files and using the file menu to import new images, or I believe the first page of the thread I linked you to has instructions for doing a mass import.
Once you have your updated h4d files, you can just drop them all in your H4 data folder (or use the resource editor to pack them into new.h4r or new_mod.h4r for Equilibris and drop that into the data folder).
Then fire up the game and profit.
Edit. And also, if you want to do things the way you're currently doing them, you just need to edit the adventure map sprites as well as the combat sprites.
The sprites under "combat" are for combat, and the others should be for the adventure map.
|
|
leadcrow
Hired Hero
|
posted February 02, 2021 01:05 AM |
|
|
Hi iLiveinabox
I am actually using your tool. Thank you for it by the way!
It worked so far for everthing i did but in this case it didn't work as expected.
What i did I extracted the Evil Sorceress actor_sequence files and renamed those hd4 files and then i replaced/added them to the x2_override.h4r
The preview in the Resource editor is correct. But when I start the game or editor all wind of war creatures are messed up.
The catapult is a ballista sprite on the adventure map, the megadragon is a black dragon and the frenzied gnasher is a behemoth. on the battlefield all 3 are a mage sprite (order creature).
Also the dwellings which came with the expansion are now Archmage's Hat sprites.
I want to replace the catapult with the evil sorceress so that I can pseudo-remove her spellbook and give her a new one without mass cancellation.
____________
|
|
iliveinabox05
Honorable
Famous Hero
|
posted February 02, 2021 03:38 AM |
|
|
Oh well, that's great you're using the tool since I can help you with any questions you have there.
So I wouldn't add your files to x2_override.h4r. That's probably what is causing the weirdness you are seeing.
What you should do is Go to File->new, select h4r. Then File->Add your modified actor sequences (or in this case the renamed actor_sequence files).
It's best to use new.h4r (or new_mod.h4r for Equilibris) when you are trying to replace assets, since this h4r container overrides all of the others.
Also, keep in mind that there are also sounds and portraits for each creature that you would want to switch.
So, those files you would also want to pack into new.h4r.
Well, let me know how it goes and if you have any other questions!
|
|
leadcrow
Hired Hero
|
posted February 02, 2021 04:48 PM |
|
|
Yes! It works !
Do you also know how to change the missile they use? When I cast targeted spells the greek fire animation is still there.
____________
|
|
iliveinabox05
Honorable
Famous Hero
|
posted February 02, 2021 05:56 PM |
|
|
leadcrow said: Yes! It works !
Do you also know how to change the missile they use? When I cast targeted spells the greek fire animation is still there.
Hmm, that's a good question. In x2_override.h4r and in the others except for heroes.h4r, I don't see any actor_sequences for "missile" types for the new units.
The one that looks like it might be the one you're looking for is in heroes4.h4r under actor_sequences called fire_bolt, but I'm not sure if that's the one that gets used.
I don't recall at the moment where the projectile that gets used is set, so hopefully someone else can chime in, since I don't think you want to switch the missile types in case it gets used somewhere else.
I did just find combat_actor.missile. section, which is probably what we want to look at, but at the moment it looks like the resource editor doesn't properly parse those files.
They must be slightly different than the other combat actor files, so I'll need to take a closer look at them and figure out their format.
Edit. Ah but you said for targeted spells.. That might even be more different.
|
|
leadcrow
Hired Hero
|
posted February 02, 2021 06:18 PM |
|
|
it's actually only happening on damage spells like icebolt
____________
|
|
iliveinabox05
Honorable
Famous Hero
|
posted February 02, 2021 06:54 PM |
|
|
Did you also swap the combat_actor and adventure actor files for catapult and evil sorceress?
|
|
leadcrow
Hired Hero
|
posted February 02, 2021 07:51 PM |
|
|
Yes, first I replaced all the adventure sprites and made in the adv.actor.catapult everything look like in adv.actor.Evil Sorceress
Then I tried to change combat.actor.catapult to be like Evil Sorceress but I couldn't change 'Unknown' values
So I took the combat.actor from evil sorceress and renamed it combat.actor.catapult and added it to new_mod.h4r
I didn't even had to replace all combat sprites
I guess i could just swap with a non ranged unit
____________
|
|
iliveinabox05
Honorable
Famous Hero
|
posted February 02, 2021 09:16 PM |
|
|
Okay good, sounds like you're on the right track.
Yeah the "unknown" values aren't editable at the moment (or at least edits you make aren't applied to the object).
Would you be interested in testing out different values for those fields to see if you can figure anything out about them?
Either you could hex edit the values or I could make a quick update for the Resource Editor to actually capture and apply those changes. Probably easier for you if I updated the resource editor since you would have to know where to look in the files to hex edit.
|
|
leadcrow
Hired Hero
|
posted February 03, 2021 09:21 AM |
|
|
Yeah I would be interested.
____________
|
|
iliveinabox05
Honorable
Famous Hero
|
posted February 04, 2021 12:13 AM |
|
|
leadcrow said: Yeah I would be interested.
That would be great!
I'll try to get a quick update out after work today and I'll let you know when it's ready.
And definitely feel free to test out editing anything else that is listed as unknown that you come across
|
|
iliveinabox05
Honorable
Famous Hero
|
posted February 04, 2021 02:46 AM |
|
|
So it looks like it actually does let you modify the unknown values on the combat actor panel, but there is a bug when trying to save the file to the same location with the same name (overwriting).
Currently looking into why I'm not able to delete the file currently there to replace with the new one, but in the meantime you can either give it a slightly different name, or save your modified file somewhere else.
|
|
Karmakeld
Responsible
Supreme Hero
|
posted February 21, 2021 07:03 PM |
|
|
There is a section in the heroes.h4r file with all animations for all missiles. Thinks it's just called missiles, but i'm not at my pc atm so..
____________
|
|
|