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,422
Reaction score
1,684
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,422
Reaction score
1,684
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,769
Reaction score
2,118
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,769
Reaction score
2,118
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,397
Reaction score
15,211
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,422
Reaction score
1,684
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

I normally only post these every 24 hours, but same-sex marriage is coming to Rune Factory 5 and I just wanted to share it with the world! https://www.xseedgames.com/2021/09/23/rune-factory-5-localization-blog-2/
Today was wild. In the day I worked in my project (and realized I have almost 100 hours wich is a happy surprise), and now i'm having to calm my boyfriend down because of chris pratt Mario.
Mr_Petue wrote on GamchiSamwise's profile.
hey pepe, why do you have a gun on your head? where is wojak?
Still alive! Totally did not finish in time for the Jam (boy that's late) but tl;dr of the last half a year is Work term -> Covid Lockdown -> Sick... again -> Full time Employment. Game stuff has been on hiatus but got a new graphics tablet so hopefully updates again soon. =D
Going on hiatus. Won't be back until mid October.:LZSoops:

Forum statistics

Threads
115,320
Messages
1,088,915
Members
149,967
Latest member
Phyll
Top