I want to completely remove the actor command window in battle. Unfortunately, all plugins I have tried using such as Visustella Battle Core only remove the party command window, not the actor command window. How would I go about doing this?
Completely remove actor command window in battle?
RPG Maker MZ SupportYour request makes no sense - if you only want autobattles without any input, either give all actors the autobattle trait or remove battles completely and simulate something with event commands.
I know what I'm asking for... I'm going to link skills to images using SRD's Hudmaker and script calls.
Then you should have said that you're replacing the actor command window.
I never used the HUD maker, but should it not have options to replace the entire battle HUD?
I never used the HUD maker, but should it not have options to replace the entire battle HUD?
It doesn't unfortunately.
SRD HUD Maker just makes picture and text overlays. They are not interactable, unless you use something like Yanfly/Visustella Picture Common Events to put invisible pictures on top of it that you can activate with click/touch, but then that makes the HUD kind of redundant because you could use pictures in the first place.
Otherwise, if you want keyboard/gamepad input control over the HUD Display "menu" you would have to have another plugin that lets you run parallel common events during battle based on button presses, and have to set that up.
Otherwise, if you want keyboard/gamepad input control over the HUD Display "menu" you would have to have another plugin that lets you run parallel common events during battle based on button presses, and have to set that up.
I see... How would I go about using Picture Common Events in battle?
You would need a plugin like this that lets you run parallel common events in battle to show the pictures, because normally you can only use the show picture command in certain instances.
This really is not a project for a beginner though as you're asking to create an entire new control system during the battle scene, and will require a fair amount of scripting to get the timing right on when things show up and when things happen.
Thanks for your reply! Perhaps I'll ask for a commission. :]
Just chiming in to emphasize this.
A lot of how battle works is tied into the battle scene and the progression of windows that it calls as you activate each part of it.
Trying to convert all of that into something event-based or replace the contents of the windows with image buttons instead of text labels is going to require some in-depth understanding of how it all works by default.
(actually, modifying the actor command window like that instead of trying to eliminate it from the process is probably the easiest way to achieve what you're looking for)
Why didn't I think of that! Thank you! :]
Depdending on how you want this to look (you didn't provide any kind of visual reference...), the way that I would personally do this is draw a brand-new window (or series of sprites, etc.) and directly tie their visual states to Window_ActorCommand.
Effectively the same concept as ATT_Turan suggested, except you aren't modifying Window_ActorCommand at all.
This also gives you a bit more freedom in the sense that you aren't trying to modify everything that the window inherits from Window_Selectable.
Your custom window and/or sprites can easily reference Window_ActorCommand's current visibility or index and update as needed.
Of course, you'd still need to update the actor command window to contain the appropriate commands.
Effectively the same concept as ATT_Turan suggested, except you aren't modifying Window_ActorCommand at all.
This also gives you a bit more freedom in the sense that you aren't trying to modify everything that the window inherits from Window_Selectable.
Your custom window and/or sprites can easily reference Window_ActorCommand's current visibility or index and update as needed.
Of course, you'd still need to update the actor command window to contain the appropriate commands.
And that's why Andar's first reply suggested it's better for you to present what you want to achieve, rather than skipping directly to how you think you should do it. 😉
If I don't know how to get to the grocery store, I'm not going to try to figure out myself that I can get there from Adams St. and then ask people to tell me where Adams St. is - I'm going to ask them how to get to the grocery store.
Ok ok I got it 🤣 Here's how my battle screen looks like currently:
I wanted to completely remove the actor command window so I could use images instead. These are the images I wanted to use.
I think it would be easier to modify the actor command window to look how I'm imagining, though. Thanks for the replies everyone. I see now that I'll need more experience before I try to tackle this task.
I wanted to completely remove the actor command window so I could use images instead. These are the images I wanted to use.
I think it would be easier to modify the actor command window to look how I'm imagining, though. Thanks for the replies everyone. I see now that I'll need more experience before I try to tackle this task.
What you want to show is not that far off from the way you have already set up the actor command window.
Hide the windowskin and you should be at least 75% of the way there, right?
Window_Selectable draws colored rects behind each item by default, as shown in the image of what you want to do. You can modify the drawBackgroundRect function to draw a solid-colored rect instead of the default gradient. Window_ActorCommand inherits the function from Window_Selectable:
The windowskin is inherited from Window_Base:
E.g.:
Unless you really want the outline thickness and rounded rect corners as shown, in which case I'd go with sprites. You can do rounded rects with Canvas, but you'll have an easier time just adding your images as sprites directly to Spriteset_Battle and updating them based on the actor command window's current state.
Edit: I zoomed in on your screenshot and I can see that the corners aren't rounded; they're more of the pixelated-style of rounding. You could totally draw that specific border using a series of rillRect() commands. Presumably you'd change the color of the border if the item is selected.
So, now that we have actual pictures of you want to do (14 posts later...), we've gone full circle and I would suggest directly modifying Window_ActorCommand.
Hide the windowskin and you should be at least 75% of the way there, right?
Window_Selectable draws colored rects behind each item by default, as shown in the image of what you want to do. You can modify the drawBackgroundRect function to draw a solid-colored rect instead of the default gradient. Window_ActorCommand inherits the function from Window_Selectable:
JavaScript:
Window_Selectable.prototype.drawBackgroundRect = function(rect) {
const c1 = ColorManager.itemBackColor1();
const c2 = ColorManager.itemBackColor2();
const x = rect.x;
const y = rect.y;
const w = rect.width;
const h = rect.height;
this.contentsBack.gradientFillRect(x, y, w, h, c1, c2, true);
this.contentsBack.strokeRect(x, y, w, h, c1);
};
The windowskin is inherited from Window_Base:
JavaScript:
Window_Base.prototype.loadWindowskin = function() {
this.windowskin = ImageManager.loadSystem("Window");
};
E.g.:
JavaScript:
Window_ActorCommand.prototype.loadWindowskin = function() {
};
Window_ActorCommand.prototype.drawBackgroundRect = function(rect) {
const c1 = ColorManager.itemBackColor1();
const c2 = ColorManager.itemBackColor2();
const x = rect.x;
const y = rect.y;
const w = rect.width;
const h = rect.height;
this.contentsBack.fillRect(x, y, w, h, '#000', true);
this.contentsBack.strokeRect(x, y, w, h, '#fff');
};
Unless you really want the outline thickness and rounded rect corners as shown, in which case I'd go with sprites. You can do rounded rects with Canvas, but you'll have an easier time just adding your images as sprites directly to Spriteset_Battle and updating them based on the actor command window's current state.
Edit: I zoomed in on your screenshot and I can see that the corners aren't rounded; they're more of the pixelated-style of rounding. You could totally draw that specific border using a series of rillRect() commands. Presumably you'd change the color of the border if the item is selected.
So, now that we have actual pictures of you want to do (14 posts later...), we've gone full circle and I would suggest directly modifying Window_ActorCommand.
Ok, I added the code to my game but the rectangles show up as light gray instead of white? Either way, it looks like what I envisioned so thank you for that :]
Also, how would I go about changing the color of the border when an item is selected?
Okay, TBH, a combo of being overtired and not knowing precisely what you wanted to do until numerous posts in has caused me to dispense some questionable advice. But since we've gone this far and the ACW is now closer to what you want, you can do this:
I realize I'm now contracting myself (twice, maybe?), but I'd still probably ultimately suggest that this be set up as I initially suggested in post #12 where these are drawn as independent sprites that update themselves based on the actor command window's current active state and index.
But that's a different approach, and I think I'm going to get a nap in before I embarrass myself further with more conflicting advice and bad code. :aswt2:
JavaScript:
Window_ActorCommand.prototype.loadWindowskin = function() { };
Window_ActorCommand.prototype.drawItemBackground = function(index) {
const rect = this.itemRect(index);
this.drawBackgroundRect(rect, index); // pass index to drawBackgroundRect
};
Window_ActorCommand.prototype.drawBackgroundRect = function(rect, index) {
let borderColor = '#fff';
if (index == this._index) borderColor = '#ffff00';
const fillColor = '#000';
const borderWidth = 2;
const c1 = ColorManager.itemBackColor1();
const c2 = ColorManager.itemBackColor2();
const x = rect.x;
const y = rect.y;
const w = rect.width;
const h = rect.height;
const x2 = rect.x + borderWidth;
const y2 = rect.y + borderWidth;
const w2 = rect.width - borderWidth * 2;
const h2 = rect.height - borderWidth * 2;
// not sure why strokeRect outputs semitransparent; the below will output sharper regardless
this.contentsBack.fillRect(x, y, w, h, borderColor);
this.contentsBack.clearRect(x2, y2, w2, h2);
this.contentsBack.fillRect(x2, y2, w2, h2, fillColor);
};
// for some reason (probably tired), I thought window_selectable repainted on select(). it doesn't.
// since your ACW only consists of 3 items, I'd just refresh() on select to update the border color.
// an alternative would be to draw a custom cursor sprite.
Window_ActorCommand.prototype.select = function(index) {
// select() fires a lot at battle start; throttle it to prevent repainting
if (index !== this._index) {
Window_Command.prototype.select.call(this, index);
this.refresh();
} else {
Window_Command.prototype.select.call(this, index);
}
}
I realize I'm now contracting myself (twice, maybe?), but I'd still probably ultimately suggest that this be set up as I initially suggested in post #12 where these are drawn as independent sprites that update themselves based on the actor command window's current active state and index.
But that's a different approach, and I think I'm going to get a nap in before I embarrass myself further with more conflicting advice and bad code. :aswt2:
Thank you so much, it worked!!!! 😀
I know this is an oooold thread but could you please explain how you would go about doing this? I want to replace the text in the actor command box to pngs. I would really appreciate the help.
Original thread: https://forums.rpgmakerweb.com/threads/completely-remove-actor-command-window-in-battle.160164/