|
Thread: Researching how to add new objects | This thread is pages long: 1 2 3 4 5 6 7 8 9 10 11 · «PREV / NEXT» |
|
radmutant69
Promising
Known Hero
|
posted July 15, 2017 11:10 AM |
|
|
Of course I can't flag hills and grass but they are now creature dwellings and I still can't add them the flag. I dont know why, since before these stuff I could add flag to any changed objects.
Well, I extracted the skeletons image with resedit, it's cause I know it's size in pixel. The injected pyramid images are all 82x82.
|
|
Baronus
Legendary Hero
|
posted July 15, 2017 02:55 PM |
|
|
Maybe only artifacts dont works? I have always crash when I add portrait...
I told that GAME DONT REPLACE DWELLINGS! Are sure you really replaced mummy dwelling look? I thik you have terrain object which name is mummy pyramide etc :-) But its not a mummy generator :-)
|
|
radmutant69
Promising
Known Hero
|
posted July 15, 2017 03:07 PM |
|
|
I tested it, and they are working dwellings. I just cannot properly change the code after it's name, cause it's very different from building codes. I can't figure out now, where should I insert the flag data.
|
|
Karmakeld
Responsible
Supreme Hero
|
posted July 15, 2017 03:54 PM |
|
|
Have you compared the modded dwelling with the original in hex editor?
I recall the first part defines the entrance, then you have object type and name. I don't know what part defines the 'flag able', but have you considered comparing a few dwellings and or other flag able objects like towns and mines? If they share the same flag able code, you should be able to find identical parts in all objects.
I've switched images on several objects, without encountering that issue, I would've assumed the dwelling code itself would be sufficient, but it appears not.
Another thing, I take it you've only been able to add single images so far, meaning animations still lies ahead.
|
|
Baronus
Legendary Hero
|
posted July 15, 2017 04:02 PM |
|
Edited by Baronus at 16:04, 15 Jul 2017.
|
Sorry I ask but how you check if you dont flag it? Only way to know it is flag it.
Maybe flag is, but far off. Serch 300 px left down maybe there is flag?
Dwelling type is in header. Rest is only picture. If you changed only picture all is the same.
|
|
radmutant69
Promising
Known Hero
|
posted July 15, 2017 04:08 PM |
|
|
This is the flag code in the file:
The blue marked values are the coordinates of the flag. I just can't properly insert it into such objects like skeletons, rocks or whatever.
Edit: I didn't copypaste it from the original file with the file header, because it caused crash when i did. So I think there should not be any flag without it.
|
|
Baronus
Legendary Hero
|
posted July 15, 2017 04:42 PM |
|
|
If f8 is flag it means 248... Your file has 82 :-) So flag never be visible :-):-):-) Try to change to 28 and 28. If it are coordinantes :-)
|
|
radmutant69
Promising
Known Hero
|
posted July 15, 2017 04:46 PM |
|
|
Well I don't know how it works exactly, but if you copy this code from eg. the efreeti dwelling into the mummy dwelling, the flag will floating in the air at that position where it is on the efreeti dwelling. So these are the 'coordinates', i guess...
Also you can see its effect on the last picture on the previous page. For example that sun temple was a medusa dwelling before the object change, but i copied the flag data from the mage tower to make it on the sun temples top.
|
|
Baronus
Legendary Hero
|
posted July 15, 2017 05:05 PM |
|
|
Its probably from right up corner of def. Ok so change it and look.
|
|
radmutant69
Promising
Known Hero
|
posted July 15, 2017 08:14 PM |
|
|
Eh... It's really hard to find the correct position of the images by handmaking...
|
|
radmutant69
Promising
Known Hero
|
posted July 15, 2017 09:41 PM |
|
|
Karmakeld said: Another thing, I take it you've only been able to add single images so far, meaning animations still lies ahead.
I've tried to make an animated object, but i failed. I don't know, what was the problem, but it looks it's not that easy as the static little objects. Sorry.
I will do some more experimenting with it, but it's a lot of work by hand.
|
|
Karmakeld
Responsible
Supreme Hero
|
posted July 15, 2017 10:09 PM |
|
|
I'm gonna try Baronus' method and then do some attempts with Namerutan's tool (it can be used to change e.g. Splashscreen in a less complicated way). The tool also allows you to view each frame of animation any object consist of and extract them.
I don't know how ResEdit extract the files/images in that regard, single or multiple/compiled pics.
Not sure if this is of any use, but according to Namerutan's tool, the Embalmers Lab contain the following info:
Pictures 2
Size 389x362 (=image position + size).
Footprint 2x2 - Horiz. 328. Vert. 300
Frame pos: 269x269 - size 120x93.
As Baronus also noted, the original flag is placed on 248x236.
Perhaps you can find this useful..??
------
ok, I simply suck at this. Could either of you, post a picture guide please?
ResEdit2, apparently can't open my heroes4.h4r file, when I ask to view photo.
So I extracted the Column2 image with Gimp in bmp format. Converted it to Raw with Irfan.
Comared the two in HexEditor, and can see that the bmp has 7 lines of code, before just ff. Raw is simple ff.
and now I simply feel stuck..
any help please
|
|
radmutant69
Promising
Known Hero
|
posted July 16, 2017 12:24 AM |
|
|
So, let's see what i did:
1. Backup (at least) your new_mod.h4r file.
1. Save your image as a 82x82 sized bmp.
2. Paste it to the Facetool as (for example) Aislinn portrait and save it.
3. Open the new_mod.h4r file what you just made with mh4win or resedit2. Search for the layers.icons.hero.death.82.lay file and extract it.
4. Open this file with a hex editor and search for 'aislinn'.
5. Now scroll up until you find 00 01 01 00 nnnnnn... Mark it or something.
6. Search aislinn again and scroll down to find another 00 01 01 00. Mark the last byte before it and copy it and...
...save it to an empty file.
|
|
radmutant69
Promising
Known Hero
|
posted July 16, 2017 12:26 AM |
|
|
7. Search for aislinn in this new file and change her name...
...to this:
8. Extract the adv_object.Skeletons.Snake.obj file and open it with hex editor. Mark it from this point:
To this point:
9. Replace it with your frame and save the file with another name. And it's done. If you did it correctly, you have a 'new' object, what you can change whatever type you want.
|
|
Karmakeld
Responsible
Supreme Hero
|
posted July 16, 2017 07:04 PM |
|
|
Baronus said: Maybe only artifacts dont works? I have always crash when I add portrait...
Baronus, is that the editor or the game that crashes?
Equlibris managed to add new artifacts/images to those artifacts.
I believe they tried to add even more in v3.55/3.6, but to my knowledge those artifacts crash, if you try to pick them up.
That might be because artifacts require both an adventure image and an inventory image - they're read seperately.
Of course I don't know if this has any connection to your crash, but Equilibris team proved it possible, so we know it can be done, just gotta figure out how.
I'm also quite interested in trying to add mirrored objects (others have requested this aswell years ago.) Dalai told me it's supposedly an easy task to do so, but not a priority. But that would require animations, rather than just single image.
|
|
Karmakeld
Responsible
Supreme Hero
|
posted July 19, 2017 12:01 AM |
|
|
I tried it, but first attempt failed, so I'll try again.
I'm just looking at step 6, where I saved it to a new file. When I compare your screen with mine, my hex code reads 00 01 01 00 ff 00 ff 02 02 02... That doesn't match with yours.. (?!)
In your step 9, where I should replace part of the skeleton.snake with my frame, I asume by frame you mean the entire code I saved, right?
If you could share the part you replace in the Embalmers Lab, it might be easier for me to compare the codes between the files.
|
|
radmutant69
Promising
Known Hero
|
posted July 19, 2017 08:21 AM |
|
|
Currently I have no access to those files but later I will share the codes.
For step 6: all pictures will have different codes after the 00 01 01 00, and some pics even don't start with that (as you can see in the snake skeleton object what starts with FD 00 01 00). Your different code shouldn't cause any problem.
Step 9: yes, I mean the entire saved code. You have to delete everything in the skeleton object from the FD to the 03 (see on pictures) and paste your saved code to that place.
|
|
Baronus
Legendary Hero
|
posted July 19, 2017 08:34 AM |
|
|
And try another def. The best is "Gnoll hut". In this def you have disabled shadow! Def without shadow. So you dont have problem with this. Add shadow to picture and paste to def.
Its not problem with artifact layer. But if you use obj def eg. "gnoll hut" you can replace artifacts too!
|
|
radmutant69
Promising
Known Hero
|
posted July 19, 2017 09:16 AM |
|
|
Wow! Thanks for this info! The only objects what I found without shadow were the lights in Equilibris. But I could not use them, they always caused crashes. I'll try the gnoll hut now.
|
|
Karmakeld
Responsible
Supreme Hero
|
posted July 19, 2017 09:27 AM |
|
|
Thanks for the info both of you, hopefully I'll learn where the images start/end for various images.
I tried with the Aislinn image, and assumed that was the image/code displayed on your pics - that would've made it easier for me to compare . But I'll keep trying.
When saving the new file does it matter if it's saved as .adv_object, .h4d or .layer?
And lastly when youn talk about adding shadows afterwards, have you tried making multiple framed images (animated), Baronus?
|
|
|