Look at my try to change a keyboard input setting. I just created a C++ empty project with no starter content and edited the level blueprint of the default map. EventF is the subject (there is an ActionMapping so that key F triggers this event), the event ChangeMapping (also an ActionMapping, triggered by C) assigns EventF to another key (here: Q), and event Reset shall reset all:
The behaviour of the game is very different depending the mode it is running. When you just play it (Selected Viewport, PIE, …), you do not even need “Save Key Mappings”. Unfortunately, the mapping is changed directly in the project settings in any case. When packaging the game, however, you need “Save Key Mappings”.
Resetting to default does not work. But it’s far away from possible: Let’s assume we packaged to Development. In WindowsNoEditor/GameName you can find a directory “Saved”. If you delete it, you can start the game and get the default settings.
Furthermore, there seems to be a difference between packaging Development and Shipping. In the later package there is no such directory “Saved”!
Well, guys … has anyone any idea? I am not interested in handling 20 different options tortuously in a save game slot, when I am so close to the solution. And, of course, it would be very pleasant to have the same behaviour of saving/loading/defaulting no matter of the way you start, preview, or package your game.
We’ve been developing a project where we encountered similar problems.
We were forced to build our system to take this into account.
We have one system that has several rules inside of him to handle every cases properly. It’s not different options but it’s certainly going into that direction.
If you don’t, you even end up with Inputs being deleted from your project while playing in Editor and trying to rebind. Especially if you start adding features that automatically unbind an input which was using a hotkey that the player just assigned to another input.
We stored base mappings (action + inputs) in a structure stored in our SaveGame_Settings (wrote them by hand in the structure).
We stored player mappings in the SaveGame_Settings (by default they are = base mappings and whenever the player modify inputs we store it there).
When we run the game, we check if player mapping is missing an entry, if it is, we are generating it from the base mappings.
It makes sure we never end up with a missing input from our Project Settings.
It’s not convenient but it’s ‘okay-ish’.
If you want more details, quote me with my name (it will generate a notification for me).
We didn’t find a way around building our system so that it takes into account the different setup you can be playing in (Editor, Standalone, Shipping).
We have a structure composed of a name and an action (or axis) and we have two arrays of this in our SaveGame. One filled with the base inputs of the projects, the other filled with the inputs customized by the player.