Map Screen Plugin Request

Veggiebad

Veteran
Veteran
Joined
Nov 27, 2017
Messages
47
Reaction score
1
First Language
English
Primarily Uses
RMVXA
I have searched google and this forum high and low, and the plugin that I cannot find is one for a Map Screen where you could figure out where you are and where you're supposed to go. Since my game is rather large and spans multiple areas, I need a plugin that could help the player navigate through places so they would not be so lost.

Do you guys have any plugins for me?
 

glaphen

Veteran
Veteran
Joined
Jan 13, 2019
Messages
326
Reaction score
120
First Language
English
Primarily Uses
RMMV
If you mean a mini map plugin there are a ton of plugins or guides even how to make them, if you want just a world map overview that you can't actually do anything on, you can do that with a common event and making your own picture of the map with different things shown based off a variable you would change at certain points.
 

Veggiebad

Veteran
Veteran
Joined
Nov 27, 2017
Messages
47
Reaction score
1
First Language
English
Primarily Uses
RMVXA
If you mean a mini map plugin there are a ton of plugins or guides even how to make them, if you want just a world map overview that you can't actually do anything on, you can do that with a common event and making your own picture of the map with different things shown based off a variable you would change at certain points.
Is there a tutorial I can use for a world map overview? I want to make it so a press of a single button could bring up the world map so the user could tell where they are.
 

glaphen

Veteran
Veteran
Joined
Jan 13, 2019
Messages
326
Reaction score
120
First Language
English
Primarily Uses
RMMV
Not sure about map tutorial, but to add a button to do things is really easy.
Code:
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
    69: 1,   // E
    81: 2,   // 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
};
Buttons are mapped at this part of code, you can just add in your key number from this site
So say g is 71 add 71: 1, to the code on next line remember comma placements if not last, if last add to previous, or keep the order. Then I add a check to onKeyUp with
Code:
if (buttonName > 0) Input.myActions(buttonName);
Code:
Input._onKeyUp = function(event) {
    const buttonName = this.keyMapper[event.keyCode];
    if (buttonName) {
        if (buttonName > 0) Input.myActions(buttonName);
        this._currentState[buttonName] = false;
    }
    if (event.keyCode === 0) {  // For QtWebEngine on OS X
        this.clear();
    }
};

Input.myActions = function(key) {
    switch(key) {
        case 1:
            $gamePlayer._speed = $gamePlayer._speed + 0.25;
            if ($gamePlayer._speed > 2) $gamePlayer._speed = 2;
            $gamePlayer._tempSpeed = $gamePlayer._speed;
            break;
        case 2:
            $gamePlayer._speed = $gamePlayer._speed - 0.25;
            if ($gamePlayer._speed < 0.25) $gamePlayer._speed = 0.25;
            $gamePlayer._tempSpeed = $gamePlayer._speed;
            break;
    }
};
Then made my own function that does the actions. So if g is 1 it would do case 1 and call common event 1
Code:
Input.myActions = function(key) {
    switch(key) {
        case 1:
           $gameTemp.reserveCommonEvent(1);
            break;
    }
};
Probably better to instead turn on a switch though that turns on a auto run common event.
Code:
Input.myActions = function(key) {
    switch(key) {
        case 1:
        if (!$gameSwitches.value(1)) $gameSwitches.setValue(1, true);
            break;
    }
};
Then in common event make images based off variable or whatever and then a conditional branch that waits for input which turns off the above switch and erases pictures.
 

Veggiebad

Veteran
Veteran
Joined
Nov 27, 2017
Messages
47
Reaction score
1
First Language
English
Primarily Uses
RMVXA
Not sure about map tutorial, but to add a button to do things is really easy.
Code:
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
    69: 1,   // E
    81: 2,   // 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
};
Buttons are mapped at this part of code, you can just add in your key number from this site
So say g is 71 add 71: 1, to the code on next line remember comma placements if not last, if last add to previous, or keep the order. Then I add a check to onKeyUp with
Code:
if (buttonName > 0) Input.myActions(buttonName);
Code:
Input._onKeyUp = function(event) {
    const buttonName = this.keyMapper[event.keyCode];
    if (buttonName) {
        if (buttonName > 0) Input.myActions(buttonName);
        this._currentState[buttonName] = false;
    }
    if (event.keyCode === 0) {  // For QtWebEngine on OS X
        this.clear();
    }
};

Input.myActions = function(key) {
    switch(key) {
        case 1:
            $gamePlayer._speed = $gamePlayer._speed + 0.25;
            if ($gamePlayer._speed > 2) $gamePlayer._speed = 2;
            $gamePlayer._tempSpeed = $gamePlayer._speed;
            break;
        case 2:
            $gamePlayer._speed = $gamePlayer._speed - 0.25;
            if ($gamePlayer._speed < 0.25) $gamePlayer._speed = 0.25;
            $gamePlayer._tempSpeed = $gamePlayer._speed;
            break;
    }
};
Then made my own function that does the actions. So if g is 1 it would do case 1 and call common event 1
Code:
Input.myActions = function(key) {
    switch(key) {
        case 1:
           $gameTemp.reserveCommonEvent(1);
            break;
    }
};
Probably better to instead turn on a switch though that turns on a auto run common event.
Code:
Input.myActions = function(key) {
    switch(key) {
        case 1:
        if (!$gameSwitches.value(1)) $gameSwitches.setValue(1, true);
            break;
    }
};
Then in common event make images based off variable or whatever and then a conditional branch that waits for input which turns off the above switch and erases pictures.
Any specific file I have to put this code into, or I can just make a new JS file?
 

glaphen

Veteran
Veteran
Joined
Jan 13, 2019
Messages
326
Reaction score
120
First Language
English
Primarily Uses
RMMV
Any specific file I have to put this code into, or I can just make a new JS file?
You can add it as a new js file at the top of the plugin list, the base code is in rpg_core.js
 

Veggiebad

Veteran
Veteran
Joined
Nov 27, 2017
Messages
47
Reaction score
1
First Language
English
Primarily Uses
RMVXA
You can add it as a new js file at the top of the plugin list, the base code is in rpg_core.js
Oh, so the code itself will call upon either the switch or the common event after pressing, say, the tab key? Then I can make conditional branches where it could show the character's location around the map depending on if the player unlocks the map, too?
 

glaphen

Veteran
Veteran
Joined
Jan 13, 2019
Messages
326
Reaction score
120
First Language
English
Primarily Uses
RMMV
Oh, so the code itself will call upon either the switch or the common event after pressing, say, the tab key? Then I can make conditional branches where it could show the character's location around the map depending on if the player unlocks the map, too?
Yes, with conditional branches just set it up set it first checks a switch that will be off, then set up the images based off variables, turn on switch to prevent it from running again, below that have a conditional branch checking if button ok is pressed or whatever and just remove pictures and turn off auto run switch.
 

Veggiebad

Veteran
Veteran
Joined
Nov 27, 2017
Messages
47
Reaction score
1
First Language
English
Primarily Uses
RMVXA
Yes, with conditional branches just set it up set it first checks a switch that will be off, then set up the images based off variables, turn on switch to prevent it from running again, below that have a conditional branch checking if button ok is pressed or whatever and just remove pictures and turn off auto run switch.
I tried making a new plugin JS file, but it didn't seem to work, even when I am pressing Tab. I tried all the keys, but it didn't work. I also tried applying it to the RPG core, but the game crashed.
 

glaphen

Veteran
Veteran
Joined
Jan 13, 2019
Messages
326
Reaction score
120
First Language
English
Primarily Uses
RMMV
I tried making a new plugin JS file, but it didn't seem to work, even when I am pressing Tab. I tried all the keys, but it didn't work. I also tried applying it to the RPG core, but the game crashed.
Not sure what you did wrong, I couldn't get it to crash even messing up commas in new project.
Just put this into a new js file near top of plugins, tab already changed to 1.

Code:
Input.keyMapper = {
    9: 1,       // 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
};

Input._onKeyUp = function(event) {
    const buttonName = this.keyMapper[event.keyCode];
    if (buttonName) {
        if (buttonName > 0) Input.myActions(buttonName);
        this._currentState[buttonName] = false;
    }
    if (event.keyCode === 0) {  // For QtWebEngine on OS X
        this.clear();
    }
};

Input.myActions = function(key) {
    switch(key) {
        case 1:
            if (!$gameSwitches.value(1)) $gameSwitches.setValue(1, true);
            break;
    }
};
 

Veggiebad

Veteran
Veteran
Joined
Nov 27, 2017
Messages
47
Reaction score
1
First Language
English
Primarily Uses
RMVXA
Not sure what you did wrong, I couldn't get it to crash even messing up commas in new project.
Just put this into a new js file near top of plugins, tab already changed to 1.

Code:
Input.keyMapper = {
    9: 1,       // 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
};

Input._onKeyUp = function(event) {
    const buttonName = this.keyMapper[event.keyCode];
    if (buttonName) {
        if (buttonName > 0) Input.myActions(buttonName);
        this._currentState[buttonName] = false;
    }
    if (event.keyCode === 0) {  // For QtWebEngine on OS X
        this.clear();
    }
};

Input.myActions = function(key) {
    switch(key) {
        case 1:
            if (!$gameSwitches.value(1)) $gameSwitches.setValue(1, true);
            break;
    }
};
Alright, that is fixed, now I just need a way for the switch to turn off whenever I press TAB again.
 

glaphen

Veteran
Veteran
Joined
Jan 13, 2019
Messages
326
Reaction score
120
First Language
English
Primarily Uses
RMMV
Alright, that is fixed, now I just need a way for the switch to turn off whenever I press TAB again.
You can turn it off in the common event by waiting for input with a conditional branch, turn it off when button ok is pressed for example and erase all pictures. Here's a common event example if switch 1 turns it on.
map2.png

Oh and put wait 1 at the top or else it will lag.
 
Last edited:

Veggiebad

Veteran
Veteran
Joined
Nov 27, 2017
Messages
47
Reaction score
1
First Language
English
Primarily Uses
RMVXA
You can turn it off in the common event by waiting for input with a conditional branch, turn it off when button ok is pressed for example and erase all pictures. Here's a common event example if switch 1 turns it on.
View attachment 139169

Oh and put wait 1 at the top or else it will lag.
Got that down... and one more thing...

How would I disable and reenable the tab function if I want to make cutscenes without the player hitting tab and messing up the cutscene flow?
 

glaphen

Veteran
Veteran
Joined
Jan 13, 2019
Messages
326
Reaction score
120
First Language
English
Primarily Uses
RMMV
Got that down... and one more thing...

How would I disable and reenable the tab function if I want to make cutscenes without the player hitting tab and messing up the cutscene flow?
Change
Code:
Input.myActions = function(key) {
    switch(key) {
        case 1:
            if (!$gameMap.isEventRunning() && !SceneManager.isSceneChanging() && !$gameSwitches.value(1)) $gameSwitches.setValue(1, true);
            break;
    }
};
 

Veggiebad

Veteran
Veteran
Joined
Nov 27, 2017
Messages
47
Reaction score
1
First Language
English
Primarily Uses
RMVXA
Change
Code:
Input.myActions = function(key) {
    switch(key) {
        case 1:
            if (!$gameMap.isEventRunning() && !SceneManager.isSceneChanging() && !$gameSwitches.value(1)) $gameSwitches.setValue(1, true);
            break;
    }
};
Oh, is that whenever a map auto event plays or would I still have to call upon the script?
 

glaphen

Veteran
Veteran
Joined
Jan 13, 2019
Messages
326
Reaction score
120
First Language
English
Primarily Uses
RMMV
Oh, is that whenever a map auto event plays or would I still have to call upon the script?
Not sure what you mean, if you change that in plugin file to that it won't turn on switch if an event is playing when you hit the key.
 

Veggiebad

Veteran
Veteran
Joined
Nov 27, 2017
Messages
47
Reaction score
1
First Language
English
Primarily Uses
RMVXA
Not sure what you mean, if you change that in plugin file to that it won't turn on switch if an event is playing when you hit the key.
I have situations where the player would have to play a mini game and the flow would be messed with if the map screen is opened. I want to make it so that the map screen is disabled while the introductory portion of my game is taking place and have a way to enable the map feature once the beginning portion of my game is complete.
 

glaphen

Veteran
Veteran
Joined
Jan 13, 2019
Messages
326
Reaction score
120
First Language
English
Primarily Uses
RMMV
I have situations where the player would have to play a mini game and the flow would be messed with if the map screen is opened. I want to make it so that the map screen is disabled while the introductory portion of my game is taking place and have a way to enable the map feature once the beginning portion of my game is complete.
I mean if that above doesn't work for said mini game you can just add an extra switch check.
Code:
if (!$gameMap.isEventRunning() && !SceneManager.isSceneChanging() && !$gameSwitches.value(1) && !$gameSwitches.value(2)) $gameSwitches.setValue(1, true);
In that case if switch 2 is on it won't toggle either.
 

Veggiebad

Veteran
Veteran
Joined
Nov 27, 2017
Messages
47
Reaction score
1
First Language
English
Primarily Uses
RMVXA
I mean if that above doesn't work for said mini game you can just add an extra switch check.
Code:
if (!$gameMap.isEventRunning() && !SceneManager.isSceneChanging() && !$gameSwitches.value(1) && !$gameSwitches.value(2)) $gameSwitches.setValue(1, true);
In that case if switch 2 is on it won't toggle either.
Oh, so this code would require both the scene and switch 2 to be off?
 

glaphen

Veteran
Veteran
Joined
Jan 13, 2019
Messages
326
Reaction score
120
First Language
English
Primarily Uses
RMMV
Oh, so this code would require both the scene and switch 2 to be off?
You can change the switches to whatever you want, then just turn on that switch before the mini game.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Please do not buy games from g2a.com. The sellers have total power over you. The website has many scam sellers. It looks cheap, but the key code didn't work.
A while back I was having fun making my own custom tiles, then I hit carpet... why is it so difficult!? Lol.
Weekend is finally here... what would you like to see (?):
1) Pokemon into zelda minish-cap style
or
2) Pokemon into zelda gbc style
or
3) Zelda into pokemon style

#= Choose ===============#
||__[ Full mockup ]_[ Charset ]__||
#=======================#
I know someday I'll start working on this...

I'm so happy that I got Steam achievements to work in my game, thanks in large part to the posts by other RPG Maker devs on this issue!

Forum statistics

Threads
97,943
Messages
948,060
Members
129,193
Latest member
annygma
Top