Author Topic: SWBFII Split Screen Toolkit  (Read 22835 times)

SleepKiller

  • Co-Admin
  • Internet Addict
  • ****
  • Posts: 2180
  • Awards To recognize Modders that make a most excellent contribution within the Month Releasing Multiple Mods on SWBFgamers.com
    • View Profile
    • Awards
  • Steam ID:
SWBFII Split Screen Toolkit
« on: October 24, 2016, 12:22:37 AM »
This is a little something I have been working on for fun recently. It enables people to play Star Wars Battlefront II in a split screen mode on PC.

Spoiler: Image (click to show/hide)

Requirements
   As many XInput compliant controllers as you wish to have players. PS3 or PS4 controllers will work fine if you use something like SCP Toolkit.

   At least Windows 7, though I haven't tested it provided you have the runtimes below it should work.

   Non-Steam Version of SWBFII, the Steam version will not work unless you replace BattlefrontII.exe with the SWBFSpy version of the client.

   If you're lazy and on Windows 10 only bother downloading them if you get a "Runtime error" or something to that effect, the operating system may very well take care of getting dependencies for you.

   The core application requires Visual C++ Redistributable for Visual Studio 2015
   https://www.microsoft.com/en-nz/download/details.aspx?id=48145

   And the GUI requires .NET Framework 4.6.1 which you can get here.
   https://www.microsoft.com/en-nz/download/details.aspx?id=49981

   Optionally you can also install the SWBFII dedicated server software and use that for lower loading times.
   http://www.swbfgamers.com/index.php?topic=10619.msg106046#msg106046

Installation
   Copy all the contents of zip to the directory where your BattlefrontII.exe is.
   This is usually "C:\Program Files (x86)\LucasArts\Star Wars Battlefront II\GameData"

   Do not get BattlefrontII.exe confused with LaunchBFII.exe, if you don't see BattlefrontII.exe you're in the wrong place.

Usage
   Once installed simply start Split Screen GUI to configure and launch your play session. All the controls should have tooltips to inform you what they do.
   
   The map list supports common Windows controls like Double Clicking to add a single map, holding Control to select multiple items and drag-droping selections.

   The tool uses a pre-created profile to give you controls almost identical to the console version of the game. If you want to rebind them you'll have to set a player's name to SplitScreen using the GUI, or commandline tool, and rebind the controls using that player's screen. Once you've got them how you want exit and start the split screen session again to update the controls across all players.

Technical Overview
Spoiler (click to show/hide)

Change Log
Spoiler (click to show/hide)

Download it here! (Current Version 1.0.4)

If you do use it be sure to let me know how it goes and feel free to ask questions, especially if you encounter strange behaviour.
« Last Edit: November 21, 2016, 09:26:12 PM by SleepKiller »

FuzzyQuills

  • Captain Falcon
  • Member
  • **
  • Posts: 14
    • View Profile
    • Awards
  • Steam ID:
Re: SWBFII Split Screen Toolkit
« Reply #1 on: October 24, 2016, 04:37:50 AM »
Hey, this looks good!
I'm happy to do some testing of my own if you like.
Does this work by exploiting the localhost IP? Or does it use multiple BFII instances?
This Universe's Captain Falcon. A title I will pass on when I leave this world.

SleepKiller

  • Co-Admin
  • Internet Addict
  • ****
  • Posts: 2180
  • Awards To recognize Modders that make a most excellent contribution within the Month Releasing Multiple Mods on SWBFgamers.com
    • View Profile
    • Awards
  • Steam ID:
Re: SWBFII Split Screen Toolkit
« Reply #2 on: October 24, 2016, 05:09:50 AM »
If you want to test it go ahead, it would be nice to know that it works on PCs other than my own.

To answer your question it works by creating multiple instances of the game (one for each player) and positioning their windows accordingly. It optionally also supports creating and managing a server for players to connect to. Bringing the total instance count of the game up to (Number of Players + 1).

Regrettably I didn't seem to be able to get auto-joining for LAN working so players must still navigate through the Multiplayer menu to find the server. But SWBFII has no issue locating and joining servers running on the same machine once you are there, it can just take a few seconds for the server to load the map.

A user can pick if the server it creates is hosted by using the client executable or if installed the server executable. Both more or less functionally identical but the dedicated server executable does load smaller game files so it is preferred.

Led

  • Administrator
  • The Chosen One
  • *****
  • Posts: 7234
  • The 82nd Element
  • Awards For those who play any version of the 2016+ EA games Special Award for those that play the original SWBF
    • View Profile
    • Awards
  • Steam ID:
  • Tunngle ID: _PLA-Led
  • Origin ID: plaled
Re: SWBFII Split Screen Toolkit
« Reply #3 on: October 24, 2016, 05:18:50 AM »
Very nice SK!

Thanks for thinking of us  :cheers:
Don't believe everything you read on the internet

Rookie 1

  • Member
  • ***
  • Posts: 37
    • View Profile
    • Awards
Re: SWBFII Split Screen Toolkit
« Reply #4 on: October 24, 2016, 12:17:28 PM »
Great work! I'm going to have to try this with some friends. Now we just need a way to activate two player galactic conquest on the pc.

Commander Awesome

  • SWBF 1&2 Modder
  • Retired Staff
  • This Man Has No Life
  • *****
  • Posts: 1378
  • Addicted to Battlefront since 2006.
  • Awards For those who play any version of the 2016+ EA games Participated in the ICW6 Special Award for those that play the original SWBF Special Award for those that play SWBF2
    • View Profile
    • Awards
  • PSN: AaTc_CmdrAwesome
  • Steam ID:
  • Origin ID: Rayce_Skykiller
Re: SWBFII Split Screen Toolkit
« Reply #5 on: October 24, 2016, 12:49:00 PM »
Awesome job, man!

Also, you're back!!

William

  • {YAK}
  • Frequent Poster
  • ****
  • Posts: 267
  • Awards Special Award for those that play SWBF2
    • View Profile
    • ^Hidden Arrows^
    • Awards
  • GR ID: 6380224
  • Steam ID:
Re: SWBFII Split Screen Toolkit
« Reply #6 on: October 24, 2016, 02:18:45 PM »
SO many people have requested this on Steam. Do you mind if I post a link to this topic on there?

SleepKiller

  • Co-Admin
  • Internet Addict
  • ****
  • Posts: 2180
  • Awards To recognize Modders that make a most excellent contribution within the Month Releasing Multiple Mods on SWBFgamers.com
    • View Profile
    • Awards
  • Steam ID:
Re: SWBFII Split Screen Toolkit
« Reply #7 on: October 24, 2016, 07:25:07 PM »
SO many people have requested this on Steam. Do you mind if I post a link to this topic on there?
Yes and no. I would love to support the Steam version of the so that people can use this tool regardless of the version of the game they own. But I have no way to verify compatibility with it myself. I would request that before you do post anything about it you test it to make sure it works for people not running with the SWBFSpy executable. (That part is very important, be sure to test using the original Steam executable.)

In the likely event the game crashes then you can still post about it if you want, you would just have to include SWBFSpy as a requirement for it. Something I personally find ugly which is why I didn't reference it in the original post, I would much rather add support for the Steam version directly. But since I don't own it that may be a ways off. (Unless any of you are feeling particularly generous and have a spare copy kicking about.)

William

  • {YAK}
  • Frequent Poster
  • ****
  • Posts: 267
  • Awards Special Award for those that play SWBF2
    • View Profile
    • ^Hidden Arrows^
    • Awards
  • GR ID: 6380224
  • Steam ID:
Re: SWBFII Split Screen Toolkit
« Reply #8 on: October 25, 2016, 01:13:33 AM »
I tried it and got error messages saying missing XINPUT1_4.dll

SleepKiller

  • Co-Admin
  • Internet Addict
  • ****
  • Posts: 2180
  • Awards To recognize Modders that make a most excellent contribution within the Month Releasing Multiple Mods on SWBFgamers.com
    • View Profile
    • Awards
  • Steam ID:
Re: SWBFII Split Screen Toolkit
« Reply #9 on: October 25, 2016, 04:08:51 AM »
I tried it and got error messages saying missing XINPUT1_4.dll
Ah thanks for testing it. That's the kind of mistake it's easy for me to miss, XInput 1.4 is only included on Windows 8 and above. It is also what Visual Studio links to by default. I had intended to link against the Windows 7 version (XInput 9.1.0) but I completely forget. A new version is in the main post that should address this issue.

Ltin

  • Greyscale Trout
  • This Man Has No Life
  • *****
  • Posts: 1085
  • Wololo
  • Awards Special Award for those that play the original SWBF Special Award for those that play SWBF2 ICW4 Participant
    • View Profile
    • Awards
Re: SWBFII Split Screen Toolkit
« Reply #10 on: October 25, 2016, 09:51:05 PM »
Would this be more taxing on graphics cards then too?
Yes i know this shouldn't be a problem for anyone, but hey you never know.

SleepKiller

  • Co-Admin
  • Internet Addict
  • ****
  • Posts: 2180
  • Awards To recognize Modders that make a most excellent contribution within the Month Releasing Multiple Mods on SWBFgamers.com
    • View Profile
    • Awards
  • Steam ID:
Re: SWBFII Split Screen Toolkit
« Reply #11 on: October 27, 2016, 08:02:38 AM »
Would this be more taxing on graphics cards then too?
Yes i know this shouldn't be a problem for anyone, but hey you never know.
A simple answer is yes it probably will be more expensive than running a single instance of the game. That said SWBFII is eleven years old so in the unlikely event someone encounters a performance problem turning down the video settings by editing the SplitScreen profile outside the tool would in all likely hood be all that is needed to make it run smoothly. (Just a quick related note for anyone reading this, do not edit controls outside the tool the buttons the virtual control presents to the game are different from the ones DirectInput presents. If you want to change the controls set Player #1's name to SplitScreen and do it from their screen. Once you're done exit from their screen and restart the session.)

In other news a new version has been posted fixing bugs with thumbstick behaviour.

flyingDutchman

  • Recruit
  • *
  • Posts: 2
    • View Profile
    • Awards
Re: SWBFII Split Screen Toolkit
« Reply #12 on: November 20, 2016, 01:05:30 PM »
Hey, first off this is awesome!

I'm trying to get it to work with the steam version, so far I can't get it to work. Right after I set up the map and hit play I get a generic windows error "Split Screen Gui has stopped working". I've installed all the files you listed in the first post. Any other ideas? (windows 8.1 + steam version)

Thanks again!

SleepKiller

  • Co-Admin
  • Internet Addict
  • ****
  • Posts: 2180
  • Awards To recognize Modders that make a most excellent contribution within the Month Releasing Multiple Mods on SWBFgamers.com
    • View Profile
    • Awards
  • Steam ID:
Re: SWBFII Split Screen Toolkit
« Reply #13 on: November 20, 2016, 07:43:49 PM »
I put an update in the main post removing some functionality in the GUI relating to XInput that was causing problems. The checkbox for Keyboard Player was also removed as I do not have the time currently to implement keyboard support.

As for Steam support thanks to Dark_Phantom I was able to look into it. And regrettably looks like it doesn't want to work, since circumventing DRM is far beyond the scope of this toolkit I will not be looking into it further. However you should be able to replace Steam's BattlefrontII.exe with the SWBFSpy one and have it work. (You have to rename "BattlefrontII - SWBFSpy.exe" to "BattlefrontII.exe" and replace Steam's version of the executable.)

Much less clean and simple than I would like but it is what it is.
 
Hey, first off this is awesome!

I'm trying to get it to work with the steam version, so far I can't get it to work. Right after I set up the map and hit play I get a generic windows error "Split Screen Gui has stopped working". I've installed all the files you listed in the first post. Any other ideas? (windows 8.1 + steam version)

Thanks again!
Hm, I haven't encountered that. The console application should catch most errors and provide some useful form of feedback.

There are a couple things you can do. First is to make sure the entire contents of the "SWBF2 Split Screen" were copied into the directory BattlefrontII.exe lives in. The GUI will fail ungracefully if it can't find "SWBF Split Screen++.exe", which in turn will fail if it can't find the two DLLs it depends on.

If you're sure everything is installed correctly you can try right clicking on the Play button and clicked "Play (Debug)" and see if you get any useful output. (If you do get some form of output other than a generic windows message just take a screen shot and post it for me to look at.)

Hope one of those can help solve it for you!

flyingDutchman

  • Recruit
  • *
  • Posts: 2
    • View Profile
    • Awards
Re: SWBFII Split Screen Toolkit
« Reply #14 on: November 21, 2016, 06:32:06 PM »
progress!

I noticed you mentioned SWBF Split Screen++.exe which wasn't in the folder I downloaded, did some digging around looks like avast was auto deleting it must be a false positive. I added it to the exclusions and I can now run without a generic windows error, but after running it it just opens and closes,

here the error it shows for the debug (ive attached it)

Thanks for the help! this is going to amazing if I can get it to work  :cheer:
« Last Edit: November 21, 2016, 07:17:11 PM by flyingDutchman »