Disallow Usage of Items for specific Actor / Class?

Aerosys

Veteran
Veteran
Joined
Apr 23, 2019
Messages
533
Reaction score
504
First Language
german
Primarily Uses
RMMZ
Somebody has a quick solution or Plugin in which I can forbid access to use Items for specific Actors or Classes? I want specific Actors to behave like summons or pets (beastmastery). If not, I would quickly write a Plugin for myself, but maybe someone already has some tips.
 

ShadowDragon

Veteran
Veteran
Joined
Oct 8, 2018
Messages
3,849
Reaction score
1,463
First Language
Dutch
Primarily Uses
RMMV
there is one that forbid Equips though, but not items or skills,
skills specific might be one of yanfly plugins though, but still,
there is not for items.

combine armor, skills, items etc in 1 plugin is better than using 3 for the same purpose :p
 

JamesRyan

Game Designer
Veteran
Joined
Sep 13, 2014
Messages
704
Reaction score
224
First Language
Vietnamese
Primarily Uses
RMMV
I think Yanfly's Item Requirements can help do this. It provides you a way to forbid item usage via pieces of codes putting into the item's note tag. Take a look and follow his instructions on how to set up, and I hope your problem can be resolved.
 

Aerosys

Veteran
Veteran
Joined
Apr 23, 2019
Messages
533
Reaction score
504
First Language
german
Primarily Uses
RMMZ
I think Yanfly's Item Requirements can help do this. It provides you a way to forbid item usage via pieces of codes putting into the item's note tag. Take a look and follow his instructions on how to set up, and I hope your problem can be resolved.
Good tip! But it's not exactly what I was looking for. I wish to remove or disable the "Use Item" Command during Battle completly when a pet is selected. Okay then I just do it by myself, it shouldn't be too difficult.

If anyone finds this thread because he has the same issue, after some years or whatever, feel free to contact me.
 

id0

Villager
Member
Joined
May 28, 2013
Messages
27
Reaction score
5
First Language
Russian
Primarily Uses
N/A
Good tip! But it's not exactly what I was looking for. I wish to remove or disable the "Use Item" Command during Battle completly when a pet is selected. Okay then I just do it by myself, it shouldn't be too difficult.

If anyone finds this thread because he has the same issue, after some years or whatever, feel free to contact me.

Were you able to do it?
 

Aerosys

Veteran
Veteran
Joined
Apr 23, 2019
Messages
533
Reaction score
504
First Language
german
Primarily Uses
RMMZ
Were you able to do it?
In the mean time I just programmed a Plugin that disables Item Command for any Actor except the first one, as I had only one Protagonist and the rest were pets. Super simple but works fine for me :)

If I need it to be more flexible I could extend it.
 

id0

Villager
Member
Joined
May 28, 2013
Messages
27
Reaction score
5
First Language
Russian
Primarily Uses
N/A
In the mean time I just programmed a Plugin that disables Item Command for any Actor except the first one, as I had only one Protagonist and the rest were pets. Super simple but works fine for me :)

If I need it to be more flexible I could extend it.

Can you share the code? I have some item (vodka for example) only special actor can use. But in the game menu.
 

Aerosys

Veteran
Veteran
Joined
Apr 23, 2019
Messages
533
Reaction score
504
First Language
german
Primarily Uses
RMMZ
Sure, but I don't think it fits your needs. But I can think about making a more flexible Plugin ;)

Code:
// Override
Window_ActorCommand.prototype.addItemCommand = function() {
    if (this._actor && this._actor._actorId == 1)
        this.addCommand(TextManager.item, 'item');
};

As you can see, it just overrides the Battle Menu and removes Item Command when the actor Id is not 1.
 
  • Like
Reactions: id0

id0

Villager
Member
Joined
May 28, 2013
Messages
27
Reaction score
5
First Language
Russian
Primarily Uses
N/A
A, I see. Thanks anyway)
 

Latest Threads

Latest Posts

Latest Profile Posts

If there was an award for best game dev procrastination, I'd say 'meh, I'll pick it up tomorrow' >_>
Honestly though, I've been staring at the same half-made map for a while now haha! Ahhh, I'm so tired of mapping!
Time to add the support for import/export default RMXP maps. Maybe there will be customized tileset support later. In theory, I can reimplement the entire RMXP inside this RMXP-made game to make more RMXP games. :kaojoy:RMXPFORMATSUPPORT.jpg
Gonna make a story driven game someday in RPG Maker about this diseased character in my head. Will keep you posted, although I was warned by the authorities that posting too much would be considered 'spamming' so I WON'T SPAM. It'll be before I go in anyways. It's gonna be messed up but it won't be explicitly pornographic so don't worry, I'll give all the content warnings. :barf::barf::barf:
If you're a RM plugin developer, and you're reading this...

Thank you. You're awesome. Even if I haven't used your plugin, your work is appreciated.

Forum statistics

Threads
111,265
Messages
1,059,727
Members
144,557
Latest member
Goruto_Wizzard
Top