RMMV Disabling attack command

Destra47

Veteran
Veteran
Joined
Jul 14, 2020
Messages
36
Reaction score
17
First Language
English
Primarily Uses
RMMV
I'm trying to disable (not remove) the attack battle command when the player is under a certain state. Works fine for sealing "guard", but not for attack.

I notice even if I go into rpg_windows.js and change
this.addCommand(TextManager.attack, 'attack', this._actor.canAttack());
to
this.addCommand(TextManager.attack, 'attack', false);
it's still enabled. The code is definitely being run, too, because if I just comment it out the attack command does disappear.

Is there something really obvious I'm missing here?

I tried HimeWorks' battle command plugin and that let me seal the command, but it wrecked havoc on the ring menu plugin I'm using.

EDIT: I was finally able to get it to work by adding
this._list[0].enabled = !this._actor.isSkillSealed(1);
to the end of Window_ActorCommand.prototype.makeCommandList. But it's a REALLY messy duct-tape solution. Surely there's something a bit...smarter.
 
Last edited:

Ami

World Maker
Veteran
Joined
Jul 12, 2019
Messages
46
Reaction score
363
First Language
English
Primarily Uses
RMMV
go to Traits > Skill > Seal Skill > Attack
 

Destra47

Veteran
Veteran
Joined
Jul 14, 2020
Messages
36
Reaction score
17
First Language
English
Primarily Uses
RMMV
go to Traits > Skill > Seal Skill > Attack
I'd already done that, hence the check for "this._actor.isSkillSealed(1)", but the command was still showing as enabled. Even if I bypassed that check entirely and setup the command with the enabled argument as "false" it still showed as enabled.
 

Dopan

Veteran
Veteran
Joined
Mar 27, 2020
Messages
542
Reaction score
255
First Language
German
Primarily Uses
RMMV
As Example:
The SRPG system has its own ActorBattleComands and i added GameSwitches to each of them..
ill show how i did that with Imgs and i will show where you can do the same for the "normal" default rpg system^^

here what i did in SRPG :
Screenshot_4.png
-
Screenshot_3.png
-
Screenshot_2.png
-
here is where you can do the same in the default system:
Screenshot_1.png
If you need more detailed Infos pls let me know i can explain it step by step if needed^^.
I hope that helps.
Edit
If you are not familiar with JS i could edit a RPG Windows Plugin and send it to you..
(i asume that this is allowed but im not sure,..)
=> that edited RPG Windows Plugin will have Switches in its Parameters where you will have to insert the GameSwitches IDs..
Edit2
Sry i forgot that you dont want to remove the Command , this solution will Add or Remove the Command depending on the GameSwitch.Also this solution will Add or Remove the Command for all Actors .
( I dont know how to Disable but still show the Attack Command sry)
 
Last edited:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.
Can someone recommend some fun story-heavy RPGs to me? Coming up with good gameplay is a nightmare! I was thinking of making some gameplay platforming-based, but that doesn't work well in RPG form*. I also was thinking of removing battles, but that would be too much like OneShot. I don't even know how to make good puzzles!
one bad plugin combo later and one of my followers is moonwalking off the screen on his own... I didn't even more yet on the new map lol.

Forum statistics

Threads
106,034
Messages
1,018,446
Members
137,820
Latest member
georg09byron
Top