Christoph

Villager
Member
Joined
May 24, 2019
Messages
9
Reaction score
0
First Language
German
Primarily Uses
RMMV
Hi there,

I'm having a question that concerns Victor Saints VE_ActiveTimeBattle system. I wanted to include the feature to be able to switch between ATB ready characters by pressing "left" or "right".

I came quite far already, the only thing I'm missing is to (really) change the character. I can only manage to switch the character so that the new one steps forward, but the Actor command window (Window_ActorCommand) doesn't update.

So for example I'm having Char1 with skills named "Technique" and Char2 with skills named "Black Magic" and Char1 is ATB ready. I press my button to switch to Char2 who is also ready for input. He steps forward, but it still shoes "Technique" under skills. I of course get an error if I want to execute that. If I would only "Attack" it would work, since all characters use the same skill therefor.

Here is my code snipped that I inlcuded in Victors UpdateBattleManager function:


VictorEngine.ActiveTimeBattle.updateBattleManager = BattleManager.update;
BattleManager.update = function() {
VictorEngine.ActiveTimeBattle.updateBattleManager.call(this);
this.updateAtb();

//Start of my new code
if (this.actor()) {

if (Input.isTriggered('right')) {
SoundManager.playCursor();
currentActorID = this.actor()._actorId;
currentReadyActors = this.atbReadyActors();
currentMaxMembers = this._allAtbMembers.length;
var newCharacter;

//search for ATB ready character from current char till last char in party
for (var i = currentActorID; i < this._allAtbMembers.length; i++) {
if (this.isAtbReady(this._allAtbMembers)) {
newCharacter = this._allAtbMembers;
break;
}
}

//if no ATB ready character was found so far search from first char till current char in party
if (!newCharacter) {
for (var i = 0; i < currentActorID - 1; i++) {
if (this.isAtbReady(this._allAtbMembers)) {
newCharacter = this._allAtbMembers;
break;
}
}
}

//We found another ATB ready char (that is not the current one)
if (newCharacter) {
//That is the part of the code where I don't really know how to properly change the char right.
newCharacter.clearExpiredStates();
newCharacter.makeActions();
this.refreshStatus();
this.displayAtbStateMessages(newCharacter);
var index = $gameParty.members().indexOf(newCharacter);
if (index >= 0) {
AudioManager.playSe(VictorEngine.ActiveTimeBattle.ATBReadySound);
this.changeActor(index, 'inputting');
}

}

}

if (Input.isTriggered('left')) {
//insert second part of code after "right" works
}

}


};



Notes: I found out that there must either exist a function in Victors Scripts or in the base RPG Maker MV Scripts. I am actually also using Moghunters BattleHud and BattleCommand Plugin. But those don't interfere as far as I could figured out (I disabled the plugins and tried, but yet the same issues.
 

Christoph

Villager
Member
Joined
May 24, 2019
Messages
9
Reaction score
0
First Language
German
Primarily Uses
RMMV
Solved, didn't know Victor included the possibility to change between ATB ready characters by pressing the ESC button.
 

Latest Threads

Latest Posts

Latest Profile Posts

Finished reworking the design of my Itch.io page <3 Back to making plugins.
I kind of want make a map that's just giant version of the player that's they're running around on. Either by stringing together multiple maps or just by shrinking the player sprite for those maps. Actually that might make a fun reveal... The player's on a normal looking map, but then as realization dawns on them it zooms out to show a much larger map that's a giant version of the player. :LZSexcite:
Do you like to practice level design? I do hahahaha! It's not from a specific game, it's just some tests...Fase 1.png
I really need a better indicator of where you can jump up and down though I feel... otherwise I like how this turned out for the first part of the first dungeon of the game.
@Shaz needs to make a website for his plugins. (it can be done easily for free with google sites.) I can't find a database of them anywhere!

Forum statistics

Threads
109,130
Messages
1,042,401
Members
141,628
Latest member
Ocarina654
Top