Creating a custom unit image

Through some effort I managed to decypher how the game refereances areas of image files for buttons (hope that makes sense.)


using a example:

infoCardicon-ship.brushes
This file tells the game where on a specific image file a graphic resides.


brush
name "INFOCARDICON_FRIGATE_TECHCOLONY"
content "Simple"
fileName "Unit_Infocard"
pixelBox [ 1 , 139 , 22 , 22 ]

This is the card icon for the TEC colony frigate. The icon is located on the image file "unit_infocard." All image files are stored in the textures folder. pixelBox [ 1 , 139 , 22 , 22 ] tells the game the location and boundries of the icon. First coordinate, 1 in this example, is the X coordinate for the top left corner of the "image boundry." 139 is its Y coordinate. The third coordinate is how many pixels wide the image boundry is and the fourth is how many tall. So for instance 22,22 (as in the example above) is a perfect square fo 22 by 22 pixels.

To get the pixel coordinate of a pixel in a image, open it in photoshop.  In your navigator window click the "info tab."  There you will see a X:  and Y:  These are the coordinate locations of x and y.  next to that there is a + sign, click that and make sure "pixels" is selected


The "unit_infocard" image is a collection of images used for various hud elements.


Referance Sheet


Text File (Window folder) Image file (textures folder) Comments
picture-Ship.brushes ref--->Unit-picture Unit picture for "center screen"
HUDIcon-Ship.brushes ref--->unit_hud_normal buy menu icon
HudIcon-Ability.brushes ref--->buttons_research_disabled research menu icons
Hudicon-Action.brushes ref--->buttons_Interface main interface buttons, for example ping,
diplomact button
Hudicon-module.brushes ref--->unit_hud structure icons
HUDIcon-Planet.brushes ref--->Icons_planets planet icons
Hudicon-Research.brushes ref--->Research research hud elements
infocard_icon_module.brushes ref--->Unit_Infocard zoomed out unit icons, structures
infocard_icon_ship.brushes ref--->unit-infocard zoomed out unit icons, ships
Mainviewicon-ship.brushes ref--->Unit_main ranks and various unit icons
mainviewicon-modules.brushes ref--->unit_main various icons for structures
picture-ship.brushes ref--->unit_picture build icons


skin_tech hud skin


Also note many of the image files refereance as "normal" ; "disabled" ; "pressed" etc. This simply means its that version of the button. For example "unit_hud_pressed" is the image for a pressed unit buy/build button (such as the frigate button in the frigate factory..)

If you come across any other useful image files please add them to the list!










4,899 views 4 replies
Reply #1 Top
Thanks man! I'm searching this for 2 days.
Reply #2 Top
Thanks Death_Grin,

I am looking to create custom icons for SOASE. I would like to make some "standard" icons for SOASE. They will be geometric in design and give a quicker "situational awareness" to the game. My basis is on Homeworld 2 class icons. Frigates = Squares, fighters/bombers = triangles, etc.

My question to you is... How did you open the files and get the pixelbox references?

I have not been able to get the pixel references that you have in your post. Perhaps I have just missed a step or something. Any response is greatly appreciated.

Like Skyline_HUN, I have been searching for days. I have even attempted to manually dissect the images.

I like SOASE a lot, but want "type" icons, not super shrunken ambiguous thumbnails.
Reply #3 Top
My question to you is... How did you open the files and get the pixelbox references?

I have not been able to get the pixel references that you have in your post. Perhaps I have just missed a step or something. Any response is greatly appreciated.
End of quote


The Pixel references you get from Photoshop or whatever you use. For Photoshop:

-Go to View, Click Rulers.
-Right Click on rulers and select pixels.
-The Ruler measurements will now be in pixels.

-The first two numbers in the [ 1 , 2 , 3 , 4 ] format reference the top left hand corner of the area for the image you are using.
-1 =How far down it is. (You'll use the vertical ruler)
-2 =How far from the left hand edge the corner is. (Horizontal Ruler)

The Last two numbers reference the area of the box that will go around the image. Everything that is included in the area of that box will be used.
-3 =The width of the box around the image.
-4 =The length of the box mentioned above. (Vertical Ruler)

I hope this helps. I don't actually mess with texture files other than to get the pixel references. Someone else puts the images into the texture file and I go get them and put them in game.

Also, in case you didn't figure this out yourself. It is a good idea to put the image in the same place for the 5 different texture files. (Normal, pressed, cursor over, disabled, focused) Then all you have to do is copy the Pixel Reference from the first line to the other four.

-derbal213
Reply #4 Top
If you have a good picture viewer with the DDS and TGA formats, you can browse through all the files and find all those nice secrets :) :D