race gui files

The best Modding forum in the Armada community, some of the best modders come here.

Moderators: thunderchero, MrVulcan

Post Reply
graviton
Cadet 4th Year
Cadet 4th Year
Posts: 156
Joined: Sun Sep 24, 2006 2:00 am
Location: Everywhere

race gui files

Post by graviton »

I've been trying to convert an A2 GUI to A1, possibly for a mod but mostly for the heck of it. I understand that all the data for the guis are in the gui_(insert race name) file in the sprites folder. But the A2 GUI isn't arranged the same way as an a1 gui is in the tga file. So how do I make the game accept a new tga with a different layout as a gui? I've been looking for tutorials on the subject but can't seem to find any.

Also, in all the gui sprites, there are commented-out sections that label each number. For example:

# Name File U V W H

# Federation Speed Rail
@reference=256
@tmaterial=interface
speed_panel.0 fguic04 0 176 256 80 #left side
speed_panel.1 fguic04 0 94 238 80 #right side
speed_separator fguic04 208 28 16 66

W and H probably mean width and height, but what are U and V?? I know that in weapon textures, the first two numbers are the starting point of the graphic, shown by means of its width and height. Then the last two numbers are the ending point of the graphic, shown by means of width and height. But when I open, say, fguic04.tga, a file referenced in the above code, and I go to width 0 and height 176, and then find the location of width 256 and height 80, they're not related to each other. They don't select a piece of the image, they just appear random.

Can somebody help? :(
Melior Posco Venia Quam Scisco Licentia
Achilles
Past Administrator
Past Administrator
Posts: 834
Joined: Fri Apr 25, 2003 2:00 am
Location: England
Contact:

Post by Achilles »

there are race specific gui files in both the sprites folder and the misc folder, I would start there.
User avatar
MrVulcan
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 660
Joined: Fri Apr 25, 2003 2:00 am
Location: TO CA

Post by MrVulcan »

You're right in that the first two numbers are starting points on the texture. The last two, W and H, are width and height in pixels. You have to Add height and width to the corresponding starting points to find the endpoint.

IMPORTANT: chaning the dimensions of the selected texture (as well as changing proportions) will not change the size of the texture ingame. To do this you will need to edit the cfg files in the misc folder.

If you want to rearrange or move the textures as well as change their dimensions, you'll need to play around with the numbers in the cfg files. The basic principle is the same as with sprite files; the U and V values refer to the starting point on the menu area (NOT the entire screen. 0 0 being the top left corner of a specific menu like the speedrail or the mini map). HOwever, the numbers do not represent dimentions in pixels.

The U, V, H and W values are not strictly in pixels. As you change the resolution ingame, the menus do not become smaller (at higehr resulutions, they occupy more pixels). Therefore, the W and H values either represent a ratio or are in pixels only at a specific resolution. I'm not sure which it is or at what resolution they represent pixel values.

Anyhow, I suggest that you first try changing existing textures (move them around on the texture file and also on screen ingame). Once you understand how that works, try chaning their dimensions; change them on the texture as well as ingame while maintaining proportions.

Importing menus from A2 may be very difficult. If you really want to do it, I suggest that you first reconstruct both A1 and A2 menus in photoshop (or whatever you're using). This will tell you how to split up the A2 menus to fit them on the A1 templates.

Hope this helps
graviton
Cadet 4th Year
Cadet 4th Year
Posts: 156
Joined: Sun Sep 24, 2006 2:00 am
Location: Everywhere

Post by graviton »

Thanks for the advice, this clears things up a bit. Another problem in the conversion is that the cinematic window and other parts of the interface are shown complete in the texture, instead of having parts of the panels all over the place in five different files... I'll do some experimenting as time permits :)
Melior Posco Venia Quam Scisco Licentia
Post Reply