Quitting to Desktop from stats screen [SOLVED]

This is for troubleshooting of problems with the FAF client and Forged Alliance game.

Moderator: PhilipJFry

Quitting to Desktop from stats screen

Postby ColonelSheppard » 27 Dec 2016, 04:34

I recently introduced Forged Alliance on a Lanparty that I regulary attend. I fiddled around with the FAF/SCFA files to create a single archive (game/fafres/mod/maps) which I could give to people, so the only thing left for them to do, is start the game. That works fine for the most part but one problem remains:

I would like the game to NOT quit to system after a game is finished, it's anoying. This however is the default behavior of the FA.exe in FAF/bin, any idea how I can change that?

I am well aware of the general policy about "use the FAF Client", however previous Lan Parties have shown that people don't want to start creating accounts to play with the FAFClient (some did after the last one where I offered my "offline version") and internet connection is also no certainty.

Merry Chistmas everybody
User avatar
ColonelSheppard
Contributor
 
Posts: 2997
Joined: 20 Jul 2012, 12:54
Location: Germany
Has liked: 154 times
Been liked: 165 times
FAF User Name: Sheppy

Re: Quitting to Desktop from stats screen

Postby lextoc » 27 Dec 2016, 10:09

Posted at 3:34am. Something tells me that LAN party just ended haha
I'm watching you!
User avatar
lextoc
Supreme Commander
 
Posts: 1057
Joined: 17 Mar 2013, 18:08
Has liked: 287 times
Been liked: 227 times
FAF User Name: lextoc

Re: Quitting to Desktop from stats screen  [SOLVED]

Postby speed2 » 27 Dec 2016, 11:53

You need to edit file
Code: Select all
lua.nx2\lua\ui\dialogs\score.lua

this part: https://github.com/FAForever/fa/blob/de ... #L426-L460
If you want to change just the functionality then you need to change line 458
From:
Code: Select all
EscapeHandler.SafeQuit()

To:
Code: Select all
ExitGame()

If you want to change the button label and tooltip as well you need to change also line 426
From:
Code: Select all
bg.continueBtn = UIUtil.CreateButtonStd(bg, '/scx_menu/large-no-bracket-btn/large', "<LOC _Exit_to_Windows>", 22, 2, 0, "UI_Menu_MouseDown", "UI_Opt_Affirm_Over")

To:
Code: Select all
bg.continueBtn = UIUtil.CreateButtonStd(bg, '/scx_menu/large-no-bracket-btn/large', "<LOC _Continue>", 22, 2, 0, "UI_Menu_MouseDown", "UI_Opt_Affirm_Over")

and line 460
From:
Code: Select all
Tooltip.AddButtonTooltip(bg.continueBtn, 'esc_exit')

To:
Code: Select all
Tooltip.AddButtonTooltip(bg.continueBtn, 'PostScore_Quit')
User avatar
speed2
Contributor
 
Posts: 3189
Joined: 05 Jan 2013, 15:11
Has liked: 636 times
Been liked: 1119 times
FAF User Name: speed2

Re: Quitting to Desktop from stats screen

Postby ColonelSheppard » 27 Dec 2016, 17:38

Thanks very much speed, best man!

lextoc wrote:Posted at 3:34am. Something tells me that LAN party just ended haha

:P
User avatar
ColonelSheppard
Contributor
 
Posts: 2997
Joined: 20 Jul 2012, 12:54
Location: Germany
Has liked: 154 times
Been liked: 165 times
FAF User Name: Sheppy


Return to Tech Support

Who is online

Users browsing this forum: Google [Bot] and 1 guest