Fullscreen script (Dual Screen & Single Screen)

Talk about general things concerning Forged Alliance Forever.

Moderators: FtXCommando, Ze Dogfather

Fullscreen script (Dual Screen & Single Screen)

Postby tatsu » 12 Apr 2015, 16:58

This works for both single screen and dual screen

all you have to do is set the resolution to what you want for example : 3840, 1080 (if you are doing this then I humbly suggest UI party (viewtopic.php?f=41&t=9776) as a complement :) )

Dual screen : viewtopic.php?f=2&t=9778&p=98315#p106977

UPDATE : now supports setting the core affinity and process priority.

---------------------------------------------------------------------------------------------------------------------------------------------------
Guys I made a nice script that you may enjoy.

I've found playing FA windowed reduces crashing probabilities tenfold.

Also I hate not having my music, and Aeolus chat next to the game while i'm playing. (if playing fullscreen you can't have both simultaneously. Clicking outside the FA window will minimize it with a monstrous delay)

While I'm hosting I find having FAF and the FA lobby side by side to be of extreme use, so that I may quicker evaluate things such as unwanted mods, better host to move me and my players to, or bugged lobby. Also AEOLUS.

BUT.

FA is played best at 1080P, casting and streaming much deserve to be full 1080P

so what I did is write a script.

I made my taskbar single-screen only and placed it on my secondary screen.

Also I made FA windowed.

then my script automatically detects when FA is up and removes the window border and maximizes it.

this is called "fake fullscreen" a new way to go about full-screening all modern games are turning towards. it is superior in every imaginable way. back in the day people didn't do this because the desktop was taxing to the graphic card (crazy old days) and people didn't have more than one screen (crazy new days).

Also I get boosted Simspeed (small increase) by automatically setting FA to high priority and removing it's affinity with the first thread.



to do as i do you will need to :
  • download and install AutoHotkey (when it is done installing don't run, there's nothing to run. Just close the installer)
  • right click on your desktop (or other folder if the option doesn't show up there) go to "New"->"AutohotkeyScript"
  • paste this :
    Code: Select all
    #NoEnv
    SendMode Input
    SetWorkingDir %A_ScriptDir%
    #Persistent


    procName := "ForgedAlliance.exe"
    SetTimer, CheckProc, 2000
    Return

    CheckProc:
        If (!ProcessExist(procName))
            Return
          
          
        WinGet Style, Style, % "ahk_exe " procName
        If (Style & 0xC40000)
        {
            WinSet, Style, -0xC40000, % "ahk_exe " procName
            WinMinimize, % "ahk_exe " procName
            WinMaximize, % "ahk_exe " procName
          Run, %comspec% /c process -a forgedalliance.exe 1110
          Run, %comspec% /c process -p forgedalliance.exe high
        }
        Return

    ProcessExist(exeName)
    {
       Process, Exist, %exeName%
       return !!ERRORLEVEL
    }
    return
  • hit ctrl-S, then alt-F4
  • hit Win+"R"
  • type "shell:startup"
  • drop the newly created file in the folder that opens
  • you can either restart the computer or double click the file and start enjoying my absolutely world-crysis-ending script
  • for automatically putting FA in high priority and not on first core download this https://github.com/tatsujb/Process.exe/raw/master/Process.exe
  • place in c:\windows\system32
  • edit the code above to fit your processor thread count. Mine has twelve so my number has twelve digits E.G. : 111111111110
they are counted backwards so the last one is the one you want at zero. meaning the first core (labeled as core 0, wow I didn't realize how incredibly straightforward and simultaneously impossible to explain to noobs this would be) will not be used.

if you have a typical sandybridge i7 you likely have 4 cores that are hyperthreaded e.g 8 threads, thereby : 11111110

say you have an AMD Phenom II X4 980, then it would be : 1110

ect...
Last edited by tatsu on 08 Jul 2020, 14:00, edited 25 times in total.
User avatar
tatsu
Supreme Commander
 
Posts: 1553
Joined: 02 Jul 2012, 21:26
Has liked: 1952 times
Been liked: 171 times
FAF User Name: tatsu

Re: I don't know why I haven't posted this yet.

Postby speed2 » 12 Apr 2015, 17:08

you mean something like this? that can do it for any game /viewtopic.php?f=41&t=2739&p=52109#p85521
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: I don't know why I haven't posted this yet.

Postby tatsu » 12 Apr 2015, 17:50

speed2 wrote:you mean something like this? that can do it for any game /viewtopic.php?f=41&t=2739&p=52109#p85521

yes, like that. My script also works for any game or app, all you have to do is change the name of the exe.

Also in terms of performance, a script is more lightweight.

it's also simpler to use as there is no script editing required here and no resolution needs to be specified.
User avatar
tatsu
Supreme Commander
 
Posts: 1553
Joined: 02 Jul 2012, 21:26
Has liked: 1952 times
Been liked: 171 times
FAF User Name: tatsu

Re: Fullscreen script (updated)

Postby tatsu » 25 May 2015, 15:53

I made a quick update to my script. it made it a hell of a lot better so I decided to inform you guys and update the OP.
User avatar
tatsu
Supreme Commander
 
Posts: 1553
Joined: 02 Jul 2012, 21:26
Has liked: 1952 times
Been liked: 171 times
FAF User Name: tatsu

Re: Fullscreen script (updated)

Postby tatsu » 23 Jul 2015, 02:02

updated to add auto-set to high priority and custom core affinity.
Last edited by tatsu on 14 Nov 2015, 15:18, edited 1 time in total.
User avatar
tatsu
Supreme Commander
 
Posts: 1553
Joined: 02 Jul 2012, 21:26
Has liked: 1952 times
Been liked: 171 times
FAF User Name: tatsu

Re: Fullscreen script (updated)

Postby Gyle » 23 Jul 2015, 14:39

This looks kinda interesting, I was wondering can this be used to get both of FA's dual screens operating in windowed mode ie in such a way that I can adjust the window res of the second monitor and still have space for it to display my xsplit?
My youtube Channel:http://www.youtube.com/user/felixlighta?feature=mhee

"Don't take life too seriously... no one gets out alive."
User avatar
Gyle
Avatar-of-War
 
Posts: 261
Joined: 05 Apr 2012, 00:35
Location: UK
Has liked: 52 times
Been liked: 28 times
FAF User Name: Gyle

Re: Fullscreen script (updated)

Postby tatsu » 23 Jul 2015, 15:15

Gyle wrote:This looks kinda interesting, I was wondering can this be used to get both of FA's dual screens operating in windowed mode ie in such a way that I can adjust the window res of the second monitor and still have space for it to display my xsplit?

as I said above it is completely possible to manually specify rez rather than tell it to maximize.

you can also change the rez of a whole screen if that's what you want. autohotkey scripting language is very powerfull autoit as well ... any scripting language.

the part after :

WinGet Style, Style, % "ahk_exe " procName
If (Style & 0xC40000)
{

is where you want to say what to do now that you've seen FA is running.
adding :

Winmove,% "ahk_exe " procName,,,,3840,1080

would make the window resize from pixel x 0 and y 0 on your desktop surface at the resolution of two 1080p screens.

perhaps this is what you want. you can use this in combo with UiParty viewtopic.php?f=41&t=9776 which supports automatically splitting your screen when the game starts.

is this what you want?

note changes will not take effect unless you kill the current script and execute your new one. careful you may run the same script in several instances.
Image
Last edited by tatsu on 23 Jul 2015, 16:54, edited 2 times in total.
User avatar
tatsu
Supreme Commander
 
Posts: 1553
Joined: 02 Jul 2012, 21:26
Has liked: 1952 times
Been liked: 171 times
FAF User Name: tatsu

Re: Fullscreen script (updated)

Postby tatsu » 23 Jul 2015, 16:52

ok so after having tried this it's not as easy as one would imagine as FA loves to throw obstacles in our path and FA doesn't take kindly to being resized other than by hand to both screens. the second screen will show up this memorable grey that you see when alt-tabbing and in fullscreen dualscreen mode.

so the best approach for this is to use the fullscreen dualscreen, but the bit of my script used for setting FA as high priority and it's core affinity automatically for you can still be used.
User avatar
tatsu
Supreme Commander
 
Posts: 1553
Joined: 02 Jul 2012, 21:26
Has liked: 1952 times
Been liked: 171 times
FAF User Name: tatsu

Re: Fullscreen script (updated)

Postby CodingSquirrel » 08 Aug 2015, 10:07

So I just got this script working with multiple monitors in borderless windowed using a variant of the provided script.

Code: Select all
#NoEnv
SendMode Input
SetWorkingDir %A_ScriptDir%
#Persistent


procName := "ForgedAlliance.exe"
SetTimer, CheckProc, 2000
Return

CheckProc:
    If (!ProcessExist(procName))
        Return
     
     
    WinGet Style, Style, % "ahk_exe " procName
    If (Style & 0xC40000)
    {
        WinSet, Style, -0xC40000, % "ahk_exe " procName ; remove the titlebar and border(s)
        WinMove, % "ahk_exe " procName , , 0, 0, 3840, 1080 ; move the window to 0,0 and resize it to fit across 2 monitors.
        WinMaximize, % "ahk_exe " procName
        WinRestore, % "ahk_exe " procName
    }
    Return

ProcessExist(exeName)
{
   Process, Exist, %exeName%
   return !!ERRORLEVEL
}
return


The WinMaximize is to refresh the window. The WinRestore unmaximizes the window so that it goes to the size specified by WinMove.

Gyle, if you're watching this thread still I figured out and tested how to get this and my DualScreen mod working so that you can have it borderless windowed across both your first monitor and part of a second monitor without issue. This would mean that the screen you're recording from would appear exactly like normal, but you'd get part of the second screen to use as a pseudo-minimap and also see your xsplit as well. Contact me if you want me to help you get that working.
User avatar
CodingSquirrel
Avatar-of-War
 
Posts: 180
Joined: 19 Jan 2015, 19:01
Has liked: 9 times
Been liked: 63 times
FAF User Name: CodingSquirrel

Re: Fullscreen script (updated)

Postby tatsu » 08 Aug 2015, 18:13

thanks man!!!
User avatar
tatsu
Supreme Commander
 
Posts: 1553
Joined: 02 Jul 2012, 21:26
Has liked: 1952 times
Been liked: 171 times
FAF User Name: tatsu

Next

Return to General Discussions

Who is online

Users browsing this forum: No registered users and 1 guest