[RMMV] Skill screen doesn't close when skill is used in battle

kayzorkross

Warper
Member
Joined
Mar 26, 2020
Messages
1
Reaction score
0
First Language
English
Primarily Uses
RMMV
Hey dream team,

I'm currently finalising the last component of my battle system alterations in RMMV.
It currently works like this:

Actor has two types of skills - CHAIN and FINISH. CHAIN skills are the ones I am trying to script for at the moment. I'm using YEP SkillCore & Instant Cast which means the player can use these skills multiple times in a single turn as long as they have enough MP.

When you select CHAIN skill using the Instant Cast plugin, the skill window still closes and returns to the actor command select. What I would like to try to do is have the skill select screen stay open so that more CHAIN skills can be selected in the single turn without having to constantly select the CHAIN command over and over. Instead I would like the player to close the skill select screen with the cancel button once they have used up their MP.

Now look... it is a small inconvenience to the player and this seems like it could be a lot of work for little gain, but it could also help the battle flow and intuitiveness of the system immensely.

Does anyone know where I should start or have some input on how I could achieve this?
 

Attachments

orcomarcio

Veteran
Veteran
Joined
Nov 26, 2015
Messages
104
Reaction score
20
First Language
Italian
you should look into the Scene_Battle windows, I don't know Yanfly and Instant Cast very well but you should create a plugin of yours to mess around with the code. What you are looking for is the command that gets called when you cast the chain skill. When the Scene creates the window it also add "handlers" to the commands of the window, basically it binds effects to the buttons. Example code:

Code:
Scene_Title.prototype.createCommandWindow = function() {
    this._commandWindow = new Window_TitleCommand();
    this._commandWindow.setHandler('newGame',  this.commandNewGame.bind(this));
    this._commandWindow.setHandler('continue', this.commandContinue.bind(this));
    this._commandWindow.setHandler('options',  this.commandOptions.bind(this));
    this.addWindow(this._commandWindow);
};
here for example this._commandWindow.setHandler('newGame', this.commandNewGame.bind(this)) basically sets the newGame button to execute Scene_Title.prototype.commandNewGame.
You can find these commands in rpg_scene or in the plugins you added (plugins often override previous functions.

So either in the plugins you use or in rpg_scenes you have to find the command of when you confirm the use of that skill, it will probably be something like this:
Code:
Scene_Battle.prototype.onEnemyOk = function() {
    var action = BattleManager.inputtingAction();
    action.setTarget(this._enemyWindow.enemyIndex());
    this._enemyWindow.hide();
    this._skillWindow.hide();
    this._itemWindow.hide();
    this.selectNextCommand();
};
as you can see the command closes the windows of that shows the skill (this._skillWindow.hide()) or something like that, you can maybe try to put a few of those closure in an if like "if I'm not using chain skills" or whatever conditions you want .
 

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

Latest Threads

Latest Posts

Latest Profile Posts

I based this on the armor of Actor 1_7 of the RTP. Hair is from Derex and Sythian Bard.
Stream will be live shortly! Going to do another art stream tonight so that I can finish my Fauna Focus piece~ Feel free to drop by!
Humans are fallible creatures, we all know that. It's when we're forced to look at ourselves that we start to disagree. :p
Expectation: Working on boss battle.
Reality: "Look at how awful are these code and database organization. Let me clean this mess", *yet, casually adding more modules that I have no idea if I would use it later*
Trying to learn to read Japanese so I read my manga. I like to buy them without all the edits made during translation.

Forum statistics

Threads
97,865
Messages
947,454
Members
129,087
Latest member
jubacard
Top