Author Topic: Proposed Hud_gauge.tbl Changes  (Read 2102 times)

0 Members and 1 Guest are viewing this topic.

Offline z64555

  • 210
  • Self-proclaimed controls expert
    • Minecraft
    • Steam
Proposed Hud_gauge.tbl Changes
After overhauling the hud_gauges.tbl wiki page, I found a few entries that I just simply didn't like. So, I went ahead and did a few changes and made a patch.

Basically, the patch groups a whole bunch of related items under @Primary List: and @Secondary List, so tablers won't have to mess with nonsense like Primary List Top Background Filename. As a bonus, a minor performance gain is achieved since the parse doesn't have to check for weapon list entries if they're not there (because the @Primary List: or @Secondary List: isn't there).


For comparison, here is the original/current hud_gauges.tbl as of r9025

Code: [Select]
+Weapons: ;; Current
  Primary List Top Background Filename:
  Primary List Middle Background Filename:
  Primary List Bottom Background Filename:
  Secondary List Top Background Filename:
  Secondary List Entry Background Filename:
  Secondary List Bottom Background Filename:
  Primary List Start Y-offset:
  Secondary List Start Y-offset:
  Primary Weapon Ammo X-offset:
  Primary Weapon Link X-offset:
  Primary Weapon Name X-offset:
  Secondary Weapon Ammo X-offset:
  Secondary Weapon Name X-offset:
  Secondary Weapon Reload X-offset:
  Primary Weapon Entry Height:
  Secondary Weapon Entry Height:
  Top Primary Frame Height:
  Top Secondary Frame Height:
  Primary List Start Y-offset:
  Secondary List Start Y-offset:
  Primary Weapon Ammo X-offset:
  Primary Weapon Link X-offset:
  Primary Weapon Name X-offset:
  Secondary Weapon Ammo X-offset:
  Secondary Weapon UNlinked X-offset:
  Secondary Weapon Linked X-offset:
  Secondary Weapon Name X-offset:
  Secondary Weapon Reload X-offset:
  Primary Weapon Entry Height:
  Secondary Weapon Entry Height: 

+Weapon Linking:
    Single Primary Filename:
    Double Primary Filename:
    Single Primary Offsets:
    Double Primary Offsets:
    Single Secondary Filename:
    Double Secondary Filename:
    Triple Secondary Filename:
    Single Secondary Offsets:
    Double Secondary Offsets:
    Triple Secondary Offsets:


And here are my proposed changes:


Code: [Select]
+Weapon: ;; Proposed
  @Primary List:
    Top Background Filename:
    Middle Background Filename:
    Bottom Background Filename:
    Top Background X-offset:
    Top Frame Height:
    List Start Y-offset:
    Ammo X-offset:
    Weapon Link X-offset:
    Weapon Name X-offset:
    Entry Height:

  @Secondary List:
    Top Background Filename:
    Entry Background Filename:
    Bottom Background Filename:
    Top Frame Height:
    List Start Y-offset:
    Weapon Ammo X-offset:
    Weapon Unlinked X-offset:
    Weapon Linked X-offset:
    Weapon Name X-offset:
    Weapon Reload X-offset:
    Entry Height:
  @End


+Weapon Linking:
  @Primary Weapon:
    Single Filename:
    Double Filename:
    Single Offsets:
    Double Offsets:
  @Secondary Weapon:
    Single Filename:
    Double Filename:
    Triple Filename:
    Single Offsets:
    Double Offsets:
    Triple Offsets:
  @End


Closing remarks: I'm aware that some mod's may already be dependent on the moved strings. If this proves to be a significant problem to them, I have no objection to modifying the patch to include "omitted" portions.

Lastly, to help a few of you, I've also attached a test build along with the patch. This may be used to quickly determine if it will or will not "break" your existing tables. (Hopefully there won't be any broken tables, furniture is so expensive  :nervous:)

hudparse.cpp.patch
fs2_open_3_6_13d_r9025_hud_gauges
Secure the Source, Contain the Code, Protect the Project
chief1983

------------
funtapaz: Hunchon University biologists prove mankind is evolving to new, higher form of life, known as Homopithecus Juche.
z64555: s/J/Do
BotenAlfred: <funtapaz> Hunchon University biologists prove mankind is evolving to new, higher form of life, known as Homopithecus Douche.

 

Offline IronBeer

  • 29
  • (Witty catchphrase)
    • Minecraft
Re: Proposed Hud_gauge.tbl Changes
I don't have a lot of familiarity with this particular table, but the changes definitely improve readability and ease of use. For what it's worth, I'd support adding these changes to trunk- they don't seem that radical, and should make things easier on modders first cracking open this table.
"I have approximate knowledge of many things."

Ridiculous, the Director's Cut

Starlancer Head Animations - Converted