I would try testing the button with something else like a show picture or an abort battle command to see if it works at all
Custom Battle Buttons
RPG Maker MZ SupportSolved!
IT WORKS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
So the attack script is working with the button now?
correct! now i just need the skill, item, and guard, which will probably be easier now that i kinda know what to do?
Guard should be just as easy but skills might be a little more difficult
got guard working!
for skill, this is the code im using
SceneManager._scene._skillWindow.setActor(BattleManager.actor());
SceneManager._scene._skillWindow.setStypeId(SceneManager._scene._actorCommandWindow.currentExt());
SceneManager._scene._skillWindow.refresh();
SceneManager._scene._skillWindow.show();
SceneManager._scene._skillWindow.activate();
SceneManager._scene._statusWindow.hide();
SceneManager._scene._actorCommandWindow.hide();
and it pulls up a skill window, just with nothing on it, but here's the insane part, when i hover over the "special" button on the normal UI, and then click the button, it pulls up that actors skill window! but if i hover over anything else, it pulls up a skill window with nothing in it.
for skill, this is the code im using
SceneManager._scene._skillWindow.setActor(BattleManager.actor());
SceneManager._scene._skillWindow.setStypeId(SceneManager._scene._actorCommandWindow.currentExt());
SceneManager._scene._skillWindow.refresh();
SceneManager._scene._skillWindow.show();
SceneManager._scene._skillWindow.activate();
SceneManager._scene._statusWindow.hide();
SceneManager._scene._actorCommandWindow.hide();
and it pulls up a skill window, just with nothing on it, but here's the insane part, when i hover over the "special" button on the normal UI, and then click the button, it pulls up that actors skill window! but if i hover over anything else, it pulls up a skill window with nothing in it.
Item works perfectly, so i just need skill. any way to specify which actor's menu it is?
You need to replace this with a numerical value representing the skill type
YAY it works!!!! there's unfortunately no way for me to make it use magic for 1 actor and special for another, right? it could even work if i could just change the picture to say magic instead. not required though, obviously.
There is always a way but it depends how you want the engine to determine that. If it's actor dependent you would put it in a conditional that checks for actor id and changes the value depending on the actor id.
another option could be to have it display special and magic, but i tried both
SceneManager._scene._skillWindow.setStypeId(1);
SceneManager._scene._skillWindow.setStypeId(2);
and
SceneManager._scene._skillWindow.setStypeId(1, 2);
what do you think the easiest way is? is there a way to display special and magic? or should i just use conditional?
SceneManager._scene._skillWindow.setStypeId(1);
SceneManager._scene._skillWindow.setStypeId(2);
and
SceneManager._scene._skillWindow.setStypeId(1, 2);
what do you think the easiest way is? is there a way to display special and magic? or should i just use conditional?
Doing this would just make the second command overwrite the first.
You can't arbitrarily pass two arguments into a function that's only written to accept one.
You would have to create a plugin to overwrite that section of the engine.
okay, I'll try conditional branches and if it doesn't work I'll just lump them both into "skill"
Final Question! how do you disable the normal command menu?
You would need a plugin. I can't think of one off hand as that's not a common request but you can search around.
are you sure? isn't there some quick code that disables the actor command window that you can easily put into plugins? i already did that with the party command window
If you're putting code in a plugin that's still using a plugin. It doesn't have to be a complicated one, it probably is just commenting out several lines of code, you just have to find which ones.
damn, i genuinely can't find one. i found people that asked for one so I asked them if they ever found a solution but idk
i found
function Window_ActorCommand() {
this.initialize(...arguments);
}
in scenes, but deleting it brings an error message, is there any way this helps?
This isn't something I can help you with because I don't have MZ. You basically would have to go through the core files to find out which ones are responsible for creating the menus or displaying them and comment out those lines. Commenting out the wrong lines will cause things to break because of dependencies so it's trial and error.
You can try asking in the Javascript thread or starting a new thread since it's a different issue than what the thread was originally about.
You can try asking in the Javascript thread or starting a new thread since it's a different issue than what the thread was originally about.
DW! I figured it out
Original thread: https://forums.rpgmakerweb.com/threads/custom-battle-buttons.173462/