Player icon indicating copy to clipboard operation
Player copied to clipboard

[Feature Request] Gamepad button remapping in RPG_RT.ini and command line options

Open donmor opened this issue 3 years ago • 0 comments

Extremely useful when there's a game requiring special keys to play with, Yume Nikki for example.

An example:

[Controller]
; Use both Dpad and Lstick as direction keys, A/X for Z/X, 1/3/5/9/Reset mapped to L/R/Y/B/Back
Btn_Up="a7-,a1-"
Btn_Down="a7+,a1+"
Btn_Left="a6-,a0-"
Btn_Right="a6+,a0+"
Btn_Actions="b0"
Btn_Cancel="b2"
Btn_1="b4"
Btn_3="b5"
Btn_5="b3"
Btn_9="b1"
Btn_Reset="b6"
  • Events are named as Btn_[Up,Down,Left,Right,Actions,Cancel,PgUp,PgDn,Shift,1,2,3,4,5,6,7,8,9,0,+,-,*,/,.,FF3x,FF10x,DebugGoThrough,DebugFps,DebugLog,Fullscreen,Zoom,Screenshot,DebugMenu,DebugAbort,DebugSave,Reset]
  • Each event can be triggered by multiple buttons, separated by , in ini file
  • Gamepad buttons are named b*(for buttons) or a*+/-(for axes)
  • Some axes and buttons are aliased to match xinput layout:
    • a0-->X-
    • a0+->X+
    • a1-->Y-
    • a1+->Y+
    • a2-->RX-
    • a2+->RX+
    • a3-->RY-
    • a3+->RY+
    • a4-->Z-
    • a4+->Z+
    • a5-->RZ-
    • a5+->RZ+
    • a6-->HAT0X-
    • a6+->HAT0X+
    • a7-->HAT0Y-
    • a7+->HAT0Y+
    • b0->A
    • b1->B,
    • b2->X,
    • b3->Y,
    • b4->L,
    • b5->R,
    • b6->BACK,
    • b7->START,
    • b8->MODE,
    • b9->L3,
    • b10->R3,
  • Configurations can be placed in RPG_RT.ini in game directory, global ini (Raised by #2802), or in command line option: --controller="Btn_Up:a7-,a1-;Btn_Down:a7+,a1+;Btn_Left:a6-,a0-;Btn_Right:a6+,a0+;Btn_Actions:b0;Btn_Cancel:b2;Btn_1:b4;Btn_3:b5;Btn_5:b3;Btn_9:b1;Btn_Reset:b6"
  • Use the default mapping by #2752 when no mapping defined, and disable undefined events if any mapping defined

Player platform:

Windows, Linux, Darwin, ...(other PCs)

donmor avatar Jun 23 '22 16:06 donmor