Hard Light Productions Forums

Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: starbug on April 13, 2021, 07:54:48 am

Title: How to add Scroll buttons to Command briefing Screen
Post by: starbug on April 13, 2021, 07:54:48 am
I am currently replaying and really enjoying Solaris TC love. And I am starting to do some FREDing for it. Solaris for its briefings uses LUA scripting to do its command briefings and mission briefings etc. Which i really struggle to do. So i decided to use the standard Command briefing editor and mission briefing editor in FRED. I noticed that Solaris doesn't have the scroll options on the Command briefings like Blue Planet does, as my messages are pretty long. As i am doing my story through Emails, News articles etc.

So i had a look at LUA scripting and i just can't get my head round it. My Brain really struggles to understand scripting like LUA(pretty much all coding) due to my dyslexia, its all blurs and becomes gibberish to me. So i thought about adding scroll buttons to the command briefings as the button graphics are already in the interface folder, but i have no idea on actually how to do it.

So is there a tutorial etc, something easy to understand on how to add this feature?
Title: Re: How to add Scroll buttons to Command briefing Screen
Post by: 0rph3u5 on April 14, 2021, 08:41:06 pm
It might be that Solaris lacks the correct mask file (tl;dr FS uses at least two files for each non-cockpit UI, one of them is contains the information where each button is).

To enable scrolling text in the Command Briefing you need the following files in data/interface:
2_CommandBriefb
2_CommandBrief-Mb
CommandBriefb
CommandBrief-Mb

there files should be either .pcx (old) or .png (new)

Data interface might already contain CommandBrief.[extension] and CommandBrief-M.[extension] (as well as their 2_ counterparts), these handle the Command Briefing Screen if it is already functional, but don't have irnformation for the scrolling buttons. You can simply copy and paste CommandBrief.[externsion] to make a CommandBriefb.[extension] (that file is just the background) - same for 2_CommandBriefb.
To get functional scrolling buttons you need to the get a CommandBrief-Mb (and 2_CommandBrief-Mb) from a mod that has them working in thier UI - as per usual the MediaVPs should provide.
Title: Re: How to add Scroll buttons to Command briefing Screen
Post by: starbug on April 15, 2021, 05:15:36 am
Thank you so much Orph3u5 :)
Title: Re: How to add Scroll buttons to Command briefing Screen
Post by: 0rph3u5 on April 16, 2021, 06:00:54 am
You're welcome .... if it worked that is (no thanks required if I was off base).
Title: Re: How to add Scroll buttons to Command briefing Screen
Post by: starbug on April 16, 2021, 07:24:52 am
I will let you know, will try it out tonight when i get home from work
Title: Re: How to add Scroll buttons to Command briefing Screen
Post by: starbug on April 16, 2021, 04:02:44 pm
Ok so i have got the interface screen with the scroll buttons Yay! but none of the actually buttons are working. I may have messed up something as i am tired so will look again tomorrow
Title: Re: How to add Scroll buttons to Command briefing Screen
Post by: Goober5000 on July 02, 2021, 03:13:59 pm
:bump:

I didn't see any follow-up to this, but I wanted to add that in addition to the background image files that 0rph3u5 mentioned, you also need the button image files.  The are the CBB_ and 2_CBB files in mv_root.vp.
Title: Re: How to add Scroll buttons to Command briefing Screen
Post by: starbug on July 03, 2021, 03:09:21 pm
I sort of hit a bump with this in that I still can't get the buttons to work, ive all the button images etc and i am sure i have the right names, but i still can't get them to work. But in Solaris's folder there are multiple files with the name 2_CommandBriefb
2_CommandBrief-Mb
CommandBriefb
CommandBrief-Mb

So i redid them all with the extra button's, still no luck so in the end i chopped up the Command briefings to cover lots of screens. I just don't get what i was doing wrong, maybe i was just getting confused and missing files as there are of interface files in the mod.
Title: Re: How to add Scroll buttons to Command briefing Screen
Post by: Goober5000 on July 05, 2021, 02:02:33 pm
If you have the CBB_ files, the CommandBriefb and CommandBrief-Mb files, and their 2_ equivalents, it should work.  Make sure to put all the files in the data/interface folder.
Title: Re: How to add Scroll buttons to Command briefing Screen
Post by: starbug on July 05, 2021, 03:45:39 pm
See the issue i had was all that is in the Solaris Interface folder isthe 2_CommandB and 2_CommandM, no other  files like  CommandBriefb
CommandBrief-Mb are in the interface folder and the files seem to have a different naming convention so trying to find out if i had the correct files was trickiy. But everything has a 2_ in front of it. Could that be the issue?
Title: Re: How to add Scroll buttons to Command briefing Screen
Post by: 0rph3u5 on July 05, 2021, 04:06:49 pm
Interface like that originally (as in FS2 vanilla) came in 2 resolutions - 640x480 and 1024x768; everything with the prefix 2_ would be 1024x768 in vanilla, everything without 640x480.

I don't know if that would still apply to Solaris.