Show Item, Weapon and Armor only.

NehpetsYar

Villager
Member
Joined
Jun 1, 2014
Messages
11
Reaction score
5
First Language
English
Primarily Uses
I am using many of Yanfly's plugins, and I have a scene where you speak to a "blacksmith". In this scene I enable the use of Yanfly's Augment system, and Script Call "SceneManager.push(Scene_Item);" to bring up the Item menu. All of that works great so far; but I would like to only show Items, Weapons, Armor, and possibly a custom Item category called Accessory. I have some very basic understanding of editing the JS files, would this be possible for me to do? I apologize ahead of time if I've posted this in the wrong section.
 

Poryg

Dark Lord of the Castle of Javascreeps
Veteran
Joined
Mar 23, 2017
Messages
4,125
Reaction score
10,639
First Language
Czech
Primarily Uses
RMMV
The simplest, but definitely not the easiest, thing is to create a new plugin.
Before you make it:
1. Open your rpg maker mv folder, go to dlc. In one of the folders there's a plugin that allows you to display window names by holding the CTRL. Copy paste it into your project's plugin folder and activate it.
2. Find the names of two windows: The one that ays "Items, weapons, armor, key item" and the one that draws the item list.
Now create a new plugin and make Scene_BSItem, which is the prototype of Scene_Item.
Then you need to create new windows as well. They'll be called Window_BS* and will be the prototype of Window_*, where * is the window names we found. For example if the upper window is called Window_ItemCategory, the new window will be called Window_BSItemCategory and will be the prototype of Window_ItemCategory.
These are the changes you'll need to make:
1. Rename Key item to Accessories in the category window
2. Edit the function responsible for making item list (usually it's makeItemList) to display only accessories. For that you may need to do your own research on how accessories are handled, so for that I'd create an event that gives you an accessory, open dev console with f8 in game and display $gamePlayer._armors and $dataArmors and compare it to the database to understand what is what.
3. Paste all functions of Scene_Item that contain creating new windows and edit the new windows appropriately. For example you don't want to create a new Window_ItemCategory when your scene wants to use Window_BSItemCategory.
4. Maybe you'll also need to create a patch for Yanfly Attachable augments.
This is an example code of how you create the new window, feel free to use that.
Code:
function Window_BSItemCategory() {
this.initialize.apply(this, arguments);
}

Window_BSItemCategory.prototype = Object.create(Window_ItemCategory.prototype);
Window_BSItemCategory.prototype.constructor = Windows_BSItemCategory;

//here go the other functions
I know it's rather advanced, but this is how I'd do that, because I don't want the default scene to be hit by my edits.
 

NehpetsYar

Villager
Member
Joined
Jun 1, 2014
Messages
11
Reaction score
5
First Language
English
Primarily Uses
Thank you for taking the time to type that all out. I will give it a try and see how it goes. Its advanced for me but I will definitely give this a try and let you know how. Ill probably leave accessories out and keep it basic to start. Thanks!
 

Poryg

Dark Lord of the Castle of Javascreeps
Veteran
Joined
Mar 23, 2017
Messages
4,125
Reaction score
10,639
First Language
Czech
Primarily Uses
RMMV
You're welcome. If you have a problem, feel free to give me a shout. I won't be able to help with anything practical, since I'm currently left with no computer, but I can still read and understand the code.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

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'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c

Forum statistics

Threads
105,857
Messages
1,017,015
Members
137,563
Latest member
MinyakaAeon
Top