guerringuerrin Posted 50 minutes ago Share Posted 50 minutes ago I've been working on a new feature to add to the game. The idea is to provide an easy way to preserve our hotkeys, create templates, and quickly switch between them. Potentially export presets into a plain text file. I currently have a basic implementation that covers the minimum functionality: duplicating and deleting hotkey presets, while always keeping a Default Preset as a baseline. The presets are stored in binaries\data\mods\public\moddata\hotkeypresets.json (in theory, this would be mods/user in a compiled redistributable version). Just like with user.cfg, this .json file only stores hotkeys that differ from the default hotkeys. Initially, I wanted to use an INI-style file structure, but I'm not sure if there is an equivalent function to WriteJSONFile for that. I chose this location because it is already included in the whitelist, so I can avoid making changes to the Engine. I also didn't want to use user.cfg and add dozens of extra lines to it. So basically, the code adds a .json file that stores, reads, and modifies hotkey presets, and then copies/applies the active hotkeys to user.cfg. As for mods that interact with hotkeys, the idea is to change the current workflow as little as possible. So if there are any details I should take into account from a modding perspective, please let me know. Do you think this functionality would be useful to have? And, especially for the devs, does this seem like an appropriate approach, or would you recommend a better alternative? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now