Is the attached image usable? Then I will create more of them. I’m afraid I can’t test it myself as the mentioned DefTool has very weird Russian letters in the menus.
I tried to be as close as possible to the original font, but getting rid of the image (for space reasons).
Could you try to convert it to .def and post or send me the result?
H3 uses specific palette where 1st 10 colors are reserved for transparency and last 32 - for player coloring (if there is need for it). Try using palette from H3 files.
Sorry but fact that I know Russian letters doesn’t help me to manage with that DefTool (it has English version too AFAIK but don’t expect much)
I’ve already managed to open different formats like gif \ png in VCMI and it would be great to add possibility for some other formats for animation too, will open thread about this soon. Animated gif will not be easy to add though.
Hm, this is beyond my skills of graphic manipulation. I’ll try it though…
So I’ll have to wait until this is implemented, so that we can use .gif files. Or anyone else is able to convert .gif to .def? (Until .gif in VCMI is possible)
It is that way because thanks to it you can just blit unhighlighted button image to overdraw that glowing highlight.
I do have a counter-idea for scrolling. Instead of messing with global blitters and every place that touches screen, I’d rather realize scrolling as part of my GUI system and property of particular GUI objects. So we won’t be scrolling the whole screen but only single windows (like castle window or battle window). It is better, cause it’ll allow using 800x480 adventure map (and other windows when they’ll be adjusted) along with scrollable 800x600 windows. [And’ll be much cleaner in the code.]
Realising this idea would certainly need some work and I’m not promising anything now… but there is hope
I don’t understand it. What would be a purpose of “minimal” or “double size” layouts, if everything was to be scaled to fit device resolution? [Besides, as I’ve written, dynamic scaling would be really troublesome from various reasons.]
Would that still be a workaround until working 800x480 images for town/battle are implemented? I’m not in the position to, but I’d really dislike this being a final solution. Which does not mean I don’t like the idea itself! Quite the contrary, I’d be happy to have it as soon as possible!
There’s no need to rush!
The purpose of those “classes” would be to have a customizable interface (adventure map button layout e.g.) like if you’d create a new one in those .pcx files and settings.txt. But more like defining various aspects like where to put the buttons, and in which size.
For example the “double-size” class could be there for people with bad eyes, and it would generate a normal AdvMap, but with all buttons in double size (scaled). The minimal config would remove some rarely used buttons and images to get more out of the actual map (for small screens probably).
If I did not misunderstand settings.txt it would be pretty much the same appart from the dependency on a resolution. Therefore the resolution is either picked from the native screen resolution or overwritten like it was done before in settings.txt. This does not affect the advMap and layout though.
Well, after reading my own words I guess it doesn’t make any difference from my previous post, so maybe this example is a better attempt. I removed irrelevant lines, to keep it clean.
Let magic happen! You’re the one that knows best what is possible. I guess there has to be a way? Maybe we need a totally different approach though.
Thank you, will give it a try!
PS: vcmi.eu was down from ~ 1 AM to >= 3:30 AM…
EDIT: I tried the DefTool, and it’s not working. It says it imported the .def (which it created) into H3sprite.lod, but after starting VCMI the old logo is still present. DefPreview also showed me what I suspected. The transparency is dumb, and only fading for player colors. So can we get rid of .def, please?
Server was down, ISP fixed it around 4:30. Sorry for trouble.
File should be named ZMENUNG.DEF, not ZMENNG.DEF.
Use DefTool only to pack images into the def, don’t fight with .lod archives. They are a pain to edit.
VCMI should recognize image (and use it instead of the standard one from the .lod) if you put the def file in /Sprites subfolder.
Uhm… I don’t understand. Pregame buttons are not player-coloured, so you don’t have to worry about player colors. What do you neeed from transparency?
Well, there are sprites that have a “player color” area that is replaced by the current players color. This kind of transparency is able to fade, so that even slightly different colors are semi-transparent. For the normal transparency it seems not to be possible, so you have to match the exact RGB values to get transparency at all. Maybe I just misunderstood DefTools explanation though.
My logo is not transparent at all. And the animation frames are mixed up somehow.
As you can see H3-style palette is essential. Wrong color is used for transparency and as result picture is broken.
Try converting some stuff from archive in attachment - this is that buttons but with fixed sizes in gif format. I can’t convert into .def but they use correct palette and most possibly - correct frame order. buttons.zip (183 KB)
I have this huge file containing H3sprite.lod and H3bitmap.lod in .gif and .bmp format. I used the pipette tool to extract the turquoise color for transparency, so I assumed it was correct.
Given the fact that there is no smooth blending transparency for these menu buttons available, why don’t we just use your buttons? They are tiny and would easily fit on the 480 pixels height. I can’t make any better buttons without fading…
After you guys implemented .png images for animations I could create real transparent buttons, i guess?
The turquoise on screenshout you attached is (0,252,248). The default “transparent” colour should be (0,255,255). Maybe that’s an issue? In DefTool you can also set different colours for transparency, just click on the colour box in the Frames tab. But they must be same for all the frames and match exactly.
If that doesn’t solve the issue with transparency, please upload your frames and I’ll look why they don’t want to be assembled into a nice .def.
Sorry, I still can’t understand. You write as if player colours were some kind of transparency. Those things are unrelated.
H3 uses several first colours in palette as transparent “shadow” and - in some of the sprites - last 32 colours as players colours. Those colours are just replaced with predefined palette appropriate for given player. [H3 has a list of 32 colours for each player colour.]
That’s the problem, there is no tolerance. That way I can’t create a “fading transparency” (fading from color to transparency". But the pipette tool of GIMP still shows me 0,255,255 in the BMPs I use (I can’t check it for the .def).
Please find the 3 frames attached. Thanks!
You’re right, player colors are no transparency, and yes, they are not used in spritedefs. But they are able to fade if I understood it right. And that is what is needed to create smooth blending buttons without background image pieces in it.
From here I understood, if the transparency would work the same way, it would be possible to create fading transparency. But it doesn’t. Bad. ZMENUNG.zip (14.3 KB)
Well, certainly it’s more important to have the game complete before end of the world in 2012.
It’s getting closer to that state, as all of minor gameplay features seem to be more or less handled. But we need a really big jump to get through MP & AI.
I believe 800x480 may be the future of project as more and more mobile platforms can support it. However, the problem with graphics still exists. Things don’t get solved on their own.
I don’t get the problem with supporting it. It’s almost there, we just need the smaller buttons working (and remove the scrolling as it crashes the game - or fix). The graphics could just be cropped and replaced one by one.
I don’t have a good view on how much work this means, it would be sad to drop it though. in the end it’s your decision…
Our GUI system is just not designed to handle resolutions smaller than 800x600. If you were a coder, you’d know that if a system is not designed to do something, very often it’s very, very, very hard to provide that feature. Of course it’s possible, but would you postpone MP support for many months to have 800x480 resolution? Currently I have no time to do anything with VCMI, even bugfixing and only Tow is able to add 800x480, but he is writing multiplayer mode.