[SOLVED]How Add The Feature "Exit To Windows" To The Escape Menu In MultiPlayer?

Started by Phobos, October 31, 2011, 02:58:03 PM

Previous topic - Next topic
ah, i guess you were right on that, i didnt look at the whole script. just that piece of code.

well, since bamdur's idea didn't work and sleepkiller's method of trying to convince you didn't work, and since me and led don't know how to do this, why not try improvising your very own way of acheiving this goal. bamdur and sleepkiller (and maybe others) can provide info, and you can try developing your own script for this.

just a suggestion  :happy:
Current Projects:
Battlefront One and a Half Era Mod, v2.0. Making great progress (SWBF)

yeah i honestly didn't understand the riley pages.
Current Projects:
Battlefront One and a Half Era Mod, v2.0. Making great progress (SWBF)

I'm regreting ever replying to your orginal topic... You have the script needed to add it in now. Add it in and see once and for all that it will crash in multiplayer.

Quote from: Phobos Developer on November 04, 2011, 08:05:14 PM
Good for you sleepkiller.
I don't care that it crashes, now that I have the script I can work on ways to modify it so that it doesn't crash. Either that or modifications to another script. I'm not just gonna give up because you did.

And I still have to write the mini-tutorial to put in the OP to solve the thread. I know how much you will hate seeing that. :cheers:
You misunderstand me I've nothing against you writing a guide on how to add the button guides are useful and I always enjoy it when people do them. And my point is that I have investagated this and their is no command that is capable of doing what you desire.

I'll write my own one just for you.  :)

-- Ingame pause menu

ifspausemenu_vbutton_layout = {
ySpacing = 5,
width = 260,
font = "gamefont_medium",
buttonlist = {
{ tag = "resume", string = "common.resume", },
{ tag = "freecam", string = "game.pause.freecam", },
{ tag = "lobby", string = "game.pause.playerlist", },
{ tag = "opts", string = "ifs.main.options", },
{ tag = "console", string = "Fake Console", },
{ tag = "suicide", string = "game.pause.suicide", },
{ tag = "friends", string = "ifs.onlinelobby.friendslist", },
{ tag = "recent", string = "common.mp.recent", },
{ tag = "restart", string = "common.restart", },
{ tag = "quit", string = "common.quit", },
{ tag = "exit", string = "common.quit2windows", },
},
title = "game.pause.title",
}

Take note of the tag "exit".


this.buttons.exit.hidden = (gPlatformStr ~= "PC" or ScriptCB_InNetGame())

Find and comment this line.

Now munge the script and munge common. Boom you now have your button. Good luck at finding the workaround to get in game.

And BTW this section is the section that handles the quiting to windows button.
function ifs_pausemenu_fnExitPopupDone(bResult)
local this = ifs_pausemenu

if(bResult) then
ifelm_shellscreen_fnPlaySound(this.acceptSound)
ScriptCB_QuitToWindows()
else
ifelm_shellscreen_fnPlaySound(this.cancelSound)
ifs_pausemenu_fnSetPieceVis(this,1) -- restore screen on 'no' only
end
Popup_YesNo.fnDone = nil
end

removed

Sleepkiller still wont say where he got swbf2 luas

Quote from: Phobos Developer on November 04, 2011, 11:00:01 PM
Thanks a lot for posting this sleepkiller. I have updated the first post and soon will be posting a new tool for modders to use. By the way exit to windows works perfect for me, NO CRASH.

Led will have to approve this before u can download
http://www.swbfgamers.com/index.php?action=downloads;sa=view;down=377
:o :blink: :wacko: :censored: :ohmy: What! But it shouldn't. Eh, gusee I was mistaken. I appologize for sayying it was impossible.

EDIT: I just figured out that it freezes the game when you try exit to windows in public servers, forcing you to close battlefront.exe with task manager. But apparently when you are the server host, it exits to windows properly with no crash. Interesting.

My suspicion is that the common lua files control public/team chat too. Until we get more source code it will probably be near impossible to make any modifications to the chat system such as hiding it. If we had the lua file we could probably just null out the display for chat and munge. I don't even know what common script controls chat specifically but have some guesses.

I'm looking for references to any chat scripts in the ifs_pausemenu.lua because I know that the chat gets hidden when the pause menu is open.

Ah, so it was how I thought.And lets not pester the pschy0 for more scripts. We should be grateful for what we have, instead of thinking on what we do not have. We do not want to annoy him and we should respect his space.

And regarding chat I think the EXE is just coded to hide chat when a menu is open. And I've scoured the SWBFII scripts for a referance to chat, with nothing showing up. Aside from the font definer for text pop-ups upon trying to remove that and load it up in SWBF1 it crashes. So yeah. It would probably just simplier to build a trainer on the server side that intercepts and nulls out chat.

Quote from: SleepKiller on November 05, 2011, 01:57:26 AM
Ah, so it was how I thought.And lets not pester the pschy0 for more scripts. We should be grateful for what we have, instead of thinking on what we do not have. We do not want to annoy him and we should respect his space.

And regarding chat I think the EXE is just coded to hide chat when a menu is open. And I've scoured the SWBFII scripts for a referance to chat, with nothing showing up. Aside from the font definer for text pop-ups upon trying to remove that and load it up in SWBF1 it crashes. So yeah. It would probably just simplier to build a trainer on the server side that intercepts and nulls out chat.
Won't know for sure until we see the scripts. A trainer is another option.

Another idea would be to add escape menu option to endgame scores screen so that when dedi servers hang on 0 people don't have to use task manager to close game and restart.