xan1242 / NFS-XtendedInput

NFS (Black Box, MW & newer) - XInput Plugin
MIT License
109 stars 7 forks source link

NFSMW Impossible to remap buttons #71

Open it2000-the-original opened 1 year ago

it2000-the-original commented 1 year ago

I am using an xbox one controller and the 1.20 version of this plugin. I have an alias called it2000, but when I try to remap buttons creating the file Need for Speed Most Wanted\scripts\XtendedInputMaps\it2000\NFS_XtendedInput.usermap.ini, my changes semes to have no effect. I have tried different positions where put the remap file, but without success

My NFS_XtendedInput.usermap.ini file content (I have changed only two keys from the defaults):

[Events]
GAMEACTION_GAS = XINPUT_GAMEPAD_RT
GAMEACTION_BRAKE = XINPUT_GAMEPAD_LT
GAMEACTION_STEERLEFT = XINPUT_GAMEPAD_LS_LEFT
GAMEACTION_STEERRIGHT = XINPUT_GAMEPAD_LS_RIGHT
GAMEACTION_TURNLEFT = XINPUT_GAMEPAD_LS_LEFT
GAMEACTION_TURNRIGHT = XINPUT_GAMEPAD_LS_RIGHT
GAMEACTION_HANDBRAKE = XINPUT_GAMEPAD_B
GAMEACTION_NOS = XINPUT_GAMEPAD_A
GAMEACTION_GAMEBREAKER = XINPUT_GAMEPAD_X
GAMEACTION_SHIFTUP = XINPUT_GAMEPAD_RS_UP
GAMEACTION_SHIFTDOWN = XINPUT_GAMEPAD_RS_DOWN
GAMEACTION_RESET = XINPUT_GAMEPAD_BACK
HUDACTION_PAUSEREQUEST = XINPUT_GAMEPAD_START
HUDACTION_ENGAGE_EVENT = XINPUT_GAMEPAD_DPAD_UP
HUDACTION_PAD_LEFT = XINPUT_GAMEPAD_DPAD_LEFT
HUDACTION_PAD_DOWN = XINPUT_GAMEPAD_DPAD_DOWN
HUDACTION_PAD_RIGHT = XINPUT_GAMEPAD_DPAD_RIGHT
HUDACTION_SKIPNIS = XINPUT_GAMEPAD_A
HUDACTION_NEXTSONG = XINPUT_GAMEPAD_RIGHT_THUMB
CAMERAACTION_CHANGE = XINPUT_GAMEPAD_RIGHT_SHOULDER
CAMERAACTION_LOOKBACK = XINPUT_GAMEPAD_LEFT_SHOULDER
zhiyuanzhai commented 11 months ago

@xan1242 Would you please confirm if this is the right way to remap the buttons? I have been following the same routine as this issue says to remap buttons, seeing no effect at all. I am not sure if this is a bug or just me misunderstanding the README.

it2000-the-original commented 11 months ago

@xan1242 Would you please confirm if this is the right way to remap the buttons? I have been following the same routine as this issue says to remap buttons, seeing no effect at all. I am not sure if this is a bug or just me misunderstanding the README.

I discovered that to remap buttons, you must execute the game as admin, because if you not do that, all settings in the .ini files will not load. The problem is that this is not explained in the README file.

xan1242 commented 11 months ago

It is not explained in the README because you're the first user to actually report this. I'll update the README to make note of this soon.

However, the reason why is simple - it's UAC virtualization causing issues by creating copies of old files and not updating them on new instances. I don't think I can work around this issue at all because the mINI library uses a regular std::ifstream when opening files (which goes through the CRT to do Win32 stuff).

Either way, this won't be necessary in the future once the ingame remapping menu becomes functional. When will that be - I don't know, I'm very busy with other stuff.