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»
iliveinabox05
iliveinabox05


Honorable
Famous Hero
posted March 22, 2018 02:04 AM bonus applied by Galaad on 09 Jun 2019.
Edited by iliveinabox05 at 16:40, 22 Mar 2018.

Here are the results of my testing. I edited the mountain object like so:



And importing it into the campaign editor and dropping it onto the map yielded the following:



So passability is editable by my tool

Edit: I've started getting interactivity coded and will see about getting that displayed soon.

Also, I updated the passable areas to be green and I've made the grid lines thicker so that they are more visible.

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


Responsible
Supreme Hero
posted March 22, 2018 11:34 PM
Edited by Karmakeld at 23:35, 22 Mar 2018.

So it worked congrats..

When you say interactivety, is that the entrance info? When I asked about passability the other day, what I really wanted to ask about was entrance infos.
Radmutant has succesfully mirrored some, but there are lots of unused ways that entrance info can be coded in. I'm hoping you'll be able to display/edit in new ways as well.

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


Honorable
Famous Hero
posted March 22, 2018 11:37 PM

Karmakeld said:
So it worked congrats..

When you say interactivety, is that the entrance info? When I asked about passability the other day, what I really wanted to ask about was entrance infos.
Radmutant has succesfully mirrored some, but there are lots of unused ways that entrance info can be coded in. I'm hoping you'll be able to display/edit in new ways as well.


Thanks

And yes, I mean the entrance information when I say interactivity. I understand how it is stored in the file and how to read it out and display it, but I'm going to have to come up with a process for actually editing it

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


Legendary Hero
posted March 23, 2018 11:05 AM

Fantastic look!
One click to select second to save. And right click to remove. :0)

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


Honorable
Famous Hero
posted March 23, 2018 04:53 PM
Edited by iliveinabox05 at 20:50, 23 Mar 2018.

I believe I am correctly parsing the interactivity (entrance) info. I'll need to test with a few more objects, including the shipyard Namerutan uses in his example, but I think I'm doing it correctly.

There is a case that I don't quite yet understand how to identify programmatically, so there is a little work to do there before I can actually display it correctly.

I'll edit later when I get home to show what I'm talking about.

Edit: Nevermind, I was being silly. Nothing unusual at all about the slightly different case. In fact, it's not even a different case than the example Namerutan used, just looked different.

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


Honorable
Legendary Hero
We don't need another 'eroes
posted March 23, 2018 09:30 PM

wow this is fantastic progress my old pal, you are making these old hardcoded mysteries look easy to solve, all kudos and please keep it up cheers man lol
____________

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


Honorable
Famous Hero
posted March 23, 2018 09:38 PM
Edited by iliveinabox05 at 23:13, 26 Mar 2018.

Haha thanks man To be honest though, it would be much slower going if I didn't have Namerutan's documentation. All I have to do is code that without having to figure out what each byte means, and then code the user interactions

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


Responsible
Supreme Hero
posted March 23, 2018 11:55 PM

Hey Johnny, you can't just come here (almost out of the blue) and praise Derrick for being awsome and stuff. It's not fair . You know, me and Radmutant have been mirroring objects and lighting and shadows and reinserting them into the game. We wanna be praised as well.. for being awsome

Oh well.. Derrick I would like to send you a few edited entrances, just to see if you can read those.

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


Honorable
Famous Hero
posted March 24, 2018 02:41 AM
Edited by iliveinabox05 at 02:51, 24 Mar 2018.

Well, well, well.

I implemented editing of the flag location, and it is indeed two integers for the x and y offset in pixels from the center of the object.  See below First I edit the flag x and y offsets (top right corner of the tool).



Click the "Update" button and then file -> save, then move the file to the data folder. Then have a look at the unmodified sawmill on the left, and then the modified one on the right.



I haven't yet written the code to actually make an object flaggable, but that won't be too difficult

Edit: Made things easier so that you are viewing / entering decimal numbers instead of hex for the flag x and y offsets

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


Responsible
Supreme Hero
posted March 24, 2018 10:55 AM
Edited by Karmakeld at 11:00, 24 Mar 2018.

Great. Oh it just so happens that we're in need of just that option as of right now, so err... I wouldn't mind being a testsubject

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


Responsible
Supreme Hero
posted March 24, 2018 10:15 PM

iliveinabox05 said:

Edit: we can discuss features we would like to see for this tool once the image info data lengths are solved


Just sharing some of my wishes for features for the ResourceEditor.

- Beside the ability to easily edit passability and entrance info, it would be nice to be able to edit/move passability placement based on object placement - I'm wondering if you would be able to display objects in isometric view (similar to Reshelper)? That would make it easier to align new objects with passability info.
I support using red for impassable, yellow for entrance and green for passable. Also grid display is nice.

- Possibility to edit an objects type, e.g from Dwelling or Creature to Quest Hut or Interactive object to Decorative.
Dropdown menu would likely be a good solution. Your current Major, Minor and Sub type gives a good overview.

- Ability to decide/edit if object should always appears infront of others or in the back.

- The ability to import new images (ora format?) and then setup type, passability etc. and save them as new objects.

- possibility of editing objects animation speed.
____________

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


Honorable
Famous Hero
posted March 25, 2018 12:00 AM

Karmakeld said:

- Beside the ability to easily edit passability and entrance info, it would be nice to be able to edit/move passability placement based on object placement - I'm wondering if you would be able to display objects in isometric view (similar to Reshelper)? That would make it easier to align new objects with passability info.
I support using red for impassable, yellow for entrance and green for passable. Also grid display is nice.



I'm not sure what you mean by move passability placement. I think the only thing we can move is the actual image, but if y'all have some more info here please let me know!

The passability info is for the area of the entire footprint: rows * columns. Decorative objects don't necessarily have the entire footprint as impassable as pretty much all of the interactive objects do, but that doesn't mean the interactive objects can't be setup in such a way as to have part of the foot print passable (objects you can walk past / through).

As far as the isometric view goes, I think I just need to shorten the square diagonal heights / make them wider to give that effect. Then, once we solve the issue with the image data lengths, we can draw the image, then overlay the passability, grid, and entrance info in that order.

Karmakeld said:

- Possibility to edit an objects type, e.g from Dwelling or Creature to Quest Hut or Interactive object to Decorative.
Dropdown menu would likely be a good solution. Your current Major, Minor and Sub type gives a good overview.



Should be pretty simple. I've already documented and coded the majority of the types and codes from my work with the H4MG.

Karmakeld said:

- Ability to decide/edit if object should always appears infront of others or in the back.



Need more info on this. Is there a particular field that decides this?

Karmakeld said:

- The ability to import new images (ora format?) and then setup type, passability etc. and save them as new objects.



May be able to do more than ora once I get there but we'll see. Might be able to import multiple jpegs or other formats to use as the layers since Java has built in support to read in jpegs and other highly used formats straight into its BufferedImage class, which is what I will be using.

Karmakeld said:

- possibility of editing objects animation speed.



I'm not sure where this field is for adventure objects, such as the windmill, but it will be editable for the sprites that are animations.

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


Honorable
Famous Hero
posted March 25, 2018 08:37 AM

I have displaying of the entrance info working at least for one object. I'll test more when I wake up and get some screen shots posted.

Then it's time to edit

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


Responsible
Supreme Hero
posted March 25, 2018 05:46 PM

iliveinabox05 said:
Karmakeld said:

- Beside the ability to easily edit passability and entrance info, it would be nice to be able to edit/move passability placement based on object placement - I'm wondering if you would be able to display objects in isometric view (similar to Reshelper)? That would make it easier to align new objects with passability info.
I support using red for impassable, yellow for entrance and green for passable. Also grid display is nice.



I'm not sure what you mean by move passability placement. I think the only thing we can move is the actual image, but if y'all have some more info here please let me know!

The passability info is for the area of the entire footprint: rows * columns. Decorative objects don't necessarily have the entire footprint as impassable as pretty much all of the interactive objects do, but that doesn't mean the interactive objects can't be setup in such a way as to have part of the foot print passable (objects you can walk past / through).



Look at the two images of the teleporter here. But I think my describtion was bad, so it should've been move image to entrance/passability info.
Radmutant describes what bytes to change. For further info we should call him to the witness stand..

iliveinabox05 said:
Karmakeld said:

- Possibility to edit an objects type, e.g from Dwelling or Creature to Quest Hut or Interactive object to Decorative.
Dropdown menu would likely be a good solution. Your current Major, Minor and Sub type gives a good overview.



Should be pretty simple. I've already documented and coded the majority of the types and codes from my work with the H4MG.



I've encountered a few obstacles along the way, when I've been changing types, that weren't just a matter of chaning just the type, but torough testing should be able to iron out those.

iliveinabox05 said:
Karmakeld said:

- Ability to decide/edit if object should always appears infront of others or in the back.



Need more info on this. Is there a particular field that decides this?



I believe Radmutant found the part that determines this, so he's the one to answer this.

iliveinabox05 said:
Karmakeld said:

- The ability to import new images (ora format?) and then setup type, passability etc. and save them as new objects.



May be able to do more than ora once I get there but we'll see. Might be able to import multiple jpegs or other formats to use as the layers since Java has built in support to read in jpegs and other highly used formats straight into its BufferedImage class, which is what I will be using.



That would be neat, just didn't wanna come off greedy

iliveinabox05 said:
Karmakeld said:

- possibility of editing objects animation speed.



I'm not sure where this field is for adventure objects, such as the windmill, but it will be editable for the sprites that are animations.


The 3rd byte in adv. objects changes animation speed. I've just did some more tests and it definitely changes it. Try changing the Windmill's code from 6 to something else and you can see the change.

I'm just looking through various objects and my conclusion after checking and matching is this: hex code 0a/10 = 100 (stills are always 100), 9 = 111. 8 = 125. 7 = 142. Hex code 6 = speed 166. Hex 5 = speed 200. 4 = 250. 3 = 333. Speed is defined in ResHelper, not sure how though.

There are a few other speeds found under Animation->spell, adventure->magic resistance has speed 90. Health boost has speed 83, plague speed 76, Dragon Strenght has speed 71, Devour has speed 66. I'm not sure where info is read here though.

iliveinabox05 said:

I'll test more when I wake up and get some screen shots posted.



You're pretty good at writing in your sleep I must say
____________

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


Promising
Known Hero
posted March 25, 2018 09:16 PM
Edited by radmutant69 at 22:27, 25 Mar 2018.

iliveinabox05 said:
Karmakeld said:

- Ability to decide/edit if object should always appears infront of others or in the back.



Need more info on this. Is there a particular field that decides this?



Karmakeld said:

I believe Radmutant found the part that determines this, so he's the one to answer this.


I think this is what Namerutan called as 'elevation' or something like that in his notes.
In normal objects it's 00 02 (or simply 02?):



Most of the objects are this kind of 'normal object'. These have the ability to appear either in front or in back of other normal objects.

But there are some 'background only' objects like the infamous Snake Skeleton. These have 01 01 instead of the 02:



These can only appear in back of other objects (well, unless if you put them onto another background object i guess).
Also you can import any images into this kind of object, even if the image is way bigger than the object's original image. Normal objects are accept only images of the same size of their original, or smaller ones.

You can make background object from any normal object by simply change the 00 02 to 01 01 but you can't do the opposite because that will causing crash (although it's not really impossible, once I managed to make a likely normal object from a background one somehow with the help of Namerutan's notes but I lost it with my other projects so I don't know how I did it... )

Also some edited objects have a strange behavior to always appear in front of other objects but I don't know what causes this.

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


Honorable
Famous Hero
posted March 26, 2018 02:09 AM

Here is displaying of the entrance info on the H4 Resource Editor.



and



Now onto editing this information

Also, I have confirmed your finding with the water wheel that the third byte is most definitely for animation speed.

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


Honorable
Famous Hero
posted March 26, 2018 04:51 AM bonus applied by Galaad on 09 Jun 2019.
Edited by iliveinabox05 at 04:59, 26 Mar 2018.

Anddddddd, the entrance info is editable See below.



And then when viewing in the editor:




Edit: Ah the "elevations format" which consists of two bytes (or 1 Short). Radmutant, shift your blue rectangle in your images one byte to the right. The byte before the elevations format tells you if there are those extra Short numbers at the end of the file, but 1 means they aren't there and 0 means they are.

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


Promising
Known Hero
posted March 26, 2018 12:14 PM

iliveinabox05 said:

Edit: Ah the "elevations format" which consists of two bytes (or 1 Short). Radmutant, shift your blue rectangle in your images one byte to the right. The byte before the elevations format tells you if there are those extra Short numbers at the end of the file, but 1 means they aren't there and 0 means they are.


Yeah, I should but...

1. You asked for the bytes which affect the objects' appearance in front/back and these two are those (at least according to my experiments).

2. These two things (elevation format and the short numbers at the end of file) seems to linked somehow.
In normal objects with 00 02 here, there are always short numbers at the end while in the original background objects (with 01 01) there isn't. Strangely you can set these bytes to 0101 in any object BTW, no matter if they have the short numbers, that won't causing crash.

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


Honorable
Famous Hero
posted March 26, 2018 05:13 PM
Edited by iliveinabox05 at 19:55, 26 Mar 2018.

Oh okay, understood. You're saying it's possible the info at the end of the file has something to do with it in addition to the elevations format 2 bytes.

The info at the end of the file is present if the byte before the elevations format is 0, regardless of what the elevations format is. So, whether the elevations format is 01 or 02, you can change the byte before that independently (at least that's what the documentation says, but I'll have to actually test that).

Note, if the first byte is 01 and you change it to 00, I would expect the game to crash if you don't add the extra data at the end of the file.

Edit: it was just confusing for me to see 2 fields grouped together as one.

Edit2: Forgot to mention that an object's animation speed is easily editable now.

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


Promising
Known Hero
posted March 27, 2018 11:08 AM

iliveinabox05 said:
The info at the end of the file is present if the byte before the elevations format is 0, regardless of what the elevations format is. So, whether the elevations format is 01 or 02, you can change the byte before that independently (at least that's what the documentation says, but I'll have to actually test that).


Well I don't know that, probably you are right. But I still think these two things are 'linked somehow' because when I said this:

Quote:
In normal objects with 00 02 here, there are always short numbers at the end while in the original background objects (with 01 01) there isn't.


I would saying this: there is NO single object with '01 02' or '00 01' in these fields in the game and I think it must have a purpose.

But this is a typical 'I think' thing, so I'm not really sure about this

 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.0757 seconds