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


Promising
Known Hero
posted August 23, 2018 03:06 PM

iliveinabox05 said:
Edit. Just realized it would actually be very simple to make h4d files which contain only the image data viewable since I already have constructs in place which read this data.


That type of 'h4d' file is actually the same as the H4 layer (.lay) file like portraits, town backgrounds etc.

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


Honorable
Famous Hero
posted August 23, 2018 05:50 PM

radmutant69 said:
That type of 'h4d' file is actually the same as the H4 layer (.lay) file like portraits, town backgrounds etc.


So is the extension .h4d or .lay if I were to read / write these to file? Did Michael just mistype when he wrote h4d?

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


Promising
Known Hero
posted August 23, 2018 06:06 PM

The ResHelper saves both .lay and .ani files with .h4d extension. Probably because one can just put the new files into the Data folder in that way, and the game instantly reads them. But if one wants to pack the files into a h4r file, he have to change the extensions because they are two different types and not just 'h4ds'.

It's the same thing as the 'h4d' files readed or created by your tool are in fact .obj files in the game. Or at least have to be renamed to .obj to pack them. I think you should make the Resource Editor be able to open the files with all of those extensions later to avoid such kind of misleading. I mean we can't call all the H4 file types as 'h4d'.

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


Honorable
Famous Hero
posted August 23, 2018 06:09 PM
Edited by iliveinabox05 at 18:10, 23 Aug 2018.

radmutant69 said:
It's the same thing as the 'h4d' files readed or created by your tool are in fact .obj files in the game. Or at least have to be renamed to .obj to pack them. I think you should make the Resource Editor be able to open the files with all of those extensions later to avoid such kind of misleading. I mean we can't call all the H4 file types as 'h4d'.


I agree, with everything having the same extension, there's not really a way to know what actual file type is being opened.

I would have to check for exceptions and then try to open it as a different type.. Using the correct extensions would make things much easier.

I mean I guess scanning the filename for known strings like "adv_obj" works, haha, but still.

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


Responsible
Supreme Hero
posted August 23, 2018 11:31 PM

iliveinabox05 said:
radmutant69 said:
It's the same thing as the 'h4d' files readed or created by your tool are in fact .obj files in the game. Or at least have to be renamed to .obj to pack them. I think you should make the Resource Editor be able to open the files with all of those extensions later to avoid such kind of misleading. I mean we can't call all the H4 file types as 'h4d'.


I agree, with everything having the same extension, there's not really a way to know what actual file type is being opened.

I would have to check for exceptions and then try to open it as a different type.. Using the correct extensions would make things much easier.

I mean I guess scanning the filename for known strings like "adv_obj" works, haha, but still.


Radmutant explained nicely what I was rambling about with saved/exported h4d - suggesting it was a mistype, ha! tsk tsk...

If you look at the files first name, it's rather easy to determine their extension:
actor_sequence - spr
adv_actor - spr
adv_object -obj
animation - ani
bitmap_raw - raw
combat_object -obj
game_maps - h4c
layers - lay
____________

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


Honorable
Famous Hero
posted August 24, 2018 12:33 AM
Edited by iliveinabox05 at 21:30, 24 Aug 2018.

Haha right, had a "duh" moment and forgot we know from the name.

Edit. Okay guys, help me get my head on straight. What would you like me to proceed working on?

I've finally started work on making the elevations data editable so y'all can play around with those values and see what happens. I just need to make one of the combo boxes editable so you can try some different values, but other than that, I should have the correct behavior for switching the different elevation data values.

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


Honorable
Famous Hero
posted August 27, 2018 05:37 AM

I got the elevations format and data fields editable, but it seems like we're going to need to figure out what those offsets at the end of the file mean, or at least get some default values to try out based on what they are for various objects with different footprints. Might be easiest to start out looking at the values for objects where the entire footprint is impassable.

After disabling the info at the end of the file, I tried various combinations of the header info, but nothing was different, the object was always behind any other object. So that info at the end of the file very likely has something to do with which portions of the image are displayed above / below another object (in addition to somehow asserting a size constraint on the image).

Also, what would y'all like me to work on next? I'm guessing we want .ora support since that would at least alleviate the immediate need to figure out what that data at the end of the file represents.

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


Responsible
Supreme Hero
posted August 27, 2018 07:43 PM

iliveinabox05 said:

Also, what would y'all like me to work on next? I'm guessing we want .ora support since that would at least alleviate the immediate need to figure out what that data at the end of the file represents.


For me ora support would be top priority as it will allow us to import/make animated objects. As long as we import it into existing objects we can still have objects appear in front, where as a focus on the end data would still leave us with only still images.

As for the end data, I can post what I have noted so far in patterns either here or in the research tread. I have only written down the similar pattern between adv. objects, but not decoratives (or passable vs blocked). Also I haven't yet tried to edit the 'non pattern' data or compared those with other data found within the object/images (except I vaguely recall the image's frame size is among the end data).

I hope others (Baronus, NimoStar etc) will help us figure out how the end data is read/determined.
____________

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


Honorable
Famous Hero
posted August 28, 2018 05:41 PM

Alrighty, .ora support it is! It probably is the best way to hold animations since gif doesn't support partial transparency, and a folder of png files is, as others have said, pretty much the same thing except it's not zipped.

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


Honorable
Famous Hero
posted September 06, 2018 11:56 PM
Edited by iliveinabox05 at 05:23, 07 Sep 2018.

Just a quick update. I have been able to create a .ora file and open it with gimp, but I believe I need to "crop" each of the layers so that the .png file for each layer is the size of the layer, and not the size of the canvas with the layer in its proper place.

After that, I need to figure out the issue I've been having with parsing the alpha data because this will affect what is exported.

Importing should work fine, since I can correctly use the alpha data there when packing it into H4 format.

Edit. Got it working after using the layer size for the png file of each layer, so next is either working on importing a .ora file or finally figuring out what is going wrong with parsing the alpha data!

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


Responsible
Supreme Hero
posted October 07, 2018 01:29 AM bonus applied by Galaad on 09 Jun 2019.
Edited by Karmakeld at 21:36, 30 Oct 2018.

How footprint data is determined

I want to pick up where I left - looking into the footprint data.
I've compiled a bunch of info, having looked into various ojects. As I've mentioned earlier, there's a lot of similarties but also several variables. I got some of them covered, but if anyone could help look into those variables, I hope we can progress faster

As Radmutant69 posted earlier, the 1st and 5th value tells where the top of the passability info is placed. I'll display an example with the Archery Range. I've also added the position in the parantese along with the objects tile size.
The position seems to be, in most cases, calculated like this 256-(the position/76 = hex value b4/180. And 256 - pos.38 = da/218.
The 3 following ff ff ff or 00 00 00 is the x/y offsets like flag position.

Archery Range (tile size 2x2) (76, 38)
b4 ff ff ff da ff ff ff 04 00 00 00 fe ff fd ff fd ff fe ff



If the position value is higher than 256, like the Alter of Light (3x3), the calculated is a bit longer: 256- pos.359 = -103. 256-103 = Hex value 153. 256- pos.336 = -80. 256-80 = 176
Alter of Lighting footprint:
99 fe ff ff b0 fe ff ff 08 00 00 00 fd ff fd ff fc ff fb ff fc ff fd ff fd ff

I'm not sure what determines the lenght of the code '0x 00 00 00'.
But I know that the 0x 00 00 00 determines how many blocks of code follows. E.g 02 00 00 00 is followed by 2 blocks, like this ff ff | ff ff.


Also noticable is that some Left and Right faced objects like Mines and Veins seems to have reversed footprints, while the Gold vein is an exception.

A few examples for comparison:
----------------
Emerald (1x1) (360, 332)
98 fe ff ff b4 fe ff ff 02 00 00 00 ff ff ff ff
152 254 255 255 180 254 255 255 2 0 0 0 255 255 255 255

Learning Stone (1x1) (345, 325)
a7 fe ff ff bb fe ff ff 03 00 00 00 ff ff ff ff ff ff
167 254 255 255 187 254 255 255 3 0 0 0 255 255 255 255 255 255

Derelict Ship (1x2) (360, 318)
98 fe ff ff c2 fe ff ff 03 00 00 00 fe ff fe ff ff ff
152 254 255 255 194 254 255 255 3 0 0 0 24 255 254 255 255 255

Sanctuary (2x1) (101, 36)
9b ff ff ff dc ff ff ff 06 00 00 00 fe ff fe ff fe ff fe ff ff ff ff ff
155 255 255 255 220 255 255 255 6 0 0 0 254 255 254 255 254 255 254 255 255 255 255 255

Vein.Gem R (2x1) (428, 316)
54 fe ff ff c4 fe ff ff 03 00 00 00 fe ff fe ff ff ff
84 254 255 255 196 254 255 255 196 254 255 255 3 0 0 0 254 255 254 255 255 255

Vein.Gem (1x2) (398, 332)
72 fe ff ff b4 fe ff ff 03 00 00 00 ff ff fe ff fe ff
114 254 255 255 180 254 255 255 3 0 0 0 255 255 254 255 254 255

gold vein R (2x1) (62, 14)
c2 ff ff ff f2 ff ff ff 03 00 00 00 fe ff fe ff ff ff
194 255 255 255 242 255 255 255 3 0 0 0 254 255 254 255 255 255

gold vein (1x2) (32, 15)
e0 ff ff ff f1 ff ff ff 04 00 00 00 ff ff fe ff fe ff fe ff
224 255 255 255 241 255 255 255 4 0 0 0 255 255 254 255 254 255 254 255

Mansion (2x1) (356, 329)
9c fe ff ff b7 fe ff ff 05 00 00 00 fe ff fe ff fe ff ff ff ff ff
156 254 255 255 183 254 255 255 5 0 0 0 254 255 254 255 254 255 255 255 255 255

Vein, Ore R (2x3) (390, 300)
7a fe ff ff d4 fe ff ff 05 00 00 00 fd ff fc ff fc ff fd ff fe ff
122 254 255 255 212 254 255 255 5 0 0 0 253 255 252 255 252 255 253 255 254 255

Vein. Ore (3x2) (331, 299)
b5 fe ff ff d5 fe ff ff 05 00 00 00 fe ff fd ff fc ff fc ff fd ff
181 254 255 255 213 254 255 255 5 0 0 0 254 255 253 255 252 255 252 255 253 255

wood pile (2x3) (329, 333)
b7 fe ff ff b3 fe ff ff 06 00 00 00 fe ff fd ff fc ff fc ff fd ff fd ff
183 254 255 255 179 254 255 255 6 0 0 0 254 255 253 255 252 255 252 255 253 255 253 255

wood pile R (3x2) (361, 351)
98 fe ff ff a1 fe ff ff 06 00 00 00 fd ff fd ff fc ff fc ff fd ff fe ff
151 254 255 255 161 254 255 255 6 0 0 0 253 255 253 255 252 255 252 255 253 255 254 255

Weekly, Windmill (2x2 but is really 2x1) (94, 101)
a2 ff ff ff 9b ff ff ff 05 00 00 00 fe ff fd ff fd ff fe ff fe ff
162 255 255 255 155 255 255 255 5 0 0 0 254 255 253 255 253 255 254 255 254 255

woodcutters cottage (2x2) (80, 73)
b0 ff ff ff b7 ff ff ff 04 00 00 00 fe ff fd ff fd ff fe ff
176 255 255 255 183 255 255 255 4 0 0 0 254 255 253 255 253 255 254 255

halfling burrow (2x2) (56, 5)
c8 ff ff ff fb ff ff ff 04 00 00 00 fe ff fd ff fd ff fe ff
200 255 255 255 251 255 255 255 4 0 0 0 254 255 253 255 253 255 254 255

Kennels (2x2) (69, 53)
bb ff ff ff cb ff ff ff 04 00 00 00 fe ff fd ff fd ff fe ff
200 255 255 255 251 255 255 255 4 0 0 0 254 255 253 255 253 255 254 255

archery range (2x2) (76, 38)
b4 ff ff ff da ff ff ff 04 00 00 00 fe ff fd ff fd ff fe ff
180 255 255 255 218 255 255 255 4 0 0 0 254 255 253 255 253 255 254 255

dwarven mines (2x2) (66, 28)
be ff ff ff e4 ff ff ff 05 00 00 00 fe ff fd ff fd ff fe ff fe ff
190 255 255 255 228 255 255 255 5 0 0 0 254 255 253 255 253 255 254 255 254 255

Mage tower (2x2) (91, 136)
a5 ff ff ff 78 ff ff ff 06 00 00 00 fe ff fe ff fd ff fd ff fe ff fe ff
165 255 255 255 120 255 255 255 6 0 0 0 254 255 254 255 253 255 253 255 254 255 254 255

mage guild.chaos (2x2) (71, 71)
b9 ff ff ff b9 ff ff ff 04 00 00 00 fe ff fd ff fd ff fe ff
185 255 255 255 185 255 255 255 4 0 0 0 254 255 253 255 253 255 254 255

red dwarf mine (2x3) (79, 16)
b1 ff ff ff f0 ff ff ff 05 00 00 00 fd ff fc ff fc ff fd ff fe ff
177 255 255 255 240 255 255 255 5 0 0 0 253 255 252 255 252 255 253 255 254 255

Evil Toll Gate (3x1) (304, 314)
d0 fe ff ff c6 fe ff ff 06 00 00 00 ff ff ff ff ff ff fd ff fd ff fd ff
208 254 255 255 198 254 255 255 6 0 0 0 255 255 255 255 255 255 253 255 253 255 253 255

Alter of Light (3x3) (1st 256-359 = -103. Value is 153. 153 + 103 = 256.) 5th 256-336 = -80. value is 176. 176+80 =

256.)
99 fe ff ff b0 fe ff ff 08 00 00 00 fd ff fd ff fc ff fb ff fc ff fd ff fd ff
153 254 255 255 176 254 255 255 8 0 0 0 253 255 253 255 252 255 251 255 251 255 252 255 253 255 253 255

Golden pavilion (3x3) (111, 18)
91 ff ff ff ee ff ff ff 08 00 00 00 fd ff fd ff fc ff fb ff fb ff fc ff fd ff fd ff
145 255 255 255 238 255 255 255 8 0 0 0 253 255 253 255 252 255 251 255 251 255 252 255 253 255 253 255

Ward Sorcery (3x3) (173, 167)
53 ff ff ff 59 ff ff ff 06 00 00 00 fd ff fc ff fb ff fb ff fc ff fd ff
83 255 255 255 89 255 255 255 6 0 0 0 253 255 252 255 251 255 251 255 252 255 253 255

Siege Workshop (3x) (111, 112)
91 ff ff ff 90 ff ff ff 08 00 00 00 fd ff fd ff fc ff fb ff fb ff fc ff fd ff fd ff
145 255 255 255 144 255 255 255 8 0 0 0 253 255 253 255 252 255 251 255 251 255 252 255 253 255 253 255

alter of wishes (3x3) (147, 86)
6d ff ff ff aa ff ff ff 06 00 00 00 fd ff fc ff fb ff fb ff fc ff fd ff
109 255 255 255 170 255 255 255 6 0 0 0 253 255 252 255 251 255 251 255 252 255 253 255

Funeral Pyre (3x3) (195, 192)
3d ff ff ff 40 ff ff ff 06 00 00 00 fd ff fc ff fb ff fb ff fc ff fd ff
61 255 255 25 64 255 255 255 6 0 0 0 253 255 252 255 251 255 251 255 252 255 253 255

DRAGON CAVE (3x3) (159, 136)
61 ff ff ff 78 ff ff ff 07 00 00 00 fd ff fc ff fb ff fb ff fc ff fd ff fd ff
97 255 255 255 120 255 255 255 7 0 0 0 253 255 252 255 251 255 251 255 252 255 253 255 253 255

Ice Gate (3x3) (120, 76)
88 ff ff ff b4 ff ff ff 06 00 00 00 fd ff fc ff fb ff fb ff fc ff fd ff
136 255 255 255 180 255 255 255 6 0 0 0 253 255 252 255 251 255 251 255 252 255 253 255

Cliff Nest (3x3) (355, 291)
9d fe ff ff dd fe ff ff 09 00 00 00 fd ff fd ff fc ff fb ff fb ff fc ff fd ff fd ff fd ff
157 254 255 255 221 254 255 255 9 0 0 0 253 255 253 255 252 255 251 255 251 255 252 255 253 255 253 255 253 255

DRAGON CITY (4x4) (172, 128)
54 ff ff ff 80 ff ff ff 08 00 00 00 fc ff fb ff fa ff f9 ff f9 ff fa ff fb ff fc ff
84 255 255 255 128 255 255 255 8 0 0 0 252 255 251 255 250 255 249 255 249 255 250 255 251 255 252 255

Academy, Castle (6x6) (202, 33)
36 ff ff ff df ff ff ff 0c 00 00 00 fa ff f9 ff f8 ff f7 f6 ff f5 ff f5 ff f6 ff f7 ff f8 ff f9 ff fa ff
84 255 255 255 128 255 255 255 8 0 0 0 252 255 251 255 250 255 249 255 249 255 250 255 251 255 252 255

Dark Castle/Hexis' Garrison (6x6) (371, 266)
8d fe ff ff f6 fe ff ff 09 00 00 00 fa ff f9 ff f8 ff f7 ff f7 ff f8 ff f9 ff fa ff fb ff
141 254 255 255 246 254 255 255 9 0 0 0 250 255 249 255 248 255 247 255 247 255 248 255 249 255 250 255 251 255
------------------------------------------------------------
Mountains.grass.04 (4x3) (410, 280)
66 fe ff ff 8e fe ff ff 05 00 00 00 fb ff fb ff fb ff fb ff fc ff
102 254 255 255 232 254 255 255 5 0 0 0 251 255 251 255 251 255 251 255 252 255

Mountains.grass.06 (4x4) (375, 127)
89 fe ff ff f1 fe ff ff 08 00 00 00 fc ff fb ff fb ff fb ff fb ff fb ff fb ff fc ff
137 254 255 255 241 254 255 255 8 0 0 0 252 255 251 255 251 255 251 255 251 255 251 255 251 255 252 255

mountains.grass.37 (6x5) (357, 238)
9b fe ff ff 12 ff ff ff 09 00 00 00 f9 ff f8 ff f8 ff f9 ff f9 ff f8 ff f8 ff f9 ff fa ff
155 254 255 255 18 255 255 255 9 0 0 0 249 255 248 255 248 255 249 255 249 255 248 255 248 255 249 255 250 255

rocks.sand.18 (1x1 passable) (9, -12)
f7 ff ff ff 0c 00 00 00 02 00 00 00 ff ff ff ff
247 255 255 255 12 0 0 0 2 0 0 0 255 255 255 255

rocks.sand.26 (2x2) (362, 323)
96 fe ff ff bd fe ff ff 04 00 00 00 fe ff fd ff fd ff fe ff
150 254 255 255 189 254 255 255 4 0 0 0 254 255 253 255 253 255 254 255

iceberg.10 (7x7) (361, 261)
97 fe ff ff fb fe ff ff 0a 00 00 00 fa ff fa ff f9 ff f9 ff fa ff fa ff f9 ff f9 ff fa ff fa ff
151 254 255 255 251 254 255 255 10 0 0 0 250 255 250 255 249 255 249 255 250 255 250 255 249 255 249 255 250 255 250

255

iceberg.12 (7x7) (345, 252)
7a fe ff ff 04 ff ff ff 0b 00 00 00 fa ff fa ff f9 ff f9 ff f9 ff f9 ff f9 ff f9 ff fa ff fa ff fa ff
167 254 255 255 4 255 255 255 11 0 0 0 250 255 250 255 249 255 249 255 249 255 249 255 249 255 249 255 250 255 250 255

250 255

skeletons.rib cage R (3x1) (422, 345)
5a fe ff ff a7 fe ff ff 04 00 00 00 fd ff fd ff fe ff ff ff
90 254 255 255 167 254 255 255 4 0 0 0 253 255 253 255 254 255 255 255

skeletons.snake (1x1 passable) (27, 0) (horiz/vert. positions is indeed found if one leave out the first 4 bytes - I think I got it wrong at first)
00 01 ff ff e5 ff ff ff 00 00 00 00
(0 1 255 255) 229 255 255 255 0 0 0 0

skeletons.bird (1x1 passable) (38, 3) (horiz/vert. positions IS found in the footprint)
da ff ff ff fd ff ff ff
218 255 255 255 253 255 255 255

skeletons.Dino (1x3 passable) (329, 301)
b7 fe ff ff d3 fe ff ff 05 00 00 00 ff ff ff ff fe ff fd ff fd ff
183 254 255 255 211 254 255 255 5 0 0 0 255 255 255 255 254 255 253 255 253 255

crocodile2 (1x1 impassable) (357, 335)
9b fe ff ff b1 fe ff ff 03 00 00 00 ff ff ff ff ff ff
155 254 255 255 177 254 255 255 3 0 0 0 255 255 255 255 255 255

pig (1x1) (353, 336)
9f fe ff ff b0 fe ff ff 02 00 00 00 ff ff ff ff
159 254 255 255 176 254 255 255 2 0 0 0 255 255 255 255
-------------------------------------------------------
- So how is the lenght of the footprint calculate - the 0x 00 00 00?

- How the is the end footprint determined? What determines wheter it should be fd ff or ff ff or fa ff...?

I will try editing the end of the footprint and see what happens..
____________

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


Honorable
Famous Hero
posted October 08, 2018 05:52 PM

Which info are you talking about exactly? There is the footprint info before the image stuff (part of the header) and then there is the end of file offset stuff we have been looking into.

Maybe post a screen shot of your hex editor with the file open and put a box around the data you're talking about?

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


Responsible
Supreme Hero
posted October 08, 2018 10:37 PM

iliveinabox05 said:
Which info are you talking about exactly? There is the footprint info before the image stuff (part of the header) and then there is the end of file offset stuff we have been looking into.

Maybe post a screen shot of your hex editor with the file open and put a box around the data you're talking about?


Sorry about that. I can post some images, but I felt it was faster with just text with this many examples, but these are the end of the files ones. The very end.

I recall we already got the header footprint covered(?)
____________

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


Honorable
Famous Hero
posted October 08, 2018 11:52 PM

Karmakeld said:
Sorry about that. I can post some images, but I felt it was faster with just text with this many examples, but these are the end of the files ones. The very end.

I recall we already got the header footprint covered(?)


Okay the end of file stuff. No need to post more images then

Might also be helpful to pair the numbers the H4 Resource Editor has for them as well. It shows the number for the 2 byte representation as well as two 1 byte numbers for each of the entries at the end of the file. The two 4 byte numbers before that are the offset of the image from the top tip of the footprint.

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


Responsible
Supreme Hero
posted October 09, 2018 12:02 AM
Edited by Karmakeld at 00:13, 09 Oct 2018.

That just got a bit too technical.. could you give an example of those 1 and 2 bytes?
Or will you be pairing them yourself?
I get the 4 bytes being the offset x/y ones.

Edit. Also I should probably post a bunch of impassable objects end code as you suggested.
____________

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


Honorable
Famous Hero
posted October 09, 2018 12:48 AM
Edited by iliveinabox05 at 22:12, 16 Oct 2018.

I just meant that the H4 Resource Editor already displays each of those numbers at the end of the file, but as decimal numbers and not hex. Unless it is just my latest version, the one that you have should display each of those 2 bytes as either one two byte number, or two 1 byte numbers, probably separated by a comma.

I was just saying it might also be useful to look at those decimal numbers instead of the hex numbers. -1 might look a bit more meaningful to people than ff, so others might be able to notice some pattern.

Edit. Just a small update: I finally made some more progress with importing .ora image files. It's taking a little bit longer because I actually had to make some bigger changes to my importing code, since it was just based one importing a single image and we need to be able to import both single images, and multiple images (layers), and they should all be handled in the same way.

I did, however, make some good progress this weekend so we should be able to import .ora files reasonably soon.

I am probably going to suspend the resizing options for the moment, since resizing images like .ora files require more than just resizing each of the individual layers (I also need to update the x / y values accordingly).

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


Responsible
Supreme Hero
posted October 17, 2018 06:52 PM

iliveinabox05 said:

I did, however, make some good progress this weekend so we should be able to import .ora files reasonably soon.

I am probably going to suspend the resizing options for the moment, since resizing images like .ora files require more than just resizing each of the individual layers (I also need to update the x / y values accordingly).


Mate if you complete this or atleast release an update with the ora/animation feature in 2018, I'll be one happy man
____________

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


Honorable
Famous Hero
posted October 17, 2018 07:00 PM

Karmakeld said:
Mate if you complete this or atleast release an update with the ora/animation feature in 2018, I'll be one happy man


The chances that I finish and release the update with the ability to read in .ora files in 2018 (minus the resizing) is pretty much 100% so you should be happy, haha

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


Honorable
Famous Hero
posted October 30, 2018 07:39 PM

Next update: I have imported in a .ora file that Namerutan's program exported, to an object and it was (mostly) successful at least as far as my program is concerned. I haven't yet tested dropping the object on a map for use because right now the shadows didn't seem to make it in, so I'll have to take a look at that but it should be a simple bug to find / fix.

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


Responsible
Supreme Hero
posted October 31, 2018 10:44 PM

Karmakeld said:

- So how is the lenght of the footprint calculated - the 0x 00 00 00?

- How the is the end footprint determined? What determines wheter it should be fd ff or ff ff or fa ff...?

I will try editing the end of the footprint and see what happens..


I have updated the footprints with decimal codes.

As for how the lenght is determined, I believe the following to be true:
It's NOT based on the amount of Frames or Pictures in the object/animation.
It's NOT based on the FootPrint size (in tiles) - alone.
It's NOT based on the overall canvas size (in pixels).
It's NOT based on the file size (in KB).
It's NOT based on wheter the object is passable or impassable.
It's NOT based on major object types.

I have found the following similarities within groups:
Power Ups and Misc objects like Redwood Tree and Quest Guard Water (all 1x1) all consists of only 255 end code. Ice Spire (2x2) has another end code, so it isn't linked with objects major type.

02 byte objects all share the same end code = 2x 255 255

(Most) Right/Left objects seem to have reversed order of end code (Castles seem to be an exception). Look at the 2 Gem Veins for example. Though when we mirrored our objects, this rule didn't seem important, as they original end code of the object was used.

03's: All Right facing objects share the same 254 255 254 255 255 255 code. South faced objects/non directional objects seems to have just 3x 255 255 code (see Learning Stone and Crocodile2).

04's Rocks.Sand26 share the same code as some 2x2 Dwellings as well as Woodcutters Cottage and Mage Guild Chaos (all share the size 2x2).

05's Windmill and Dwarven Mines share the same code (both 2x2).

06's All 3x3 Dwellings share the same end code. 2x2 Dwelling has another.

08's All 3x3 Dwellings share the same end code.

The largest end code byte length found is the Castles (6x6) with 12 byte end. Larger objects like Icebergs with 7x7 size has up to 11 byte code.

CONCLUSION:
I had a theory that the size of the largest frame (within the object) might determine the lenght of the end code. There are some indications, as larger objects generally has longer end codes. This could also explaing why the Tree of Knowledge (1x1 size object) has a 07 byte end code. But at the same time, I haven't been able to conclude at what size the end code would switch. Infact rather it seem to overlap some sizes. Having just looked at the 2 Skeletons.Dragon + R, I can rule this out. One has a 5 byte code the other a 6 byte. They're almost idenical in frame size - 147, 74 vs. 147, 73. Shadow being only 5 pixels wider.
Within byte groups like e.g 02 or 06, it appears that footprint/tile size determines some of the code, but I still have no clue what determines the lenght. I'll have to test if the end code can be switched as long as it keeps it lenght and also if the lenght can be changed.
____________

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

Page compiled in 0.1094 seconds