When you press F1 during the game you can change the key bindings. For example, Z is bound to game key C and so on.
Is it possible to change these settings through script calls and when I call up F1 again it will have changed according to what I have set it to?
Using scripts to change keybindings and have it reflected in F1
● ARCHIVED · READ-ONLY
-
-
Well, there are input scripts out there that can possible allow changing via script calls with a few edits (since they use their own binding methods)... but as far as reflecting it to the F1 menu, AFAIK we can't.
Wait I have an idea, what if we print out the whole Input module to the console? We might be able to determine what possibilities lie in there if we do that -
To change keyboard default input, it could be done with Registry access. But admin rights can be a problem. It's easy to fetch the values in-game from the registry. I remember talking to Kread about this but he told me once, we think RM just makes its registry key read-only during game, in which case what you asked me is impossible without a custom keyboard script.
-
It is possible, I looked into it a bit, but I didn't actually bother to write the registry-editing code in ruby, as far as I can tell this will require a DLL, or a lot of time testing things in Ruby.
How it works:

Each button, starting from the top-left moving to the bottom-right in the list of buttons in the F1 menu is one to the right in the registry. Thus in this case (I changed them, so this is NOT the default Keyboard Space is 0D, Keyboard Enter is 0D, and Keyboard Escape is 0C. -
Where in the registry are you looking at?
Most RM games do not create registry files, unless you mean the settings are global to all RM games.
EDIT: actually, it does seem like the settings are global...lol that's kind of questionable. I thought it was on an individual game basis.
Since that's the case, this is not important. You might as well just provide your own in-game interface for re-assigning keys. -
I just tested it... it seems like the setting is global for the computer...
yeah, that seems to be the better option.Since that's the case, this is not important. You might as well just provide your own in-game interface for re-assigning keys. -
Yes it is global for all RM games. It's located in Computer\HKEY_CURRENT_USER\Software\Enterbrain\RGSS3. If you want to set static keys for controls during the game, my keyboard manager does that. I will be implementing editable keybindings during the game running, but at the moment it's just the specific keys specified in the beggining.
-
That would be really useful. :)
-
That is pretty much all that needs to be done on a programming standpoint, but I wanted to add a scene for players to rebind the keys that way, and I haven't gotten around to making the rebinding scene yet.