RMMV (SOLVED)Question reguarding executing common event before victory screen (Yanfly victory aftermath)

Status
Not open for further replies.

Kaymon145

Veteran
Veteran
Joined
Apr 22, 2022
Messages
34
Reaction score
17
First Language
English
Primarily Uses
RMMV
Hello all, I will start with what I am trying to do I am using Yanfly victory aftermath and it shows the actors portraits along with their experience gained and so on. I'm trying to execute a common event BEFORE that screen comes up to change my actors portraits, I've looked for plugins that execute common events upon victory but they all seem to either activate after the victory screen pops up or upon travelig back to the map. I tried editing the code of victoryAftermath by adding this line:
$gameTemp.reserveCommonEvent(20);
into multiple places but it either triggers at the start of battle or after battle on the map screen. I feel like I've moved it all over the place but some of the places i tried it were:
BattleManager.startVictoryPhase = function() {
$gameTemp.reserveCommonEvent(20);
this._victoryCheerWait = 0;
this._victoryStep = 0;
this.prepareVictoryInfo();
};

which dosent activate till map screen and :
BattleManager.processVictory = function() {
$gameTemp.reserveCommonEvent(20);
$gameParty.performVictory();
if (this.isVictoryPhase()) return;
if (this._windowLayer) this._windowLayer.x = 0;
$gameParty.removeBattleStates();
this._victoryPhase = true;
if ($gameSystem.skipVictoryAftermath()) {
this.processSkipVictory();
} else {
this.processNormalVictory();
}
};

which has the same effect, I'm also using yanfly battleenginecore and have tried putting it here:
Yanfly.BEC.BattleManager_processVictory = BattleManager.processVictory;
BattleManager.processVictory = function() {
$gameTemp.reserveCommonEvent(20);
this._logWindow.clear();
this._victoryPhase = true;
if (this._windowLayer) this._windowLayer.x = 0;
Yanfly.BEC.BattleManager_processVictory.call(this);
};
but this one has no effect... If anyone sees what I'm doing wrong here or has a better idea on how to go about doing this I would love to hear it.. I'm getting so sick of fighting this same battle over and over again just to see if my common event activates lol
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
4,930
Reaction score
3,131
First Language
English
Primarily Uses
RMMV
If you use Hime's plugin to be able to run a troop event at the end of battle, you should be able to make one that runs when all enemies are dead and that would happen before the aftermath scene.
 

Kaymon145

Veteran
Veteran
Joined
Apr 22, 2022
Messages
34
Reaction score
17
First Language
English
Primarily Uses
RMMV
Hmmm that does seem to be exactly what I'm looking for but I can only find the script for RGSS3?
https://himeworks.com/2013/05/post-battle-events/ <--this is the one that keeps coming up in the searches, is there an updated version for MV that I'm missing somewhere?
If you use Hime's plugin to be able to run a troop event at the end of battle, you should be able to make one that runs when all enemies are dead and that would happen before the aftermath scene.
EDIT: Nevermind I think I found the right one you were talking about, anyone else who is interested can find it here
after struggling a bit to get it to work I realized I was running a conditional branch with the script

($gameTroop.isAllDead() ....Including the extra ( at the beginning... doh.. Just goes to show how one misplaced symbol can really wreck your whole code haha. It is now working as intended and we can mark this thread as SOLVED. I appreciate all the help lately ATT_Turan, you've been a huge help with my current project!
 
Last edited:

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
9,828
Reaction score
6,250
First Language
Dutch
Primarily Uses
RMXP

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

Latest Threads

Forum statistics

Threads
124,349
Messages
1,162,944
Members
163,147
Latest member
onbetme
Top