Call of Chernobyl is a free-play sandbox mod for S.T.A.L.K.E.R. : Call of Pripyat created by TeamEPIC. It features 32 explorable maps, reworked level design and level fixes, new original level, Trucks Cemetery, Full AI and A-Life overhaul, engine and script enhancements, Repeatable task system which bases itself on A-Life events, Customizable weather environments for every map as well as surges and psi-storms from AF3, Character creation which includes name, portrait and faction selection; Several optional modes such as Ironman mode, story mode and zombie survival mode, New achievements, rankings and reputation system, PDA leaderboard and enhanced PDA statistics, Companion system with keyboard issued commands, many optional side-features and community-made addons . Call of Chernobyl was player's choice Mod of the Year 9th place in 2015 and 1st place in 2016!

Forum Thread
  Posts  
Anyone Know Anything About This? (Games : S.T.A.L.K.E.R.: Call of Pripyat : Mods : S.T.A.L.K.E.R.: Call of Chernobyl : Forum : General Discussion : Anyone Know Anything About This?) Locked
Thread Options
Nov 27 2019 Anchor

Does anyone know why all of the UI icons are scaled up in size (in-game) from their source image? Does anyone know which Config file would deal with this?

I'm playing Anomaly, Dead Air, etc, and I've noticed that each icon has it's dimensions multiplied by 1.875x1.40625, respectively, to fit 4:3 format even while playing in 16:9.

In other words, even if you're playing in 1920x1080, the default drawing format appears to be 4:3. And the icon's dimensions are multiplied by the aforementioned values. If you have a 24x24 icon in Photoshop or Gimp, it becomes 45x34 in game, resulting in a horrible pixelated mess. All of the source image files are re-sized to a 4:3 format even while playing in 16:9...and no one is talking about it!

If we figure this out....we could have true HD icons for Stalker for the first time. Why are DDS images scaled to this proportion even while playing in higher resolutions? Let's figure it out!


EDIT 11/29/19 > SOLUTION - Didn't want to start a new thread. Copied this from Anomaly forum.

After racking my brain for a week or so, I've discovered something that I believe modders will appreciate. If you didn't know, virtually every single DDS image file is resized if its boundaries (within textures_descr) are not proportional to 4:3 format, even while playing in 16:9. This includes weapons, icons, minimap, and even loading screens. The minimap you've been looking at this whole time is blown up almost twice the size of the original source image, resulting in some atrocious interpolation and totally not high-fidelity HD.

Hud icons and the minimap are some of the worst offenders, which is what I'll be focusing on here.

The icons for hunger, over-encumbered, thirst, etc are 18x19. However they appear in-game as 34x27. The minimap is approximately 155x158, but in-game it appears as approximately 230x235. As a result of this resizing the images are nowhere near as sharp and crisp as they could be for their size represented in game. They are rescaled because their boundaries are not in 4:3 proportions.

Want to make true HD icons for a mod?

  • Measure the dimensions of any hud icon. Using whatever image editor you have, do not leave any space, gaps, or padding around the icon. You need the Width x Height of the icon.
  • Within the appropriate Config file that handles the icon, make sure that the Width and Height equal your measurements. (Example - Maingame.xml - Line 21 - Hunger/Starvation icon)
  • The textures_descr config sets the boundaries for each icon. This is where the magic happens. The Width here must be equal to the Width (measured before) multiplied by 1.875. The Height here must be equal to the Height (measured before) multiplied by 1.40625. The boundaries are now in 4:3 proportions

Now, after placing the edited image in the appropriate gamedata folder you will see a true representation of the icon. It will be much smaller than before. This is a good thing (if you're interested in sharp, HD icons). You are seeing the true size of the icon. This now means that you can create a larger icon, allowing for more graphical fidelity, and it be the same size as the original non-HD icon. (Or it can be whatever size you want)

Remember, the boundaries of the icon must be multiplied accordingly to 4:3 format within the appropriate textures_descr Config file.

I've already started creating my own new icons that are of similar size to 'vanilla' Anomaly icons, but with substantial improvement in visual fidelity. Perhaps I'll showcase some, if anyone is interested.

You may realize (like I did) that if you're wanting to create new HD icons, or revamp existing ones, that you'll have to do the work of creating a new DDS image file for your icons because you simply don't have enough space on the original ones to expand the icon boundaries. (ui_actor_hint_wnd, ui_common, etc) Then you'll have to direct the appropriate config files to use your custom DDS image (and NOT use the original, vanilla icons. I have just been commenting out the original code and putting in my own).

Any questions, just ask.

To me, this is a huge discovery. I don't know if anyone else knows this. As far as I can tell, we now know how to implement true HD icons.

EDITED, after learning new information and after DoctorX's response.

Edited by: Droscoe

Nov 27 2019 Anchor

A lot of the hud elements are called directly from the engine, which is probably why you can't find the corrolation between the icon and the texture map in the db files.

You should have everything you need though if you're looking to resize the icons, you've already discovered the files you would need to edit.

The files in configs\ui control the positioning of the icons on the screen. The files that end in "_16" are for widescreen format and the one's that don't are for 4:3 resolution.

Forgive me if you already knew any of this, just running through what I know about it linearly.

So, for your overweight indicator in maingame.xml, the values there are for where the icon will appear on the monitor. The values are X-pos, Y-pos, width, and height. The image will be resized to these dimensions regardless of the original size of the texture. Units are in pixels, but are not absolute. They assume a screen size of 1024x768 and will be scaled proportionally for larger monitors.

The files in configs\ui\textures_descr layout where the icon image is being pulled from the actual texture. The texture file name is at the top of the file, and those files can be found in textures\ui. The values here are now referring to where on the texture image the icon is located and are absolute relative to the image itself. X-pos, Y-pos are the location of the upper-left corner of the image, width and height are the size in pixels of the rectange containing the icon image. For most icons, you can search for the texture id in the ui layout files or scripts, but for icons called from the engine you will have to just make an educated guess.

So, knowing all of this, if you want to have the icons be resized "less" (they will always be resized unless you are running 1024x768 resolution), you can do one of two things:

1. Change the height and width values for the placement of the icon on the hud in the ui layout files in configs\ui. If you make the values the same as the actual size defined in the texture map file in configs\ui\textures_descr, they will not be artificially stretched larger than they were intended to be, but they will be physically smaller on your monitor. Again, they will still be resized a little because most monitors these days are larger than 1024x768. To be thorough, you should change the values in both the 4:3 and widescreen version of the file.

-or-

2. Resize the icon itself. You could create a new icon or resize the existing ones and touch them up a bit, just be sure to update the new width and height in the texture map file or else only a portion of the new icon will be displayed on screen. Also be aware if you intend to do this, some of the icon files have an alpha channel that will need to be resized or recreated as well.

Hope this helps. I feel like I'm just rambling. :p


Reply to thread
click to sign in and post

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.