MZ Showing button icons for controls.

I didn't see anything like this in the base engine, so here I am.
I am trying to make a tutorial for my game but I can't really do it very well if there isn't anything for controls, especially since what people use for playing the game can vary from keyboards to a few different types of controllers, is there a plugin that allows me to show them? Or is there maybe something in the engine itself that I missed?
I might be misunderstanding you, but are you just asking to show icons on the screen to reflect controls?

If so, you can just use Show Picture to show the icon images on the screen. You just need to get the appropriate assets to display.

If you want them clickable, you can use the default plugin ButtonPicture and if you want to display text you can use the default plugin TextPicture. Both come with MZ.
I might be misunderstanding you, but are you just asking to show icons on the screen to reflect controls?

If so, you can just use Show Picture to show the icon images on the screen. You just need to get the appropriate assets to display.

If you want them clickable, you can use the default plugin ButtonPicture and if you want to display text you can use the default plugin TextPicture. Both come with MZ.
Like, if I wanted to have a message that says "Press (insert button symbol based on what you are using) to select, press (insert another button symbol based on etc etc) to back out"
You can do that with the plugins I mentioned above.
Hmmm, you could also ask the player what controller they're using and then you use conditionals to show different text boxes. You can show icons in the text box with \i[X]
JavaScript:
/**
 * A hash table to convert from a virtual key code to a mapped key name.
 *
 * @type Object
 */
Input.keyMapper = {
    9: "tab", // tab
    13: "ok", // enter
    16: "shift", // shift
    17: "control", // control
    18: "control", // alt
    27: "escape", // escape
    32: "ok", // space
    33: "pageup", // pageup
    34: "pagedown", // pagedown
    37: "left", // left arrow
    38: "up", // up arrow
    39: "right", // right arrow
    40: "down", // down arrow
    45: "escape", // insert
    81: "pageup", // Q
    87: "pagedown", // W
    88: "escape", // X
    90: "ok", // Z
    96: "escape", // numpad 0
    98: "down", // numpad 2
    100: "left", // numpad 4
    102: "right", // numpad 6
    104: "up", // numpad 8
    120: "debug" // F9
};
/**
 * A hash table to convert from a gamepad button to a mapped key name.
 *
 * @type Object
 */
Input.gamepadMapper = {
    0: "ok", // A
    1: "cancel", // B
    2: "shift", // X
    3: "menu", // Y
    4: "pageup", // LB
    5: "pagedown", // RB
    12: "up", // D-pad up
    13: "down", // D-pad down
    14: "left", // D-pad left
    15: "right" // D-pad right
};

Not sure if you mean this, from the source code.
Also you may need to know the gamepad type to actually draw buttons, like a ps2 controller and a xbox controller. But standard gamepad should all have similar layout, maybe you can use icons like this:
1739097375652.png
If I understand you right, you want 1 way to explain to your players, how to play the game with the keyboard, the mouse and a controller?

Well, yeah... What I do is, I do not really talk about [Z], [X] and [Shift], but instead I say: [Action Button], [Dash Button] and [Back Button].

In the begin of the tutorial, I have the game explain the controls per input method, but from there on, I will never mention them again. I just say [Action Button], [Cancel Button], [Dash Button]

See... Bu naming the buttons, It doesn't matter if someone is playing with a keyboard or a mouse or a controller. I don't mind even if they use potatoes as input, (which is totally possible, but not very efficient,) and my tutorial will still work.

So yeah, that is my way of dealing with this. I use alternative names for the buttons, so the same explanation goes for keyboard, mouse and controller (and potato if you really want).


I hope this helps.

Original thread: https://forums.rpgmakerweb.com/threads/showing-button-icons-for-controls.175290/