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 ]
New Server | HOMM1: info forum | HOMM2: info forum | HOMM3: info forum | HOMM4: info forum | HOMM5: info forum | MMH6: wiki forum | MMH7: wiki forum
Heroes Community > Heroes 4 - Lands of Axeoth > Thread: Researching how to make new spells + town buildings
Thread: Researching how to make new spells + town buildings
NimoStar
NimoStar


Promising
Supreme Hero
Modding the Unmoddable
posted October 20, 2018 08:19 PM
Edited by NimoStar at 20:21, 20 Oct 2018.

Researching how to make new spell anims + town buildings

NOTE: THIS ONLY SPEAKS ABOUT THE GRAPHICAL ASPECT OF MAKING ANIMATIONS, NOT THE CODE ASPECT OF MAKING NEW COMPLETELY FUNCTIONAL SPELLS AND BUILDINGS.
THOUGH WE CAN CHANGE SOME SPELL FUNCTIONALITY IN THE SPELLS TABLE AND BUILDING COSTS IN THEIR TABLE FILES

SInce I don't remember we have a thread for this...

Note that this only speaks of town buildings, not adventure objects. Thare is karmakeld thread for that.

I will lay down some basics:

- Spells and town buildings are the same type of file/animation

- They are interchangeable in ingame use
(You can use spells for building anims, and buildings for spell anims)

- They can be divided into a "static" frame and an "animation" portion
- ...Or they can be fully animated too

- Building files may be only the *animation*, with thew base frame being provided in the Town layers file.

- However all spell anims overwrite the base frame in town file when used as buildings.

Extra:
- Buiildings that come with the game have different lighting based on which town they represent. This is specially notable with Order buildings, which are noticeably lighter than the ones from other towns.

***

Things to document/research:

- What makes a building be only "animation" instead of overwriting the still frame from the town file? Is it a missing base frame, or something else?

- Can .ora be simply imported with namerutan's tool and used as spells/buildings? Or is there any obstacle?

After the town buildings and spell animations are "solved", we can very easily make our own custom towns with unique looks, and eventually our own custom magics.
____________
Discover H4 Greatest Mod!
https://www.moddb.com/mods/greatest-mod/downloads
(Also biggest of only two 2 mods for HOMM IV)

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


Famous Hero
posted November 03, 2018 10:21 PM
Edited by Karmakeld at 22:25, 03 Nov 2018.

NimoStar said:

Things to document/research:

1) What makes a building be only "animation" instead of overwriting the still frame from the town file? Is it a missing base frame, or something else?

2) Can .ora be simply imported with namerutan's tool and used as spells/buildings? Or is there any obstacle?

After the town buildings and spell animations are "solved", we can very easily make our own custom towns with unique looks, and eventually our own custom magics.


1) If you look at the Chaos Grail structure, it's animation consist of a frame named animation_position, then frames 000-015. The animation is only the Eye moving, thus it doesn't overwrite the static frame from Town's Layout file.
So quite simply, it's cause the specific animation only contains the 'animation' and NOT the building in the animation.


Other animations contain a frame named base within the animation.


2) The answer is yet. I just exported the Chaos Blacksmith and Adventure spell Mire as ora files. Replaced the base of the Blacksmith with the Luckstone and changed the color of the Mire to red. Imported the ora files with Namerutans tool, saved as h4d files. Placed them in the Data folder and voila. It works..
In generel there shouldn't be any obstacles, this was fairly easy for me. Only thing to be aware of is that the ResHelper doesn't export blank images, so you can occasionally miss a frame or two. That was the case with Mire btw. Missing frame 001 and frame 012, but when importing I got a failure message.



____________

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


Promising
Supreme Hero
Modding the Unmoddable
posted November 09, 2018 12:00 PM
Edited by NimoStar at 12:01, 09 Nov 2018.

Quote:
So quite simply, it's cause the specific animation only contains the 'animation' and NOT the building in the animation.


That can't be true because the game doesn't know if the building is there or not since it doesn't have image recogniticion, it needs to be based on frame names...

Because some buildings from the town files are replaced and others just "complimented" with the animation.

I thought originally that it needs to be a frame named "base" for the town-appearing buildings to be replaced, because "replacing" buildings have it while "complimenting" anims don't.






But then I found out that spells replace buildings instead of complimenting them too, so it wasn't that, since they don't have a "base" frame.



So it was something else. Then I found it:





Besides an "animation_position" frame, complimenting anims have an empty first frame with 0x0 size.

Eye of Chaos also has it:


Now we would need to know how to reproduce that in the .ora
...

Plus I found an unused hourglass animation:



(It runs but doesn't flip)

*****
TL;DR:

Animations that don't replace buildings but compliment them have an empty 0x0 first numbered frame. We need to know how to do that in a .ora to make out own.

They also may have a separate "base" named frame that appears along and below all anims, much like adventure objects.
____________
Discover H4 Greatest Mod!
https://www.moddb.com/mods/greatest-mod/downloads
(Also biggest of only two 2 mods for HOMM IV)

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


Promising
Supreme Hero
Modding the Unmoddable
posted November 09, 2018 12:03 PM
Edited by NimoStar at 12:03, 09 Nov 2018.

2) Very nice, its good to know at least we can change them.

But that is even more worrying as regarding 0x0 frames since you are saying namerutan's tool doesn't even recognize them at least when exporting. If so using it to make buildings with 0x0 frames may be impossible; or maybe its impossible by definition that an .ora file contains such frames.
____________
Discover H4 Greatest Mod!
https://www.moddb.com/mods/greatest-mod/downloads
(Also biggest of only two 2 mods for HOMM IV)

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


Known Hero
posted November 09, 2018 09:50 PM

I do recall Namerutan mentioning something about 0x0 frames and not having come up with a way yet to handle these things.

I think it wouldn't be terribly difficult though. The H4 Resource Editor would just need to allow you to add one of these when importing a .ora file, or some other way to specify that it should be there, what it should be named, etc.

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


Famous Hero
posted November 09, 2018 10:33 PM
Edited by Karmakeld at 23:40, 09 Nov 2018.

Have you tried using the infos specied on the 0x0 frame?
As far I can see by just lookkng at your image (will have to test this when I have the time), but it's listed as a 0x0 sized frame with 0x0 position.. just a guess but if all other sizes and positions are read, perhaps these are true enough.
What I mean is, have you tried making a layer  sized 0x0? I do find it easier to just try it, rather than to just speculate

There's lots of unused images and animations. Just Look through the files..

As for the 'base' of buildings, keep in mind some of the town structures are also located in a some Layout at the bottom (can't recall the path). That might be the 2nd image/base you seek.
____________

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


Promising
Supreme Hero
Modding the Unmoddable
posted November 10, 2018 12:52 AM
Edited by NimoStar at 20:28, 11 Nov 2018.

Quote:
have you tried making a layer  sized 0x0? I do find it easier to just try it, rather than to just speculate


I can't "try" if I don't know how to "try". Layers in gimp are images, I suppose you can make a layer with nothing on it, but 1- Is this really equivalent to 0x0 pixels or just an empty image the size of the frame, 2-How do you know the "Position" of this layer 3- will it be imported?

And no, speculating is easier, this is an objective fact :V

Quote:
There's lots of unused images and animations. Just Look through the files..


I woudn't say lots, and I have found others before, I just didn't recall this particular one.

Quote:
As for the 'base' of buildings, keep in mind some of the town structures are also located in a some Layout at the bottom (can't recall the path). That might be the 2nd image/base you seek.


You mean inside the Town file? I know about those, that's what I was talking about as for replace/not replace. They are not replaced if the first numbered image is 0x0.

If you mean some other thing please say.

Also we need to know how the animation offset is saved in the "animation position" frame, since it doesn't seem to have positional data either.

____________
Discover H4 Greatest Mod!
https://www.moddb.com/mods/greatest-mod/downloads
(Also biggest of only two 2 mods for HOMM IV)

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

Page compiled in 0.0398 seconds