Hard Light Productions Forums

FreeSpace Releases => Scripting Releases => Topic started by: wookieejedi on October 14, 2018, 02:54:17 pm

Title: Custom Wingmen HUD Gauge v2.7
Post by: wookieejedi on October 14, 2018, 02:54:17 pm
Current Version 2.7
Released April 23, 2019

Custom Wingmen HUD Gauge v2.7

(https://i.ibb.co/t3JsBGz/Custom-Wingmen-Gauge.png) (https://i.ibb.co/ZdVMx4B/screen0113.png)


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


Major Features:

Installation:

Last Items:

Thanks!   


Download: Custom Wingmen Script V2.7 Script (https://github.com/wookieejedi/Custom-Wingmen-Gauge/blob/master/cuswingmengag-sct.tbm)


Version History:
Code: [Select]
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.

Title: Re: Custom Wingmen HUD Gauge v1.0
Post by: mjn.mixael on October 14, 2018, 05:17:50 pm
This is cool. Nice work!
Title: Re: Custom Wingmen HUD Gauge v1.0
Post by: wookieejedi on October 14, 2018, 08:42:51 pm
This is cool. Nice work!

Thanks!
Title: Re: Custom Wingmen HUD Gauge v1.0
Post by: Spoon on October 15, 2018, 08:19:16 am
To quote a wise man:
This is cool. Nice work!

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.
Title: Re: Custom Wingmen HUD Gauge v1.0
Post by: wookieejedi on October 15, 2018, 11:25:35 am
To quote a wise man:
This is cool. Nice work!

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.

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.
Title: Re: Custom Wingmen HUD Gauge v1.0
Post by: Spoon on October 15, 2018, 12:33:43 pm
Nice  :yes:
1. Yeah, lets color everything. I think the white text looks pretty nice too, but looking at how the hud currently is, all of the other hud gauges have their text in color too (with the directives themselves as an exception), so for consistency sake.

2. It's needed in my case:
(https://i.imgur.com/iGgsQKi.png)
If you could raise it so it's at the top of the screen, with a small distance away from the edge of the border, that'd be great.
Title: Re: Custom Wingmen HUD Gauge v1.0
Post by: mjn.mixael on October 15, 2018, 02:33:53 pm
Honestly, I'd love it if it worked a little smarter. So like it does 3 wings horizontally and then after that it starts a new row?

Bonus points to make color automatically get it from the Player's HUD color and/or configurable with a cfg file. Could do the same with text color and the horizontal vs vertical layouts.
Title: Re: Custom Wingmen HUD Gauge v1.1
Post by: wookieejedi on October 15, 2018, 02:40:19 pm
Just posted a new version. Now the script now supports gray-scale option, improved position, and the script now uses the background color of the default wingmen gauge, thus it matches your current color configuration settings. Also fixed quite a few minor bugs.

Hmm two horizontal lines is a good idea, then it would nicely fit with the old gauge's placement. Changing the line colors and whatnot in a configure file is certainly doable, but since the player can alter it from the HUD Configuration in game I think that covers most use cases.

Just to note, the max list is 5 wings, since the script gathers the wings to list from the "Squadron Wing Names" in the mission file.

Thanks for both of your suggestions. I would be happy to hear any additional feedback, too!
Title: Re: Custom Wingmen HUD Gauge v1.1
Post by: Spoon on October 15, 2018, 02:55:22 pm
New version is nice  :yes:
Title: Re: Custom Wingmen HUD Gauge v1.1
Post by: wookieejedi on October 15, 2018, 02:58:05 pm
New version is nice  :yes:

Thanks! I also tried to make a few variable names more understandable in case anyone wanted to adjust it for specific purposes.
Title: Re: Custom Wingmen HUD Gauge v1.1
Post by: theperfectdrugsk on October 15, 2018, 03:47:54 pm
Ooooo I like it.

Very very very small suggestion, you may want to allow it to have high-contrast toggled instead of being at full brightness all the time.  Again, just for consistency.
Title: Re: Custom Wingmen HUD Gauge v1.1
Post by: wookieejedi on October 15, 2018, 04:18:40 pm
Ooooo I like it.

Very very very small suggestion, you may want to allow it to have high-contrast toggled instead of being at full brightness all the time.  Again, just for consistency.

Thanks! Just so I can better address your suggestion, are you referring the the color contrast on the dots, or the color contrast on the text?
Title: Re: Custom Wingmen HUD Gauge v1.1
Post by: theperfectdrugsk on October 15, 2018, 06:26:55 pm
Thanks! Just so I can better address your suggestion, are you referring the the color contrast on the dots, or the color contrast on the text?

I meant the "high contrast" toggle that you can bind to a key for use in-mission that makes the entire HUD brighter.  Right now the custom wingmen gauge is always at full brightness even when the rest of the HUD is at lower brightness.  Like I said, it's a super minor detail (especially since I always toggle the HUD to full brightness anyway).
Title: Re: Custom Wingmen HUD Gauge v1.1
Post by: wookieejedi on October 15, 2018, 07:22:31 pm
Thanks! Just so I can better address your suggestion, are you referring the the color contrast on the dots, or the color contrast on the text?

I meant the "high contrast" toggle that you can bind to a key for use in-mission that makes the entire HUD brighter.  Right now the custom wingmen gauge is always at full brightness even when the rest of the HUD is at lower brightness.  Like I said, it's a super minor detail (especially since I always toggle the HUD to full brightness anyway).

Oh I had completely forgotten about that! Let me see what I can do! (Hopefully there is a scripting hook that can tell when it is set.)
Title: Re: Custom Wingmen HUD Gauge v1.1
Post by: m!m on October 17, 2018, 12:43:31 pm
This looks pretty nice :yes: The default wingman gauge was always a little limited for my tastes...

I had some previous instances where I wanted to scale the health of a ship to a color and I found out that it is better to add a second color step in the middle to avoid that ugly red/green mix. When you use a shade of orange at 50% health the progression should look a bit nicer.

EDIT: Also, your script is nicely isolated from the rest of the scripting system. Only once global variable and everything else is local. I know that may be obvious to you but I see way too many scripts that pollute the global namespace :yes:
Title: Re: Custom Wingmen HUD Gauge v1.1
Post by: wookieejedi on October 17, 2018, 02:00:27 pm
This looks pretty nice :yes: The default wingman gauge was always a little limited for my tastes...

I had some previous instances where I wanted to scale the health of a ship to a color and I found out that it is better to add a second color step in the middle to avoid that ugly red/green mix. When you use a shade of orange at 50% health the progression should look a bit nicer.

EDIT: Also, your script is nicely isolated from the rest of the scripting system. Only once global variable and everything else is local. I know that may be obvious to you but I see way too many scripts that pollute the global namespace :yes:

Thank you! Ah adding an orange step is a very good idea. I appreciate the coding comments, I learned a lot of how to lua script from reading your and Axem's scripts : D
Title: Re: Custom Wingmen HUD Gauge v1.1
Post by: Spoon on October 20, 2018, 09:32:31 am
So I ran into a big issue that FRED couldn't save to the mission file that was open in FSO. FRED didn't give any warnings, it just straight up undid all of the changes made and would only agree to save to the file if the mission was no longer open in FSO. Behavior I had never seen before and wrongly attributed to some bug in recent builds and/or FRED. Thankfully, Axem is a very smart man, and he figured out that bug was caused by this script. Probably because it reads the wing names from the mission file, and then keeps the file open. Preventing FRED from writing to it.

Just a heads up to everyone using the script in its current version.
Title: Re: Custom Wingmen HUD Gauge v1.1
Post by: wookieejedi on October 20, 2018, 10:41:04 am
So I ran into a big issue that FRED couldn't save to the mission file that was open in FSO. FRED didn't give any warnings, it just straight up undid all of the changes made and would only agree to save to the file if the mission was no longer open in FSO. Behavior I had never seen before and wrongly attributed to some bug in recent builds and/or FRED. Thankfully, Axem is a very smart man, and he figured out that bug was caused by this script. Probably because it reads the wing names from the mission file, and then keeps the file open. Preventing FRED from writing to it.

Just a heads up to everyone using the script in its current version.

Thanks for the update, I have fixed the issue and uploaded a new version (v1.2). That must have been very annoying to try and figure out, and I am sorry about all that extra bug fixing I put you guys through!

The new version also incorporates the intensity value from the player's HUD settings as well, so if you like a brighter or darker HUD the gauge will match what you have set.
Title: Re: Custom Wingmen HUD Gauge v1.2
Post by: m!m on October 20, 2018, 10:44:59 am
I made some changes to how the engine handles the file handles so that you get yelled at if you forget to close a file handle so this shouldn't happen again in the future.
Title: Re: Custom Wingmen HUD Gauge v1.2
Post by: wookieejedi on October 20, 2018, 10:46:26 am
Good idea! It's fixed in this script now, but that is definitely a good safety check to have for any future scripts.
Title: Re: Custom Wingmen HUD Gauge v1.1
Post by: Spoon on October 20, 2018, 12:26:14 pm
Thanks for the update, I have fixed the issue and uploaded a new version (v1.2). That must have been very annoying to try and figure out, and I am sorry about all that extra bug fixing I put you guys through!

The new version also incorporates the intensity value from the player's HUD settings as well, so if you like a brighter or darker HUD the gauge will match what you have set.
No worries!
I would be lying if I said I wasn't freaking out for a bit earlier. "How many changes have I made in these past months that have not been saved?! :shaking:" But thankfully that turned out to be non-issue.

The fixes and added safeties are  :yes:
Title: Re: Custom Wingmen HUD Gauge v1.2
Post by: wookieejedi on October 21, 2018, 08:54:06 pm
New version released, Version 1.3. This fixes an issue that shows the gauge in certain views where it should not be shown. Thanks to Axem for the fix!
Title: Re: Custom Wingmen HUD Gauge v1.2
Post by: Rampage on November 05, 2018, 06:19:38 pm
This is a great addition to the community.  Any chance there might be an option to include images (eg radar icons) to represent wingmen instead of dots?  This will allow the script to represent allied capital ships in capship command missions.

Once again great work!

R
Title: Re: Custom Wingmen HUD Gauge v1.2
Post by: Spoon on November 06, 2018, 04:57:31 pm
One more major issue to report: If you have a wing with multiple waves on your hud gauge, any wave aside from the first one won't show up on the gauge.

So for example. Alpha wing has 3 wingmen to start with, they die, next three launch from the hangarbay, the hud gauge is then not updated to reflect the status of alpha 4, 5 and 6 etc.
Title: Re: Custom Wingmen HUD Gauge v1.2
Post by: wookieejedi on November 07, 2018, 08:05:06 pm
This is a great addition to the community.  Any chance there might be an option to include images (eg radar icons) to represent wingmen instead of dots?  This will allow the script to represent allied capital ships in capship command missions.

Once again great work!

R

That is a good idea, though implementation will just depend on how much free time I can muster over the next few weeks. Thanks for you feedback!

One more major issue to report: If you have a wing with multiple waves on your hud gauge, any wave aside from the first one won't show up on the gauge.

So for example. Alpha wing has 3 wingmen to start with, they die, next three launch from the hangarbay, the hud gauge is then not updated to reflect the status of alpha 4, 5 and 6 etc.

Ah good to know, that is a rather important issue to address, so I will work on fixing that this weekend or next! Thanks again for you continued suggestions and comments.
Title: Re: Custom Wingmen HUD Gauge v1.2
Post by: Spoon on November 24, 2018, 10:48:03 pm
Hey, not to be pushy, but it's been a few weekends now.
Title: Re: Custom Wingmen HUD Gauge v1.2
Post by: wookieejedi on November 26, 2018, 09:27:56 pm
I knew there was something else on my FSO list, thanks for the reminder! I am testing fixes now and will hopefully have something by the end of the week once I return from travels.
Title: Re: Custom Wingmen HUD Gauge v1.2
Post by: Spoon on November 27, 2018, 12:10:09 am
I knew there was something else on my FSO list, thanks for the reminder! I am testing fixes now and will hopefully have something by the end of the week once I return from travels.
  :yes:
Title: Re: Custom Wingmen HUD Gauge v1.4
Post by: wookieejedi on December 04, 2018, 09:05:34 pm
Version 1.4 has been released! This version 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!).
Title: Re: Custom Wingmen HUD Gauge v1.4
Post by: Spoon on December 04, 2018, 09:50:35 pm
Thanks for the hardwork (https://fi.somethingawful.com/images/smilies/discoursechef.png)

The way it fills up new slots for new wave arrivals is kind of... interesting, though.
Alpha is a wing of 3 with a threshold of 1 and Custodian is a wing of 2. So after three waves the display ends up looking like this (attachment)

[attachment deleted by admin]
Title: Re: Custom Wingmen HUD Gauge v1.4
Post by: wookieejedi on December 05, 2018, 03:59:29 am
Thanks for the hardwork (https://fi.somethingawful.com/images/smilies/discoursechef.png)

The way it fills up new slots for new wave arrivals is kind of... interesting, though.
Alpha is a wing of 3 with a threshold of 1 and Custodian is a wing of 2. So after three waves the display ends up looking like this (attachment)

Thanks! Yeah if there are less then 6 slots filled the next wave fills the six slots first. That behavior can be easily changed :) Would you like it if the new wing simply filled over the previous wing. For example, Alpha wing has 3 ships and 2 waves. On the first wave three dots are shown and on the second wing only three dots are still shown. Does that sound like more what you were looking for?
Title: Re: Custom Wingmen HUD Gauge v1.4
Post by: Spoon on December 05, 2018, 12:07:03 pm
Yeah, that's how the retail wingmen hud works, it just fills the same dots again. I do think that looks a bit nicer on the hud. So if you could change it to behave like that, that would be good.
Title: Re: Custom Wingmen HUD Gauge v1.4
Post by: Iain Baker on December 05, 2018, 01:36:10 pm
Nice!

One addition that would be very handy would be an indication as to what the ships in each wing are.

In particular, it would be very handy to know which ones are bombers. In some missions of some mods you may have five wings under your command, possibly more. It can be tricky to work out / remember which are your bomber wings in the middle of a fight. Especially so if you didn't choose the wings yourself in the hanger. Even more so if you are dropped into the middle of a hairball and don't have time to visually check each wing / cycle through each friendly ship.

Is this technically possible? If so, how would it react if the player were to swap ships around in the hanger?
Title: Re: Custom Wingmen HUD Gauge v1.4
Post by: wookieejedi on December 05, 2018, 05:10:09 pm
Yeah, that's how the retail wingmen hud works, it just fills the same dots again. I do think that looks a bit nicer on the hud. So if you could change it to behave like that, that would be good.

Good point. That is now changed to match retail behavior in Verizon 1.5.

Nice!

One addition that would be very handy would be an indication as to what the ships in each wing are.

In particular, it would be very handy to know which ones are bombers. In some missions of some mods you may have five wings under your command, possibly more. It can be tricky to work out / remember which are your bomber wings in the middle of a fight. Especially so if you didn't choose the wings yourself in the hanger. Even more so if you are dropped into the middle of a hairball and don't have time to visually check each wing / cycle through each friendly ship.

Is this technically possible? If so, how would it react if the player were to swap ships around in the hanger?

Thanks, that is a good suggestion. It is indeed possible and the changes between waves and player swapping ships in the load-out (hangar) screen is also accounted for. I have added the different bomber icons as a feature for Version 1.5. Now bombers are designated by squares and other ships by circles.

Version 1.5 is released and the link is on the front page.

As always, I appreciate the feedback from you both, and I would be happy to answer any additional questions or address any issues! Thanks!
Title: Re: Custom Wingmen HUD Gauge v1.5
Post by: Spoon on December 05, 2018, 11:27:43 pm
Sorry to be difficult here  :p

Issue 1. I have Alpha wing start with 3 in the wing, but with a threshold of 1. So when 2 are destroyed, the next three in the wing arrive. With the retail hud gauge, it would add the fourth icon to the hud.
The fourth icon would remain empty (ergo: dead. Not empty as in, its gone completely) if the wing got reduced to 3 again, but in the cases where the wing was again 4 on the field, it would fill up again.
Currently the script doesn't account for that, and only ever shows the three circles, even if there are four in the wing.

Issue 2. see attachment
Is this a debug text thing? The text seems to color along with the dot, but only for the first three fighters.


[attachment deleted by admin]
Title: Re: Custom Wingmen HUD Gauge v1.5
Post by: wookieejedi on December 06, 2018, 03:31:17 am
Sorry to be difficult here  :p

Issue 1. I have Alpha wing start with 3 in the wing, but with a threshold of 1. So when 2 are destroyed, the next three in the wing arrive. With the retail hud gauge, it would add the fourth icon to the hud.
The fourth icon would remain empty (ergo: dead. Not empty as in, its gone completely) if the wing got reduced to 3 again, but in the cases where the wing was again 4 on the field, it would fill up again.
Currently the script doesn't account for that, and only ever shows the three circles, even if there are four in the wing.

Issue 2. see attachment
Is this a debug text thing? The text seems to color along with the dot, but only for the first three fighters.

No worries, I appreciate the feedback! I think I see what you mean, and I have adjusted the script for Version 1.6 accordingly. You are correct, those are debug lines and I commented them out properly this time. Please let me know if that works more how you'd expect!

Version 1.6 (and now 1.7) is released, link on front page as usual  :)
Title: Re: Custom Wingmen HUD Gauge v1.6
Post by: Spoon on December 07, 2018, 01:57:38 pm
Doesn't quite work right yet.
https://www.dropbox.com/s/557cuaegk5p624z/Fs2_open_Wings_of_Dawn-EX17-SSE%202018-12-07%2015-39-31-60.webm?dl=0
Title: Re: Custom Wingmen HUD Gauge v1.6
Post by: wookieejedi on December 07, 2018, 04:21:48 pm
Doesn't quite work right yet.
https://www.dropbox.com/s/557cuaegk5p624z/Fs2_open_Wings_of_Dawn-EX17-SSE%202018-12-07%2015-39-31-60.webm?dl=0

Ah I see what you mean now. Once the second wave jumps in all four dots should be green. Will work on fixing that!
Title: Re: Custom Wingmen HUD Gauge v1.6
Post by: wookieejedi on December 07, 2018, 07:05:37 pm
Doesn't quite work right yet.
https://www.dropbox.com/s/557cuaegk5p624z/Fs2_open_Wings_of_Dawn-EX17-SSE%202018-12-07%2015-39-31-60.webm?dl=0

Once the second wave jumps in all four dots should be green. Will work on fixing that!

I think I have fixed the issue in Version 1.8 which is now released. Let me know if it works as expected, thanks! 
Title: Re: Custom Wingmen HUD Gauge v1.8
Post by: Spoon on December 07, 2018, 10:13:03 pm
Onward to version 1.9
https://www.dropbox.com/s/ykm4dnud5sis46j/Fs2_open_Wings_of_Dawn-EX17-SSE%202018-12-07%2023-53-43-09.webm?dl=0
Title: Re: Custom Wingmen HUD Gauge v1.8
Post by: wookieejedi on December 08, 2018, 05:31:57 pm
Onward to version 1.9
https://www.dropbox.com/s/ykm4dnud5sis46j/Fs2_open_Wings_of_Dawn-EX17-SSE%202018-12-07%2023-53-43-09.webm?dl=0

Indeed! Version 1.9 is released, and hopefully it now works as expected. I replicated what I saw on your screen and I believe the new version works how you'd expect, but of course let me know if not.  :) Thanks again for testing so often, I very much appreciate it!
Title: Re: Custom Wingmen HUD Gauge v1.9
Post by: Spoon on December 08, 2018, 10:28:08 pm
Not quite there yet.
https://www.dropbox.com/s/xfoxcz21usq06a7/Fs2_open_Wings_of_Dawn-EX17-SSE%202018-12-08%2023-55-01-74.webm?dl=0
I didn't see this happen with a wing of 5
Title: Re: Custom Wingmen HUD Gauge v1.9
Post by: wookieejedi on December 09, 2018, 03:29:08 am
Not quite there yet.
https://www.dropbox.com/s/xfoxcz21usq06a7/Fs2_open_Wings_of_Dawn-EX17-SSE%202018-12-08%2023-55-01-74.webm?dl=0
I didn't see this happen with a wing of 5

To me, the video seems to show the correct number of alive icons for the correct number of ships in mission for each wing at any time. But I might be thinking about it differently so just for my clarification, are you saying what is in the video is good, but it doesn't work with a wing of 5, or that what is in the video doesn't look good, but it does work with a wing of 5? Thanks!
Title: Re: Custom Wingmen HUD Gauge v1.9
Post by: Spoon on December 09, 2018, 01:03:47 pm
When the next wing arrives, it adds the new dot along side the empty dot. So that wing of 1 is now indicated as a wing of 2. That happens all the way up to a wing of 5.
That's not quite what I'd expect should happen, with the retail hud, the only time an empty extra icon would appear is with cases of threshold triggering. Otherwise it would just fill up the empty circle again with a new fresh one. Which makes sense to me.
Title: Re: Custom Wingmen HUD Gauge v1.9
Post by: wookieejedi on December 09, 2018, 08:35:53 pm
When the next wing arrives, it adds the new dot along side the empty dot. So that wing of 1 is now indicated as a wing of 2. That happens all the way up to a wing of 5.
That's not quite what I'd expect should happen, with the retail hud, the only time an empty extra icon would appear is with cases of threshold triggering. Otherwise it would just fill up the empty circle again with a new fresh one. Which makes sense to me.

Ah I see what you mean! I have now added some lines to account for that in Version 2.0. Now, unless there is threshold triggering, the wing dots will match the wing sizes for successive waves.

Version 2.0 is released on the front page. Let me know what you think. Thanks!
Title: Re: Custom Wingmen HUD Gauge v2.0
Post by: Spoon on December 09, 2018, 10:33:25 pm
It looks like V2.0 might be a winner! 
I'll put it under some more testing over the next days, but it looks promising  :yes:
Title: Re: Custom Wingmen HUD Gauge v2.0
Post by: wookieejedi on December 09, 2018, 10:36:27 pm
It looks like V2.0 might be a winner! 
I'll put it under some more testing over the next days, but it looks promising  :yes:

Great to hear! Thanks, sounds good!
Title: Re: Custom Wingmen HUD Gauge v2.1
Post by: wookieejedi on December 16, 2018, 03:46:10 am
New Version 2.1 released! This version 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!).

[attachment deleted by admin]
Title: Re: Custom Wingmen HUD Gauge v2.1
Post by: Spoon on December 16, 2018, 11:42:09 am
Colors definitely transition smoother and look nicer with the yellow added
Title: Re: Custom Wingmen HUD Gauge v2.1
Post by: wookieejedi on December 16, 2018, 02:24:03 pm
Colors definitely transition smoother and look nicer with the yellow added

Thanks, happy to hear it looks better! Is the gauge still behaving as expected for wave arrivals?
Title: Re: Custom Wingmen HUD Gauge v2.1
Post by: theperfectdrugsk on January 17, 2019, 02:57:19 pm
Just decided to play through Aftermath: Reboot again, and I got the following crash:

LUA ERROR: [string "cuswingmengag-sct.tbm - On Game Init"]:227: attempt to perform arithmetic on local 'endstr' (a nil value)

------------------------------------------------------------------
ADE Debug:
------------------------------------------------------------------
------------------------------------------------------------------


------------------------------------------------------------------

stack traceback:
   [C]: ?
   [string "cuswingmengag-sct.tbm - On Game Init"]:227: in function 'DrawWingSection'
   [string "cuswingmengag-sct.tbm - On Game Init"]:399: in function 'Draw'
   [string "cuswingmengag-sct.tbm - On HUD Draw"]:464: in main chunk
------------------------------------------------------------------

------------------------------------------------------------------

It's on a mission where it's just you (alpha 1) and Beta 1, so separate wings with no wingmen.  The mission works fine without the wingmen script, and it worked fine for the first fiew missions of the campaign as well.  I'm guessing it's just got something to do with how Aftermath is assigning the wings for this particular mission but...I don't anything about scripting, so figured I'd post it anyway.
Title: Re: Custom Wingmen HUD Gauge v2.1
Post by: wookieejedi on January 17, 2019, 03:25:36 pm
Thanks for the update! That is strange, does it cause that crash at the beginning of the mission?
Title: Re: Custom Wingmen HUD Gauge v2.1
Post by: theperfectdrugsk on January 17, 2019, 03:28:32 pm
Yep, right after the briefing.  Although, I did actually just realize that I was running the mod under a nightly instead of a release build, so maybe that has something to do with it.  I'll have to play through a couple missions under the 3.8.0 to get to this point and see if it crashes again.
Title: Re: Custom Wingmen HUD Gauge v2.1
Post by: wookieejedi on January 17, 2019, 03:46:19 pm
Yep, right after the briefing.  Although, I did actually just realize that I was running the mod under a nightly instead of a release build, so maybe that has something to do with it.  I'll have to play through a couple missions under the 3.8.0 to get to this point and see if it crashes again.

Thanks for the quick reply! I always run the script with nightlies, so I am guessing that is not the cause. I have added a fix, so please feel freet to download the attachment, overwrite and let me know if it works. Do you have Discord, per chance? (Might make the debugging process easier if more steps are needed).

Ah I found the issue, that mission has a different capitalization between alpha 1 and wing name Alpha, I will add a fix for that in the script.
Title: Re: Custom Wingmen HUD Gauge v2.2
Post by: wookieejedi on January 17, 2019, 04:24:53 pm
V2.2 is now released and provides a fix to check for capitalization inconsistencies between default wing and ship names within a given mission file (thanks for the catch theperfectdrugsk!). Also attached below.
Title: Re: Custom Wingmen HUD Gauge v2.2
Post by: theperfectdrugsk on January 18, 2019, 12:05:19 pm
Sweet, works perfectly.

I kinda wish there was a way to fold nifty scripts like this into a knossos download.  It'd certainly be easier for users to keep updated and easier for users to find (I bet a lot of people haven't started using this just because it's in the "scripting releases" forum and scripting = scary).
Title: Re: Custom Wingmen HUD Gauge v2.2
Post by: wookieejedi on January 18, 2019, 12:30:08 pm
Sweet, works perfectly.

I kinda wish there was a way to fold nifty scripts like this into a knossos download.  It'd certainly be easier for users to keep updated and easier for users to find (I bet a lot of people haven't started using this just because it's in the "scripting releases" forum and scripting = scary).

Great, glad to hear it! That's a good idea! Though I think the way that Knossos works might make it difficult because Knossos can't really overlap mods/run more then one mod together, and this script would ideally be used with many mods at once. Spoon is using the script in Wings of Dawn, so at least people see it there!  :)
Title: Re: Custom Wingmen HUD Gauge v2.2
Post by: Nightmare on January 18, 2019, 01:12:35 pm
Axem has a script collection on github. I suggested it could be turned into a more general resource, but so far nothing came out of it than a general idea.
Title: Re: Custom Wingmen HUD Gauge v2.2
Post by: wookieejedi on January 18, 2019, 01:51:18 pm
Axem has a script collection on github. I suggested it could be turned into a more general resource, but so far nothing came out of it than a general idea.

Ah I remember seeing that github collection. A collection of solid scripts that have wide use in one spot with a downloadable link on Knossos and updated on GitHub could be very cool. The tricky part is having someone having the time to run it, as many of these widely useable scripts are part of larger projects that also take up a lot of time. But I would be down for collaborating with folks who are interested in that sort of thing!
Title: Re: Custom Wingmen HUD Gauge v2.2
Post by: AdmiralRalwood on January 21, 2019, 12:58:17 pm
Sweet, works perfectly.

I kinda wish there was a way to fold nifty scripts like this into a knossos download.  It'd certainly be easier for users to keep updated and easier for users to find (I bet a lot of people haven't started using this just because it's in the "scripting releases" forum and scripting = scary).

Great, glad to hear it! That's a good idea! Though I think the way that Knossos works might make it difficult because Knossos can't really overlap mods/run more then one mod together, and this script would ideally be used with many mods at once. Spoon is using the script in Wings of Dawn, so at least people see it there!  :)
This functionality is eventually supposed to exist in the form of "extension" mods, it just hasn't been implemented yet (AFAIK).
Title: Re: Custom Wingmen HUD Gauge v2.2
Post by: wookieejedi on February 13, 2019, 10:11:32 am
Sweet, works perfectly.

I kinda wish there was a way to fold nifty scripts like this into a knossos download.  It'd certainly be easier for users to keep updated and easier for users to find (I bet a lot of people haven't started using this just because it's in the "scripting releases" forum and scripting = scary).

Great, glad to hear it! That's a good idea! Though I think the way that Knossos works might make it difficult because Knossos can't really overlap mods/run more then one mod together, and this script would ideally be used with many mods at once. Spoon is using the script in Wings of Dawn, so at least people see it there!  :)
This functionality is eventually supposed to exist in the form of "extension" mods, it just hasn't been implemented yet (AFAIK).

Gothca. Maybe a Knossos mod with finished community scripts might be worthwhile in the meantime, though I am not sure who else might be interested.
Title: Re: Custom Wingmen HUD Gauge v2.5
Post by: wookieejedi on March 13, 2019, 01:43:05 pm
New update V2.3-2.7!

This version provides a new, optional grid view. It also 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 and works more like the retail gauge because it won't appear if the player all alone in the mission.

It also, allows modders to more easily 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'.

(https://i.ibb.co/ZdVMx4B/screen0113.png) (https://imgbb.com/)

Download: Custom Wingmen Script V2.7 Script (https://github.com/wookieejedi/Custom-Wingmen-Gauge/blob/master/cuswingmengag-sct.tbm)