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,514
Reaction score
1,734
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,514
Reaction score
1,734
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,854
Reaction score
2,191
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,854
Reaction score
2,191
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,737
Reaction score
15,309
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,514
Reaction score
1,734
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

Doing RPG Maker News for 24th October 2021

I'm not sure how to do this so I'll just ask here, Wheres a good place to post your game (for free) once its done?
I don't know what I'm doing :D
So got my hearing tested to see if it was the cause of my mishearing what people say. Test showed no problems but talked with the doctor about anxiety and ADHD causing hearing issues and she agreed and also added that some people hear things differently. With my anxiety cause I am in fight or flight I pay attention to all the sounds in the area so body knows when react. Can't pay attention to one source.

Forum statistics

Threads
116,057
Messages
1,095,401
Members
151,418
Latest member
MythologixGD
Top