The Long Dark

The Long Dark

View Stats:
This topic has been locked
HotDogAuChou Sep 29, 2014 @ 7:05pm
Xbox Controller Script. For GlovePie
Here is a script for using a controller with the long dark.

Credits to Killadelphia for the template of this script I have used (was for RUST)

To use this script you need to download GlovePie.

Make sure your Xbox 360 controller is plugged in before you start,

Open up GlovePie, click File---- New --- Paste in the script that I wrote down there---

Click Run, go Play!

Controls:

right trigger: action (left click)
left trigger: throw (right click)

right bumper: craft menu (tab)
left bumper : inventory (i)
a: run (i suggest you toggle the togglerun option )
b: crouch
x: reload
y: holster

pause: pause (duh)
select: light match.

Right bumper: up arrow (for inventory)
left bumper : down arrow

up arrow : decoy
down arrow: lantern
left arrow: firearm
righ arrow: flare.

You may switch controls by editing the script (pretty easy)

Search GlovePie in google to install.
Cheers!

Script:

//Set right stick inversion preference (True or False)
var.Inverted = false

//Set dead zones (Values between 0 and 1)
var.LdeadX = 0.25
var.LdeadY = 0.25
var.RdeadX = 0.25
var.RdeadY = 0.25

//Left Stick – Movement

keyboard.W = Xinput.Joy1Y > var.LdeadY
keyboard.S = Xinput.Joy1Y < -var.LdeadY
keyboard.A = Xinput.Joy1X < -var.LdeadX
keyboard.D = Xinput.Joy1X > var.LdeadX

// Right Stick – Mouse Pointer
// To change the lookspeed, increase or decrease the number preceding the deadzone - default is 20
if Xinput.Joy2X < -var.RdeadX or Xinput.Joy2X > var.RdeadX then Mouse.DirectInputX = Mouse.DirectInputX + 20*deadzone(Xinput.Joy2X)
if var.Inverted = true then{
if Xinput.Joy2Y < -var.RdeadY or Xinput.Joy2Y > var.RdeadY then Mouse.DirectInputY = Mouse.DirectInputY + 20*deadzone(Xinput.Joy2Y)
}else{
if Xinput.Joy2Y < -var.RdeadY or Xinput.Joy2Y > var.RdeadY then Mouse.DirectInputY = Mouse.DirectInputY - 20*deadzone(Xinput.Joy2Y)
}

// 360 Bumpers
keyboard.Tab = Xinput.RightShoulder
keyboard.I = Xinput.LeftShoulder

//360 Triggers
mouse.RightButton = Xinput.LeftTrigger
mouse.LeftButton = Xinput.RightTrigger

//360 Buttons ABXY
keyboard.Shift = Xinput.A
keyboard.R = Xinput.X
keyboard.H = Xinput.Y
keyboard.ctrl = Xinput.B

//360 dPad
keyboard.1 = Xinput.Right and not Xinput.RightTrigger
keyboard.2 = Xinput.Down and not Xinput.RightTrigger
keyboard.3 = Xinput.Left and not Xinput.RightTrigger
keyboard.4 = Xinput.Up and not Xinput.RightTrigger

//360 Start and Select
keyboard.esc = Xinput.start
keyboard.M = Xinput.back

//360 Stick Clicks
keyboard.Down = Xinput.LeftThumb
keyboard.Up = Xinput.RightThumb
< >
Showing 1-15 of 16 comments
HotDogAuChou Sep 29, 2014 @ 7:43pm 
oh and if anybody has any hardcore skills with this, It would need a fix for the mouse aiming and movement, as it doesnt take into account the acceleration of Sticks or various angles. It only goes up down left right, not according to degrees of the sticks. Also, I could also add a way to navigate the menus using the stickpads, if anybody is interested.

On a last note, please add feedback on this script :P

Thank you!
RSRising Sep 29, 2014 @ 10:40pm 
OH gotta try this! Will give input ASAP. AWESOME! Keyboard free in this game is ideal. Kudos Huuk45!
HotDogAuChou Sep 30, 2014 @ 4:55am 
Tell me if you get it working on your side, If not I will make a more complete guide on how to do this and maybe ask for it to be stickyed.
HotDogAuChou Sep 30, 2014 @ 8:20am 
Also forgot to add, once you've pasted the code, you can save it for easyer access next time.
just name it TheLongDark.pie and open it when playing TLD.
cheers!
ra_mull Oct 2, 2014 @ 2:35pm 
I tried this, but the game crashed to desktop when I tried to load the game. Hmmm... although this could've been something to do with an older save and a couple updates since then. I'll have to try again with a new game.
HotDogAuChou Oct 2, 2014 @ 6:04pm 
mine works fine so it's probably a client side issue
ra_mull Oct 3, 2014 @ 1:51pm 
Yeah, new update caused D3D 11 to crash when starting a game. Did that a few updates ago as well. Haven't had a chance to try it yet still.
Last edited by ra_mull; Oct 3, 2014 @ 1:52pm
ra_mull Oct 3, 2014 @ 2:16pm 
This script works great! Thanks for the post.
Anyone have the script for xpadder?
DrF()()d Jun 29, 2015 @ 5:08am 
dud one word for you. amazeing
ernestww Jun 29, 2015 @ 7:06am 
Originally posted by Sgt. Rex Power Colt:
Anyone have the script for xpadder?

There are profiles for TLD on the xpadder site, you need an account. I find it easier to just select my own keyboard buttons.

bethany Jun 29, 2015 @ 10:50am 
Originally posted by ernestww:
Originally posted by Sgt. Rex Power Colt:
Anyone have the script for xpadder?

There are profiles for TLD on the xpadder site, you need an account. I find it easier to just select my own keyboard buttons.

You shouldn't need it anymore just for controller functionality -- We added native support in a recent update.
ernestww Jun 29, 2015 @ 8:04pm 
Originally posted by hinterlandcommunity_bethany:
Originally posted by ernestww:

There are profiles for TLD on the xpadder site, you need an account. I find it easier to just select my own keyboard buttons.

You shouldn't need it anymore just for controller functionality -- We added native support in a recent update.

Thank you Bethany,

I will try the native interface again. We xpadder types are a fussy lot and like the programability of the thing, :),,,
Satoru Oct 10, 2015 @ 4:40pm 
Originally posted by Huuk45:
oh and if anybody has any hardcore skills with this, It would need a fix for the mouse aiming and movement, as it doesnt take into account the acceleration of Sticks or various angles. It only goes up down left right, not according to degrees of the sticks. Also, I could also add a way to navigate the menus using the stickpads, if anybody is interested.

On a last note, please add feedback on this script :P

Thank you!
change value 40 for sensitivity, controls are invert, swap up/down input for standard

var.MouseSensitivity = screen.width/256

Key.W = (XInput.LeftStickY > .40)
Key.S = (XInput.LeftStickY < -.40)
Key.E = (XInput.LeftStickX > .40)
Key.Q = (XInput.LeftStickX < -.40)

if (XInput.RightStickY > .40) mouse.RightButton + mouse.DirectInputY += var.MouseSensitivity^(XInput.RightStickY) //cursor right
if (XInput.RightStickY < -.40) mouse.RightButton + mouse.DirectInputY -= -var.MouseSensitivity^1*(XInput.RightStickY) //cursor left
if (XInput.RightStickX > .40) mouse.RightButton + mouse.DirectInputX += var.MouseSensitivity^(XInput.RightStickX) //cursor down
if (XInput.RightStickX < -.40) mouse.RightButton + mouse.DirectInputX -= -var.MouseSensitivity^1*(XInput.RightStickX) //cursor up
Last edited by Satoru; Oct 10, 2015 @ 4:54pm
Dread Arkive Oct 10, 2015 @ 5:03pm 
Necro post? Native support works perfectly.
< >
Showing 1-15 of 16 comments
Per page: 1530 50

Date Posted: Sep 29, 2014 @ 7:05pm
Posts: 16