Hard Light Productions Forums

Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: JGZinv on April 19, 2014, 01:22:17 pm

Title: Coloring of HUD Gauges
Post by: JGZinv on April 19, 2014, 01:22:17 pm
Could someone list the files and priority of fields that pertain to the color of a HUD gauge?

I'm trying to create a heavily custom HUD, but for some reason custom gauges with a specified color
are not changing, they are default FS2 green.

example:

Code: [Select]
+Custom:
Origin: (0.0, 0.0)
Offset: (152, 540)
Name: Line Art
Text:
Gauge Type: WINGMEN_STATUS
Filename: GSClineart
Color: 117 5 255
Active by default: true

Wingmen status is temporary. But I've consulted the Wiki for the hud_gauges.tbl and not found any additional info.
There are references to $Color but some are just broken links/dead ends.

Checked for a overall species color in my mod's defs.tbl, nothing at all there.

Checked FRED, and tried changing the colors via the in game HUD config options panel, it's still FS2 green.

So is there a hierarchy as to what will take precedence over the hud_gauges.tbl settings?
Title: Re: Coloring of HUD Gauges
Post by: zookeeper on April 19, 2014, 01:51:31 pm
There's the .hcf files in players/ which IIRC are the main means of defining the color of the HUD, dunno what the specifics of precedence are exactly or where you'd get example files (Diaspora doesn't seem to have them).
Title: Re: Coloring of HUD Gauges
Post by: niffiwan on April 19, 2014, 06:46:54 pm
I think you need to change the syntax slightly. i.e. Enclose the RGB values in braces () and separate them with commas.  Here's an table fragment that I've successfully used in a test case (although it's not a custom gauge it should still be valid).

Code: [Select]
                +Radar:
                        Origin: (0.15, 0.15)
                        Offset: (154,0)
                        Color: (30,30,170)
                        Filename: grid
Title: Re: Coloring of HUD Gauges
Post by: JGZinv on April 19, 2014, 08:25:57 pm
That got it niffiwan

It's also sensitive to what order, I tried having it in the lower position, with the brackets, and there wasn't any change.

This works:

Code: [Select]
+Custom:
Origin: (0.0, 0.0)
Offset: (152, 540)
Color: (117, 5, 255)
Name: Line Art
Text:
Gauge Type: WINGMEN_STATUS
Filename: GSClineart
Active by default: true

Thanks.