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

greensdream

"GREEN'S DREAM" developer page
Veteran
Joined
Jul 15, 2017
Messages
59
Reaction score
26
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,895
Reaction score
1,029
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,695
Reaction score
1,113
First Language
Portuguese - Br
Primarily Uses
RMMZ
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,895
Reaction score
1,029
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

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,862
Messages
1,017,049
Members
137,569
Latest member
Shtelsky
Top