FreeSpace Releases > Scripting Releases

Custom Wingmen HUD Gauge [features now in FSO]

(1/17) > >>

wookieejedi:
Final update: I've now ported all the features from this script into FSO. These included color for health, full wing names, and custom dot icons for ship classes (now bombers, interceptors, and fighters all have unique wingmen dots). Beyond the substantial optimization, this has the added benefit that the gauge will now scale at varying resolutions, use HUD brightness settings, and fully work in multiplayer.


Details of which new features were added:
'$Wingmen Gauge Dot Override:' within ships.tbl. This allows modders to set wingmen status dots on a per-ship class basis. If no animation is specified then the default dot animation specified in the HUD table wingmen gauge is used. Wiki link here: https://wiki.hard-light.net/index.php/Ships.tbl#.24Wingmen_Gauge_Dot_Override:

'Use Full Wing Names:' within hud_gauges. Enabling this setting draws the full wing name and does not alter the capitalization. Wiki link here: https://wiki.hard-light.net/index.php/Hud_gauges.tbl#.2BWingman_Status:

'Use Expanded Colors:' hud_gauges. Enabling this setting uses red, yellow, or green color to designate wingmen health (green 1.0 to > 2/3, yellow 2/3 to > 1/3, and red <= 1/3. Wiki link here: https://wiki.hard-light.net/index.php/Hud_gauges.tbl#.2BWingman_Status:






Current Version 3.0
Released August 27, 2020

Custom Wingmen HUD Gauge v3.0




Background:
This script creates a new wingmen HUD gauge that provides three large differences compared to the default Wingmen HUD Gauge.


Major Features:

* Gauge writes the full wingnames. The script updates the width of the gauge so that you will always see the fill wing name. It will not show characters after a "#", too.
* Gauge can use two different styles, the traditional wingmean gauge layout, or a compact grid layout. To change to grid layout simply set CustomWingGauge.style = "grid".
* Custom sexp included so FREDer can change which wings are displayed on the gauge throughout the mission.
* Gauge shows a color for each wingman's relative health. The color transitions from green to orange to red. If the wingman is dead then a hollow red circle is shown. If the wingman departed then a hollow circle with a line is shown with the color of the departed wingman's health. If you would prefer to use gray-scale dots instead of green-orange-red dots then open the file and simply change CustomWingGauge.isgrayscaled = false to CustomWingGauge.isgrayscaled = true.
* Different icons are used to differentiate between bombers and other ships. Bombers are shown as square icons and other ships are shown as circles. This feature can be turned off by setting CustomWingGauge.isbombdifferent = false
* You can now specify the type of font the gauge uses from fonts.tbl. To specify a different font then the default change the values of CustomWingGauge.fonts = {default=1, low_resolution=3} to desired the font name or index.
* You can specify the position of the gauge easily. To change position of the gauge set values of origin and offset, similar to hud_gaugles.tbl. For example, CustomWingGauge.origin = {x=0.85, y=0.2} and CustomWingGauge.offset = {x=0, y=0}. If you want to use RTT to a cockpit display you can also set CustomWingGauge.RTT = {use=true, gauge_name="Wingmen_Custom_RTT}. If using the RTT feature, the script will use RTT in internal view then switch to screen render for external view. Also, for RTT to work be sure to also make a '+Scripted Gauge:' entry in hud_gauges.tbl, and the 'gauge_name' should equal the 'Name' of the '+Scripted Gauge' in the 'hud_gauges.tbl'.
Installation:

* Download and copy the "cuswingmengag-sct.tbm" and "cuswingmengag-sexp.tbm" files into your data/tables folder. If you know a bit of basic scripting you can also set this to appear on a mission by mission basis.
* To change the color of the gauges text and outline simply change the HUD color for the wingmen gauge in the HUD configuration settings.
Last Items:

* Here is a screenshot showing it in action.
* Script file is attached. I would be happy to hear any feedback, suggestions, or overall thoughts.
Thanks!   


Download: Custom Wingmen Gauge


Version History:

--- Code: ---V3.0 Adds option to specify which wings are displayed with custom SEXP.

V2.8-2.9 Adds an option that will scale the gauge to UHD monitors.

V2.7 makes the gauge work more like the retail gauge, because now it won't appear if the player is all alone in the mission.

V2.6 improves support for RTT options using the new SCP scripted gauge feature (thanks m!m)!

V2.5 adds an easier option to change the gauge's position.

V2.4 adds a grid option and improves minor script drawing code discrepancies.

V2.3 stops the gauge from showing if the player disables the wingmen gauge in the HUD configuration window. The update also provides proper scaling at low resolutions (<1024x768) and allows modders to specify custom fonts.

V2.2 provides a fix to check for capitalization inconsistencies between default wing and ship names within a given mission file (thanks for the catch theperfectdrugsk!).

V2.1 provides minor visual fixes and adds an orange color step, which looks much better then the previous simple green to red transition (thanks for the advice m!m!).

V1.8-2.0 gives more buffer space between the gauge borders and long wing names and better adjusts the behavior of drawing wing icons for successive waves to match retail (thanks Spoon!).

V1.7 better supports wings with greater then four ships (ie 5 or 6).

V1.6 better adjusts the behavior of drawing wing icons for successive waves to match retail and removes a debug display (thanks Spoon!).

V1.5 adjusts the behavior of drawing wing icons for successive waves to match retail (thanks Spoon!). Also it adds the option to show bombers as squares instead of circles (thanks Iain Baker!).

V1.4 fixes an issue that drew the gauge on top of fadeouts, etc (thanks Axem!) and fixed an issue of not showing the health of second or more waves of the wing (thanks Spoon!).

V1.3 fixes an issue that shows the gauge in certain views where it should not be shown (thanks Axem!).

V1.2 fixes an issue that would keep a mission file open while FREDing with FSO open (thanks to Spoon and Axem for finding that!), and also it incorporates intensity values so the brightness of the gauge will also match what you set in the HUD configuration settings.

V1.1 of the script now supports gray-scale option, bugs fixes, improved position, and the script now uses the background color of the default wingmen gauge, thus it now matches your current color configuration settings.
--- End code ---

mjn.mixael:
This is cool. Nice work!

wookieejedi:

--- Quote from: mjn.mixael on October 14, 2018, 05:17:50 pm ---This is cool. Nice work!

--- End quote ---

Thanks!

Spoon:
To quote a wise man:

--- Quote from: mjn.mixael on October 14, 2018, 05:17:50 pm ---This is cool. Nice work!

--- End quote ---

Two questions/requests, though: 1. Would it be possible for this gauge to take the hud color of the retail gauge? It feels a bit out of place being grey.
2. Could you move it back up to the height of the retail gauge position? (I had a look at the script but I'm too smoothbrained to figure out how to adjust its position) It's overlapping with other custom gauges on my end.

wookieejedi:

--- Quote from: Spoon on October 15, 2018, 08:19:16 am ---To quote a wise man:

--- Quote from: mjn.mixael on October 14, 2018, 05:17:50 pm ---This is cool. Nice work!

--- End quote ---

Two questions/requests, though: 1. Would it be possible for this gauge to take the hud color of the retail gauge? It feels a bit out of place being grey.
2. Could you move it back up to the height of the retail gauge position? (I had a look at the script but I'm too smoothbrained to figure out how to adjust its position) It's overlapping with other custom gauges on my end.

--- End quote ---

1. Sure! So you would like the grey border and background/wingname text to use that color?
2. Sure! Since it is a vertical gauge it increases in size as more wings arrive, so I can make it go a bit higher to account for that if needed.

Navigation

[0] Message Index

[#] Next page

Go to full version