Fullscreen script (Dual Screen & Single Screen)

Talk about general things concerning Forged Alliance Forever.

Moderators: FtXCommando, Ze Dogfather

Re: Fullscreen script (Dual Screen & Single Screen)

Postby tatsu » 21 Jul 2020, 01:40

codepants wrote:Great! How do you "stretch" the game? Does it work on two different sized screens?

Yes it's possible,

first set FA to windowed,

then follow this guide here : viewtopic.php?f=2&t=9778

At the part where I have code to copy and paste into a new file, for the dual screen version it's here : viewtopic.php?f=2&t=9778&p=98315#p106977

So basically this except replace "1110" with whatever corresponds to your number of threads:
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
        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


Then start FAF and go to "Vault" then "Mods" then search "Common" and install "Common mod tools" that comes up.

since your screens are not the same size look here: viewtopic.php?f=2&t=9778&start=40#p152680

you'll have to get this : https://github.com/b2ag/ui-festival

and put it into your mods folder.

after doing so host a game on FAF, go into "Options" then "Mods" and enable UI Festival (this should subsequently enable common mod tools as well).

Start the game and configure UI Festival to your liking.
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 (Dual Screen & Single Screen)

Postby codepants » 21 Jul 2020, 18:22

Thanks. Wow that's a lot of work. I sure appreciate you typing it all up in detail.
codepants
Priest
 
Posts: 310
Joined: 07 Aug 2014, 17:44
Has liked: 14 times
Been liked: 54 times
FAF User Name: codepants

Re: Fullscreen script (Dual Screen & Single Screen)

Postby tatsu » 21 Jul 2020, 21:31

codepants wrote:Thanks. Wow that's a lot of work. I sure appreciate you typing it all up in detail.

did you get it working? if not PM me or someone else willing to help on FAF
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 (Dual Screen & Single Screen)

Postby codepants » 23 Jul 2020, 17:24

Yea, took a lot of work/fiddling like I thought it would.

Still having the following problems:
- UI Festival turns off every time. I have to manually enable it every time I'm in a lobby.
- The lobby is centered across the entire window, meaning half the lobby is on the right side of my left screen and half of it is on the left side of my right screen.
- My UI is on the left screen. I think I made the right screen my primary by setting "primaryRight = true," as that's the screen that zooms in at the start of the game, but the UI is still on the left and I can't seem to figure which setting changes it.
- My Windows Taskbar doesn't go away. I have it up for everything else, but if FAF is to be true "fullscreen," it should go away. It goes away when I add:
Code: Select all
WinHide, ahk_class Shell_TrayWnd
WinHide, Start ahk_class Button
; however, that makes the window bordered again, no matter if I put it before or after WinSet, Style, %WINDOW_STYLE_UNDECORATED%. Is it possible to both hide the taskbar and have the window be unbordered?

For future reference:
- Adding WinSet, Style, %WINDOW_STYLE_UNDECORATED% made the window borderless and fixed the resolution being slightly off (I did the math correctly, but with the border there was a small gap around the entire screen).

While I've got you, I have an AMD FX-8350 8-core processor. I assume that means my magic number for prioritizing FAF not on the first thread is 11111110. Correct?

Thanks again for your help.
codepants
Priest
 
Posts: 310
Joined: 07 Aug 2014, 17:44
Has liked: 14 times
Been liked: 54 times
FAF User Name: codepants

Re: Fullscreen script (Dual Screen & Single Screen)

Postby tatsu » 23 Jul 2020, 19:53

codepants wrote:- UI Festival turns off every time. I have to manually enable it every time I'm in a lobby.

that makes sense to me. Someone (you?) should add it to the FAF mod vault (it should be approved shortly) this way you can get it from there instead and that will get rid of that issue.


codepants wrote:The lobby is centered across the entire window, meaning half the lobby is on the right side of my left screen and half of it is on the left side of my right screen.
I'm pretty sure there are modded lobby files that you can replace that fix this. since I game on a single screen nowadays, I'm not the expert on this.
codepants wrote:My UI is on the left screen. I think I made the right screen my primary by setting "primaryRight = true," as that's the screen that zooms in at the start of the game, but the UI is still on the left and I can't seem to figure which setting changes it.

This will probably require additional modding of the UI festival mod.
codepants wrote:- My Windows Taskbar doesn't go away. I have it up for everything else, but if FAF is to be true "fullscreen," it should go away. ....
Is it possible to both hide the taskbar and have the window be unbordered?
that is both possible and the expected default windows behavior.

that the taskbar come back on top is a windows-bug. I don't know that many people are getting this.
Something must be bringing focus to the taskbar.

what windows are you running? 10? In older windows the taskbar had tons of issues related to this. but yeah in windowed mode if you can somehow switch the focus directly to the taskbar then since it's nothing more than another window, it will show up on top. Stopping whatever's focusing the taskbar for you should be your fix there.

codepants wrote:11111110. Correct?
correct.

codepants wrote:Thanks again for your help.
No problem, my 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

Re: Fullscreen script (Dual Screen & Single Screen)

Postby codepants » 23 Jul 2020, 20:16

tatsu wrote:This will probably require additional modding of the UI festival mod.


Yea... I'm trying this mainly to get rid of a bug where when I run native dual screen (using FAF video settings), clicking on the part of the screen where the radar build icon is (such as when building a radar, or if something I want to click on like a unit or reclaim is in that part of the screen) often tabs me out. I've mostly overcome that by learning build keys and moving the screen if I need to click there for a non-build reason.

I hope someone does the "additional modding," but it's not worth it to me to jump through those hoops right now.

Thanks again for your help, though.
codepants
Priest
 
Posts: 310
Joined: 07 Aug 2014, 17:44
Has liked: 14 times
Been liked: 54 times
FAF User Name: codepants

Re: Fullscreen script (Dual Screen & Single Screen)

Postby KilroyRed » 08 Aug 2020, 18:03

When I try to run AHK script for fullscreen I get an error "Error at line 11, Line text: CheckProc Error: This line does not contain a recognized action.
The game has split screen in monitor 1 (left) and a full screen in monitor 2 (right).
Thanks for any help.
KilroyRed
 
Posts: 1
Joined: 05 Aug 2020, 22:26
Has liked: 0 time
Been liked: 0 time
FAF User Name: KilroyRed

Re: Fullscreen script (Dual Screen & Single Screen)

Postby tatsu » 09 Aug 2020, 11:51

KilroyRed wrote:When I try to run AHK script for fullscreen I get an error "Error at line 11, Line text: CheckProc Error: This line does not contain a recognized action.
The game has split screen in monitor 1 (left) and a full screen in monitor 2 (right).
Thanks for any help.

you have to follow the guide I gave on page one pretty strictly for the optimization part.

if you don't care about optimizations just remove these two lines :

Code: Select all
      Run, %comspec% /c process -a forgedalliance.exe 1110
      Run, %comspec% /c process -p forgedalliance.exe high

if you do want optimizations then pick the guide up from step 9 to 11.

you basically just need to download this file https://github.com/tatsujb/Process.exe/ ... rocess.exe
and place in C:\windows\system32

i highly recommend also changing this line :

Code: Select all
      Run, %comspec% /c process -a forgedalliance.exe 1110


to have this : 1110 match your thread count. you can see how many threads you have by opening the task manager, right clicking on the cpu graph and selecting "show logical cores" and the counting how many cpu graphs you have.
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

Previous

Return to General Discussions

Who is online

Users browsing this forum: No registered users and 1 guest