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,401
Reaction score
1,679
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,401
Reaction score
1,679
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,748
Reaction score
2,100
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,748
Reaction score
2,100
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,344
Reaction score
15,158
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,401
Reaction score
1,679
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 Posts

Latest Profile Posts

Changed my avatar, goodbye Alan Sugar, hello George Carlin (one of my favorite human beings ever)
If you still don't subscribe our Polish channel please consider it :)
1.png
Who wants to see my review of the worst star wars movie? This movie has all the excitement of being on Jury Duty of the most boring case ever about trade negotiations.
A lot to learn to make a game. Can I handle it?
I've been working on status effects since last thursday, and today I finished the core mechanic of Zombie, Teleport, Curse and Recall. Zombie and Curse are lacking a few things to make them complete atm. Teleport though is the "HAHA" spell for some of my mobs, but can "NOPE" at them with Recall.

Forum statistics

Threads
115,171
Messages
1,087,797
Members
149,718
Latest member
MadAtticProductions
Top