Xbox 360 Controller Support

Want to share your mod with the world? Feel free!

Xbox 360 Controller Support

Postby krighton » Fri Nov 30, 2012 10:31 pm

Torchlight II Gamepad Software: XInput Mapper

First things first, here's the software. A detailed description with usage and configuration instructions follows.

Download Current Version (1.2.2)

Last updated: 03.05.2013
* Fixed an issue that sometimes caused the player to stop moving after attacking.

About:

XInput Mapper (for lack of a better name), is an application written solely for the purpose of enabling Xbox 360 support for Torchlight II. I may extend this to support other games in the future, hence the generic name.

The original purpose and motivation behind this was to allow my 7 year old son to play the game with me, as he's much more comfortable using a gamepad than a keyboard and mouse. I looked into using existing third party apps, such as xpadder and a few others, but they either did not do everything I wanted them to or they were too complex to set up. I decided it would be easier to start from scratch and roll my own.

This is a stand-alone tool written exclusively for Torchlight II, which means I'm able to tweak more than you normally could using more generic controller mapping software. I've also provided a default (and customizable) configuration out of the box. Just launch the app (it sits in the system tray - no UI) and your Xbox360 controller is ready to use.

There is nothing magic or dangerous about this application, it simply intercepts gamepad events and forwards them to the Torchlight II window as input events.

Installation:

Simply unzip to a directory of your choice and run XInputMapper. Connect your Xbox controller and that's all there is to it.

The zip contains the following files:

  1. XInputMapper.exe - the application
  2. t2.mappings - controller mapping configuration
  3. t2mappings.jpg - an image of the default mapping configuration
  4. changelog.txt - revision history

Configuration:

The t2.mappings file contains all of the configurable controller mappings. If you open this file with a text editor (i.e. notepad), you can read descriptions of all supported configuration options. If you change this file, simply restart XInputMapper for the changes to take effect.

The default controller mappings are shown below. These went through a few iterations and I'm fairly happy with the current mappings. Almost every action in the game is mapped, including 8 of the 10 quickslots. There are actually a few unused button combinations that I didn't bother mapping with this default configuration (such as DPad+Modifier), so you could easily map any remaining actions to them if you like.

Image

Tips and Troubleshooting:

  • If your controller is not working at all in Torchlight II, chances are that Torchlight II is running at a higher privilege level than XInputMapper. The easiest way to fix this is to run XInputMapper.exe as Administrator.
  • If the left analog stick is not moving your player (or if any other default controls are not working), most likely there was no key mappings file for XInputMapper to parse. Try going into Settings->Controls within Torchlight II and clicking the green checkmark (accept button). This forces creation of your KeyBindings.dat within the Torchlight II save folder. Restart XInputMapper or select the 'Refresh Mappings' menu option to (hopefully) resolve your problems.
  • If you get an error when starting XInput Mapper stating "Unable to load Torchlight II key bindings (failed to lookup Documents folder)", try manually specifying the path to your Torchlight II "save" folder via the T2SavePath option in t2.mappings.
  • The default player control mappings (which rely on a 'move circle' in the middle of the screen) assume a fully zoomed out camera. This will be just fine for most players. However, if you decide to change the camera zoom, the move circle size may need to be increased for movement to work smoothly. You can update the default move circle size by changing the 'MoveCircleSize' setting in t2.mappings. You can also update the move circle size on the fly while playing, using the 'Set Move Circle' and 'Reset Move Circle' actions (see controller image above for default mappings).
  • If you change your control settings from within Torchlight II or your t2.mappings file while XInputMapper is running, right click the system tray icon and select 'Refresh Mappings' to have the tool pick up your changes.
  • XInputMapper will currently only work with Torchlight II when the game is on your primary monitor.
  • Use the Quickbar for your most frequently used attacks and skills, since the buttons are easier to press. Assign less frequently used skills to the left and right shoulder buttons (Left and Right mouse buttons in default T2 controls).

Changelog:

* See download link above for changelog.

Please post any bugs or feedback.

-Krighton
Last edited by krighton on Tue Feb 11, 2014 3:15 pm, edited 14 times in total.
krighton
 
Posts: 40
Joined: Fri Nov 30, 2012 10:03 pm

Re: Xbox 360 Controller Support

Postby krathoz » Sat Dec 01, 2012 2:49 am

i like what the left trigger does, amazing work men, much better than xpadder and all that kind f software.

anyway, its only playable in easy or normal, or maybe veteran but with A LOT of practice...

ps: if u need inspiration look how ascaron games port Sacred 2 to the xbox 360, amazing port and control use i must say
krathoz
 
Posts: 35
Joined: Sun Sep 16, 2012 2:32 pm
Location: Posadas, Argentina

Re: Xbox 360 Controller Support

Postby BLISSKILLER86 » Wed Dec 05, 2012 10:17 am

Hi like this so far the only thing i was wondering is my quick slots wont work for some reason, and is there a way to speed up the mouse movement on the right stick? thank you
User avatar
BLISSKILLER86
 
Posts: 1
Joined: Wed Dec 05, 2012 10:04 am

Re: Xbox 360 Controller Support

Postby Zidders » Wed Dec 05, 2012 10:22 am

Wow..so, this is fantastic but my main question is, is there a way you can maybe make a video showing how this all works? Not featuring your son, of course but i'm curious as to how well this works with the interface and especially the hotbar. I believe that the game is already pretty controller friendly-much of their current UI work came about because of work they'd done on Torchlights Xbox port but there are still a lot of gamepad-unfriendly features, I would think?
Image
User avatar
Zidders
 
Posts: 13467
Joined: Fri Oct 30, 2009 9:50 am
Location: Bertram, Texas

Re: Xbox 360 Controller Support

Postby krighton » Wed Dec 05, 2012 2:19 pm

BLISSKILLER86 wrote:Hi like this so far the only thing i was wondering is my quick slots wont work for some reason, and is there a way to speed up the mouse movement on the right stick? thank you


Did you enable the quickslot mappings in the t2.mappings file? If so and it still doesn't work, I might have missed testing these. I'll take a look when I get home tonight and upload a new version if they are broken.

For the right stick. you can change up the sensitivity by changing the "CursorSensitivityX" and "CursorSensitivityY" settings in the t2.mappings file.
krighton
 
Posts: 40
Joined: Fri Nov 30, 2012 10:03 pm

Re: Xbox 360 Controller Support

Postby krighton » Wed Dec 05, 2012 2:34 pm

Zidders wrote:Wow..so, this is fantastic but my main question is, is there a way you can maybe make a video showing how this all works? Not featuring your son, of course but i'm curious as to how well this works with the interface and especially the hotbar. I believe that the game is already pretty controller friendly-much of their current UI work came about because of work they'd done on Torchlights Xbox port but there are still a lot of gamepad-unfriendly features, I would think?


I considered making a video - I'll look into it.

FWIW, my son and I have put in about 20-30 hours of co-op so far. He's been using the controller exclusively during this time and he's been really happy with it. TBH, I still play with a keyboard/mouse, but that has more to do with the fact that I'm just a keyboard/mouse kind of guy (I'm a programmer, what can I say)...

Also, after playing the game more, I've come to the realization that I would probably put more emphasis on mapping quickslots instead of some of the more infrequently used actions that are currently mapped. Thankfully this is configurable, so anyone can make this mapping change to suit their play style. At any rate, I'll consider making that video.
krighton
 
Posts: 40
Joined: Fri Nov 30, 2012 10:03 pm

Re: Xbox 360 Controller Support

Postby Porsha » Wed Dec 05, 2012 2:57 pm

This honestly just made my day. I'm a console player at heart. While I love Torchlight 2 it was a dagger through my heart when I read they wouldn't support an Xbox controller especially after Torchlight was such a big hit on Xbox Live Arcade (and worked better with a controller IMO). Funny enough, Blizzard was also quoted as saying D3 plays as good or better with a controller.

For me personally, I hate working on a PC all day and then having to come home to "relax" on a KB/Mouse. No thank you.


Can't wait to try this out. Thanks again!!!!
User avatar
Porsha
 
Posts: 94
Joined: Thu Jun 21, 2012 7:16 am

Re: Xbox 360 Controller Support

Postby tekkamansoul » Wed Dec 05, 2012 4:08 pm

Thanks for doing this, I'll be sure to try it out soon to give feedback.
背景音楽主義
!jrpg
tekkamansoul
 
Posts: 854
Joined: Mon May 14, 2012 12:54 pm

Re: Xbox 360 Controller Support

Postby krighton » Fri Dec 07, 2012 6:10 pm

I've updated the OP with more a more detailed description and structure, which I can update as I make changes.

There's also a new version for download that includes support for many more actions by default, including most of the Quickslots.
krighton
 
Posts: 40
Joined: Fri Nov 30, 2012 10:03 pm

Re: Xbox 360 Controller Support

Postby 0x442E472E » Sat Dec 08, 2012 5:33 am

Well, maybe i should have advertised my own tool better
Last edited by 0x442E472E on Sat Dec 08, 2012 6:05 pm, edited 1 time in total.
T2Gamepad - Play T2 with a gamepad!
User avatar
0x442E472E
 
Posts: 21
Joined: Sat Oct 06, 2012 11:32 am

Re: Xbox 360 Controller Support

Postby Reeload69 » Sat Dec 08, 2012 9:45 am

"Awesome! Maybe not suited for Elite, but sure worth checking out to see how it... oh, wait, my Razer Onza's analog sticks are not working right." :|||

From the looks of it (as I can't test), great job there. I'm gonna try it out as soon as I get my Onza fixed (riiiight...) or get a new gamepad :)
"Welp, we're boned!"
--Bender the Robot
User avatar
Reeload69
 
Posts: 409
Joined: Thu Mar 22, 2012 12:29 am
Location: Poland

Re: Xbox 360 Controller Support

Postby Wytefang » Sat Dec 08, 2012 3:31 pm

Super nice of you to post all that info. And I mean no offense by this by why would someone want to go to all that hassle just to play the game with an inferior control scheme? Seems odd to me but each to their own, I guess.
User avatar
Wytefang
 
Posts: 6
Joined: Sat Dec 08, 2012 12:20 pm

Re: Xbox 360 Controller Support

Postby krighton » Sat Dec 08, 2012 5:15 pm

Wytefang wrote:Super nice of you to post all that info. And I mean no offense by this by why would someone want to go to all that hassle just to play the game with an inferior control scheme? Seems odd to me but each to their own, I guess.


As mentioned above, I went to all the hassle so my kid could play the game. Personally, I still play with a keyboard and mouse, although I do enjoy messing around with the controller from time to time as I can just sit back and relax while playing the game on an easier difficulty setting.
krighton
 
Posts: 40
Joined: Fri Nov 30, 2012 10:03 pm

Re: Xbox 360 Controller Support

Postby Wytefang » Sat Dec 08, 2012 7:19 pm

D'oh! Shoulda read more carefully. Very nice of you to do that, though! :)

I just always prefer K/M for RPGs on PC. So much easier to manage inventory and such.
User avatar
Wytefang
 
Posts: 6
Joined: Sat Dec 08, 2012 12:20 pm

Re: Xbox 360 Controller Support

Postby SamuelMarston » Tue Dec 18, 2012 5:28 pm

I wanted to let you know that I've been loving your app, and I've passed it around to friends on F-Book.

I am curious if there is a way to disable the zoom functions for the camera and map? Those ones get accidentally modified when I'm Alt+Pressing. It's a small issue, but I can't seem to find a way to disable/change it.
User avatar
SamuelMarston
 
Posts: 195
Joined: Fri Mar 18, 2011 6:41 am

Re: Xbox 360 Controller Support

Postby Drascoll » Tue Dec 18, 2012 8:28 pm

Anyone having any success in getting this to work? It doesn't seem to recognize my controller at all. It's a generic GameStop Xbox controller.
Image
User avatar
Drascoll
 
Posts: 54
Joined: Wed Jun 20, 2012 4:14 pm

Re: Xbox 360 Controller Support

Postby krighton » Tue Dec 18, 2012 8:37 pm

SamuelMarston wrote:I wanted to let you know that I've been loving your app, and I've passed it around to friends on F-Book.

I am curious if there is a way to disable the zoom functions for the camera and map? Those ones get accidentally modified when I'm Alt+Pressing. It's a small issue, but I can't seem to find a way to disable/change it.


Glad to hear you're liking it.

I've uploaded a new version (1.1.2) that adds support for two new config settings: ZoomCameraEnabled and ZoomMapEnabled. You can find them in the t2.mappings file - they are still on by default. Set them both to "0" to disable it.
krighton
 
Posts: 40
Joined: Fri Nov 30, 2012 10:03 pm

Re: Xbox 360 Controller Support

Postby krighton » Tue Dec 18, 2012 8:39 pm

Drascoll wrote:Anyone having any success in getting this to work? It doesn't seem to recognize my controller at all. It's a generic GameStop Xbox controller.


I only have official MS xbox controllers, although I don't see why yours would not work.

Is it wired or wireless? And does it work fine with other xbox 360 controller enabled windows games? I could possibly add some logging to help troubleshoot the issue (to see if the issue is your controller not being recognized, or if it's something else about your setup).
krighton
 
Posts: 40
Joined: Fri Nov 30, 2012 10:03 pm

Re: Xbox 360 Controller Support

Postby Drascoll » Tue Dec 18, 2012 8:52 pm

wired, the driver show's up as "Xbox 360 controller for Windows" in my Device Manager. It works fine with all games that support game pads.
Image
User avatar
Drascoll
 
Posts: 54
Joined: Wed Jun 20, 2012 4:14 pm

Re: Xbox 360 Controller Support

Postby krighton » Wed Dec 19, 2012 12:23 am

Drascoll wrote:wired, the driver show's up as "Xbox 360 controller for Windows" in my Device Manager. It works fine with all games that support game pads.


Turned out to be a permissions issue for those who also encounter this problem.

It was fixed by running the app in Administrator mode. I've updated the post and included a troubleshooting menu option in the app now with this information.
krighton
 
Posts: 40
Joined: Fri Nov 30, 2012 10:03 pm

Next

Return to Mod Showcase

Who is online

Users browsing this forum: No registered users and 7 guests