MIT License

项目介绍

xan1242/NFS-XtendedInput 是一个托管在 GitHub 上的开源项目,主要使用 C++ 编写,采用 MIT License 许可证,目前获得 215 个 Star、18 次 Fork。

仓库全名
xan1242/NFS-XtendedInput
开源许可证
MIT License
Star 数
215
Fork 数
18
未关闭 Issue
60

README 摘要

PROJECT UPDATE This project is currently undergoing a major rewrite. Any and all issues that curently exist will not be addressed (they will be addressed in the new project instead). It will take a while before it gets published, so please be patient. ORIGINAL README Need for Speed (MW & newer) - Xtended Input This is a plugin for NFS games by Black Box (MW and newer only) which brings XInput support to the games…

完整内容见 GitHub 原始 README 或本页 。

常见问题

NFS-XtendedInput 用什么语言开发?

主要使用 C++ 编写,采用 MIT License 许可证,目前有 215 个 Star。

NFS-XtendedInput 可以免费商用吗?

仓库采用 MIT License 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 NFS-XtendedInput 的源码?

可以直接克隆仓库:git clone https://github.com/xan1242/NFS-XtendedInput.git,默认分支为 master;安装与运行步骤见仓库 README。

NFS-XtendedInput 最近还在维护吗?

仓库最近一次更新为 2025年5月14日,当前有 60 个未关闭 Issue;Star 数为 215,可作为社区活跃度的参考。

关于

GitHub 原始描述(英文)

NFS (Black Box, MW & newer) - XInput Plugin

描述取自 GitHub 官方 API,保持仓库作者书写的原文。

语言占比

Batchfile
C
C++

Release

README

PROJECT UPDATE

This project is currently undergoing a major rewrite. Any and all issues that curently exist will not be addressed (they will be addressed in the new project instead).

It will take a while before it gets published, so please be patient.

ORIGINAL README

Need for Speed (MW & newer) - Xtended Input

This is a plugin for NFS games by Black Box (MW and newer only) which brings XInput support to the games!

Currently a work in progress, but fully usable and playable!

(NFS World currently at ALPHA stage!)

Also available for Underground and Underground 2 here

Features

  • Automatic UI and text swapping for button icons - dynamically detects when you use either a keyboard or a controller

  • Choice between Xbox (One and 360), PS4/PS3 and Switch icons (made by AeroWidescreen (Aero_) )

  • Console control feature parity (except rumble): restored debug camera analog control

  • Re-done keyboard input code - not using DInput8 anymore. Now talks directly over Win32 (GetAsyncKeyState or GetKeyboardState)

  • Re-done mouse input - also using Win32 for mouse input (with auto hiding after 5 seconds)

  • Mouse look for debug camera

  • Optional - Win32 / OS mouse rendering with a custom cursor

  • All game actions are now rebindable

Button mappings & configuration

NOTE: If the remaps don’t have any effect, either disable UAC virtualization or run the game as Administrator!

You may remap the buttons in the NFS_XtendedInput.usermap.ini file found inside the scripts\XtendedInputMaps\<your save name> folder.

For secondary maps, use the sections [Events_Secondary] for gamepads and [EventsKB_Secondary] for keyboards.

Refer to the EventReference.txt file to see what’s available.

(PROSTREET ONLY) You may also freely remap inside the game’s settings menu. This feature will become available in other games soon.

You can configure other settings (such as deadzones, omni mode, etc.) in the NFS_XtendedInput.ini file found inside the scripts folder.

NFS_XtendedInput.default.ini contains default mappings for when a new profile is created or settings reset to default in the remap menu.

(MW ONLY) You cannot enter the “Controls” settings menu as it currently crashes the game, therefore it has been disabled. If you need to access it, disable this plugin.

The button remaps will change the textures as well according to what you set it to (only for gamepads).

Default mapping follows the Xbox 360 version of the games.

Default controller button mappings are:

Ingame

  • Throttle: Right Trigger

  • Brake: Left Trigger

  • Steering: Left Stick X axis

  • E-Brake: A button

  • NOS: B button

  • Speedbreaker: X button

  • Look back: Left shoulder (Pro Street: Y)

  • Change camera: Right shoulder (Pro Street: X)

  • Shift up/down: Right Stick Y axis up/down

  • Car reset: View/Back

  • Pause/Unpause: Menu/Start

  • SMS/Map/Status/Engage Event: D-Pad

(Carbon only)

  • Activate crew member: Y

(Pro Street only)

  • Clutch: Left shoulder

  • Toggle arrow indicators: D-Pad Up

  • Toggle best line indicators: D-Pad Down

  • Toggle Leaderboards: D-Pad Left

  • Toggle minimap: D-Pad Right

One note about the World Map screen: during this screen and only then, you can control the mouse cursor with the right analog stick (and click with the Left shoulder button). If you’re using the OS mouse, it **will ** take control of it (and subequently confine the mouse wihin the game window).

FrontEnd

Please note that some menus may not advertise their functions properly, but they should be fully functional and controllable like in the console versions.

  • Navigation: D-Pad & Left Analog Stick

  • Accept: A button

  • Back: B button

  • L1: Left Trigger

  • R1: Right Trigger

  • Car orbit: Right Stick

  • Button 0: Right shoulder

  • Button 1: Light shoulder

  • Button 2: Left Thumbstick (L3)

  • Button 3: Right Thumbstick (R3)

  • Button 4: X

  • Button 5: Y

  • Start: Start

  • Quit game: View/Back button

Debug camera

You must use a controller on the second port to use it. Invoke it with a debug camera plugin like Extra Options.

  • Debug camera trigger: View/Back

  • Move forward: A button

  • Move backward: Y button

  • Move left: X button

  • Move right: B button

  • Move up: Left Shoulder

  • Move down: Right Shoulder

  • Look up/down/left/right: D-Pad

  • Turbo: Left Trigger

  • Super Turbo: Right Trigger

  • Movement (analog): Left Stick X/Y

  • Look (analog): Right stick X/Y

  • Drop car: Start

Keyboard controls

They’re slightly changed from default.

By default it’ll use GetAsyncKeyState (unbuffered) to read keys which might cause some issues with other hooks to the WndProc of this game, but will deliver the most optimal performance. A key’s status is being read as it’s being scanned in this mode.

Second mode is GetKeyboardState (buffered). This will store all keys in a buffer and read them during InputDevice::PollDevice() (which starts right before eDisplayFrame). Use this if you have some issues.

Ingame

  • Throttle: Up

  • Brake: Down

  • Steering: Left/Right

  • E-Brake: Space (Pro Street: Right Control)

  • NOS: Left Alt

  • Speedbreaker: X

  • Look back: L

  • Change camera: C

  • Pull camera back: P

  • Shift up/down: Left Shift / Left Control

  • Pause: Escape

  • Quit game: Q

  • SMS: Tab

  • Map: M

  • Blacklist menu: B

  • Engage event: Enter (Undercover: Tab)

(Carbon only)

  • Activate crew member: Right Control

(Pro Street only)

  • Clutch: Space

FrontEnd

They should be identical to the default game, with one exception: the navigation keys do not control the camera anymore. They were moved to their own buttons.

  • Navigation: Navigation keys (U/D/L/R)

  • Accept: Enter

  • Back: Escape

  • Left shoulder & Right shoulder buttons: 9 & 0

  • Car orbit: WASD

  • Button 0: Most Wanted: 3, Carbon: 5, Pro Street: 3

  • Button 1: Most Wanted: 5, Carbon: 3, Pro Street: 4

  • Button 2: Most Wanted: T, Pro Street: 5

  • Button 3: Most Wanted: R, Pro Street: M

  • Button 4: 2

  • Button 5: 1

  • Start: Most Wanted: 4, Carbon & newer: Space

  • Quit game: Q

Debug camera

  • Debug camera trigger: Subtract (minus key on numpad)

  • Move forward: W

  • Move backward: S

  • Move left: A

  • Move right: D

  • Move up: Space

  • Move down: Left Control

  • Look up: I

  • Look down: K

  • Look left: J

  • Look right: L

  • Turbo: Right Shift

  • Super Turbo: F

  • Drop car: 5

Windows 7 compatibility

To use in Windows 7 (and maybe Vista & XP), you need to use the “Win7” builds.

Requirements are:

This was tested on a Pentium 3 machine running Windows 7 and it is fully working.

These builds are made with SSE instructions enabled (and other extensions disabled), so it should also work on Athlon XP as well.

The release package comes with a special build of ASI loader which is made without any CPU extensions required. It is also patched to work in Windows XP.

These builds may or may not work in Windows XP with some hacks, YMMV as it wasn’t tested. Follow the instructions found here to find out more. TLDR: “The last version of the Visual C++ Redistributable that works on Windows XP shipped in Visual Studio 2019 version 16.7 (file versions starting with 14.27).”

TODO list:

  • Check the top of the source file

  • Currently KILLS Direct Input, beware

Credits

  • AeroWidescreen - for the amazing button icons!

  • LINK/2012 - injector

评论

暂无评论