Castle Crashers

Castle Crashers

View Stats:
Keyboard to Direct Input emulator?
Hello guys,
I'm having the same issue as most people here. I have a PS3 game pad and... a keyboard. Using Motioninjoy and its Direct Input emulator gets the pad to work but both register as player 1. I've tried using x360ce and changed the PAD1 code to PAD2 and changed PassThrough to 0 but same problem.

Is there such a thing as a keyboard to Direct Input emulator?

Please help I really want to play this game with my brother.

Edit: I also read the update 1 post and Behemoth doesn't seem to have any plans for correcting this disaster :(.

Thank you.
Last edited by MaxLightningUK; Oct 6, 2012 @ 10:26am
< >
Showing 1-15 of 28 comments
Kletian999 Oct 6, 2012 @ 5:14pm 
I got this working with a logitech wired controller; you need X360ce
http://code.google.com/p/x360ce/downloads/list
and something else called x360ce vibmod.
http://code.google.com/p/x360ce/downloads/detail?name=x360ce%20vibmod%203.1.4.1.zip&can=4&q=

Save the contents of that zip to a special folder. Don't worry about the deprecated warning.

First save the x360ce executable to Program Files/Steam/Common/Castle Crashers. Run the file and allow it to generate what's needed and use internet settings. If you save and quit now, you'll notice that the controller is still stuck at player 1. To force it to another controller, copy all the files from the vibmod zip into Castle crashers overwriting x360ce files. Once again run the x360ce executable, but tell it NOT to update the dll (if you say yes you'll need to recopy from the zip). Save and close, now edit the .ini file in the directory. Unlike modern x360 files, this'll contain information that looks like:

[PAD1]
Index=-1 #controller index in system game controllers list; 0 is first; -1 to ignore this pad
Native=0 #experimental native mode, calls system xinput1_3.dll to support xinput compatible controller together with emulated
VID=0x0 #controller VID
PID=0x0 #controller PID
Left Analog X=1 #axis index; use - to invert; precede with 's' for a slider eg; s-1; 7 to disable
Left Analog Y=-2 #axis index; use - to invert; precede with 's' for a slider eg; s-1; 7 to disable
Right Analog X=3 #axis index; use - to invert; precede with 's' for a slider eg; s-1; 7 to disable
Right Analog Y=-6 #axis index; use - to invert; precede with 's' for a slider eg; s-1; 7 to disable
Left Analog X+ Button=0 #button id; 0 to disable
Left Analog X- Button=0 #button id; 0 to disable
Left Analog Y+ Button=0 #button id; 0 to disable
Left Analog Y- Button=0 #button id; 0 to disable
Right Analog X+ Button=0 #button id; 0 to disable
Right Analog X- Button=0 #button id; 0 to disable
Right Analog Y+ Button=0 #button id; 0 to disable
Right Analog Y- Button=0 #button id; 0 to disable
D-pad POV=1 #POV index; 0 to disable
D-pad Up=0 #button id; 0 to disable
D-pad Down=0 #button id; 0 to disable
D-pad Left=0 #button id; 0 to disable
D-pad Right=0 #button id; 0 to disable
A=2 #button id; 0 to disable
B=3 #button id; 0 to disable
X=1 #button id; 0 to disable
Y=4 #button id; 0 to disable
Left Shoulder=5 #button id; 0 to disable
Right Shoulder=6 #button id; 0 to disable
Back=9 #button id; 0 to disable
Start=10 #button id; 0 to disable
Left Thumb=11 #button id; 0 to disable
Right Thumb=12 #button id; 0 to disable
TriggerDeadzone=5 #use 0 to 255; default 0; add deadzone to trigger
Left Trigger=7 #button id; precede with 'a' for an axis; 's' for a slider; 'x' for a half range axis; 'h' for half slider; use '-' to invert ie. x-2;
Right Trigger=8 #button id; precede with 'a' for an axis; 's' for a slider; 'x' for a half range axis; 'h' for half slider; use '-' to invert ie. x-2;
UseForceFeedback=1 #use 0 to 1; default 0
SwapMotor=0 #use 0 to 1; default 0
ForcePercent=100 #use 0 to 100; default 100
ControllerType=1 #GAMEPAD 1; WHEEL 2; STICK 3; FLIGHT_SICK 4; DANCE_PAD 5; GUITAR 6; DRUM_KIT 8; //WILDS
AxisToDPad=0 #Use Axis to control DPad (0 disabled, 1 enabled) //WILDS
AxisToDPadDeadZone=256 #Dead zone for Axis //WILDS
AxisToDPadOffset=0 # //WILDS
POVXReverse=0 #Reverse POV Up/Down
POVYReverse=0 #Reverse POV Left/Right

For 4 PADs, then it'll give information with a controller ID like
[IG_c837ebe00da111e28001444553540000], and a similiar list of variables without the #comments.

At the very bottom, you'll see
[Mappings]
PAD1=IG_c837ebe00da111e28001444553540000
PAD2=
PAD3=
PAD4=

Step one: Cut and paste the value of PAD1= to another PAD, like PAD3

Step two: Scroll up to the PAD1 block. The Index is likely set to 0, set it instead to -1=. This ensures the pads will stop trying to be Player 1.

Step Three Go to PAD3 (or PAD2 or PAD4) and likewise set PAD3 Index to 0( or 1 or 2) depending on number of controllers you do this with. If you run the Test application that came with the vibmod you should see Controller 1 as Disconnected, Controller 3 as Connected. One problem after this was I found the XAB buttons were mixed up, as well as the Trigger buttons considered themselves contantly half pressed (unless you moved the right analogue stick).

Step Four: To correct this, under the PAD3 (or whatever number) block make the following corrections:
A=1 #button id; 0 to disable
B=2 #button id; 0 to disable
X=3 #button id; 0 to disable

Left Trigger=x+3 #button id; precede with 'a' for an axis; 's' for a slider; 'x' for a half range axis; 'h' for half slider; use '-' to invert ie. x-2;
Right Trigger=x-3 #button id; precede with 'a' for an axis; 's' for a slider; 'x' for a half range axis; 'h' for half slider; use '-' to invert ie. x-2;

This should make the triggers register properly (albiet also considered moving the right stick, but for castle crashers we dont care.

I'm going to say this was a very trial and error process. It's possible I have wasted steps, and there's possible a better value for Left and Right Trigger. But I'm happy I was able to get a single keyboard and controller working for local co op multiplayer in Castle Crashers (pick this up google)

Here's to the day it's all unnescesary.
MaxLightningUK Oct 7, 2012 @ 12:22am 
As someone who was pissed at Behemoth this guy restored my faith in humanity. For me the keyboard has become player 2 while the gamepad is player 1, is this behaviour normal?

In addition I fixed Select and Start on the PS3 pad by enter 7 and 8 for Back and Start in the ini.
Right analogue seems not to work although I tried RX+3 and what not. I got these values by using xpadder.

Any solutions for fixing the rest of the controller? I ask incase it's necessary.
Kletian999 Oct 7, 2012 @ 6:07pm 
The keyboard becomes player 2 if you use the controller to hit "start game" on the menu. For best results, dont touch the controller until you are at the character select prompt. One downside of my method with the shoulder buttons for magic and blocking can't be pressed with they are considered the same axis. so the player with this configuration should probably not be a tanking magic user. I do hope someone can find a better value for triggers than Axis 3; but I tried everything I could think of. Maybe I should switch those buttons with the value for switch item.
MaxLightningUK Oct 8, 2012 @ 4:53am 
Nah but thanks to you me and my brother have gotten hours of fun!
Apple Pie™ Oct 8, 2012 @ 12:06pm 
does this work for mac?
FranckyFox2468 Oct 11, 2012 @ 2:09pm 
I wonder the same here
Kletian999 Oct 16, 2012 @ 4:38am 
If I owned a mac I would tell you.
Increasedcuz Oct 20, 2012 @ 6:11am 
I can confirm that Kletian999's method works.

PS: Bohemoth u suck
Last edited by Increasedcuz; Oct 20, 2012 @ 6:11am
Revelanth Oct 20, 2012 @ 9:14am 
Originally posted by dib2nv:
I can confirm that Kletian999's method works.

PS: Bohemoth u suck
You don't seem to possess a legitimate copy of the game, yet that doesn't stop you from insulting the developer. You truly emanate shamelessness.
Kletian999 Oct 25, 2012 @ 9:19pm 
Figure I'd bump this since the workaround is still needed with Patch 1.1
The Scrungal Load Oct 26, 2012 @ 12:18am 
Hmmmm, my motioninjoy driver contains an Xbox360 Controller Emulator... so yeah, I play this with a PS3 controller.
Philophobic Nov 9, 2012 @ 3:49pm 
I'm using a generic vibration controller, and I found this guide extremely useful, with a small difference. At least for me, the correct button settings (Step Four in Kletian's post) are these:
A=3 #button id; 0 to disable
B=2 #button id; 0 to disable
X=4 #button id; 0 to disable
Y=1 #button id; 0 to disable

Left Trigger=7 #button id; precede with 'a' for an axis; 's' for a slider; 'x' for a half range axis; 'h' for half slider; use '-' to invert ie. x-2;
Right Trigger=8 #button id; precede with 'a' for an axis; 's' for a slider; 'x' for a half range axis; 'h' for half slider; use '-' to invert ie. x-2;

It might be just me, but I hope this helps others with generic gamepads.
MassHypnosis Nov 28, 2012 @ 5:29am 

Originally posted by Kletian999:
I got this working with a logitech wired controller; you need X360ce
http://code.google.com/p/x360ce/downloads/list
and something else called x360ce vibmod.
http://code.google.com/p/x360ce/downloads/detail?name=x360ce%20vibmod%203.1.4.1.zip&can=4&q=

Save the contents of that zip to a special folder. Don't worry about the deprecated warning.

First save the x360ce executable to Program Files/Steam/Common/Castle Crashers. Run the file and allow it to generate what's needed and use internet settings. If you save and quit now, you'll notice that the controller is still stuck at player 1. To force it to another controller, copy all the files from the vibmod zip into Castle crashers overwriting x360ce files. Once again run the x360ce executable, but tell it NOT to update the dll (if you say yes you'll need to recopy from the zip). Save and close, now edit the .ini file in the directory. Unlike modern x360 files, this'll contain information that looks like:

[PAD1]
Index=-1 #controller index in system game controllers list; 0 is first; -1 to ignore this pad
Native=0 #experimental native mode, calls system xinput1_3.dll to support xinput compatible controller together with emulated
VID=0x0 #controller VID
PID=0x0 #controller PID
Left Analog X=1 #axis index; use - to invert; precede with 's' for a slider eg; s-1; 7 to disable
Left Analog Y=-2 #axis index; use - to invert; precede with 's' for a slider eg; s-1; 7 to disable
Right Analog X=3 #axis index; use - to invert; precede with 's' for a slider eg; s-1; 7 to disable
Right Analog Y=-6 #axis index; use - to invert; precede with 's' for a slider eg; s-1; 7 to disable
Left Analog X+ Button=0 #button id; 0 to disable
Left Analog X- Button=0 #button id; 0 to disable
Left Analog Y+ Button=0 #button id; 0 to disable
Left Analog Y- Button=0 #button id; 0 to disable
Right Analog X+ Button=0 #button id; 0 to disable
Right Analog X- Button=0 #button id; 0 to disable
Right Analog Y+ Button=0 #button id; 0 to disable
Right Analog Y- Button=0 #button id; 0 to disable
D-pad POV=1 #POV index; 0 to disable
D-pad Up=0 #button id; 0 to disable
D-pad Down=0 #button id; 0 to disable
D-pad Left=0 #button id; 0 to disable
D-pad Right=0 #button id; 0 to disable
A=2 #button id; 0 to disable
B=3 #button id; 0 to disable
X=1 #button id; 0 to disable
Y=4 #button id; 0 to disable
Left Shoulder=5 #button id; 0 to disable
Right Shoulder=6 #button id; 0 to disable
Back=9 #button id; 0 to disable
Start=10 #button id; 0 to disable
Left Thumb=11 #button id; 0 to disable
Right Thumb=12 #button id; 0 to disable
TriggerDeadzone=5 #use 0 to 255; default 0; add deadzone to trigger
Left Trigger=7 #button id; precede with 'a' for an axis; 's' for a slider; 'x' for a half range axis; 'h' for half slider; use '-' to invert ie. x-2;
Right Trigger=8 #button id; precede with 'a' for an axis; 's' for a slider; 'x' for a half range axis; 'h' for half slider; use '-' to invert ie. x-2;
UseForceFeedback=1 #use 0 to 1; default 0
SwapMotor=0 #use 0 to 1; default 0
ForcePercent=100 #use 0 to 100; default 100
ControllerType=1 #GAMEPAD 1; WHEEL 2; STICK 3; FLIGHT_SICK 4; DANCE_PAD 5; GUITAR 6; DRUM_KIT 8; //WILDS
AxisToDPad=0 #Use Axis to control DPad (0 disabled, 1 enabled) //WILDS
AxisToDPadDeadZone=256 #Dead zone for Axis //WILDS
AxisToDPadOffset=0 # //WILDS
POVXReverse=0 #Reverse POV Up/Down
POVYReverse=0 #Reverse POV Left/Right

For 4 PADs, then it'll give information with a controller ID like
[IG_c837ebe00da111e28001444553540000], and a similiar list of variables without the #comments.

At the very bottom, you'll see
[Mappings]
PAD1=IG_c837ebe00da111e28001444553540000
PAD2=
PAD3=
PAD4=

Step one: Cut and paste the value of PAD1= to another PAD, like PAD3

Step two: Scroll up to the PAD1 block. The Index is likely set to 0, set it instead to -1=. This ensures the pads will stop trying to be Player 1.

Step Three Go to PAD3 (or PAD2 or PAD4) and likewise set PAD3 Index to 0( or 1 or 2) depending on number of controllers you do this with. If you run the Test application that came with the vibmod you should see Controller 1 as Disconnected, Controller 3 as Connected. One problem after this was I found the XAB buttons were mixed up, as well as the Trigger buttons considered themselves contantly half pressed (unless you moved the right analogue stick).

Step Four: To correct this, under the PAD3 (or whatever number) block make the following corrections:
A=1 #button id; 0 to disable
B=2 #button id; 0 to disable
X=3 #button id; 0 to disable

Left Trigger=x+3 #button id; precede with 'a' for an axis; 's' for a slider; 'x' for a half range axis; 'h' for half slider; use '-' to invert ie. x-2;
Right Trigger=x-3 #button id; precede with 'a' for an axis; 's' for a slider; 'x' for a half range axis; 'h' for half slider; use '-' to invert ie. x-2;

This should make the triggers register properly (albiet also considered moving the right stick, but for castle crashers we dont care.

I'm going to say this was a very trial and error process. It's possible I have wasted steps, and there's possible a better value for Left and Right Trigger. But I'm happy I was able to get a single keyboard and controller working for local co op multiplayer in Castle Crashers (pick this up google)

Here's to the day it's all unnescesary.

4 me is work but i have a question. How make x360pad 1 player and keyboard 2 player
Kletian999 Dec 4, 2012 @ 5:39pm 
Simply start the game (get to the character select screen) using the controller, then use the keyboard to add/control player 2.
Almakos Dec 8, 2012 @ 12:27pm 
is there any solution for mac users? we cannot open exe files obviously...
< >
Showing 1-15 of 28 comments
Per page: 1530 50

Date Posted: Oct 6, 2012 @ 10:26am
Posts: 28