Moghunter Menu - looping to the left - RMMV

Fitferfer

Villager
Member
Joined
Sep 24, 2018
Messages
13
Reaction score
3
First Language
English
Primarily Uses
RMMV
Hello! I'm using Moghunter's Monogatari menu plugin, and would like to add the ability to simply press "left" to have the menu cursor selection go to the final selection on the right, rather than having to hit "Right" 9 times to get to Quit.

Menu.png

Here's the plugin: https://atelierrgss.wordpress.com/rmv-monogatari/

I can't seem to figure out where in the code the author disabled this option... as it works by default in RMMV. Can anyone help?

Thanks very much!

-Fer
 

ShadowDragon

Veteran
Veteran
Joined
Oct 8, 2018
Messages
3,193
Reaction score
1,189
First Language
Dutch
Primarily Uses
RMMV
I know where to look, but I dont see 9, or 8, but you can look to the cursor saying
if index <= 0, than index = 8 instead of 0
same with the other thing, but I can look tomorrow into it for you, but hopefully someone can help you
on it before me.

But its somewhere between those lines :)
 

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
2,227
Reaction score
1,635
First Language
EN
Primarily Uses
RMMZ
It's because Mog calls the cursorUp & cursorDown methods without a wrap argument, meaning they'll never wrap. The default code only wraps if you have just pressed the directional key. :kaoswt:

Try saving this one of these a .js file and importing as a plugin:
Code:
Window_MenuCommand.prototype.processCursorMove = function() {
    if (this.isCursorMovable()) {
        var lastIndex = this.index();
        if (Input.isRepeated('down') || Input.isRepeated('right')) {
            this.cursorDown(true);   // <-- edit 1 of 2
        };
        if (Input.isRepeated('up') || Input.isRepeated('left')) {
            this.cursorUp(true);   // <-- edit 2 of 2
        };
        if (this.index() !== lastIndex) {
            SoundManager.playCursor();
        };
    };
};
Code:
Window_MenuCommand.prototype.processCursorMove = function() {
    if (this.isCursorMovable()) {
        var lastIndex = this.index();
        if (Input.isRepeated('down') || Input.isRepeated('right')) {
            this.cursorDown(Input.isTriggered('down') || Input.isTriggered('right'));   // <-- edit 1 of 2
        };
        if (Input.isRepeated('up') || Input.isRepeated('left')) {
            this.cursorUp(Input.isTriggered('up') || Input.isTriggered('left'));   // <-- edit 2 of 2
        };
        if (this.index() !== lastIndex) {
            SoundManager.playCursor();
        };
    };
};
Alternatively, you can simply find the relevant lines in MOG_SceneMenu.js and edit them directly~ :kaothx:
 

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
2,227
Reaction score
1,635
First Language
EN
Primarily Uses
RMMZ
OK, just remember that if you happen to update the plugin at some point then you'll need to reapply that edit. :)

Happy RPG Making! :kaojoy:
 

Latest Threads

Latest Posts

Latest Profile Posts

Are we now stuck with WYSIWYG ? I cannot revert back my posts to good old raw text ?
I'm wondering if I may be putting too many things into one map. A story, within a story, within a story . . . it's fun, but I can't shake the feeling that it may be better to scrap some of it, and use it for another map. I'm not sure what to do.

And the beginning of a nearly complete grid system dawns.

I want to add a thin pixel border around the entire region. Like across all blue highlights that connect and red attack highlights that connect.
Ami
--- Remake ---

Hero: Hey,look! Some Artist will Remake us to 3D!
M.Knight: Really? Then i hope they make me so Cool & Handsome
Heroine: I hope they make me Cute & Sexy,too
(6 Months Later,The 3D Model Are Revealed With Unexpected Yet Horrible Model)
Hero: (Spit The Water)
M.Knight: What the Hell?!
Heroine: I'm Dissapointed...

Forum statistics

Threads
107,784
Messages
1,032,182
Members
139,938
Latest member
rpgvoices
Top