RMMV How do I erase these extra inventory slots?

kaitoes

Villager
Member
Joined
Jul 26, 2021
Messages
16
Reaction score
3
First Language
English
Primarily Uses
RMMV

ShadowDragon

Realist
Veteran
Joined
Oct 8, 2018
Messages
4,421
Reaction score
1,683
First Language
Dutch
Primarily Uses
RMMV
serveral ways, you can open the itemScene.js from your project or
copy the function and rule those out if not needed.

but why do you want to rule them out?
are you using only "key items?" or key items and equip?

because there are serveral methodes on what to show and hide.
depending what you exactly need.
 

kaitoes

Villager
Member
Joined
Jul 26, 2021
Messages
16
Reaction score
3
First Language
English
Primarily Uses
RMMV
serveral ways, you can open the itemScene.js from your project or
copy the function and rule those out if not needed.

but why do you want to rule them out?
are you using only "key items?" or key items and equip?

because there are serveral methodes on what to show and hide.
depending what you exactly need.
I only really want to have 2 separate categories of items. The ones I set to a blank space are (armor) and (key items)
 

ShadowDragon

Realist
Veteran
Joined
Oct 8, 2018
Messages
4,421
Reaction score
1,683
First Language
Dutch
Primarily Uses
RMMV
this removed the item category of "Item" and "weapon".
I didn't test it, but should work while I aliased teh category function
just in case.

if it doesn't work, I missed something, but this is a really basic version.

EDIT:
plugin removed due a minor mistake, download the one from caetyril below!.
 
Last edited:

caethyril

^_^
Global Mod
Joined
Feb 21, 2018
Messages
2,764
Reaction score
2,114
First Language
EN
Primarily Uses
RMMZ
@ShadowDragon close, but not quite. :kaoswt: Yours adds a couple of extra commands: it invokes the original method (all four commands) then adds two more. It works as intended if you don't call the original method, but that will conflict with other plugins that alter this method.

Instead, I suggest aliasing that window's addCommand method: when a command is added to the item category window, first check whether the command's symbol should be skipped. If it shouldn't, then go ahead as normal; otherwise, do nothing. :kaohi:

See attachment~
JavaScript:
/*:
 * @plugindesc Remove specific item categories
 * @author Caethyril
 * @help Free to use and/or modify for any project!
 */

(function(alias) {
    var IGNORE = ['armor', 'keyItem'];  // <- edit to change ignored categories
    Window_ItemCategory.prototype.addCommand = function(name, symbol, enabled, ext) {
        if (IGNORE.indexOf(symbol) < 0) alias.apply(this, arguments);
    };
})(Window_ItemCategory.prototype.addCommand);

// Change column count (default 4).
Window_ItemCategory.prototype.maxCols = function() { return 2; };
 

Attachments

  • removeItemCats.js
    553 bytes · Views: 4

kaitoes

Villager
Member
Joined
Jul 26, 2021
Messages
16
Reaction score
3
First Language
English
Primarily Uses
RMMV
Thanks a ton guys! Great code!!
This may be stupid but where should I put the js files?
 

caethyril

^_^
Global Mod
Joined
Feb 21, 2018
Messages
2,764
Reaction score
2,114
First Language
EN
Primarily Uses
RMMZ
They're plugins; import them like any other plugin. Here's a relevant section from the RMMV help:


Or this guide (it's for RMMZ but the importing part is the same as in RMMV):
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
43,392
Reaction score
15,206
First Language
English
Primarily Uses
RMMV

I've moved this thread to Plugin Requests. Thank you.

 

ShadowDragon

Realist
Veteran
Joined
Oct 8, 2018
Messages
4,421
Reaction score
1,683
First Language
Dutch
Primarily Uses
RMMV
@caethyril I checked your code and is different in mind, also a friend
point out to remove the alias and just rule out the other 2 which was a mistake
on my end, and had to much on my end, but your code looks intresting as well.

but I keep learning how some things are done.
Thank you for the change required, (I will remove mine to avoid confusion).
 

Latest Threads

Latest Profile Posts

Is it weird that i feel overwhelmed from reading codes that i wrote few months ago? Lol.

I dont even know where to continue!:hsad:
Ami
Gosh,I want to Play this Game Again one more again!

Seeing my Own Character & Kannono Once Again!
Tales_of_the_World_Radiant_Mythology_3_JPN_PSP-Coverart.jpg
I've been a bit to depressed to get work done on the game lately. Don't worry, I'll be okay.
LunarFlareStudios wrote on Solar_Flare's profile.
Hey, my name is Lunar Flare Studios, and you're Solar Flare? That's so weird!

Forum statistics

Threads
115,301
Messages
1,088,750
Members
149,943
Latest member
Chymora
Top