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: Figured how map objects work (and can't be changed)
Thread: Figured how map objects work (and can't be changed)
NimoStar
NimoStar


Promising
Famous Hero
Modding the Unmoddable
posted February 17, 2017 11:48 AM
Edited by NimoStar at 11:56, 17 Feb 2017.

Figured how map objects work (and can't be changed)

This is from my modding notes:

- Try map-editing hex object type change
-> Not work in maps because they are compressed (probably just a number)
-> Changes it back if found different image than object functionality in .aop (even if you edit the .aop correctly)
-> Probably compares it with "table.adventure object.txt"
-- Options:
- Try to make Campaign Editor Exe that doesn't read "table.adventure object"
- Try to purge resource files of all copies of "table.adventure object"
- Edit "table.adventure object" only for campaign editor, so that it supports the needed objects on-demand
-- See if supports redundant object types (one image for many types, and/or viceversa, many images for one type)
...apparently, there is no way to do it. The image comes first and the object is invoked later it seems (genius level H4 programming there...)
Images are not invoked in the table - Rather, the Editor invokes the separate image file, that has passability data as well as data indicating which object to refer on the table.
Simply put, it is dumb. Instead of calling the object and then that object calling an image (therefore, objects that are only a few bytes is writing and can call any image from the vast and heavy library), you have the vast and heavy library calling the few-bytes objects (which also accounts for some of H4 and it's editor performance problems).

This also means that apparently there is no way (other than maybe hex editing the compressed maps - good look with that arcane magicks) to change the images of objects without duplicating endlessly the image files. That is because there are no "images of objects", actually there are only "Objects of images".














____________
CLICK on the image to discover H4 Greatest Mod!

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


Supreme Hero
posted February 18, 2017 04:12 PM

Thanks for good tutorial. It will be needed to build another objects maps.

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


Famous Hero
posted February 19, 2017 05:08 PM

Having followed your posts and treads about modding with great interest, this tread has me puzzled. Is it just to conclude:

NimoStar said:

..that apparently there is no way (..) to change the images of objects without duplicating endlessly the image files.
??

Do you intend to change the image of existing objects?

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


Promising
Famous Hero
Modding the Unmoddable
posted February 20, 2017 12:01 AM

I was intending to make "alternate objects", for example a water wheel which looks like a cascade, etc.

If you could change just the object and image values separately, you could make this object just by editing a few bytes in the .aop file (what I tried to do).
This would allow you to use any image on any existing object, without adding new files to the resources (instead of duplicating Tree of Knowledge image for each new use, you could just change the object type and indicate to use "tree of knowledge" image - you copuld use any object type with any existing image without adding anything to the game, just as in WOG)

But the way the files are structured, object type was *already* included in image, sadly. So object will always auto correct to what image file says it is. This makes it so far not possible to add new objects without adding new image files (even duplicated ones).
____________
CLICK on the image to discover H4 Greatest Mod!

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

Page compiled in 0.0252 seconds