Author Topic: HUD Overhaul Test Build  (Read 45489 times)

0 Members and 1 Guest are viewing this topic.

Offline Dragon

  • Citation needed
  • 212
  • The sky is the limit.
Re: HUD Overhaul Test Build
Is that possible to add support for adjusting top arc of the HUD?
There is a blank ANI file for it in retail files, so it's invisible on default HUD, but some mods used it and made custom interface art for it (TVWP comes to mind).

 

Offline swashmebuckle

  • 210
  • Das Lied von der Turd
    • The Perfect Band
Re: HUD Overhaul Test Build
Just to add to my earlier comment, the wingman anis and the weapons5 ani (bottom of the weapons gauge) seem to be similarly locked out, and I'm finding that most of the parameters for the latter don't seem to do anything yet either.  I love that you can change the header in the escort list--is this planned for the other gauges as well?  Also it would be awesome if the font size was controlled in the table--most of the stock high res anis look a little silly with the small text.  Great stuff.

 

Offline Swifty

  • 210
  • I reject your fantasy & substitute my own
Re: HUD Overhaul Test Build
Just to add to my earlier comment, the wingman anis and the weapons5 ani (bottom of the weapons gauge) seem to be similarly locked out, and I'm finding that most of the parameters for the latter don't seem to do anything yet either.  I love that you can change the header in the escort list--is this planned for the other gauges as well?  Also it would be awesome if the font size was controlled in the table--most of the stock high res anis look a little silly with the small text.  Great stuff.
Your concerns have been noted. Yes, I'll get around to changing the header text for the other gauges.

As for font size, that's something out of my control. Font sizes are fixed in the engine. As I explained earlier in this thread, I plan to implement the ability for the HUD to choose and use a font separate from the menu interface as a work around.

 

Offline swashmebuckle

  • 210
  • Das Lied von der Turd
    • The Perfect Band
Re: HUD Overhaul Test Build
Ah sorry, I somehow missed that bit of info--sounds great.

 

Offline Swifty

  • 210
  • I reject your fantasy & substitute my own
Re: HUD Overhaul Test Build
New build posted in the original post. Synced with the most recent trunk revision, 6385. Some minor bug fixes.

- Radar range appears now.
- The targetbox bitmaps no longer ignore filenames.
- Wingmen dots fixed for the Wingman Status gauge.
- The fields of the weapons list gauge should work now.

 

Offline Swifty

  • 210
  • I reject your fantasy & substitute my own
Re: HUD Overhaul Test Build
Another new build. Another bug fix. Radar that's been specified in the tbl will no longer force standard radar despite the orb radar launcher flag being enabled.

Oh, and I added the capability for HUD-specific, ship-specific, and gauge-specific fonts. :D

Documentation in the sample hud_gauges.tbl along with an example fonts.tbl.

PDBs are now included as they should have been many releases before. Thanks goes to the chief for reminding me.

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️À➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: HUD Overhaul Test Build
Wouldn't have noticed without The E trying to help Dragon.
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 

Offline Dragon

  • Citation needed
  • 212
  • The sky is the limit.
Re: HUD Overhaul Test Build
I indeed done plenty of testing on that and found some bugs (they should now be fixed).

 

Offline Aardwolf

  • 211
  • Posts: 16,384
    • Minecraft
Re: HUD Overhaul Test Build
A general question (in response to seeing mention of ship/gauge/HUD-specific stuff)...

How much support (if any) for doing stuff like... creating a HUD specific for one ship class, which copies all the properties of another HUD, but changes one aspect of it (without requiring the mod developer to basically copy-paste the entire thing)? Also, for stuff like defining positions relative to other stuff?

And will scripting be able to control HUD components, without having to fully recreate the HUD? I remember a while ago (and maybe to this day) it was rather frustrating that if you overrode the $On HUD Draw: scripting hook, you had to completely re-implement all of the parts of the HUD you didn't want to get rid of... Meaning getting rid of 1 gauge via scripting was as bad as adding dozens of gauges.

 

Offline Dragon

  • Citation needed
  • 212
  • The sky is the limit.
Re: HUD Overhaul Test Build
Ship specific HUD is exactly the reason why I tested this build and it does indeed work.

That thing written over the grid is the model number and "official" name of fighter it's installed on.

 

Offline Commander Zane

  • 212
  • Spoot Knight of Anvils
Re: HUD Overhaul Test Build
I wonder why that wasn't on the Lao Tze.

 

Offline The E

  • He's Ebeneezer Goode
  • Global Moderator
  • 213
  • Nothing personal, just tech support.
    • Skype
    • Steam
    • Twitter
Re: HUD Overhaul Test Build
Because this is a highly experimental feature that isn't in trunk?
**** every cause that ends in murder and children crying. ― Iain Banks
Join the fun at the HLP IRC channel. Get the latest spam and gossip as long as it's fresh!

 

Offline Commander Zane

  • 212
  • Spoot Knight of Anvils
Re: HUD Overhaul Test Build
No, but it originally had a cockpit when it was the MiG.

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: HUD Overhaul Test Build
No, but it originally had a cockpit when it was the MiG.

I'm sure the cockpit is still there, just enable show ship.

It may have been resized however.

 

Offline swashmebuckle

  • 210
  • Das Lied von der Turd
    • The Perfect Band
Re: HUD Overhaul Test Build
Been working on refining the HUD with the latest build, and the new font support is freaking sweet.  Though the wingman anis still seem to be locked out, the target viewer now is working great with the high res artwork.  When I tried to use the "Integrity Bar Foreground Clip Height: 88" option though, I get a crash on startup where it says the game is looking for an INT (even though it is using an integer), so I've had to leave that commented out.  I also sometimes see a problem with the extra target data gauge where "waypoint" and "time to 01:30" are overlaid on top of each other rather than showing up as "time to waypoint 01:25" or however it's supposed to read.  Anyway, the awesomeness of this feature cannot be overstated.

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Re: HUD Overhaul Test Build
A general question (in response to seeing mention of ship/gauge/HUD-specific stuff)...

How much support (if any) for doing stuff like... creating a HUD specific for one ship class, which copies all the properties of another HUD, but changes one aspect of it (without requiring the mod developer to basically copy-paste the entire thing)? Also, for stuff like defining positions relative to other stuff?

And will scripting be able to control HUD components, without having to fully recreate the HUD? I remember a while ago (and maybe to this day) it was rather frustrating that if you overrode the $On HUD Draw: scripting hook, you had to completely re-implement all of the parts of the HUD you didn't want to get rid of... Meaning getting rid of 1 gauge via scripting was as bad as adding dozens of gauges.

i wouldnt mind having hooks for some gauges, like radar and anything else that can be recreated with scripting fairly easily, like weapon info and different styles of lead indicators. these hooks might want variables like where its supposed to go, what size its supposed to be. of course that sounds somewhat complicated.

it might be easier just to disable certain gauges on certain ships, and place a scripted gauge in the resulting hole, crude but somewhat effective (and made somewhat easier if your first suggestion is implemented). it would help though if you could find out some info about the gauge you are replacing through scripting, like its position/size/color and other parameters. the script doesnt need to know what configuration your using, just what parameters are currently in use. and if you could disable and enable the gauge from the script as well (make it one of the parameters), then the scripter really doesnt need to concern themselves with the hud table at all.

also a small fiy, my attempt to render a hud to polygons in the cockpit model with scripting have hit a brick wall. seems i cant tell the hud to render at an arbitrary time, and if i recreate everything in scripting, i cant seem to draw anything transparent to the dynamic texture, so even if i could render the hud, the bitmap would be opaque and completely block your view. so li be keeping an eye on this, waiting for scrpting features to pop up.
« Last Edit: August 31, 2010, 06:27:10 pm by Nuke »
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 

Offline Swifty

  • 210
  • I reject your fantasy & substitute my own
Re: HUD Overhaul Test Build
Scripting features involving the new HUD specification are planned. The plan would be to perhaps have the Custom gauge HUD object type have a Script: field which a user can define a Lua function or source file that will provide additional logic for a more dynamic user-defined gauge with access to the HudGauge class methods so the script writer won't have to worry about the various transformations that FS2 does (TrackIR, afterburner shakes, screen position)

In any case, would it really bother anyone if we change the behavior of On HUD Draw to not disable the HUD? If someone really wants to completely replace the HUD with this new HUD spec, they can just set Load Retail Configuration to No in hud_gauges.tbl and not define any gauges.

Been working on refining the HUD with the latest build, and the new font support is freaking sweet.  Though the wingman anis still seem to be locked out, the target viewer now is working great with the high res artwork.  When I tried to use the "Integrity Bar Foreground Clip Height: 88" option though, I get a crash on startup where it says the game is looking for an INT (even though it is using an integer), so I've had to leave that commented out.  I also sometimes see a problem with the extra target data gauge where "waypoint" and "time to 01:30" are overlaid on top of each other rather than showing up as "time to waypoint 01:25" or however it's supposed to read.  Anyway, the awesomeness of this feature cannot be overstated.
Uploaded a new build in the OP with all the stuff you reported fixed. Thanks for reporting them.

As for the Extra Target Data gauge, I forgot to properly initialize the offsets that handle "Time to waypoint". There's an extra field that I forgot to add for it before but it's now there. I've updated the sample hud_gauges.tbl with the extra field.


 

Offline The E

  • He's Ebeneezer Goode
  • Global Moderator
  • 213
  • Nothing personal, just tech support.
    • Skype
    • Steam
    • Twitter
Re: HUD Overhaul Test Build
In any case, would it really bother anyone if we change the behavior of On HUD Draw to not disable the HUD? If someone really wants to completely replace the HUD with this new HUD spec, they can just set Load Retail Configuration to No in hud_gauges.tbl and not define any gauges.

Yes. The ability to completely override the entire HUD through scripting should still be present. What should be added would be a "Override HUD gauge type" option, as well as the "integrated scripting" thing you proposed.
**** every cause that ends in murder and children crying. ― Iain Banks
Join the fun at the HLP IRC channel. Get the latest spam and gossip as long as it's fresh!

 

Offline Swifty

  • 210
  • I reject your fantasy & substitute my own
Re: HUD Overhaul Test Build
So, should we create a new hook then? Something called With HUD Draw?

Custom gauges already have a "Gauge Type" field. If you want to hypothetically replace the weapons gauge, you'd define a Custom gauge in hud_gauges.tbl with Gauge Type: WEAPONS_GAUGE and Script: hud_new_weapons.lua or something like that.

That's the best I can think of a scripting interface that plays nice with the new HUD spec.

 

Offline Commander Zane

  • 212
  • Spoot Knight of Anvils
Re: HUD Overhaul Test Build
No, but it originally had a cockpit when it was the MiG.

I'm sure the cockpit is still there, just enable show ship.

It may have been resized however.
By WiH default; it doesn't come up with show ship. It's named invisible so it has to be renamed for it to appear, like the Uriel and Durga.