How to resize image from DEF?

Mods and development for mods. Including WoG & Equilibris (RU) subforums.
User avatar
Artas1984
Assassin
Assassin
Posts: 284
Joined: 06 Jan 2007
Location: Vilnius

How to resize image from DEF?

Unread postby Artas1984 » 28 Oct 2009, 10:21

Alright, i feel like an idiot resizing the 88 bitmap animation files of a single goblin creature from a def file with PhotoShip CS2 and then trying to make a new def file without success. A whole day it took!!!

Here is the problem - a bitmap image in the def file has parameters like the picture "widthbitmap" and "heightbitmap" as well as "widthframe" and "heightframe":

Image


When i was resizing every image manually i made the exact copies of the default bmp images aprox 1.4 times smaller, this is what i mean:

Image

But when i placed those 88 resized images to create a def file, nothing worked, because it did not recognized the "wifthframe" and "heightframe".

Now i think you know my problem. A whole day wasted and no results.

So, how do i make a def file from resized bitmap images where i can write the parameters of frames?

When you answer me this, please try to answer as detailed as you can, not just post your opinions..
Last edited by Artas1984 on 30 Aug 2011, 13:45, edited 1 time in total.

User avatar
Salamandre
Genie
Genie
Posts: 1032
Joined: 13 May 2006
Location: France
Contact:

Unread postby Salamandre » 11 Nov 2009, 05:25

I don't have a clue about what you are doing there. Can I ask:

What tools you use? What version of the game? Why don't you use the Photoshop tool for processing multiple images in one script, so it takes 2 minutes to make 88 frames?

The latest deftool does not care about wight or height frame. To resize an existing one you have to remove the cyan (0.255.255) from palette, resize and copy, paste in a new 450x400 layer and add cyan background. All this can be automatically done by batch processing. Then of course you have to set a new position in deftool using the grid. 2 hexes monsters will have wrong animations on hit and getting hit frames if resized, so need manually fix.
Image

User avatar
Artas1984
Assassin
Assassin
Posts: 284
Joined: 06 Jan 2007
Location: Vilnius

Unread postby Artas1984 » 02 Jul 2011, 11:04

I feel like having the mood to start this again, so help me here.

I have defviewer, defmaker 3.5, deftool, viewpcx, resedit2.

I have Heroes 3 Complete.

Let's start from beginning, because i forgot everything. First of all how do i extract the the pcx from def file? Let's use the same cgobli.def file. What i want to do is resize the creature - make him 1,4 times smaller in every frame.

Since what i did last time was BS, tell me how to do it right. How do you paste the pcx image in deftool?
Heroes franchise was not about the free actions of Heroes or monsters, it was not about 3D of shiny graphics either, it was about diversity and balance, simplicity of gameplay and realistic picture, strategy in it's purest form. That's why Heroes 3 will be the greatest game of all, because only Heroes 3 has all those qualities together, no matter which one you personally like more. This statement is unquestionable, uncriticized and undeniable .

User avatar
GreatEmerald
CH Staff
CH Staff
Posts: 3330
Joined: 24 Jul 2009
Location: Netherlands

Unread postby GreatEmerald » 02 Jul 2011, 15:57

You can only extract BMPs, last time I checked.

User avatar
Artas1984
Assassin
Assassin
Posts: 284
Joined: 06 Jan 2007
Location: Vilnius

Unread postby Artas1984 » 30 Aug 2011, 13:13

First off all, you said you need to remove the cyan background before resizing the image. How do you do this? Talking about Photoshop CS2. By manually brushing the cyan background around the image with another color? That is pain in the ass - is there a function in any image program that would identify cyan background from the rest of image and automatically fill it with another color? Imagine you yourself have to remove the cyan background - what you do!?

And just by the way - all the editing must be done on an 8 bit BMP right?
Heroes franchise was not about the free actions of Heroes or monsters, it was not about 3D of shiny graphics either, it was about diversity and balance, simplicity of gameplay and realistic picture, strategy in it's purest form. That's why Heroes 3 will be the greatest game of all, because only Heroes 3 has all those qualities together, no matter which one you personally like more. This statement is unquestionable, uncriticized and undeniable .

User avatar
GreatEmerald
CH Staff
CH Staff
Posts: 3330
Joined: 24 Jul 2009
Location: Netherlands

Unread postby GreatEmerald » 30 Aug 2011, 13:32

There is a tool, or two tools, actually. One of them is the Paint Bucket. If you set it to be non-contiguous and have zero tolerance, it will replace only that colour everywhere. Another tool is the palette editor. You can access it when you set the mode to Indexed. It allows you to swap any colours in the palette.

User avatar
Artas1984
Assassin
Assassin
Posts: 284
Joined: 06 Jan 2007
Location: Vilnius

Unread postby Artas1984 » 30 Aug 2011, 13:40

Salamandre wrote: To resize an existing one you have to remove the cyan (0.255.255) from palette, resize and copy, paste in a new 450x400 layer and add cyan background.
How about this:

REMOVE CYAN
RESIZE
ADD CYAN

I mean does it make a difference between

REMOVE CYAN
RESIZE
ADD CYAN

and

REMOVE CYAN
RESIZE
COPY
PASTE IN NEW LAYER
ADD CYAN

???
Salamandre wrote: All this can be automatically done by batch processing.

Ok what? Batch processing is used to convert image file types from one to other, not resizing pictures.. Are you sure you not confusing something?
Things like removing background and resizing are done by hand, step by step, and it is quite easy too.
Heroes franchise was not about the free actions of Heroes or monsters, it was not about 3D of shiny graphics either, it was about diversity and balance, simplicity of gameplay and realistic picture, strategy in it's purest form. That's why Heroes 3 will be the greatest game of all, because only Heroes 3 has all those qualities together, no matter which one you personally like more. This statement is unquestionable, uncriticized and undeniable .

User avatar
Artas1984
Assassin
Assassin
Posts: 284
Joined: 06 Jan 2007
Location: Vilnius

Unread postby Artas1984 » 30 Aug 2011, 19:03

I noticed just now that i can use DEFTOOL and it can open my bmp or pcx files..

So i was using the wrong program. Nobody uses DEFMAKER, but DEFTOOL instead? Salamandre - you use only DEFTOOL to to import resized picture into DEF catalog, not DEFMAKER?

GreatEmerald helped me all he could - since he uses Linux, he can't really do all the things i would ask him.
Heroes franchise was not about the free actions of Heroes or monsters, it was not about 3D of shiny graphics either, it was about diversity and balance, simplicity of gameplay and realistic picture, strategy in it's purest form. That's why Heroes 3 will be the greatest game of all, because only Heroes 3 has all those qualities together, no matter which one you personally like more. This statement is unquestionable, uncriticized and undeniable .

User avatar
Salamandre
Genie
Genie
Posts: 1032
Joined: 13 May 2006
Location: France
Contact:

Unread postby Salamandre » 30 Aug 2011, 19:19

Your infos are 2 years old and CH is not the forum to ask for modding/work with H3resources.

Try here:

http://heroescommunity.com/viewthread.php3?TID=32519


Return to “Modcrafting Guild”

Who is online

Users browsing this forum: No registered users and 6 guests