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: Researching how to add new objects
Thread: Researching how to add new objects This thread is 11 pages long: 1 2 3 4 5 6 7 8 9 10 11 · «PREV / NEXT»
Karmakeld
Karmakeld


Responsible
Supreme Hero
posted July 19, 2017 09:38 AM

Baronus said:
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!


So what happens if you try to pick up any of your replaced artifacts?
If you attempt to use e.g Boots of Levitation, which aren't programmed, game crashes.
Or perhaps you just replaced the image and didn't add it as new?
If you simply change the image, I find that they change back to original in the inventory screen.

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


Promising
Known Hero
posted July 19, 2017 09:56 AM
Edited by radmutant69 at 10:02, 19 Jul 2017.

Karmakeld said:
When saving the new file does it matter if it's saved as .adv_object, .h4d or .layer?


The filename should be adv_object.object type.(subtype if have).object name.h4d if you want ot use it unpacked. I think.

Layer files have another type of header. I cannot edit most of them yet. BTW you can use the created object also as town/spell/whatever animation if you delete the object's header to 02 00 00 01 01 00 etc. But that usually don't looks good, and in town it's constantly 'blinking'. I'm still trying to work around it.

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


Legendary Hero
posted July 19, 2017 09:57 AM

Ive replaced succesfully adventure artifact chain mail using adventure object eg. gnoll hut beacuse copy paste to artifact def gived crash. But all is ok.In equipment its still old layer. It must be changed too... You must add new artifact in txt.table I think but still may be crash because function must be codded. No function.

I try only hero adventure animation and it works but shadow and flag is 300 px right down. This way is possible only if you know how to change flag and unit area position. Shadow position is in def but I still dont know where is flag and area coded. But I see that animation is possible.

Picture begins ff ff ff ff 02000101
02 is begin. BEWARE because you have 2 times it 02000101 its the second.
and ends too 0200 etc where is shadow. See gnoll hut its easy and short shadow 0100 not 0200... shadow 1... etc

Must be h4d if unpacked...

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


Responsible
Supreme Hero
posted July 19, 2017 10:29 AM

If you got Namerutan's tool, try opening the hero animation (if possible - it reads most but not all images yet). It can show you the image sizes and positions, else tell which hero and I can look for it. The flag position isn't displayed though, but didn't Radmutant post that earlier?

Regarding artifacts, you may be able to edit it in the artifacts.txt file, but alternatively you need to replace the inventory image. They're read from two separate places.

Have either of you attempted to insert an additional hero image yet? Alternatively one could attempt to make the game read the Hexis images in the death heroes layer, that might help understand if/how new heroes can be added.

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


Promising
Known Hero
posted July 19, 2017 10:35 AM
Edited by radmutant69 at 10:35, 19 Jul 2017.

I think that you cannot add a new hero without editing the exe. It's because they have a keyword list like creatures and almost everything else in the game.

In my opinion the only way to do that is replacing one of the 'generic' heroes but I never tried it.

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


Legendary Hero
posted July 19, 2017 11:29 AM

You can add new hero look very easy:
creature hero
Start skill editing you can do in exe file (Ive wrotten it) and random generating in txt file.
Additional hero portraits in face tool 95 are possible to do.
I think that hero flag and area maybe are central codded for all because are not it in def like in buildings. But rather not, where is data flag for units all in another place? Dont know it still.

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


Responsible
Supreme Hero
posted July 19, 2017 11:38 AM
Edited by Karmakeld at 13:02, 19 Jul 2017.

Yeah I have been thinking that the generic heroes might be the best start out. Equilibris also replaced unused artifacts, so that seems easier than adding new lines of text - I tried to with the TxtEdit, but couldn't add any lines, haven't tried hex editing the txt files though.
I haven't yet looked at the exe file, but that's why I figured if anyone could activate Hexis' portrait, it would he a start, as the image is already packed, just unused.

I know about the creature heroes, but I hope to add new hero portraits, not replacing them. Changing the looks of heroes is a different story.

EDIT: WUHU!!! Thank you so much Radmutant, it finally worked, I found I hadn't replaced fd and 03 in the snake object. I'll have to try the Gnoll Hut and next Namerutan's tool, as it's somewhat limiting only being able to add 82x82 images. Also my image isn't centered in the tile, but I guess that's linked to where it's placed in the image itself. But still awsome

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


Legendary Hero
posted July 19, 2017 01:01 PM
Edited by Baronus at 13:04, 19 Jul 2017.

Facetool 95 add NEW!? I always read you can add new. It generate new table with new hero. I think you must add new line with name. You have txtedit option...

You can do it great :-) But shadow is far far of and flag, search it 300 px down right. So try with gnoll hut without shadow.

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


Responsible
Supreme Hero
posted July 19, 2017 01:15 PM

My PC won't run FaceKit 95, so I can't test that program, I have to use the Equi FaceTool only. I'll try heroes portraits later on, but right now I need to play some more with just adding images and understanding their placement etc.

A long time dream of adding a Column with a Flame of Chaos on top it, was succesful. But I had to downsize it to 82x82, which looks oddly small compared to the original Column. I'll try it using the Gnoll hut as a base next time, as well as moving the placement of my image. Right now it's centered, in the editor it's placed between two tiles. Namerutan added a Column with a Viewing Crytal on top, meaning it's larger than the original Columns, so larger images can be added.

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


Legendary Hero
posted July 19, 2017 01:33 PM

I can announcing new succes. Ive added layer as adventure object!
Layer is rectangle and its simply indexed raw. You can do it with gimp and irfan and copy paste!
Extract using resedit2 bigger layer as bmp paste your picture, convert to raw and copy raw to layer in the same place.
picture begins after 00 ends the same 02 0011... etc size is alwas height x width eg 80 x 200 = 16000. You must calculate it ad do it correctly.
Next paste layer as you done with portrait!
Yes bigger can be added you must use bigger rectangle layer.

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


Promising
Known Hero
posted July 20, 2017 08:38 AM

Baronus, how do you make an 'indexed raw'? I've experimented a lot with raw pics but I only made crashes and blank white nopes. I just can't figure out how it works.

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


Legendary Hero
posted July 20, 2017 09:08 AM
Edited by Baronus at 09:09, 20 Jul 2017.

Easy. Make indexed bmp by gimp and open it in irfan. Convert to raw gbr. And you have it! Train in campaign splashscreens. Are always the same size rectangle so you can calculate. 426 x 313 = 133338 bytes or something like that. Extract in resedit2. Begin from down. All it is raw. Replace 133338 bytes by paste your raw. WITHOUT 000000!!! Irfan gives header 00000 cut it! Only 133338! You must know how to edit easiest camp screen because another defs are more complicated.
But def size is saved in def. You must paste the same size. Extract picture from layer. Size data is after layer name eg. Anium next 0000 and 52 and 52 = 82 x 82 px 6724 px/bytes is portrait size. See it and find in def 6724 px raw . Your rectangle must be the same as layer size! Always see size. If your def is wrong size is another than before you paste. Calculation from down is easiest. See last hero or last unit avatar and calculate 6724. You will know where is raw.

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


Responsible
Supreme Hero
posted July 20, 2017 05:20 PM
Edited by Karmakeld at 17:29, 20 Jul 2017.

Baronus said:
Easy. Make indexed bmp by gimp and open it in irfan. Convert to raw gbr. And you have it! Train in campaign splashscreens. Are always the same size rectangle so you can calculate. 426 x 313 = 133338 bytes or something like that. Extract in resedit2. Begin from down. All it is raw. Replace 133338 bytes by paste your raw. WITHOUT 000000!!! Irfan gives header 00000 cut it! Only 133338! You must know how to edit easiest camp screen because another defs are more complicated.
But def size is saved in def. You must paste the same size. Extract picture from layer. Size data is after layer name eg. Anium next 0000 and 52 and 52 = 82 x 82 px 6724 px/bytes is portrait size. See it and find in def 6724 px raw . Your rectangle must be the same as layer size! Always see size. If your def is wrong size is another than before you paste. Calculation from down is easiest. See last hero or last unit avatar and calculate 6724. You will know where is raw.


In Irfan I only get the option of saving it as (Color Option for BPP images) RGB or BGR.
Interleaved (RGB RGB) ...or Planar (RRR... GGG... BBB..)
Not GBR.
When I open a saved Raw image, it's all messed up, with blurred lines and/or messed up colors.

When exporting it in Gimp, I have the advanced options of:
Compatibility Options - Do not write color space information (check/uncheck)

and Advanced Options:
16 Bits: R5 G6 B5
A1 R5 G5 B5
or X1 R5 G5 B5

24 bits:
R8 G8 B8

32 bits:
A8 R8 G8 B8
or X8 R8 G8 B8

Which do we have to choose??

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


Promising
Known Hero
posted July 20, 2017 05:44 PM

In irfan you have to use batch conversion from the file menu. There are advanced options and you can make gbr too.

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


Legendary Hero
posted July 20, 2017 06:22 PM
Edited by Baronus at 18:23, 20 Jul 2017.

REMEMBER! Irfan cant show you your image because:
1. No size
2. No colors
Size and colors are in def! You replace only pixels!
Only you can show if you insert size widht and height of image! And you can only see ,,shadow".
Dont care that you can seeit, its correctly. Remember indexed bmp! to raw.

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


Promising
Known Hero
posted July 21, 2017 09:03 PM

Finally I started to advancing on this way. This is the best result what I reached currently with raw pictures.



I don't know how should I make it transparent and the colors are a little strange but it should working somehow...

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


Legendary Hero
posted July 21, 2017 09:13 PM
Edited by Baronus at 21:25, 21 Jul 2017.

What size?
Very good! Im happy I can help and give enjoy :-)
But in this case I suggest find smaller pic and paste to gnoll hut.

Transparent is 000000 = black. Must be in second place in pallette = 1
080000 its 00 color
000000 its 01 color = transparency
Or you can give another but ingame is black.
If you want correctly colors you must paste palette too. Usually begins 08 or 10 and 0000 ets its 256 x 3 = 768 bytes
Correctly pallete is in tga :-):-):-)  Convert indexed bmp to tga, skip first 16 bytes and 768 next is palette if 256 colors. Copy paste from this 08000 etc.

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


Promising
Known Hero
posted July 21, 2017 09:31 PM
Edited by radmutant69 at 21:34, 21 Jul 2017.

The size was 192x154 or so (as the smaller Campaign Splashscreens). I will try the gnoll hut now and do some more experiment...

Edit: yeah, I tried it already but that made crash, I think I didn't paste the palette correctly. I'll do that again.

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


Legendary Hero
posted July 21, 2017 09:38 PM

See for size :-) From gnoll hut copy header and SHADOW! And remember frame 001 and after 01 its transparency color! If 00 no transparency! Cant be 00 after.

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


Responsible
Supreme Hero
posted July 21, 2017 10:56 PM

Using Gimp you can make it transparent (gimp can be downloaded for free, and you can search for transparency guide if needed). Gimp also allows you to use layered images, which is how animations seems to be packed.
I'll have time tomorrow to try some more attempts with gbr, thanks.

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

Page compiled in 0.0376 seconds