XInput GamePad Support Mod [Pre-1.3]

Hey Green Cat, I dunno if people have asked this yet, but how feasible would a tAPI version be? I want to use it with modded terraria but this just has its own .exe and only works with vanilla terraria. Heck, I can't even use it with that one inventory manager .exe mod, which is a real shame.
Sorry but a tAPI version is completely out of the picture right now because tAPI doesn't have any of the hooks I need and every time I request a new hook be added, the devs just ignore me or they refuse to add the hook because of how unnecessary they think it is.
 
Damn, that sucks. You'd think people would realize at some point that user ease of access > pointless superficial content additions.
 
XBCM Version 2.8.0 Changes:
  • Added support for the GOG version of Terraria.
  • Re-added Auto-Mine(All) cursor mode.
  • Added Controller Mode toggle:
    • Press Back on the main menu to toggle between Auto and On.
    • Auto: Enables Controller Mode when controller is used, disables when mouse/keyboard is used.
    • On: Controller Mode stays enabled the entire time.
  • Renamed a few button contexts.
  • Removed Lockon control.
  • Added Cursor Function control:
    • Does different functions depending on the selected cursor mode:
    • Ranged (w/Targeting): Lockon
    • Auto-mine (Tiles), Auto-mine (Walls), Auto-mine (All): Holds cursor right in front of player (for placing torches).
  • Completely removed XbcmConfig app for the time being (I'm working on a new one and this version's changes would require a lot of work for the current app that I don't want to do, so I'm waiting until I have the new one). In the meantime, you can manually edit the config files in ".\Documents\My Games\Terraria\Xbox Controller Mod\Profiles\".
  • Profiles now have options for all 4 controllers in them for splitscreen.
 
Uh:
12/22/2014 9:07:10 PM
System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
 
Uh:
12/22/2014 9:07:10 PM
System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
The rest of the stack trace is need, I'm afraid.
 
The rest of the stack trace is need, I'm afraid.
You mean this?
12/22/2014 9:07:10 PM
System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at Xbcm_Main.CursorModeSelector.DrawText(SpriteBatch sb, Rectangle windowRect, Boolean selected)
at Xbcm_Main.CursorModeSelector.Draw(SpriteBatch sb, Rectangle windowRect, Boolean selected)
at Xbcm_Main.Xbcm.DrawCursorSelectMenu(SpriteBatch sb)
at Xbcm_Main.Xbcm.Draw(SpriteBatch sb)
at Xbcm_Main.Hooks_World.PreDrawMap(SpriteBatch sb)
at Terraria.Main.Draw(GameTime gameTime)
at Microsoft.Xna.Framework.Game.DrawFrame()
at Microsoft.Xna.Framework.Game.Tick()
at Microsoft.Xna.Framework.Game.HostIdle(Object sender, EventArgs e)
at Microsoft.Xna.Framework.GameHost.OnIdle()
at Microsoft.Xna.Framework.WindowsGameHost.RunOneFrame()
at Microsoft.Xna.Framework.WindowsGameHost.ApplicationIdle(Object sender, EventArgs e)
at System.Windows.Forms.Application.ThreadContext.System.Windows.Forms.UnsafeNativeMethods.IMsoComponent.FDoIdle(Int32 grfidlef)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at Microsoft.Xna.Framework.WindowsGameHost.Run()
at Microsoft.Xna.Framework.Game.RunGame(Boolean useBlockingRun)
at Microsoft.Xna.Framework.Game.Run()
at Terraria.Program.Main(String[] args)

It seems there's a problem with the mode switch on the right analog stick or something.
(Also, this pops up on both steam and gog versions)
 
Last edited:
Version 2.8.5 Changes:

  • Fixed Cursor Mode Select crashing the game.
  • Removed option for multiple controllers in a single profile.
  • Added ability to select profiles on a per-player basis:
    • Replaced Reset Profile To Default control with Select Profile Control (Default: Y):
      • Press at main menu to cycle through profiles in the profile folder.
      • Each client can choose separate profiles.
  • Massively improved scaling/readability of contextual button prompts. (It should actually be tolerable on 800x600 resolution now.)
  • Changed many minor details:
    • Added SFX when pressing config buttons on main menu.
    • Lowered rumble strength while quick-quitting the game.
    • Pressing Start to set the controlling player no longer shows a dialog message but instead simply changes the number displayed (and it changes the actual controlling player as well).
    • Button context prompts now glow when you input them on the controller.
    • Changed wording of a few text strings.
  • I recommend deleting all previous configuration files before using this version to avoid any headaches, although it should, in theory, automatically replace them with default settings when you select them in-game.
 
Last edited:
New name for the mod: XInput GamePad Support Mod (XGSM)
New update coming soon.
New installer for the mod coming soon.
New image for the mod. (Check OP)
New configuration app for the mod.
I'm actually gonna start updating the mod like a used to because I am starting to really miss coding.
 
Last edited:
I just permanently deleted the source for this mod with no backup. ¯\_(ツ)_/¯
Version 3.0 was almost done too...
 
Last edited:
Future Plans:
I'm going to release the last mod binaries I compiled once I finish my new configuration app. Then I'm going to decompile the code for my unreleased 3.0 version (the GreenCat77.XGSM and GreenCat77.XGSM.Lib assemblies), fix the ridiculous amounts of decompilation errors, clean up the mess in the coding caused by the decompiler, and begin development on a tAPI version of the mod, which will be developed open-source (MIT-Licensed) and hosted on this GitHub repository. I will create a new thread here on Terraria Community Forums for this new tAPI version of the mod once I'm ready to release XGSM 0b00000001 (the 'b' is because its a 'beta' version, but it's displayed as a binary number because I'm a nerd).



How can i play in splitscreen using keyboard and controller ?
Setting up the players' controls:
  1. Enable the splitscreen support option in your config profile.
  2. Open one instance of the regular, unmodded version Terraria for the person playing with mouse/keyboard.
  3. Open multiple instances of the mod; one for each person playing with a gamepad.
  4. For each individual player using a GamePad:
    1. Click on the player's instance of the mod in order to give focus to the window.
    2. At the Main Menu, press Start on whatever XInput GamePad the player will be using to control the game in order to make sure the player number is correct (because XInput devices are assigned a player number from 1-4, like on an Xbox 360 console, which the mod needs to know.)
    3. Once the player's controller works, press Back on the Main Menu in order to change Player 2's Controller Mode to Always On (If you leave it on Auto mode, then every time the person playing with mouse/keyboard moves the mouse or presses a key on the keyboard it will make the player's mod automatically disable Controller Mode, causing the GamePad's inputs to be ignored.)
    4. Optional: The player can press Y on the Main Menu to cycle through all of the configuration profiles found in order to choose the one that best suits his/her play style.
  5. Important: Remember that what the splitscreen support option does is boost game performance while the window is out of focus, so the instances of the modded version of the game, which the GamePad players will be using, can be run at normal speed without window focus. However, remember that the unmodded version of the game, which the mouse/keyboard player will be using, does not run full speed in the background! Therefore, the unmodded version of the game needs to be the window that's in focus while playing!
Getting Connected:
  1. Understand that each player in splitscreen multiplayer is just like each player in regular, separate-PC multiplayer and that they must each connect to a server in order to play. Therefore, just do things as you would normally do for multiplayer online or with LAN, treating all of the instances of the game running like individual PCs. However, connecting to your own PC from within your own PC is a bit different.
  2. Hosting a server on your own PC for splitscreen:
    1. Run a Terraria Server. Whether you choose to run the server from within the game by selecting Multiplayer -> Host & Play (make sure you do it on the unmodded version of the game on which the mouse/keyboard person is playing) or you choose to run the separate server program (located at ".\SteamApps\common\Terraria\TerrariaServer.exe") doesn't really matter. Just keep in mind that if you're using the built-in server hosting mode and the player who's hosting the server decides to quit, then it will disconnect all of the other players (obviously).
    2. Have every player (other than the one hosting and playing, if applicable) connect to your own PC via Multiplayer -> Join by putting your PC's local IPv4 address for the address of the server to join. Tip: for the server address you can use either 127.0.0.1(can change depending on network configuration) or localhost(never changes, at least AFAIK), both of which connect directly to your own PC. (This works for any time you wish to connect to your own PC, I should add.)
 
i seem to have installed both gamelauncher 3.0 and the latest version of xbcm but everytime i choose the "single player" option or the "host and play" option in the multiplayer menu, i get this huge error: http://i.imgur.com/OfEtaBm.png
I know the mod should be working perfectly since i'm able to navigate the menu with the 360 controller, i'm just unsure as to why it does this when i try to select a world:(

Edit: Seems if i go to single player quickly enough, i can momentarily see the choose your character screen for like 2 seconds, but then the same error pops up:/....
 
i seem to have installed both gamelauncher 3.0 and the latest version of xbcm but everytime i choose the "single player" option or the "host and play" option in the multiplayer menu, i get this huge error: http://i.imgur.com/OfEtaBm.png
I know the mod should be working perfectly since i'm able to navigate the menu with the 360 controller, i'm just unsure as to why it does this when i try to select a world:(

Edit: Seems if i go to single player quickly enough, i can momentarily see the choose your character screen for like 2 seconds, but then the same error pops up:/....
That's actually not an error in my mod..........
 
Back
Top Bottom