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: [Research/Tutorial] Switching Adventure Object images
Thread: [Research/Tutorial] Switching Adventure Object images This thread is 3 pages long: 1 2 3 · «PREV / NEXT»
NimoStar
NimoStar


Responsible
Legendary Hero
Modding the Unmoddable
posted January 03, 2017 12:16 AM

Quote:
I tried to do this too but it seems I made something wrong. I don't know what so I just would like to see your finished work in hex to compare with my bad files.


Your intent is noble. Did you remember to change the name to the artifact you want to use? Did you use an object of the same type as header? I needed to use a treasure (crypt) to change the passability.




This is in fact the only changed part, the selected one (changed from original "altar of wishes") with Magic Lamp data (and then Crypt passability data... these are the first 8 bytes or so, if I correclty remember; but you can check yourself with those three files).

Quote:
I just found out, that Boots of Levitation, actually has an image stored in the h4r files. I found it in equi.h4r -> icons -> artifacts -> armor -> boots of levitation. Maybe you could make an attempt at adding it to the unusable artifact, like you did with the Magic Lamp??


It's added, but there's no code for it. You can actually see it in my map called "All Equiobjects". If you pick up and try to use these boots, the game will crash.
3.55 can use the boots, but I have foregone the use of their .exe because it's incompatible with online multiplayer.
____________
Never changing = never improving

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


Responsible
Supreme Hero
posted January 04, 2017 10:05 PM
Edited by Karmakeld at 02:34, 12 Feb 2017.

Thanks. I might have to re-install 3.55 then.

It would be really great if you or Namerutan could post a tutorial on how to change object types by hex editing a map file. You mentioned this a while ago. Eg. a guide on how to change an interactive object into a decorative one.

The same goes for switching images, like mentioned in this tread. Say I wanted to change a Magic Well (image) into a quest hut (object). Obviously the entrance can't be used from another quest hut, as the Magic Well only takes up a single tile. Can it be done and how?

I'm also curious about some of the objects used in Equi 3.55, like some of the combat objects - eg. dead creatures - that was extracted and used as objects. Would the procedure be to extract the file(s), open them in a map and then hex edit them in the map editor, naming their type to decorative?

If either of you could post some guides, it would give the newcomers something to look at and compare with, when trying to make our own moddings.

UPDATE on feb. 11.
Thank to you NimoStar, I managed to change the looks of the Tome of Death to look like the Tome of Chaos. It will still look like the Tome of Death when you pick it up and view it in your inventory, but this is my first success at modding. Btw. I also figured out how to mod the text files, meaning I got the creature heroes working. Now I guess it's on to doing some attempts of my own..

Well I tried to change the flame of chaos into a decorative object, but with no luck.
Then I tried changing the Magic Well into a quest hut.
Namerutan succesfully changed the Tree of Knowledge into a questhut, so I decided to compared the hex code of the normal Tree of Knowledge, with the Quest hut Tree of Knowledge, and other quest huts.




The Tree of Knowledge contains the same hex code from 74 72 and on. Only the 'Seers_hut' 73 65.. appears before. This code matches all of the quest huts I looked at. So I changed the 'mana_recharger' code from the Mana Well to 'seers_hut'.

.

As it still had the 'arger' in it, I deleted those 5 digits, to match it with the other seers huts.
.

But the game crashes if I try to drag the object onto the objects palette. So can anyone tell me, where I go wrong?

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


Responsible
Legendary Hero
Modding the Unmoddable
posted February 12, 2017 08:32 PM

I congratulate you on the first sucesses.

As for the tree, I can't help much with your last code, because it's not my method.

I can however point out one thing: All seers hut have "seers hut" as part of the filename (including the modified tree of knowledge). It is very much possible this is absolutely necessary.

In other words, you are replacing the magic well (which already is coded) with a seers hut; what you need to do is *copy* the magic well image, and make a *new* seers hut with it (with a "seer's hut.name" standarized format)...

Quote:

I'm also curious about some of the objects used in Equi 3.55, like some of the combat objects - eg. dead creatures - that was extracted and used as objects.


Actual dead creatures have much larger sprites. They extracted the dead creatures, miniaturized them, then added them back as decorative objects (much as the creature quests). Equilibris had a way of importing images yet unknown.

It could be made if Namerutan makes his tool functional, but that hasn't happened :v
____________
Never changing = never improving

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


Responsible
Supreme Hero
posted February 12, 2017 10:31 PM
Edited by Karmakeld at 22:31, 12 Feb 2017.

Perhaps you could share your method? I know you managed to make the Ring of Health a misc artifact.
I appreciate the lead on the magic well. I just looked at Namerutan's Tree of Knowledge quest hut as posted, but if I'm replacing the wrong part.. I'll try your suggestion of copying it instead and will post how it goes. Thank you so far.

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


Responsible
Legendary Hero
Modding the Unmoddable
posted February 13, 2017 02:36 AM

Ring of health as misc artifact is simple table manipulation. Artifact slots are on the artifact table.

Try what I told you, duplicate and change name, then if not, try my method.

Remember that names may have one or two bytes before which have the number of bytes in that string.
That is, do not simply copy "tree of knowledge" in the hexes, also copy one or two previous bytes...

I hope what I am saying is clear enough :v
____________
Never changing = never improving

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


Responsible
Legendary Hero
Modding the Unmoddable
posted February 14, 2017 03:28 AM

Here, this should be much clearer:_


http://s12.postimg.org/mo2qadur1/explain_Untitled.png

The game is expecting a 14 character string, and you are only giving it 9 (because youy removed the extra characters). Thus your crash. (although you may have additional mistakes too)

Change the 0e for 09. What I meant is every time one does changes like this, you have to use the original "signature" (thus, copy the two previous bytes to the name, not the name only.)


____________
Never changing = never improving

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


Responsible
Supreme Hero
posted February 15, 2017 11:39 PM
Edited by Karmakeld at 00:17, 16 Feb 2017.

thank you so much, NimoStar
Changing the number from 0e to 09 did the trick. I now have a Quest hut with the look of a Magic Well working in my editor. And most importantly, I think I understand the reason of why 03 had to be changed to 09. I actually went back to the modding tread and looked at your post about hex code indicating number of letters in the description, but didn't bother to dig deeper myself at that point. Hopefully this means I'll be able to mod more objects on my own.

I do however have an additional question. How come 'tree_of_knowledge' have '11' as it's character string, when it contains 17 letters and not just 11? Is 11 = 17 in hex code or..?

Oh and one more question NimoStar. Do you know if it's possible to reverse the direction of an object by hex editing it? E.g. the red portal always face left, but what if I want it to face right? Dalai once stated it should be fairly easy to do so, but would you know how to?

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


Legendary Hero
posted February 16, 2017 09:23 AM

Nimo tell me name red font you have used in picture. Look good.

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


Responsible
Legendary Hero
Modding the Unmoddable
posted February 16, 2017 09:05 PM

Karmakeld:

Yes, 11(hex) is 17(decimal), because hex uses 0a=10, 0b=11, etc.

You can change Hex Editor Neo to display hexes in decimal, if this is hard to remember.

Also you can fgind base converters both in the program and online.

As for changhing direction, I have no idea how to do that with the code. It is "easy" editing images, but we can't edit images yet.

Baronus, that font is Algerian, it comes with MS default fonts for windows (or it did)... It is fairly overused
____________
Never changing = never improving

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


Legendary Hero
posted February 16, 2017 11:32 PM

Very nice thanks.

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


Responsible
Supreme Hero
posted February 19, 2017 05:14 PM
Edited by Karmakeld at 22:53, 19 Feb 2017.

NimoStar, let's says I want to enlarge the image file, not just the passibility grid of fx. Tree of Knowledge to take up 2x2 tiles instead of just 1x1. Could that be done by hex editing? If so, where do I find the proper info and how do I read them? Thanks in advance.

Another question. I've managed to switch images between the Sword of Swiftness and Frost Hammer, but like your example with the two Tomes, they keep their original name and when you pick them up, the original picture is displayed and it changes back to original in the inventory. Is there any way make sure the changed image, remains changed even when picked up as well as in the inventory?
Say someone wanted to create the illusion of having a Sword of Frost, using the Sword of Swiftness image, but with the properties of the Frost Hammer. I know how to change the name of the artifact in the artifact table, but do you know how one could add it as an extra line in the table, so it would appear as a 'new' artifact instead of just replacing one of the others?

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


Responsible
Legendary Hero
Modding the Unmoddable
posted February 19, 2017 11:57 PM

So, you want the Tree of Knowledge picture to actually look larger?
That's not possible via Hex Editing here to the best of my knowledge; you need to actually change the image with image editing and then re-import it (maybe with Baronus method)

Artifact name:
- Is in artifact table, you need to change it from there. Seach for the keyword "frost hammer" and change the "Name" value, same with the sword.

Artifact inventory picture:
- Is not in the same file. You need to look for the file with the inventory pictures and replace it there. I have not done it.
____________
Never changing = never improving

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


Responsible
Supreme Hero
posted February 20, 2017 05:50 PM
Edited by Karmakeld at 23:38, 21 Feb 2017.

It was just an idea, recalling a discussion you had with Nostradamus about changing the height and width of the Titan. But it makes sense the image file needs to be changed.

As posted, I already know how to change the name, but thanks anyway

Okay. I'll have to look through the different resource files and see if I can find second artifact files. At the moment it seems looks a bit odd it changes back.

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


Responsible
Legendary Hero
Modding the Unmoddable
posted February 21, 2017 06:39 AM

No, it's not odd... because if you notice, the inventory images of artifacts are not the same as their map images (see "Barbarian throwing club" in and out for example)

THis happens with every artifact.

As for where are artifact inventory images stored, I don't know. But it would be logical to be a single file with many "frames" (like spells and portraits).
____________
Never changing = never improving

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


Responsible
Supreme Hero
posted February 22, 2017 01:20 AM
Edited by Karmakeld at 17:41, 26 Feb 2017.

okay I can successfully change dwellings and other adventure objects, which has a description, such a 'dwelling', 'mana recharger', or 'movement modifier' into 'Seer's (Quest) Huts'. But some objects like Prison and Windmill, don't have these object description, and for some reason they don't work when I attempt to change them into quest huts. I believe the reason is 'coz they are missing 2(?) digits between 74 (t) and 08 (w). All the functional quest huts, have 4 digits between 74 (t) and the objects title.
In the original Windmill there are only 3 digits between 64 (d) and 8 which is the length of Windmill. Adding the extra 00 didn't work either. So how can I tell/guess which digit is missing?


I also managed to change the Elemental Dwellings, Altar of Earth into a one way portal entrance. But despite using the hex code of 4 different exit portals, they all lead to the same one, which seems to be the first (green).


I've marked the differences and similarities between the entrance and exit. I've tried the extra 5 digits up to 34 (4) as well as the 4 digits after 34, but those fail to work.
So any idea how I can make them use the different portal entrances/exits?

edit:
NimoStar said:

As for where are artifact inventory images stored, I don't know. But it would be logical to be a single file with many "frames" (like spells and portraits). - Is not in the same file. You need to look for the file with the inventory pictures and replace it there. I have not done it.



I managed to locate the Artifact inventory pictures (Barbarian Throwing Club in this case):
they're located in the heroes.h4r file -> layers -> icons -> artifacts -> weapon.
If you use H4unpacker, they're at location 58,919,269.

Edit: Now next question is, what part of the hex code needs to be replaced?. Never mind >.<. I realize you need to switch the images. Curious to see if Baronus' method can be used to re-pack the images.

I also noticed there are 4 unused 'special artifacts' images. The 4 pieces of the unused 'Legion' artifacts. They look similar to H3 versions - Legs of Legion etc.

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


Responsible
Legendary Hero
Modding the Unmoddable
posted February 28, 2017 11:55 PM

I don't know how you can tell other than by comparing object types.

You could try my method which is just replacing the image of a quest hut with the windmill image.

I don't know how is the method that you are cuyrrently using. You just replace the name of the object and it's type?

Please highlight the parts that you normally replace in the editor and post an image showing them (before and after, with the parts to change/changed selected). Then some help may be possible.

And I could also make objects easier that way :v
____________
Never changing = never improving

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


Responsible
Supreme Hero
posted March 01, 2017 11:18 PM
Edited by Karmakeld at 23:22, 01 Mar 2017.

About the rings, I would find it useful if in time, they could be used both in misc and on hands. I guess that will only come true if we find a way to add new objects.
-----------------
In case others will find it useful, I'll post my reply as a guide to how I hex-edited some of the objects.
Indeed I simply replaced the type of certain objects into another. This method seems to work with most types of objects that have 'main types' and 'sub-types' like Creature_Dwelling -> Siege Workshop, Creature_Bank -> Red Dwarf Mine or Mana_Rechargers -> Magic Well.


However some objects don't 'sub-types', like the Prison, Windmill, Tree of Knowledge and Trading Post. These causes me some frustation in order to get them to work. But I was succesful - atleast with the above. I tried adding the Seer's_Hut type infront of the type (middle picture), but that didn't work. So for these kind of objects, you just need to replace the type.


And the other way around. Here I made an 'evil' Sactuary, with the looks of the Evil Temple quest hut. I simply replaced the Seer's_Hut type with Sanctuary.


I wanted to made an (un)Dead Tree of Knowledge. So I replaced the type 'decorative' with 'tree_of_knowledge'. That worked, but the entrance was impassable, just like the dead tree object. So I copied the entrance from the Tree of Knowledge and replaced that.


The entrance point/passability info are the first numbers before the object type is defined. These info variate in length. I got no clue how to read them, as to know where or how many entrance points there are, but if you wish to replace this part, I suggest you look at the passability info in the editor and find an object that fits your demands. Be sure to copy the entire part of a code that is longer, and if it's shorter, delete remaining numbers. The same goes with type info's. Don't leave behind numbers from the previous type code.

This shows a test. I replaced the Artifact type with Decorative. Now just like I described with the Portals, it appears that all main types are linked to an object, which makes good sense, as it would otherwise mean they were blank. In this case, my Flame of Chaos now appears as a Bird. Passability info was kept, and you can interact with it, but nothing happens. In the middle, I made it impassable. To the right, I kept the original Artifact -> Flame of Chaos, but made it impassable. Right clicking still displays it's properties.


I hope this can be a help to others. Being quite new to Hex Editing myself, I actually don't find it that hard. Playing around and comparing the codes of objects has been quite insightful to me. Be aware that in the case one would use NimoStar's suggested method, one might unwanted replace the entrance/passability info, in which case I find replacing the object type, to be a quicker solution, not having to go back and re-edit the first part.
-----
Concerning the Portals, I believe your method might just be the solution, NimoStar. Just like I found the solution to the Windmill, Prison, Trading Post etc. I believe I can solve this one as well. Hitting the wall at first, was just frustrating.
-------
About new objects I managed to edit the Splashscreen using Namerutan's tool for extraction, but I forgot how I imported it (sigh). Baronus has shared his method and also confirmed he managed to change one of the creature portraits, I believe if either of these methods could be used to edit/import picture, we might have a way to add new objects. Question is, exactly how they're defined/read. I'll have to look at Namerutan's Column.CrystalSphere2 to perhaps get an idea.

Also I'm still hoping to find out how to edit the inventory picture. Any help with this, will be appreciated.

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


Responsible
Legendary Hero
Modding the Unmoddable
posted March 02, 2017 10:40 PM

Quote:
About the rings, I would find it useful if in time, they could be used both in misc and on hands. I guess that will only come true if we find a way to add new objects.


The rings are being discussed in my mod thread, not here :v

However, they are two unrelated problems.

"Where is a thing used" is related to the slots, not to programming new artifact types.

Seeing as all artifacts in H4 can go in a single and just in a single slot (you can't put some swords in the right hand only and others in any of the two hands), it's not that easy to configure special slots.

One would have to see where the slots are in the .exe and edit that. Probably, completely hex. Only people with intimate knowledge of assembly programming  and the H4 exe file structure can do that (just to locate the part, the edit itself is possibly just changing/adding some numbers).

___________________________________________________________

So, you change it to a "seers hut" but they still have the "dwarven mine" subtype? and that works?

Seems interesting, and probably an easier method than mine (replacing the entire image in Hex, much like the superior-flexibility Baronus method developed from mine)

I knew about the passability as I detailed earlier.

However, I didn't know exactly about the "green" part. Image? What do you mean by that?

The whole gigantic chunk of hexes until the end of the file is the actual image and it¿'s anim configuration...

_________________________________

As for the inventory images... you should use my/baronus method. But only a part of the file is the image you want to edit.

Open the file with all the inventory pictures in hex edit.

You will see that there is the name of each artifact codified. After this, there is unidentified code. This must be the image.

Replace this image, easier to try should be another image from the same file.

Note: I have not actually replaced this, I just have seen the files inside.
__________________________________

I HAVE LOCATED THE ANSWER TO YOUR PORTALS QUESTION

You are changing the "34" and only that. But you didn't change the 00/03 difference. I am inclined to think this is the key.

00=portal1
01=portal2
02=portal3
03=portal4
________________________

(I had another thing/method to add, but I just forgot : ( )


____________
Never changing = never improving

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


Responsible
Supreme Hero
posted March 04, 2017 12:54 AM

Yes I just change the main type and keep the subtype, wheter it's Dwarven Mine, Siege Workshop, Mana Well or what ever the sub type is. I can open them as a Quest Hut with the proper Quest Hut properties in the editor and it works in game.

As I wrote,
Karmakeld said:
In case others will find it useful, I'll post my reply as a guide to how I hex-edited some of the objects.
. I wrote it as a guide to others, I didn't intend to point out what you already knew about passability info Nimo

Well I guess it wasn't very accurate, but you stated earlier that
NimoStar said:
1d (29 in decimal)= Lenght of "miscellaneous.Garrison_Evil_R"
this is image
. I don't know how it work if you look at the .aop, but in the case you edit a .h4d I just wanted point out the entire end of the file or the gigantic chunk of hexes as you put it, is actually the image.
-----------
I'll try that. I guess it could work in the case where I'd want to switch images, but not in the case where I'd want to use the 'adventure' look like the Barbarian Throwing Club, as that image isn't found within the inventory image file. I guess I could try and see if it's possible to switch images between the files.
--------------
Actually I didn't change the '34'. What I posted wasn't the original and my edited, but original codes of two different portals. But I think you could be on to something. I just looked at all of them and they indeed go from 00 00 01 00 (31 = 1) to 05 00 01 00 (36 = 6).
I tried to replace the 4 digits after 'entrance' with 05 00 01 00 and that didn't work. Then I tried changing just the 05 right after 65 (the e in 'entrance') and that worked. I now exit through the teal/6th portal. Great I thank you for your help.

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


Legendary Hero
posted March 04, 2017 11:03 AM

Adventure object is not the same like layer. Its more complicated. Its compressed some pictures. Its hexeditable but long long time needed. If layer is regular rectangle you can copy past picture. Easy. But if its another figure it will be much hard. Skill icons eg. are rectangles and easy to mod. You must change palette and picture. Pallete extract from tiff, picture from raw and copy past. You must find pallete (on begin) and picture on end. I wrote about in def making guide. Easiest is eg. changing for one color adv object. Eg al squire white as ghost. It needs editing manualy all frames to white. Long work and small effect.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Jump To: « Prev Thread . . . Next Thread » This thread is 3 pages long: 1 2 3 · «PREV / NEXT»
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.1200 seconds