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
7,753
Reaction score
5,511
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
10,116
Reaction score
6,400
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

Latest Profile Posts

Hearing or saying ''Wife'' and/or ''Husband'' makes the persons involved sound so old, but they could literally be like 18 xD
Shoot.gif
Because The Fury from Metal Gear Solid 3 is one of my favorite bosses of all time, I felt the need to make a somewhat similar boss for my own game. taking cues from both the Fury and another awesome astronaut boss, Captain Vladimir from No More Heroes 2.
RE4make almost had me with their demo until I got to the dog stuck in a bear trap and realized that he was dead and could no longer be saved. Just not the kind of reimagining I'm interested in.
Here's some dudes that I'm drawing for Jimmy's Quest!
autredo.png
Autism Acceptance Month 2023!

Forum statistics

Threads
130,027
Messages
1,207,133
Members
171,294
Latest member
asdy2518
Top