Re-ally after death

Moderators: Duck_42, mead

Re-ally after death

Postby Duck_42 » 30 Jan 2013, 03:37

Since Phantom-X does not automatically re-ally after death, sometimes players end up not being able to see what's going on in the game due to lack of allies. For those of you who wish to observe a game after you die, the following console command will bring up the diplomacy window.

Code: Select all
UI_Lua import("/lua/ui/game/tabs.lua").BuildContent("diplomacy")
User avatar
Duck_42
Avatar-of-War
 
Posts: 237
Joined: 29 May 2012, 03:16
Has liked: 5 times
Been liked: 18 times
FAF User Name: Duck_42

Re: Re-ally after death

Postby Duck_42 » 01 Feb 2013, 00:39

Mead,

The following code should change the UI behavior so that the diplomacy button is not disabled after death.

Create /phantomxhook/lua/ui/game/tabs.lua with the following code
Code: Select all
local POriginalOnGameOver = OnGameOver
function OnGameOver()
   POriginalOnGameOver()
    --Re-enable diplomacy tab after death.
    --This way, players will be able to re-ally
    for i, tab in controls.tabs do
        if tab.Data.content == 'diplomacy' and SessionIsMultiplayer() then
            tab:Enable()
        end
    end
end
User avatar
Duck_42
Avatar-of-War
 
Posts: 237
Joined: 29 May 2012, 03:16
Has liked: 5 times
Been liked: 18 times
FAF User Name: Duck_42

Re: Re-ally after death

Postby mead » 01 Feb 2013, 02:58

Added; will go live with the next version.

Edit: Ok, this does not work. Upped it to FAF, game is unresponsive from start on. Removed the file again.
mead
Avatar-of-War
 
Posts: 64
Joined: 03 Jul 2012, 22:53
Has liked: 0 time
Been liked: 1 time
FAF User Name: mead

Re: Re-ally after death

Postby Duck_42 » 03 Feb 2013, 18:14

Not sure what the problem would be. I tested it in a UI mod with no problems. I've attached a copy of my tabs.lua in case the problem was a file issue.
Attachments
tabs.zip
tabs.zip
(355 Bytes) Downloaded 158 times
User avatar
Duck_42
Avatar-of-War
 
Posts: 237
Joined: 29 May 2012, 03:16
Has liked: 5 times
Been liked: 18 times
FAF User Name: Duck_42


Return to Phantom-X

Who is online

Users browsing this forum: No registered users and 1 guest