Using scripts to change keybindings and have it reflected in F1

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
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?
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
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
 
Last edited by a moderator:

Archeia

Level 99 Demi-fiend
Developer
Joined
Mar 1, 2012
Messages
15,141
Reaction score
15,473
First Language
Filipino
Primarily Uses
RMMZ
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.
 
Last edited by a moderator:

Zalerinian

Jack of all Errors
Veteran
Joined
Dec 17, 2012
Messages
4,696
Reaction score
935
First Language
English
Primarily Uses
N/A
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.
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
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.
 
Last edited by a moderator:

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
I just tested it... it seems like the setting is global for the computer...

Since that's the case, this is not important. You might as well just provide your own in-game interface for re-assigning keys.
yeah, that seems to be the better option.
 
Last edited by a moderator:

Zalerinian

Jack of all Errors
Veteran
Joined
Dec 17, 2012
Messages
4,696
Reaction score
935
First Language
English
Primarily Uses
N/A
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.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
That would be really useful. :)
 
Last edited by a moderator:

Zalerinian

Jack of all Errors
Veteran
Joined
Dec 17, 2012
Messages
4,696
Reaction score
935
First Language
English
Primarily Uses
N/A
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.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,849
Messages
1,016,981
Members
137,563
Latest member
cexojow
Top