Option to take the player to the "Key Items" menu?

greensdream

"GREEN'S DREAM" developer page
Veteran
Joined
Jul 15, 2017
Messages
55
Reaction score
25
First Language
English
Primarily Uses
RMMV
I have a custom menu called by a common event, and in that event I have three options to choose from. In the event I use script calls to take the player to the Equip, Save, and Quit screens respectively [ SceneManager.push(Scene_Equip), etc. ]. My question is this...

Can I add a fourth option to take the player to the "Key Items" screen? When I use [ SceneManager.push(Scene_Item) ], it of course takes me to the item menu. I'd like to have an option that takes the player instead to only the "Key Items" menu without the ability to switch between Item, Weapon, Armor, and Key Items.

If it's impossible or too complicated to take away the ability to switch between Item, Weapon, Armor, and Key Items, then is there at least a way to start on the "Key Items" part of the menu instead of on the "Item" part?
 

ShadowDragon

Veteran
Veteran
Joined
Oct 8, 2018
Messages
2,428
Reaction score
809
First Language
Dutch
Primarily Uses
RMMV
so far I know, there is none.

I dont know if its possible through SceneManager.push(Scene_Item)
around SceneManager.push(Scene_Item._keyItems) but I cant recall it.

Some people are looking for it, but I don't know if there is really a direct call to it.
 

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
1,560
Reaction score
904
First Language
Portuguese - Br
Primarily Uses
RMMV
Hi there!
You can try to change the default index when you push Scene_Item.
But I think you have to edit the code:
JavaScript:
const alias = Scene_Item.prototype.start;
Scene_Item.prototype.start = function() {
    alias.call(this);
     if($gameSwitches.value(ID)){
         const symbol = $gameVariables.value(ID);
        this._categoryWindow.selectSymbol(symbol);
    }
};
JavaScript:
const alias = Scene_Item.prototype.start;
Scene_Item.prototype.start = function() {
    alias.call(this);
    this._categoryWindow.selectSymbol('keyItem');
};
In option 1, when the specified switch is on, you will be able the scene item will select the category symbol that you choose.
In this example, I put the symbol inside a variable, so you can change it in your game. They have to be a string and you have to add it to a variable via the script call field in the control variable command.
The default symbols are:
'item'
'weapon'
'armor'
'keyItem' < This is what you want.

Or can put options 2, that will always open the scene item changing the category window to select directly the key items.
Or you can build something different, like

JavaScript:
Scene_Item.prototype.start = function() {
    alias.call(this);
     if($gameSwitches.value(ID)){
        this._categoryWindow.selectSymbol('keyItem');
    /}
};
Copy and paste this and put it into a text file with a .js extension. So all you have to do is put it as a plugin.
 

ShadowDragon

Veteran
Veteran
Joined
Oct 8, 2018
Messages
2,428
Reaction score
809
First Language
Dutch
Primarily Uses
RMMV
I can use option 2 though, no need for switches and variables.
Didn't knew this thing could be possible which is also relaive easy (when you know it).
 

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

Latest Threads

Latest Posts

Latest Profile Posts

I just like this website:
lol
I streamed Moonfall on 9/25/20
and have started a page to showcase my vids/stream :kaoluv:

Please subscribe and follow, it's free, it's quick and one sub means so much to me, it would really make my day~ :wub

And now to face my worst enemy... adding color :kaocry:
Power has been restored FINALLY to our home in Lake Charles. Hurricane Laura tried to wreck our lives and disrupt my work on the commercial project i have going with Cloud 9 but the key word is TRIED!!! Slowly moving from the shelter to home over the next week or so. I WILL NOT QUIT!
I am happy because the RPG Maker MZ character comes with extra bust and full body art, but I am disappointed because the quality of the character's PIxel art has decreased.
Only My Opinion that Pixel art MV is better.

Forum statistics

Threads
103,231
Messages
998,211
Members
134,721
Latest member
isaton
Top