MZ Help with Plug-In to change default button mapping.

I just want to change the Y button to the Start button by default so the player doesn't get confused trying to access the menu for the first time. I tried using this code as a plug-in but it doesn't seem to do anything. (I know there are plugins to modify the inputs in game, I have that, but I do think Y is a very odd default choice for gamepad).


Code:
Input.gamepadMapper = {
    0: "ok", // A
    1: "cancel", // B
    2: "shift", // X
    3: "menu", // Buttons[9]
    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
};

I don't have any Javascript experience so I don't know what I'm doing wrong. I seems like the plug-in just isn't being read because Y is still the button that functions when loading the game.
but I do think Y is a very odd default choice for gamepad).
It isn't. I've played so many games that use the triangle button on PS, and that button is in the same place as the Y button on Xbox.
It isn't. I've played so many games that use the triangle button on PS, and that button is in the same place as the Y button on Xbox.

I suppose that's true. I don't come across it very often. I went to play Elden Ring for a bit after a couple days of working in the engine and I died a few times in invasions pressing Y trying to quick swap XD
I don't know about changing by default, but if you have a plug-in for controller config, of which I believe there are quite a few, the player could change it themselves, which would eliminate any significant issues.
I don't have any Javascript experience so I don't know what I'm doing wrong. I seems like the plug-in just isn't being read because Y is still the button that functions when loading the game.
Just to address the point, it doesn't do anything because that is the default mapping
1753143850015.png
Just to address the point, it doesn't do anything because that is the default mapping
View attachment 345639


3: "menu", // Buttons[9] (i tried (start) as well)

my main problem is not knowing how to overwrite the original mapping because I am but a baby and dont quite understand how to make plugins yet.

So what would be my next step here?
3: "menu", // Buttons[9] (i tried (start) as well)

my main problem is not knowing how to overwrite the original mapping because I am but a baby and dont quite understand how to make plugins yet.

So what would be my next step here?
If I understand correctly (Which I very well may not) the 3 is what needs to change to a 9. That second bit is a comment.
the leftmost column are the controller buttons. theyre internally labeled with numbers.
the center is the button ingame they correspond to.
The right are just comments so that someone looking at the code can see what button is for what at a glance.

I cant remember the full map off the top of my head, but if 9 is start, then you just add a line saying
Code:
9: 'menu',      // Start
to make start also menu. if you want to replace y as the menu button, then swap the 3 for a 9
Ahhhh thank you, numbers tend to get jumbled in my head I didn't even notice the numbers were relative, I saw it as 1-10 @.@

Original thread: https://forums.rpgmakerweb.com/threads/help-with-plug-in-to-change-default-button-mapping.179069/