tModLoader Split Screen Mod

Add multiple mice + keyboards?


  • Total voters
    10
  • Poll closed .
So i'm playing with this mod (and alot of others) with my sister who i have set up with a controller and i'm trying to get my keyboard and mouse to work but when i get to the "press and 3 keys" I sit there for about 5 minutes and nothing happens. any reason why?
 
So i'm playing with this mod (and alot of others) with my sister who i have set up with a controller and i'm trying to get my keyboard and mouse to work but when i get to the "press and 3 keys" I sit there for about 5 minutes and nothing happens. any reason why?
Do you have any anti-virus programs that might be blocking Terraria or the mod?
When it works, the next menu will popup immediately after holding any three keys.
 
Turned windows defender off before launching terraria up to see if that was the problem and it still didn't work with it off.
 
Hello, I just stumbled across your mod today and I’m having trouble setting up my two mice, when I click to attach my first mouse, I can’t do the other one since it’s locled to the first window
Any help would be greatly appreciated thank you
 
Hello, I just stumbled across your mod today and I’m having trouble setting up my two mice, when I click to attach my first mouse, I can’t do the other one since it’s locled to the first window
Any help would be greatly appreciated thank you
Never mind, figured it out thanks anyway
 
So is there ever going to be linux support for multiple keyboards? I've been trying to help Terraria run better. I have a Ryzen CPU which still seems to be too slow. I'm only running two actual instances of the game along with a "Host and play" server, which I believe is basically just another of the game, right? Well, it's pretty slow with a surprisingly high amount of lag, enemies tend to teleport. I think this might be because the server isn't running at 60 FPS, so information doesn't get in and get out as quick as it should?. Changing resolution doesn't seem to do anything really, and overclocking my CPU helped, until we added more mods. We were gonna add more still but the game started running out of memory so we had to take out a few. After that, I was wondering if it's because we're near the 4 gig limit for each instance of the game. Looking it up, the linux version of Terraria is 64-bit, but not the windows, and I wanted to see if maybe running the game in Linux would help with performance, but we need multiple keyboards and mice. So is there planned support for that?

Also, there's a few bugs that we've noticed:
-This mod seems to make most scrolling way, way, way more sensitive than it normally is, even if only only one player is using a mouse. (Tested on a local server with only one player.) It becomes difficult to scroll through the crafting list, as scrolling one notch on the mouse causes the whole thing to scroll from top to bottom. Also, you cannot zoom in on small increments on the map. It's either way too far or way too close. It also happens on the main menu, making it impossible to scroll through mods effectively as one scroll is many, many mods. (Less of an issue than the first part, but I imagine it's the same thing causing it)

-Typing into modded GUIs does not work. I don't know if you have to fix it, make your mod compatible with them, or if it's just a thing that can't be fixed except on their end, but it would be nice to be able to search for recipes in a recipe book or in our Magic Storage.

Other than these issues (which don't ruin the game, but it would be great to have them fixed) this is an absolutely amazing mod. I'm sure it wasn't easy to make, but thank you for making it, so we can both use a keyboard and mouse.
 
So is there ever going to be linux support for multiple keyboards? I've been trying to help Terraria run better. I have a Ryzen CPU which still seems to be too slow. I'm only running two actual instances of the game along with a "Host and play" server, which I believe is basically just another of the game, right? Well, it's pretty slow with a surprisingly high amount of lag, enemies tend to teleport. I think this might be because the server isn't running at 60 FPS, so information doesn't get in and get out as quick as it should?. Changing resolution doesn't seem to do anything really, and overclocking my CPU helped, until we added more mods. We were gonna add more still but the game started running out of memory so we had to take out a few. After that, I was wondering if it's because we're near the 4 gig limit for each instance of the game. Looking it up, the linux version of Terraria is 64-bit, but not the windows, and I wanted to see if maybe running the game in Linux would help with performance, but we need multiple keyboards and mice. So is there planned support for that?

Also, there's a few bugs that we've noticed:
-This mod seems to make most scrolling way, way, way more sensitive than it normally is, even if only only one player is using a mouse. (Tested on a local server with only one player.) It becomes difficult to scroll through the crafting list, as scrolling one notch on the mouse causes the whole thing to scroll from top to bottom. Also, you cannot zoom in on small increments on the map. It's either way too far or way too close. It also happens on the main menu, making it impossible to scroll through mods effectively as one scroll is many, many mods. (Less of an issue than the first part, but I imagine it's the same thing causing it)

-Typing into modded GUIs does not work. I don't know if you have to fix it, make your mod compatible with them, or if it's just a thing that can't be fixed except on their end, but it would be nice to be able to search for recipes in a recipe book or in our Magic Storage.

Other than these issues (which don't ruin the game, but it would be great to have them fixed) this is an absolutely amazing mod. I'm sure it wasn't easy to make, but thank you for making it, so we can both use a keyboard and mouse.

One reason the performance may be bad is that all the instances are running on the first cpu core. On Windows you can try setting the CPU affinity for each terraria instance: ctrl+shift+esc to open task manager, go to more details then the Details tab. Find the Terraria.exe(or something) instancese and right click - Set Affinity. On one of the instances you want to disable the first core(maybe a few more). Go into the performance tab to see the load on each cpu. Ideally you want to balance for 100% on every core (although that might be impossible since terraria doesn't use unlimited threads, so you may have completely unused cores).

As for Linux, it would probably take a complete rewrite and I'm not really sure I have the time right now. I know what would fix the scrolling bugs, might get around to it soon. Also I might be able to fix the modded GUIs soon.
 
One reason the performance may be bad is that all the instances are running on the first cpu core. On Windows you can try setting the CPU affinity for each terraria instance: ctrl+shift+esc to open task manager, go to more details then the Details tab. Find the Terraria.exe(or something) instancese and right click - Set Affinity. On one of the instances you want to disable the first core(maybe a few more). Go into the performance tab to see the load on each cpu. Ideally you want to balance for 100% on every core (although that might be impossible since terraria doesn't use unlimited threads, so you may have completely unused cores).

As for Linux, it would probably take a complete rewrite and I'm not really sure I have the time right now. I know what would fix the scrolling bugs, might get around to it soon. Also I might be able to fix the modded GUIs soon.

In attempting to try your idea, I couldn't figure out how to check the server if I did the host and play option. So instead I ran the tmodloader server. Apparently this is what was needed to have flawless performance. From the little testing I did, both games ran pretty much 60 FPS, with no teleporting between players. It used to be obvious that there was a bit of lag, because when you would run and then stop, the player would teleport suddenly where it was supposed to be. But now there doesn't seem to be any. I'll keep you updated on it. That might be a way to have there be less lag.

The linux thing is unfortunate but understandable. Like I said, I can't imagine that doing something like this, having multiple keyboard and mice do different things, would be easy. We'll just have to live with less mods.

It would be awesome to have the bugs fixed soon. Whenever you get around to it would be fantastic.

Again, thanks so much for a fantastic mod.


EDIT: Okay, so that actually didn't seem to fix anything. Trying to play like this seemed to just screw the game up a lot. After trying this with multiple keyboard and mice, it made the cursors like staying up in the upper left corner of the screen. They still moved, but would jump back up there if either cursor moved, seemingly randomly. Making it impossible to really be able to do anything as the cursor would constantly move. Restarting the game and trying on the "Host and play" option didn't fix it, nor did restarting the computer. I had to reinstall Terraria for it to work properly.
 
Last edited:
I have been using this mod for about 5 days now. For the most part it works (after 5-10 time of crashing and retrying) the controller support is iffy but do able. I still havnt been able to get the 2 mouses and keyboards working. Also some mods are combatable like Thorium and stuff, but some are not. Like RPG and Overhaul. Not the best mod but its something.

p.s. the crash reports other complain about happen often - I just retry a dozen times till it works.
 
Hello, I have been having a problem when I use this mod and HEROs mod helper. I can't log in when I join a server. I have two tabs open and when I set both of them up I can't use the login for HEROs mod. Which you have to use on a server, even if you hosted it. Also when I don't enable mouse lock I then cant use the mouse at all. Anyways to fix these problems? I really want to be able to play Terraria with my friends!
 
Hello,
i can start the game twice , configure everthing,
but when we try to play , the controls i've configured only work in 1 window (for example.: i tried using 2 controllers, configured everthing in game and in x360ce .when i press left to walk left on the first controller it works. but when i try it on the second controller , the 1. player moves too.
Whats the solution? I have done everything you have written in the instruction.
Thanks in advance
Greets
 
I'm new to all this mod stuff, and pc Terraria in general. How do the updates for the mod work? Do they automatically update as the game updates?
 
I'm new to all this mod stuff, and pc Terraria in general. How do the updates for the mod work? Do they automatically update as the game updates?
No they don't. Modded is an entirely separate project from vanilla and we are not affiliated with Re-Logic at all. Updating the modded scene after vanilla updates takes some time, and all mod authors need to update their mods manually as well if there are breaking changes.
 
UPDATE 2.0.0: Multiple keyboard/mice support. See the parts in green for the added instructions. Please note that 2.0.0 only works on Windows - Mac/Linux users must use 1.0.1
  • The method I used in this version is very low-level and may(unlikely) cause your anti-virus to think it is a keylogger, which will probably kill Terraria the moment Split Screen loads. If this happens, you could add an exception for Terraria/tModLoader/SplitScreen or you could install version 1.0.1 if you do not want to use multiple keyboards/mice

Play with up to unlimited players in split-screen with multiple gamepads and/or multiple keyboards/mice.

1.png

2.png

3.png

Installation
  1. Install tModLoader : https://github.com/blushiemagic/tModLoader
  2. Download Split Screen from the Mod Browser(recommended) or directly here: javid.ddns.net/tModLoader/download.php?Down=mods/SplitScreen.tmod
    • If you download the SplitScreen.tmod directly, go to Terraria main menu -> Mods -> Open Mods Folder and place the .tmod file there
  3. (Optional) Install x360ce: https://github.com/Ilyaki/TerrariaSplitScreen/wiki/(Optional)-Setting-up-x360ce
  4. (Optional) Setup a fake higher resolution: https://github.com/Ilyaki/TerrariaSplitScreen/wiki/(Optional)-Setting-up-a-virtual-super-resolution

How to play
  1. Go to your Terraria installation folder, e.g. C:\Program Files (x86)\Steam\steamapps\common\Terraria and launch Terraria.exe as many times as you need
  2. Resize your windows however you like*. Press F6 to toggle the window borders
  3. On one window, go to Multiplayer -> Host & Play -> Select a character -> Select a world
  4. On the other windows, go to Multiplayer -> Join via IP -> Select a character -> Enter localhost as the IP and 7777 as the port
  5. On each window, click Next as many times as you need to change its gamepad. (If one player wants to use a keyboard+mouse, select NONE). Then click OK
    1. If you want to use a keyboard+mouse instead of a gamepad, select NONE as the gamepad index and click OK. I would recommend setting up the gamepad windows first, then the keyboards+mice
    2. Next, hold any three keys on your desired keyboard
    3. On the Lock mouse? menu, select Yes if this is the LAST window you are setting up. Otherwise select No
    4. Click the attach mouse button with your desired mouse
  6. Done. Remember to Save & Exit when you want to quit, not press Alt+F4. The window that hosted the game should quit last.

Tips
  • Use a different character for each window, or you may break your save
  • If you experience any bugs with controllers, it is recommended to install x360ce
  • Running multiple instances of Terraria can be very taxing on your computer. If you have poor performance, follow these steps
    • Toggle Frame Skip in video settings. See what works best for you.
    • Turn Quality in video settings down.
    • Set Lighting in video settings to Retro.
    • Set multithreading lighting as high as possible (Very important)
  • If you crash on launch, make sure to install the latest .NET Framework: https://www.microsoft.com/en-us/download/details.aspx?id=55170
  • Terraria may crash if you try to mod reload from within the game. I highly recommend restarting Terraria fully after enabling/disabling mods.
  • *If you don't have enough screen space to resize the windows, try setting up a virtual super resolution: https://github.com/Ilyaki/TerrariaSplitScreen/wiki/(Optional)-Setting-up-a-virtual-super-resolution

(A lot of the code for this mod was based off of my Stardew Valley split screen mod: https://www.nexusmods.com/stardewvalley/mods/2139)
Leave any feedback or bug reports below :)


Thank you for making this mod. I played it along with my siblings. I was curious because someone asked me. If there will be support coming or an update that allows the 64bit version of to do splitscreen. I put up a thread up for it recently and hope you take a look into it.
 
Back
Top Bottom