Title Screen "Controls"

Karbonic

Off Brand OFF
Veteran
Joined
Dec 24, 2015
Messages
57
Reaction score
20
First Language
English
Primarily Uses
RMMV
I've been using Moghunter's titlescreen scripts to make my custom title screen, which has
all of the options laid out horizontally from each other.
upload_2018-2-1_23-8-29.png
Since Moghunter's Script is just a visual one, this doesn't effect how the title screen is controlled.
My question is, how can I change the 'controls' of the title screen, so the choices are selected with the left and right arrow keys, and not the up and down keys?

Thanks!
 

Isabella Ava

Veteran
Veteran
Joined
Sep 13, 2016
Messages
635
Reaction score
756
First Language
English
Open the script file, try searching for Input.isTriggered('up') & Input.isTriggered('down')
and replace up > left , down > right
 

Karbonic

Off Brand OFF
Veteran
Joined
Dec 24, 2015
Messages
57
Reaction score
20
First Language
English
Primarily Uses
RMMV
Hmm.
That doesn't seem to be anywhere in the script I used.
https://atelierrgss.wordpress.com/rmv-custom-title-screen/
Since this script is only an aesthetic change to the default title screen,
I can only assume it doesn't change any basic functions.

Is there a default file which controls the keys used on the title screen?
 

Aloe Guvner

Walrus
Veteran
Joined
Sep 28, 2017
Messages
1,628
Reaction score
1,071
First Language
English
Primarily Uses
RMMV
@Isabella Ava careful because that code is at a deeper level and it might change all of the command windows to work like that! :eek:

I don't have the code in front of me, but it depends if @Karbonic assumption is true, that is, the Mog script doesn't change the basic functionality, only the aesthetics.

If that's the case, it's simply a matter of changing the number of rows in the command window to 1 and the number of columns to 3 and the rest will be taken care of for you:smile:
 

Karbonic

Off Brand OFF
Veteran
Joined
Dec 24, 2015
Messages
57
Reaction score
20
First Language
English
Primarily Uses
RMMV
@Aloe Guvner
Sorry for the possibly stupid question, but how do I change the columns and rows?
 

Llareian

Jack of All Trades, Master of None
Veteran
Joined
Jan 26, 2017
Messages
603
Reaction score
1,403
First Language
English
Primarily Uses
RMMV
@Isabella Ava you're sort of on the right track, but as @Aloe Guvner points out, you're thinking a bit too broadly.

@Karbonic I don't know if this is going to work with the plugins you listed, but if you can hit up/down and scroll through your options, this should work. Try copying the following into a text file, save it as a .js file in your plugins folder (any old name will do), and put it in your plugin manager below your other title plugins. It should accomplish what Isabella Ava was trying to say.

Code:
Window_TitleCommand.prototype.processCursorMove = function() {
    if (this.isCursorMovable()) {
        var lastIndex = this.index();
        if (Input.isRepeated('down')) {
            this.cursorDown(Input.isTriggered('down'));
        }
        if (Input.isRepeated('up')) {
            this.cursorUp(Input.isTriggered('up'));
        }
        if (Input.isRepeated('right')) {
            this.cursorDown(Input.isTriggered('right'));
        }
        if (Input.isRepeated('left')) {
            this.cursorUp(Input.isTriggered('left'));
        }
        if (!this.isHandled('pagedown') && Input.isTriggered('pagedown')) {
            this.cursorPagedown();
        }
        if (!this.isHandled('pageup') && Input.isTriggered('pageup')) {
            this.cursorPageup();
        }
        if (this.index() !== lastIndex) {
            SoundManager.playCursor();
        }
    }
};
Alternately, you can wait for Aloe Guvner to provide more info on his solution, as it's just a different way to go about it.

EDIT: Sorry, I just realized you said you wanted it to NOT trigger on the up/down keys. The solution above triggers on EITHER up/down OR left/right. Use the code below if you want to exclude up/down (it basically just switches up/down and left/right functions):

Code:
Window_TitleCommand.prototype.processCursorMove = function() {
    if (this.isCursorMovable()) {
        var lastIndex = this.index();
        if (Input.isRepeated('down')) {
            this.cursorRight(Input.isTriggered('down'));
        }
        if (Input.isRepeated('up')) {
            this.cursorLeft(Input.isTriggered('up'));
        }
        if (Input.isRepeated('right')) {
            this.cursorDown(Input.isTriggered('right'));
        }
        if (Input.isRepeated('left')) {
            this.cursorUp(Input.isTriggered('left'));
        }
        if (!this.isHandled('pagedown') && Input.isTriggered('pagedown')) {
            this.cursorPagedown();
        }
        if (!this.isHandled('pageup') && Input.isTriggered('pageup')) {
            this.cursorPageup();
        }
        if (this.index() !== lastIndex) {
            SoundManager.playCursor();
        }
    }
};
 

Isabella Ava

Veteran
Veteran
Joined
Sep 13, 2016
Messages
635
Reaction score
756
First Language
English
@Isabella Ava you're sort of on the right track, but as @Aloe Guvner points out, you're thinking a bit too broadly.

@Karbonic I don't know if this is going to work with the plugins you listed, but if you can hit up/down and scroll through your options, this should work. Try copying the following into a text file, save it as a .js file in your plugins folder (any old name will do), and put it in your plugin manager below your other title plugins. It should accomplish what Isabella Ava was trying to say.

Code:
Window_TitleCommand.prototype.processCursorMove = function() {
    if (this.isCursorMovable()) {
        var lastIndex = this.index();
        if (Input.isRepeated('down')) {
            this.cursorDown(Input.isTriggered('down'));
        }
        if (Input.isRepeated('up')) {
            this.cursorUp(Input.isTriggered('up'));
        }
        if (Input.isRepeated('right')) {
            this.cursorDown(Input.isTriggered('right'));
        }
        if (Input.isRepeated('left')) {
            this.cursorUp(Input.isTriggered('left'));
        }
        if (!this.isHandled('pagedown') && Input.isTriggered('pagedown')) {
            this.cursorPagedown();
        }
        if (!this.isHandled('pageup') && Input.isTriggered('pageup')) {
            this.cursorPageup();
        }
        if (this.index() !== lastIndex) {
            SoundManager.playCursor();
        }
    }
};
Alternately, you can wait for Aloe Guvner to provide more info on his solution, as it's just a different way to go about it.

EDIT: Sorry, I just realized you said you wanted it to NOT trigger on the up/down keys. The solution above triggers on EITHER up/down OR left/right. Use the code below if you want to exclude up/down (it basically just switches up/down and left/right functions):

Code:
Window_TitleCommand.prototype.processCursorMove = function() {
    if (this.isCursorMovable()) {
        var lastIndex = this.index();
        if (Input.isRepeated('down')) {
            this.cursorRight(Input.isTriggered('down'));
        }
        if (Input.isRepeated('up')) {
            this.cursorLeft(Input.isTriggered('up'));
        }
        if (Input.isRepeated('right')) {
            this.cursorDown(Input.isTriggered('right'));
        }
        if (Input.isRepeated('left')) {
            this.cursorUp(Input.isTriggered('left'));
        }
        if (!this.isHandled('pagedown') && Input.isTriggered('pagedown')) {
            this.cursorPagedown();
        }
        if (!this.isHandled('pageup') && Input.isTriggered('pageup')) {
            this.cursorPageup();
        }
        if (this.index() !== lastIndex) {
            SoundManager.playCursor();
        }
    }
};
That's nice. I did take a look at this section before but not sure how to do it? But is this work?
 

Aloe Guvner

Walrus
Veteran
Joined
Sep 28, 2017
Messages
1,628
Reaction score
1,071
First Language
English
Primarily Uses
RMMV
I couldn't find just the plugin without having to download a demo project, so I didn't verify this will work with the MOG plugin, but it's the right idea.

Here is a snippet of code you can include in a new plugin that changes the Title Command Window to be horizontal, and now the commands get controlled by using Left/Right rather than Up/Down.
Code:
Window_TitleCommand.prototype.maxCols = function() {
    return 3; //change this to the number of title commands
};
 

Karbonic

Off Brand OFF
Veteran
Joined
Dec 24, 2015
Messages
57
Reaction score
20
First Language
English
Primarily Uses
RMMV
@Llareian
Thanks! That first script works, but the second script doesn't.
Either way, the first script will be good enough for me.

Thanks for the help, everyone!
 

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

Latest Threads

Latest Posts

Latest Profile Posts

I was planning to release a useless plugin for april fools, but then I thought I let it be.
Tfw every dev around me is using Live2D in their MV games and make me question my skills repeatedly.

Spending the day reworking my maps, especially the first "biome". This time it's not even in the dark. :LZSwink:
Activity on the forums has increased lately, probably because of people staying home. The amount of work for moderators has increased lol.

Forum statistics

Threads
95,525
Messages
929,816
Members
125,798
Latest member
lightburnz
Top