Gamepad control (XBox360, etc)

Discussion in 'Released Mods' started by NanoPi, Oct 31, 2011.

  1. NanoPi

    NanoPi Cave Bat

    Hi, here is a tool that converts controller input into mouse and keyboard actions. These actions are mostly suited to moving around in the game and fighting mobs. Since it doesn't modify the game at all, it works on the latest Steam version of Terraria but it is unable to improve usability on the inventory or menu screens.

    controllers supported so far
    • xbox360
    • gamecube (modify this one for any joystick controller you have)
    • ps3 (motionjoy or libusb)
    • Wii Classic
    coming soon
    • Wii Remote with or without nunchuck (the script will be hugely different)
    software installation
    1. download GlovePIE (choice of Emotiv does not matter)
    2. extract GlovePIE from the zip into a new folder
    3. download my scripts and put it in GlovePIE's folder
    4. start GlovePIE, open the script for your controller and run the script
    if you don't have Administrator privileges on the computer, delete GlovePie.exe.manifest

    hardware installation

    I once made a script generator that uses configuration files from xpadder but I should also make a pure script generator that does not use it.
    click here if you have xpadder (open)

    Xpadder: bind the gamepad inputs to your terraria keys like one of the images below. (note: Scroll Lock is magically a mode switch after converting), save the controller and profile files and then run them through the converter. (both sticks are hard coded in the converter. it currently makes the most sense to put your character walking keys under the left stick)



    left stick in weapon mode moves the character and mouse. WASD keys are pressed if the left stick is far enough from the resting place. the mouse moves in a circle around the player
    the dpad and shoulder buttons cycle items on the hotbar

    the right stick changes modes:
    up = left stick moves the character and mouse in weapon mode
    down = left stick moves the mouse (mario 64 file select, etc)
    press = left stick moves the character
    left and right = change the size of the circle:

    xbox360 buttons:
    A = jump
    B = right click
    X, RT = use weapon or click mouse
    Y, LT = grapple
    LB, RB, DPad = cycle hotbar
    Start, Back = inventory or Esc key

    gamecube buttons:
    A, RT = use weapon or click mouse
    B = jump
    X = right click
    Y, LT = grapple
    DPad = cycle hotbar
    Z = inventory or Esc key
    Start = right stick press (see above) because the sticks don't have buttons under them

    wii classic buttons:
    Y, ZR = use weapon or click mouse
    B = jump
    A = right click
    X, ZL = grapple
    DPad, L, R = cycle hotbar
    Minus = inventory or Esc key
    Plus = right stick press (see above) because the sticks don't have buttons under them

    ps3 buttons:
    Cross = jump
    Circle = right click
    Square, R2 = use weapon or click mouse
    Triangle, L2 = grapple
    L1, R1, DPad = cycle hotbar
    Start, Select = inventory or Esc key

    • the circle does not follow your character at the edge of map
    • facing backwards to open a door is hard
    downloads in post attachment or Dropbox. contains all scripts.

    alternate controls (NEW! june 2013)
    I have recently created new versions of the gamecube script that changes around the controls quite a bit. they are in the extra attachments below. the latest edit is in (dropbox)

    gamecube buttons for tg3a:
    A = jump
    B = quick heal
    RT = use weapon or click mouse
    X = right click
    Y = grapple
    LT = shift key (auto select an action for tile under mouse pointer)
    DPad Left Right = cycle hotbar
    DPad Up Down = resize the "circle"
    Z = inventory or Esc key
    Start = change the mouse mode
    Left Stick: moves player and moves mouse close to player (good for doors and mining)
    Right stick: moves the mouse in a circle of customisable size. it also uses your active item if you move it far enough from middle

    Attached Files:

  2. Defponx

    Defponx Squirrel

    Can you make it work through a PS3 controller?
  3. Steve12

    Steve12 Green Slime

    cool, but what do you mean by "playstation ds"???
  4. 7UR7L3

    7UR7L3 Undead Viking

    Yeah. like a psp, a playstation controller, or a nintendo ds?
  5. Happy Bob

    Happy Bob Green Slime

    Not to kill your work, or anything, good job. But any controller that windows will recognize can be configured to work in terraria with a little program called joytokey. Including the mouse. Auto/rapidfire too. I think it could even incorporate the sixaxis function of a ps3 controller.

    (Oh, and people, when he said playstation ds, that is dualshock)
  6. Boscan

    Boscan Green Slime

    You can't make the mouse move in circles (limiting borders), that takes scripting and you can't script in joytokey the last time I checked.
  7. Mr.Person

    Mr.Person Moth

    It needs to be a wired x360 controller, rite? Cuz' I don't have that :(
  8. Defponx

    Defponx Squirrel

    Well i've connected my ps3 ds to my pc, But how do i play terraria with it? :/
  9. NanoPi

    NanoPi Cave Bat

    Microsoft sells a receiver and adapter (along with a controller I guess)

    for Ps3 controllers, I am going to have to do it two ways (depends on your choice between motioninjoy or libusb-win32)
  10. veggieboy1

    veggieboy1 Green Slime

    Can you do it for a third-party controller? (just kidding, I know that it would be a lot of work, and I bet I'm the only person who has my specific controller)
    EDIT: I have got it to work with Bastion, and it works fine.
  11. NanoPi

    NanoPi Cave Bat

    added ps3 and wii classic.

    im not sure what other ps3 drivers/tools people use

    veggieboy1, does your controller have two sticks and enough buttons?
  12. veggieboy1

    veggieboy1 Green Slime

  13. flyforshine

    flyforshine Pixie

    Won-der-ful, I should pick up my ps3 gamepad soon =o
    Terraria is also way awesome to play with the gaming mice.
  14. NanoPi

    NanoPi Cave Bat

    snakebyte: I cannot find out the shoulder buttons and the axes would take a big guess but it should be easy to mod the gamecube script for any controller.. just comment out the mousewheel lines that take buttons and uncomment the mousewheel lines that take the povhat if the dpad is a povhat
  15. joey4track

    joey4track Demon Eye

    This is fantastic!! But I only have a Logitech Dual action... Anyway that this is compatible?
  16. Carnage123

    Carnage123 Green Slime

    anyone use xpadder? I use that software alot when mapping games on my emulator and other games that I want to use a controller. I am not sure if it works when using official PS3 and Xbox controllers, but it works well with any ole cheap controller that can be hooked up through USB. You can configure the software to use joysticks to give the mouse full range of motions (in circles). Just thought Id through that out there.
  17. joey4track

    joey4track Demon Eye

    I use xpadder all the time with my Logitech Dual Action. I really wish that they had the option for that limited borders circle mouse thing. That would help with a lot games like Cortex Command etc.. and of course Terraria.
  18. joey4track

    joey4track Demon Eye

    So no chance of Logitech Dual Action support? I think it's a pretty popular pc gamepad :)
  19. Lightningkid

    Lightningkid Cursed Skull

    errr.... I am using the gamepad. but I get some difficulties. how can I move my character while moving my mouse together? I saw the code that if you want to change from mouse to wasd you should press key 8 = toggle(var.switch) = pressed(joy.Button8)
    but how if I want to change from wasd to mouse, this is kinda hard :confused:
  20. NanoPi

    NanoPi Cave Bat

    Xpadder is a nice UI for learning joystick inputs and binding them to keypresses. I've added support for any dual stick controller used in Xpadder through this converter. how to use: create and save a Controller file and Profile file with it, quit Xpadder, run the files through my converter, paste the GlovePIE script into GlovePIE and then save the script. pics in OP.

Share This Page