Coder Social home page Coder Social logo

beatcracker / ori-controller-remap Goto Github PK

View Code? Open in Web Editor NEW
5.0 5.0 2.0 151 KB

It's almost impossible to play Ori and the Blind Forest with non-XBOX gamepad: all buttons are messed up and Unity's built-in remapper doesn't work properly (you can't rebind jump button). This tool is intended to fix it.

Batchfile 0.41% PowerShell 99.59%
controller game gamepad reverse-engineering

ori-controller-remap's Introduction

I RODE BLAINE THE MONO AT LUD STATION AND ALL I GOT WAS THIS LOUSY T-SHIRT

ori-controller-remap's People

Contributors

beatcracker avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ori-controller-remap's Issues

The script doesn't work, i get this warning : "Can't load Mono.Cecil.Reflexil.dll, press any key to exit..."

The script file doesn't work... i get this warning : "Can't load Mono.Cecil.Reflexil.dll, press any key to exit..."

I run Ori in Steam and under Windows 10. Tried to map my logitech dual action pad with Pinacle and the gamepad configuration doesn't even change inside the game. Tried to click-shift on the executable file and change every button as it is told in Steam discussion... won't help either.

Is it just possible to get a Dual Action pad from Logitech to work with this game?

Thx for your help!

Clarification on Definitive Edition

I'm trying to play Ori and The Blind Forest Definitive Edition with a Logitech Dual Action gamepad.

This tool is pretty high on the list if you search for "ori and the blind forest joystick remap" so I tried it and managed to remap mostly everything except the right trigger, like in #3 .

Then I searched around for more info as remapping with joytokey did not work.

I found out that the definitive edition has two textfiles to remap my controller buttons. With this I was able to remap all my buttons without problems (reverting Assembly-CSharp.dll before of course). I used the numeric values provided in Ori_Controller_Remap.ini .

This should be in the readme.

TL;DR: The definitive edition does not require you to use this tool, and has built in remap support.

missing dll?

Powershell says: WARNING: Can't find Assembly-CSharp.dll in

I'm not familiar with what this file does, or where it should be located. How can I fix this?

Logitech Dual Action, LT and RT assigned to right stick

Hi, I had problem with Logitech Dual Action gamepad, remapping was fine, except left and right trigger assigned to right gamepad stick.

This could be repaired by changing "GetButton" method in "SmartInput.XboxControllerInput". I've done it this way (but this exact code will not work for your tool, as it is already remapped for Logitech Dual Action gamepad):

public static bool GetButton(XboxControllerInput.Button button, int userIndex = -1)
{
    ...old code...
    if (xboxController.IsConnected)
    {
        ...old code...
    }
    else
    {
        switch (button)
        {
        case XboxControllerInput.Button.ButtonA:
            return MoonInput.GetButton(XboxControllerInput.m_joystickButton1Map[num]);
        case XboxControllerInput.Button.ButtonX:
            return MoonInput.GetButton(XboxControllerInput.m_joystickButton0Map[num]);
        case XboxControllerInput.Button.ButtonY:
            return MoonInput.GetButton(XboxControllerInput.m_joystickButton3Map[num]);
        case XboxControllerInput.Button.ButtonB:
            return MoonInput.GetButton(XboxControllerInput.m_joystickButton2Map[num]);
        case XboxControllerInput.Button.LeftTrigger:
        case XboxControllerInput.Button.LeftStick:
            return MoonInput.GetButton(XboxControllerInput.m_joystickButton6Map[num]);
        case XboxControllerInput.Button.RightTrigger:
        case XboxControllerInput.Button.RightStick:
            return MoonInput.GetButton(XboxControllerInput.m_joystickButton7Map[num]);
        case XboxControllerInput.Button.LeftShoulder:
            return MoonInput.GetButton(XboxControllerInput.m_joystickButton4Map[num]);
        case XboxControllerInput.Button.RightShoulder:
            return MoonInput.GetButton(XboxControllerInput.m_joystickButton5Map[num]);
        case XboxControllerInput.Button.Select:
            return MoonInput.GetButton(XboxControllerInput.m_joystickButton8Map[num]);
        case XboxControllerInput.Button.Start:
            return MoonInput.GetButton(XboxControllerInput.m_joystickButton9Map[num]);
        }
    }
    return false;
}

Rewriting "XboxControllerInput.cs" like this should work for you (not tested):

...old code...

namespace SmartInput
{
    public static class XboxControllerInput
    {
        ...old code...

        private static readonly string[] m_joystickButton10Map = new string[]
        {
            "Joystick1Button10",
            "Joystick2Button10",
            "Joystick3Button10",
            "Joystick4Button10"
        };

        private static readonly string[] m_joystickButton11Map = new string[]
        {
            "Joystick1Button11",
            "Joystick2Button11",
            "Joystick3Button11",
            "Joystick4Button11"
        };

        ...old code...

        public static bool GetButton(XboxControllerInput.Button button, int userIndex = -1)
        {
            ...old code...

            if (xboxController.IsConnected)
            {
                ...old code...
            }
            else
            {
                switch (button)
                {

                ...old code...

                case XboxControllerInput.Button.LeftTrigger:
                    return MoonInput.GetButton(XboxControllerInput.m_joystickButton10Map[num2]);
                case XboxControllerInput.Button.RightTrigger:
                    return MoonInput.GetButton(XboxControllerInput.m_joystickButton11Map[num2]);

                ...old code...

                }
            }
            return false;
        }

        ...old code...
    }
}

New game Ori DE, missed registry folder

Since the only game version to buy is Ori and the Blind Forest DE, there is new registry folder:
Steam App 387290
Still even with this fix it doesn't work. DualShock 3 (USB), SCP Toolkit/x360ce.

I have error

Join-Path : Не удается привязать аргумент к параметру "Path", так как он имеет значение NULL.

Warning : Can't find referenced assemblies

I did paste the 4 files from
D:\Steam\steamapps\common\Ori DE\oriDE_Data\Managed
to the folder where your .cmd script was, and when i run the script it shows 2 warnings and after replacing the Assembly-CSharp.dll the bind wont work ingame.

                    ___                                   ______                   ________)
                  /(,  )    ,           /)     /)        (, /    ) /) ,      /)   (, /
                 /    / __      _ __  _(/   _/(/   _       /---(  //   __  _(/      /___, ____  _ _  _/_
                /    / / (_(_  (_(/ ((_(_   (_/ )_(/_   ) / ____)(/__(_/ ((_(_   ) /     (_) (_(//_)_(__
               (___ /                                  (_/ (                    (_/

                           __
                          /    _   _  |_  _  _  | |  _  _    _  _  _   _   _    |_  _   _  |
                          \__ (_) | ) |_ |  (_) | | (- |    |  (- ||| (_| |_)   |_ (_) (_) |
                                                                          |
________________________________________________________________________________________________________________________

Available controller mappings:

Number Name                            A B X Y LTrigger RTrigger LShoulder RShoulder LStick RStick Select Start
------ ----                            - - - - -------- -------- --------- --------- ------ ------ ------ -----
     0 Cyborg Rumble Pad               2 3 1 4 7        8        5         6         11     12     9      10
     1 Enter                           3 2 4 1 7        8        5         6         11     12     9      10
     2 Knup KP-3121 USB Joystick       3 2 4 1 7        8        5         6         11     12     9      10
     3 Logitech Dual Action            2 3 1 4 7        8        5         6         11     12     9      10
     4 Logitech Rumble Pad 2 USB       2 3 1 4 7        8        5         6         11     12     9      10
     5 Nintendo Classic Controller Pro 2 1 3 4 7        8        5         6         12     11     9      10
     6 PS To PC Converter              3 2 4 1 5        6        7         8         11     12     9      10
     7 TigerGame PS/PS2 w/ SuperJoyBox 3 2 4 1 7        8        5         6         11     12     10     9
     8 Twin USB Joystick               3 2 4 1 5        6        7         8         11     12     9      10



Select configuration number: 1
Active configuration:

Number Name  A B X Y LTrigger RTrigger LShoulder RShoulder LStick RStick Select Start
------ ----  - - - - -------- -------- --------- --------- ------ ------ ------ -----
     1 Enter 3 2 4 1 7        8        5         6         11     12     9      10


Press any key to continue...
Searching for 'Assembly-CSharp.dll'
Searching for referenced assemblies: mscorlib.dll, System.dll, UnityEngine.dll
WARNING: Can't find referenced assemblies:
WARNING: C:\Users\farooq_fox\Desktop\Ori-Controller-Remap-master\Ori-Controller-Remap-master\UnityEngine.dll
Press any key to exit...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.