Author Topic: hud_gauges.tbll - anybody with a working custom gauge, please post?  (Read 1125 times)

0 Members and 1 Guest are viewing this topic.

Offline Black Wolf

  • Twisted Infinities
  • 212
  • Hey! You! Get off-a my cloud!
    • Visit the TI homepage!
hud_gauges.tbll - anybody with a working custom gauge, please post?
OK, this table is really ****tng me off. I had it working in the older, much, much simpler style, but since the rebuild of it, I can't make heads or tails of the entire system. The wiki page has a whole lot of data, but is minimally useful, since a lot of stuff is just not defined (What do the gauge types do? Which ones do we use for custom gauges? What is fonts.tbl?). This is made worse by the fact that this table refuses to output errors, and just causes silent hanging (the log usefully says "WARNING: "Invalid gauge found in hud_gauges.tbl" at hudparse.cpp:917"). I'm sure it's great for moving existing gauges around, as evidenced by the bevy of HUD layouts lately, but for brand new stuff it's really tough going.

What I need, and what the wiki article needs, is a working table file for a from-scratch custom gauge so that I and other people can start from something we know works. The page also needs a coder to fix some of the missing bits, but for now an example would be of the greatest use. I know I've seen custom gauges in Inferno and Wings, and I'm hoping that they aren't just in the older system the way mine was until today. If it helps, all I want is to be able to do this - see the little temperature gauge off to the right there? I just need something that can display a number provided by sexps.

So, has anyone managed to do this yet?
TWISTED INFINITIES · SECTORGAME· FRONTLINES
Rarely Updated P3D.
Burn the heretic who killed F2S! Burn him, burn him!!- GalEmp

 

Offline The E

  • He's Ebeneezer Goode
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: hud_gauges.tbll - anybody with a working custom gauge, please post?
We're using quite a few custom gauges in BP.

Code: [Select]
+Custom:
Position: (1261, 250)
Name: BPTaccom
Text: TacNet Uplink
X Offset: 3
Y Offset: 2
Gauge Type: WINGMEN_STATUS
Slew: NO
Active by default: NO
Filename: directives1
+Custom:
Position: (1261, 262)
Name: BPTaccomA
Text: System in client mode
X Offset: 5
Gauge Type: WINGMEN_STATUS
Slew: NO
Active by default: NO
Filename: directives2
+Custom:
Position: (1261, 271)
Name: BPTaccomB
Text: No valid uplink targets
X Offset: 5
Gauge Type: WINGMEN_STATUS
Slew: NO
Active by default: NO
Filename: directives2
+Custom:
Position: (1261, 280)
Name: BPTaccomC
Text:
X Offset: 5
Gauge Type: WINGMEN_STATUS
Slew: NO
Active by default: NO
Filename: directives2
+Custom:
Position: (1261, 289)
Name: BPTaccomD
Text:
Gauge Type: WINGMEN_STATUS
Slew: NO
Active by default: NO
Filename: directives3

The important bits to remember are:
-Custom Gauges need to be defined for every resolution separately. The bits quoted above are from the standard 1440x900 layout we're using as a base.
-The "Name" field defines the name you need to use as an argument for the hud-set-* sexps.
-Text can be left empty
-"Gauge Type": This is a bit complicated. Every hud gauge needs to have a gauge type. Which one you choose is pretty much up to you; the important part is that you can deactivate/activate all gauges using the "activate-gauge-type" sexp.
-"Slew": If set to yes, the gauge will react to ship movements.
-"Active by default:" If set to No, the hud-gauge-set-active sexp needs to be used in order to display the gauge.

Now, for your specific temperature gauge, the tbl entry would look like this:

Code: [Select]
+Custom:
Position: (x, y)
Name: Temperature
Text: Bla
X Offset: 5
Y Offset: 3
Gauge Type: RADAR
Slew: NO
Active by default: NO
Filename: objective1

Where (x, y) needs to replaced with valid coordinates. In-game, you can use hud-set-message to display a variable value.
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns

  

Offline Black Wolf

  • Twisted Infinities
  • 212
  • Hey! You! Get off-a my cloud!
    • Visit the TI homepage!
Re: hud_gauges.tbll - anybody with a working custom gauge, please post?
OK, that's helped, as did the original post which I just re-found (I can't believe I said it seemed intuitive :p).

Anyway, I think the key error, and the number 1 thing I need to change ASAP on the wiki is the lack of information about "$End Gauges" being a neccesary part of the whole process. I'm going to look into this tonight.
TWISTED INFINITIES · SECTORGAME· FRONTLINES
Rarely Updated P3D.
Burn the heretic who killed F2S! Burn him, burn him!!- GalEmp

 

Offline JGZinv

  • 211
  • The Last Dual! Guardian
    • The FringeSpace Conversion Mod
Re: hud_gauges.tbll - anybody with a working custom gauge, please post?
I'll be working on this tonight too. Perhaps we can compare notes if we get stuck.
True power comes not from strength, but from the soul and imagination.
Max to PCS2 to FS2 SCP Guide
The FringeSpace Conversion Mod