Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: niffiwan on June 25, 2012, 12:17:26 am

Title: HUD ETS gauge changes
Post by: niffiwan on June 25, 2012, 12:17:26 am
As a heads up for everyone, as part of fixing mantis 2419 (http://scp.indiegames.us/mantis/view.php?id=2419) I've added a new HUD ETS gauge and made a a change to the way that the default ETS gauges are shown. 

The new gauge is called ETS Retail and it's purpose in life is to act like the retail ETS gauge which would draw the weapon & energy bars together when you're flying a ship without shields (or weapons or engines, but that's never been done to my knowledge).  Prior to the patch, if you didn't have shields, the weapon & engine bars would draw with a gap in between them.

The change which may affect people is that I made the new gauge the default ETS gauge, so if you're using a hud gauges.tbl file and/or certain mods that package their own, you may get ETS gauges drawn over the top of each other, like this (thanks to Axem for the screenshot)

(http://lazymodders.fsmods.net/axemart/FreeSpace/screen0849.jpg)

The fix is simple, in your hud gauges.btl file, change "+ETS Weapons:" to "+ETS Retail" and remove "+ETS Shields:" and "+ETS Engines:".  I've attached some hud gauge tables for mediavps_3612, fsport_mediavps (which won't suffer from this issue by default, but it won't get the new gauge by default either, and this is the mod that has the most instances of fighters-without-shields that I know of) & blueplanet2 that I've modified to work correctly.  Put the tables into mod/data/tables, rename them so that they're all called mv_root-hdg.tbm, and remove any other hud gauge tables from mod/data/tables. (FYI - using the same tbm filename consistently in all your mods prevents you getting duplicated hud gauges due to two different tables loading.)
For when the forums remove the attachments, they're also available in this mantis issue. (http://scp.indiegames.us/mantis/view.php?id=2672)

I chose not to add extra code so that only the new gauge OR the three individual gauges would display because I don't think this exception is intuitive, there's another setting which will stop the duplicates from happening (the load retail configuration option), the fix is simple and the fact that the new HUD feature was added since 3.6.12, so it's OK to break the feature before 3.6.14  :nervous:

Lastly (in case anyone is interested) the exact conditions to get duplicated ETS gauges are:
1) You have a hud gauges.tbl file in your .vps or in data/tables and that table specifies one or more of the ETS Weapons/Shields/Engines gauges
2) Your hud gauges table has "$Load Retail Configuration: yes" in it

Let me know if you have any questions/comments...

[attachment deleted by a ninja]
Title: Re: HUD ETS gauge changes
Post by: Kolgena on June 25, 2012, 11:21:43 am
The new retail ETS is great, but it is also bigger than the three individual gauges combined when not drawing to XXXX*768, or at least, that's what it looks like from the screenshot. If this is the case, any chance that it could be kept consistent?
Title: Re: HUD ETS gauge changes
Post by: mjn.mixael on June 25, 2012, 11:22:25 am
Seriously? With 3.6.14 in complete limbo.. you are wanting coders to spend time making sure two gauges that should never be on screen together are the same size? This is something you never would have noticed if it weren't for the bug reported and screenshot taken.
Title: Re: HUD ETS gauge changes
Post by: Kolgena on June 25, 2012, 11:29:09 am
Er yes. There could be better control given to people to arrange HUD elements as needed. With an increase in the gauges' total height and width, you risk previous tables breaking because the ETS gauge will overlap auto target, match speed, and mission time, while the bottom of the gauges go off the screen. At least, that's what would happen to all my tables and some of the new BP tables.

Edit in response to everything after "seriously": Okay, yeah, that's a good point. I just threw this out because it was the first and only thing I noticed from the OP that could have had improvement.
Title: Re: HUD ETS gauge changes
Post by: Axem on June 25, 2012, 05:19:04 pm
The reason the gauge is larger is that I am running the new mediavps in that screenshot with a proper hud gauge table. Because the ETS Retail gauge is not in that table, the game just goes by the default hardcoded behavior, which causes the gauge to be stretched up.
Title: Re: HUD ETS gauge changes
Post by: niffiwan on June 25, 2012, 07:04:43 pm
What Axem said  :)  When specified in the table, the ETS Retail gauge should be the same size as the three individual gauges.
Title: Re: HUD ETS gauge changes
Post by: Kolgena on June 27, 2012, 01:49:42 pm
The reason the gauge is larger is that I am running the new mediavps in that screenshot with a proper hud gauge table. Because the ETS Retail gauge is not in that table, the game just goes by the default hardcoded behavior, which causes the gauge to be stretched up.


K cool! Thanks for the clarification.