OpenTrespasser / JurassicParkTrespasser

A git-based fork of the Jurassic Park: Trespasser source code.
98 stars 24 forks source link

New keybinding data format #158

Open meekee7 opened 3 years ago

meekee7 commented 3 years ago

In-game commands are assigned to mouse and keyboard keys. Some of those assignments can be changed by the player in the Controls menu. Other commands like Show Hint (F1) are not reassignable.

The keybinding data is stored in a binary array. Adding more commands with assignable keys to while retaining compatibility with previous configuration is very difficult this way. Out-of-game editing of the keybindings by the player is also very difficult. A new data structure for the keybindings should be devised. One simple way would be a separate INI file with a very simple structure like this:

[OTPKeyBindings]
Jump=Q
Crouch=Z
Hand=LMB
...

Importing the binary key assignment format from previous INI files or the registry should remain possible.