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: Heroes 4 Modding Revisited
Thread: Heroes 4 Modding Revisited This thread is 17 pages long: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 · «PREV / NEXT»
iliveinabox05
iliveinabox05


Honorable
Famous Hero
posted July 11, 2022 09:00 PM
Edited by iliveinabox05 at 21:01, 11 Jul 2022.

Albyx said:
I think I found a way to add new buildings!

But first I need to add new image to the layers.town.might.layout.

With Resource Editor I see only "export background" button, how can I export buildings themselves? I need it to add new building layer.

The code is written, it is literally the last remaining thing to do I think.


I think if you extract layers.town.might.layout, and open the extracted h4d file with the resource editor, that you may get the options to import / export ora / png, but I may not have gotten to that yet.

Take a look and let me know if that works or not.

When opening the town layout file from inside an h4r container, I've done it so that it displays the buildings on the actual townscreen background and it allows you to move the buildings to the desired locations.

What I didn't do there was allow you to also just import / export the entire layers file. I was looking too far forward

Since you've already written the code, I'll see about looking at this tonight, but can't make any guarantees.

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


Known Hero
posted July 11, 2022 09:59 PM
Edited by Albyx at 23:25, 11 Jul 2022.

iliveinabox05 said:
Albyx said:
I think I found a way to add new buildings!

But first I need to add new image to the layers.town.might.layout.

With Resource Editor I see only "export background" button, how can I export buildings themselves? I need it to add new building layer.

The code is written, it is literally the last remaining thing to do I think.


I think if you extract layers.town.might.layout, and open the extracted h4d file with the resource editor, that you may get the options to import / export ora / png, but I may not have gotten to that yet.

Take a look and let me know if that works or not.

When opening the town layout file from inside an h4r container, I've done it so that it displays the buildings on the actual townscreen background and it allows you to move the buildings to the desired locations.

What I didn't do there was allow you to also just import / export the entire layers file. I was looking too far forward

Since you've already written the code, I'll see about looking at this tonight, but can't make any guarantees.

Well, It didn't work as I thought

I can only set layers of already present buildings to different ones.

I mean with code, Resource Editor worked well.

Update: I tried to add buildings from other factions with direct RAM editing, and it looks like buildings that trigger automatically (abbey, stables etc) work, they are just missing on the screen. It means we can add their effects to normal buildings by writing hook that will build several buildings at the same time.

For example, stables can be built in Might town, when player builds arena. It means we will have +3 defense AND bonus movement in one building, because stables are invisible and can't be accessed by player.

What about adding new buildings, it looks like town building screens have list of IDs somewhere in exe, and towns can ONLY display layers for buildings with the same IDs.

I'll continue researching town functions, maybe should look after buildings' requirements, because they must be connected to IDs too.

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


Responsible
Legendary Hero
Modding the Unmoddable
posted July 11, 2022 11:20 PM

You can add more layers to the ora and then import. I know I did it.

I mean the edit and re-import part, I didn't add more layers except for some terrain/ambient ones since adding more buildings would be useless without having code...

So, how to change one building into another?

I didn't find your creature portal link with the fixes, would you mind to repost it? Maybe make a separate thread for your plugin?
____________
Never changing = never improving

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


Known Hero
posted July 11, 2022 11:42 PM

NimoStar said:
You can add more layers to the ora and then import. I know I did it.

I mean the edit and re-import part, I didn't add more layers except for some terrain/ambient ones since adding more buildings would be useless without having code...

So, how to change one building into another?

I didn't find your creature portal link with the fixes, would you mind to repost it? Maybe make a separate thread for your plugin?


Portal: https://www.mediafire.com/file/fdgzznzk83ul3gn/Portal.h/file

I can't change one building into another, just change their look. I thought adding new layer would at least show the building if I edit the RAM, but towns just ignore them, as descriped in previous post.

I don't think my patcher for buildings will be useful, so I'm not planning making thread about it right now. You can achieve the same result by swapping  names of two layers .

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


Honorable
Famous Hero
posted July 11, 2022 11:52 PM
Edited by iliveinabox05 at 23:53, 11 Jul 2022.

Albyx said:
Portal: https://www.mediafire.com/file/fdgzznzk83ul3gn/Portal.h/file

I can't change one building into another, just change their look. I thought adding new layer would at least show the building if I edit the RAM, but towns just ignore them, as descriped in previous post.

I don't think my patcher for buildings will be useful, so I'm not planning making thread about it right now. You can achieve the same result by swapping  names of two layers .


Something to keep in mind when trying to change the look of a building: In addition to updating the image in the town layout file, you also need to replace the building animation file.

If you don't, when loading up the townscreen you will briefly see the updated building from the layout file and then the animation of the old building replaces it.

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


Responsible
Legendary Hero
Modding the Unmoddable
posted July 12, 2022 01:08 AM

iliveinabox05 said:

Something to keep in mind when trying to change the look of a building: In addition to updating the image in the town layout file, you also need to replace the building animation file.

If you don't, when loading up the townscreen you will briefly see the updated building from the layout file and then the animation of the old building replaces it.


That's mostly true. However one must also bear in mind:

-  That sometimes the static town image is th" base" of the anim (example, the Life town Mage Guild) so it doesn't actuallyget replaced just animation is added

- That other times some vuildings don't even have an anim file (some caravans prisons) so they don't getreplaced at all.

- That you can always use the static town screen image by just using an empty image, which you can copy and rename to replace (disable) any "anim" you like.

* * *

I would like to register the communication about utilizing edited copies of the Undead Transformer (one per town) as a solution for upgrading creatures. Each Undead Transformer could be configured to convert one creature type (of that town) into another.

On the other hand I don't know if it is possible that it works with already undead creatures, that must be coded somewhere else too. For the creatures of other towns brought to the "Upgrader", I suggest they be convertes into Peasants : )


____________
Never changing = never improving

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


Known Hero
posted July 12, 2022 09:06 AM
Edited by Albyx at 09:44, 12 Jul 2022.

NimoStar said:

On the other hand I don't know if it is possible that it works with already undead creatures, that must be coded somewhere else too. For the creatures of other towns brought to the "Upgrader", I suggest they be convertes into Peasants : )


Other creatures can be converted to themselves

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


Responsible
Legendary Hero
Modding the Unmoddable
posted July 12, 2022 05:44 PM

Well, converting to peasants may have economic uses, and at least gives you something to do withthem. But from a flavor standpoint converting to themselves (?) may be better.

* * *

In a graphical reccomendation, i would say that the "universal upgrader" should be for ease of access over the castle in the town screen. Could be something like a tall spire toering over it, or a hovering animation. So it's intuitive like "recruit here then upgrade there"

____________
Never changing = never improving

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


Known Hero
posted July 13, 2022 01:07 AM
Edited by Albyx at 01:11, 13 Jul 2022.

Sharing my progress:





I can move buildings in the building screen. It also means I can put them "on top" of each other, like fort/citadel/castle.

P.S. "Barb abbey" is reskin of Arena, also made by my plugin.

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


Responsible
Legendary Hero
Modding the Unmoddable
posted July 13, 2022 02:09 PM

we could already move and modify graphics, I am glad you are learning, but this is nothing new unless some of the buildings is new or has changed functionality...
____________
Never changing = never improving

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


Known Hero
posted July 13, 2022 04:41 PM
Edited by Albyx at 16:43, 13 Jul 2022.

NimoStar said:
we could already move and modify graphics, I am glad you are learning, but this is nothing new unless some of the buildings is new or has changed functionality...


This is not just resource editing, this values are coded in exe and are necessary to add new building.

Now if I add new building to the town, the game crashes. And it's a good sign! It means that new building is processed by the game, so I'm getting closer.

It looks like there are other arrays of building data, and when game checks that arrays for new building, it goes out of range. One of this data structures is surely building requirements, I haven't found it yet, but I have an idea where to search. But it will only work if this array is in exe, it has been changed by Equilibris team and in theory can be somewhere in dll file.

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


Responsible
Legendary Hero
Modding the Unmoddable
posted July 13, 2022 05:25 PM

Well I did warn modders to not use equi dll, as did rosekavalier, but zero didn't listen so now we are stuck wit it...
____________
Never changing = never improving

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


Known Hero
posted July 13, 2022 06:34 PM

NimoStar said:
Well I did warn modders to not use equi dll, as did rosekavalier, but zero didn't listen so now we are stuck wit it...


Hey, be more optimistic

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


Responsible
Legendary Hero
Modding the Unmoddable
posted July 14, 2022 02:08 AM

Ok, then : )

I am optimistic that some day the Equi undocumented/secret/closed-source binary Dll will be abandoned in H4 modding once and for all and that its desired functions will eventually be replaced by open source, scriptable/moddable alternatives by the community

HappY?
____________
Never changing = never improving

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


Known Hero
posted July 14, 2022 09:22 PM
Edited by Albyx at 11:55, 16 Jul 2022.

I've found a way to change building requirements. But it's unstable, sometimes game crashes and sometimes doesn't. It can be me editing the wrong bytes , I didn't really check

Update: it works perfect btw, here is demonstration of adding new requirements:


Choosing buildings and blocking buildings is in development, mod will be released after I finish everything.

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


Known Hero
posted July 17, 2022 02:01 PM
Edited by Albyx at 20:37, 22 Jul 2022.

New buildings plugin is in development. It will be united with requirements plugin. At the moment my code looks like pile of crap, so I'm going to refactor it, test plugin in my mod, write a guide and finally publish it.

Update:
I succeeded in adding existing building to other faction on building screen. But when I build it, game crashes

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


Legendary Hero
posted July 23, 2022 02:32 PM

Nice. Add link to buildings properties because this thread is going down and can be hard to find.

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


Responsible
Legendary Hero
Modding the Unmoddable
posted January 13, 2023 02:24 PM

Can't we pin this thread? I often have to search for it
____________
Never changing = never improving

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


Responsible
Supreme Hero
posted January 13, 2023 04:42 PM

NimoStar said:
Can't we pin this thread? I often have to search for it


I guess Galaad is the one who can make it sticky..
____________

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


Legendary Hero
posted January 13, 2023 08:32 PM

I think this thread must be reconstructed. All usefull data should be extracted because now is wasted for useless discussion. Finding usefull content will be hardest if It will be continued. Now its 15 pages but what if 115?

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Jump To: Next Thread » This thread is 17 pages long: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 · «PREV / NEXT»
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.1210 seconds