Hard Light Productions Forums

FreeSpace Releases => Scripting Releases => Topic started by: wookieejedi on May 07, 2019, 10:38:58 pm

Title: Custom Mission Roles Gauge v0.4
Post by: wookieejedi on May 07, 2019, 10:38:58 pm
Current Version 0.4
Released June 17, 2020

Custom Mission Roles HUD Gauge v0.4

(https://i.ibb.co/10cTj7N/squad-roles-1.png) (https://i.ibb.co/28Q9Phk/squad-roles-2.png)


Background:
Have you ever been playing a mission and completely forgot what each squadron or ship was supposed to do because you didn't take notes during the briefing? Wouldn't it be nice if the mission designer allowed you a cheat sheet to look at on the HUD? If you answered yes, then you should tell the mission designer about this script!

Description:
This script allows modders/FREDers to create a HUD gauge that shows mission roles. The script displays a simple HUD gauge that shows a list of names, followed by a respective description. The FREDer can use lua sexps to add or remove entries from list at any point in the mission, and the gauge will display those changes.

Insallation:
Go to the link: here (https://github.com/wookieejedi/FSO-Scripts/tree/master/Mission-Role-Gauge)
Download and copy the `cus_role_gauge-sexp.tbm` and `cus_role_gauge-sct.tbm` files into your mod's `data/tables` folder.

Useage:
Run FRED, and you will see a new sexps to add or remove entries to the list ("Change"->"Script_Action"). To set more specific parameters like gauge location on the HUD, simply open the script file in a text editor and change the `User Options` values. Don't worry if you aren't comfortable with editing script files, the `User Options` all have descriptions and are easy to change.   


Thanks!
Title: Re: Custom Mission Roles Gauge v0.1
Post by: 0rph3u5 on May 08, 2019, 02:08:39 am
This is interesting ... it might have more uses if you skip the briefing completely or in mods that have more "universalist" fighters than FS

I will give it a whirl some time down the line
Title: Re: Custom Mission Roles Gauge v0.1
Post by: Colonol Dekker on May 08, 2019, 02:24:23 am
This is absolutely useful and a welcome addition.  Remember all the creative stuff Derelict did with retail?  I'm sure this role guage can be used equally creatively. 
Title: Re: Custom Mission Roles Gauge v0.1
Post by: Colt on May 08, 2019, 02:40:49 am
Just gave it a spin and came across this error upon starting the mission after the briefing stage.

Code: [Select]
Invalid font index 4 specified, must be between 1 and 3!

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


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

stack traceback:
[C]: ?
[C]: ?
[string "cus_role_gauge-sct.tbm - On Game Init"]:100: in function 'Draw'
[string "cus_role_gauge-sct.tbm - On HUD Draw"]:205: in main chunk
------------------------------------------------------------------

1: Userdata [Fonts]
2: Number [4.000000]
------------------------------------------------------------------
Title: Re: Custom Mission Roles Gauge v0.1
Post by: 0rph3u5 on May 08, 2019, 04:04:59 am
Fonts.tbl (https://wiki.hard-light.net/index.php/Fonts.tbl) might be required - I mean the examples use the FotG-HUD font.

EDIT: or it might be required for the version of script as-is; it might also be a simple oversight with regards of the index (you know 0 base index....)
Title: Re: Custom Mission Roles Gauge v0.1
Post by: wookieejedi on May 08, 2019, 07:40:33 am
Ah right, I forgot to change the fonts from 4/6 to 1/3. I just updated the script and it should work now! No custom fonts needed. Alternatively, if you use a recent nightly then this issue will also go away (as I fixed that bug in the engine a month or so ago, too).  :)
Title: Re: Custom Mission Roles Gauge v0.2
Post by: Colt on May 08, 2019, 11:39:01 am
All's good now!
Title: Re: Custom Mission Roles Gauge v0.4
Post by: wookieejedi on June 17, 2020, 01:38:30 pm
New version out that expands the custom sexp functionality by allowing FREDers to change the title, separator character, update entries, add number entries (including variables), clear the entire list, and add/update/remove entries in bulk. Also cleaned up a few code framework aspects.
Title: Re: Custom Mission Roles Gauge v0.4
Post by: Colonol Dekker on June 21, 2020, 01:57:40 pm
I'm sad that nobody else has heaped praise on this..
New version out that expands the custom sexp functionality by allowing FREDers to change the title, separator character, update entries, add number entries (including variables), clear the entire list, and add/update/remove entries in bulk. Also cleaned up a few code framework aspects.

Not everyone is script savvy and this allows fredders tonnes of creativity if they're not script au fait,  thank you 👍👍👍
Title: Re: Custom Mission Roles Gauge v0.4
Post by: Iain Baker on June 22, 2020, 02:40:36 pm
Sweet! Anything that provides info and helps maintain situational awareness gets a yes from me :-)
Title: Re: Custom Mission Roles Gauge v0.4
Post by: wookieejedi on June 26, 2020, 12:17:57 pm
Thanks, glad it's helpful for folks :)
Title: Re: Custom Mission Roles Gauge v0.4
Post by: Mobius on October 15, 2022, 08:35:48 am
I've just stumbled upon this and wow, this seems to merge into one viable tool many of the ideas I had back in the day for INFA's expanded HUD, several of which will find their use in SR. Before I download it and give it a try, a few questions: are there any known bugs I should be aware of? Is the "Object" field an open one where I can mention ships/entities which are not on the field of battle? Does the number of lines have a limit?
Title: Re: Custom Mission Roles Gauge v0.4
Post by: wookieejedi on October 15, 2022, 08:38:50 am
No known current bugs, but if you do come across any please let me know! To answer your other questions, the entire custom sexp just uses strings, so not actual wing or ship objects. And I do not think there is a limit. Glad it might be helpful!
Title: Re: Custom Mission Roles Gauge v0.4
Post by: Mobius on November 02, 2022, 04:32:05 am
I confirm this is an extremely useful script. :)

May I suggest expanding its related SEXPs in order to allow FREDders to edit the RGB values for displayed texts and numbers? For example, it may prove useful to mark the most critical orders in red, relevant (but not critical) orders in yellow, and so on.