Posts from Changing the hero icon.
Auto-translated
Yes, I've already fixed that, but now there's a new problem: when I save, the transparent background (empty spaces) turns white. I've tried all the formats. Could you provide more details about where the format is specified in the xdb file?*
TF_8888 - is this the line? I couldn't find the TF-8888 format.
_________________
Группа картостроителей
Там ответы на вопросы, руководства, гайды и прочее
Discord-сервер "Герои 5: S.T.A.L.K.E.R"
Сервер по модификации "Герои 5: S.T.A.L.K.E.R"
_________________
Yes, I've already fixed it, but now there's a new problem: when I save, the transparent background (empty spaces) turns white. I've tried all the formats. Could you please provide more details about where the format is specified in the xdb file?*
TF_8888 - is this the line? I just couldn't find the TF-8888 format.

In the Channels section, add a new channel and paint white the areas that should be visible, and black the areas that should be transparent, then save. Then everything will work correctly!

Here is the result of the screenshots above:
Good day. The white background is related to the fact that you either don't have or haven't configured the alpha channel.
Good day. The white background is related to the fact that you either don't have an alpha channel or it's not configured.
In the Channels section, add a new channel and paint white the areas that should be visible, black the areas that should be transparent, and save. Then everything will work correctly!
Here is the result of the screenshots above:
Added 40 seconds ago
Hello. I have a guide in my signature: How to create your own hero?. It also discusses adding an icon.
Added 31 seconds ago
Thank you very much to everyone who responded! I thought I would be ignored and no one would answer, but there are so many responsive people here that it's a little awkward :)
Added 51 minutes ago
Damn, a new problem has arisen, I'm inserting a picture, and it seems like I'm doing it as described above, but white spots are visible on the character's avatar. For example, Faramir has white highlights near his hair, everywhere a little, I tried adding more white and black, and also cropping the image itself, but it doesn't work.*
https://imgur.com/a/3AhgNVS
It should be noted that in the immediate vicinity of the hero's face, it will still look unattractive, and if not with highlights, then it will be pixelated – therefore, you need to outline the image with a moderately thick black border! It is better to create a new layer under the main one and make this black border in it.
So, these specific pixels are just the wrong color, that's all.
I should mention that in the immediate vicinity of the hero's face, it will still look bad, and if not with highlights, then it will be pixelated – so you need to outline the image with a moderately thick black border! It's best to create a new layer under the main one and make this black border in it.
This seemed to be the least troublesome method compared to searching for "incorrect" pixels.
Accordingly, the black border can also be drawn on the lower, transparent layer.
Of course, this method works not only with an empty icon, but also with any non-empty icon where all the pixels that you want to be transparent are already transparent. But it's more universal to find an empty one.
Well, if you get suggestions for other methods, that's good; maybe it will be even more convenient.
----
And one more thing, if needed, you can determine the color of a pixel in any editor after the image has been merged, using the eyedropper tool on the desired pixel. There you can see if it's black or white (it seems that it should be transparent in any case).
----
In general, in such a description, it sounds super complicated, but in reality, it's... Simpler. So, if it's still relevant, tomorrow I'll try to make some screenshots in Paint.NET showing how I do it there.
To be honest, I've never worked with Photoshop or alpha channels. At the time, the simplest method seemed to be taking an empty icon that I found somewhere in data.pak; it's the right size and has the right black transparency. I copy this file, then create a second layer for the image and insert what shouldn't be transparent (visible pixels) into the second layer. And nothing more, so that it doesn't overlap incorrectly and result in incorrect transparency.
This seemed like the least troublesome method compared to searching for "incorrect" pixels.
Accordingly, the black frame can also be drawn on the lower, transparent layer.
Of course, this method works not only with an empty icon but also with any non-empty icon where all the pixels that you want to be transparent are already transparent. But it's more universal to find an empty one.
Well, if you get suggestions for other methods, that's great; maybe it will be even more convenient.)
----
And one more thing, if needed, you can determine the color of a pixel in any editor after merging the image, using the eyedropper tool on the desired pixel. There you can see if it's black or white (it seems that it should be transparent in any case).
----
In general, this description sounds super complicated, but in reality, it's... Simpler. So, if it's still relevant, tomorrow I'll try to make some screenshots in Paint.NET showing how I do it.
That would be great! I would also like to ask for that empty image that you use to overlay the icons on.
I also use Paint.NET, so I think I should be able to understand everything
1.
Here, we have exported it to the desktop.
Let's check its size in File Explorer -- it shows
Remember this number -- if our final 128x128 icon weighs the same, then we most likely saved it correctly. But I will still attach a screenshot later showing which format I used to save in, so as not to get confused.
2.
If you already have an image template with transparent black color of size 128x128, or if you made it earlier (found, Download from this message: I will attach it as base.dds), then this step can be skipped.
To add transparency to this icon, I suggest creating a new empty 128x128 image in paint.NET
The next sequence of actions is as follows: we set black as the primary color and perform a fill of the image.
Select our (only) background layer, click the wrench icon ("Properties") in the layers panel
and set the layer opacity to 0
Save, close the image, and open it again (the eyedropper just didn't work correctly for me until I closed the image and opened it again).
What format should you save in? At this stage, a simple png with transparency is fine, but if you want to save in the correct dds, see point 5 near the end when we save the final result.
So, let's open our template -- and you are wonderful, it really is black-transparent, just as the game requires! See the eyedropper action in the screenshot.
3.
Let's deal with the elf girl. So, let's open it.
Take an eraser with some reasonable hardness and size, and carefully remove the background. Be especially careful near the ears; Elven Ears are Important!
Take the magic wand and click on one of the transparent areas of the drawing, in this case -- on the left. Adjust the magic wand sensitivity so that this entire area is selected, but it doesn't overlap our elf girl (borderline semi-transparent pixels should not be included in the selection).
Hold Ctrl and click with the magic wand now on the right area of the elf.
Now go to the "Edit" menu and invert the selection.
We ended up with only the elf girl selected and nothing extra.
Press Ctrl+C. Open our base.dds template from point 2. Press Ctrl+Shift+V in it.
The most important part is done!
4.
So, we have a modified base.dds image with two layers: the bottom one is transparent, and the top one is the elf girl.
Go to the bottom layer and draw a black border under the elf girl, about two pixels thick or slightly thicker. I did this with a brush. It's possible it might turn out neater if you use the "Line / Curve" tool; in that case, you should draw curved lines specifically. But here is my result:
Final touches. Take the "shapes" drawing tool, select "rectangle" and "fill only". Primary color -- black.
And draw rectangles on the top layer (where the elf girl is) in those places where the elf girl touches the edge of the image. Exactly two pixels thick.
When you are finished with this, the layers can be merged. Result:
5.
Save the image as dds (Direct Draw Surface). For icons -- here is the format I used to save in:
You won't ruin the base, but it's better to save to a new file.
Also, at the time, I only made 128x128 icons. The game can scale various 64x64 and 32x32 ones from the large version itself; however, I don't know about the quality -- perhaps it's not worth it. And yet, the developers of the "Tribes of the East" expansion use only large icons in their files.
[spoiler=Result in game:]
Now, like in a school lesson -- where did the teacher make a mistake? Who can spot it on the screenshot?
Correct,
I initially forgot the black line on the upper border of the elf girl. According to the game authors' standard, black lines should be everywhere: top, bottom, and sides, if the portrait touches them.That seems to be everything.
Attaching the result and the base (template) in the archive elf + base.zip
_________________
Группа картостроителей
Там ответы на вопросы, руководства, гайды и прочее
Discord-сервер "Герои 5: S.T.A.L.K.E.R"
Сервер по модификации "Герои 5: S.T.A.L.K.E.R"
_________________
Okay, let's take one of the Master maps as an example (simply because icons were recently discussed there) and make an icon for Elva!
1.
Here, we've exported it to the desktop.
Check its size in File Explorer -- it shows
Remember this number -- if our final 128x128 icon weighs the same, then we most likely saved it correctly. But I will still attach a screenshot later of the format I used to save it, just so there's no confusion.
2.
If you already have an image template with transparent black color sized 128x128, or if you made one earlier (found and Downloaded from this post: I will attach it as base.dds), then you can skip this step.
To add transparency to this icon, I suggest creating a new empty 128x128 image in paint.NET
The next sequence of actions is as follows: we set black as the primary color and perform a fill of the image.
Select our (only) background layer, click the wrench icon ("Properties") in the layers panel
and set the layer opacity to 0
Save, close the image, and open it again (simply because my eyedropper tool didn't work correctly until I closed the image and reopened it).
What format should you save in? At this stage, a simple png with transparency is fine, but if you want to save in the correct dds, see point 5 near the end when we save the final result.
So, open our template -- and voila, it's indeed black-transparent, just as the game requires! See the eyedropper action in the screenshot.
3.
Let's deal with the elf girl. So, opening it now.
Take an eraser with a reasonable hardness and size, and carefully remove the background. Be especially careful near the ears; Elven Ears are Important!
Take the magic wand tool and click on one of the transparent areas of the drawing, in this case -- on the left. Adjust the magic wand sensitivity so that this entire area is selected, but it doesn't overlap our elf girl (borderline semi-transparent pixels should not be included in the selection).
Hold Ctrl and click with the magic wand now on the right area of the elf.
Now go to the "Edit" menu and invert the selection.
Now only the elf girl is selected, and nothing extra.
Press Ctrl+C. Open our base.dds template from point 2. Press Ctrl+Shift+V in it.
The main part is done!
4.
So, we have a modified base.dds image with two layers: the bottom one is transparent, and the top one is the elf girl.
Go to the bottom layer and draw a black border under the elf girl, about two pixels thick or slightly thicker. I did this with a brush. It's possible it might turn out neater if you use the "Line / Curve" tool; in that case, you should draw curved lines. But here is my result:
Final touches. Take the "shapes" drawing tool, select "rectangle" and "fill only". Primary color -- black.
And draw rectangles on the top layer (where the elf girl is) in places where she touches the edge of the image. Exactly two pixels thick.
When you're finished with this, the layers can be merged. Result:
5.
Save the image as dds (Direct Draw Surface). For icons -- this is the format I used to save:
You won't ruin the base, but it's better to save to a new file.
Also, in my time, I only made 128x128 icons. The game can scale 64x64 and 32x32 from the large version itself; however, I don't know about the quality -- perhaps it's not worth it. Even so, the developers of the "Tribes of the East" expansion use only large icons in their files.
[spoiler=Result in game:][/spoiler]
Now, like in a school lesson -- where did the teacher make a mistake? Who can spot it in the screenshot?Correct,
I initially forgot the black line on the top border of the elf girl. According to the game authors' standard, black lines should be everywhere: top, bottom, and sides if the portrait touches them.
That seems to be all.
Attaching the result and the base (template) in the archive elf + base.zip
Thank you very much, I can't believe you took the time to do all this
I basically did the same thing, but I didn't think to make a frame to separate the image; now I probably will
Thanks again!