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.2
Post by: wookieejedi on May 07, 2019, 10:38:58 pm
Current Version 0.2
Released May 08, 2019

Custom Mission Roles HUD Gauge v0.2

(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 becuase 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 this link: https://github.com/wookieejedi/Custom-Mission-Role-Gauge (https://github.com/wookieejedi/Custom-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.2
Post by: wookieejedi on May 08, 2019, 01:09:20 pm
Excellent, hope the gauges proves useful!