Run Common Event before EXP Scene

Daniel B

Hidden Kitten
Veteran
Joined
Dec 8, 2012
Messages
64
Reaction score
14
First Language
Swedish
Primarily Uses
Hello, first off, I just wanna say that I've had no luck finding or making a solution to my problem, but if there's something I've missed or a simple answer, then please call me out on how dumb I am.

To explain the title better; I want a certain Common Event to run after all enemies are dead, but before the EXP window appears.
The reason for this, is that I've (somehow) managed to put together a Summon, that first attacks when summoned, stays for the rest of the turn, and then leaves.

My problem?
Well, I've chosen to go with tinting the screen and hiding the battle hud (to make the summon feel more visual, etc.), but if the Summon kills the last target (or all at the same time), then I have no way of returning the battle hud and tint before the EXP window appears, which it doesn't because I've hidden it.

Visual aid:
SummonNoWindow.png

I'm using a lot of scripts, but I think the most important ones in this instant is:
Yanfly's Battle Core + Action Sequence 1-3 http://yanfly.moe/yep/
SRD's Summon Core + Replace Summons http://sumrndm.site/mv-plugins/

I've tried different plugins, eventing it, and even gave script calling a shot, but no dice. I am way of my league here, and could really use some help.

This is gonna sound rude of me, but all I really want is a way to check if all enemies are dead, and if they are, I want to run a Common Event before the Victory Screen/EXP Window is suppose to appear. I've been pulling my hair out for the past 6h...

I really hope this is enough information, thanks in advance.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,355
Reaction score
7,669
First Language
German
Primarily Uses
RMMV
There are some existing plugins that add other triggers to troop events, including end-battle-triggers for running troop events after all enemies are dead. That should allow you to do whatever you want.
 

Daniel B

Hidden Kitten
Veteran
Joined
Dec 8, 2012
Messages
64
Reaction score
14
First Language
Swedish
Primarily Uses
There are some existing plugins that add other triggers to troop events, including end-battle-triggers for running troop events after all enemies are dead. That should allow you to do whatever you want.
Could you give me an example? I can't seem to find anything, at least not for MV.

While I was eating, I thought about a work around. I could always just make the enemies Immortal when the summon is up, but that is really a lazy way of fixing it, and it would be kinda boring if your strongest magic attack can never kill a target.
 

Ahuramazda

Veteran
Veteran
Joined
Nov 9, 2012
Messages
262
Reaction score
127
First Language
English
Primarily Uses
RMMZ
If you're using Yanflys Victory Aftermath, find this section and add in the edited line:

Code:
BattleManager.processVictory = function() {
    $gameScreen.startTint([0, 0, 0, 0], 15) // Edit: Puts screen tint back to normal in 15 frames
    $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();
    }
};
You can change the 15 frames thing all the way down to 1 if you want, but it may be a bit jarring depending on the darkness back to normal shift, lol
 

Daniel B

Hidden Kitten
Veteran
Joined
Dec 8, 2012
Messages
64
Reaction score
14
First Language
Swedish
Primarily Uses
If you're using Yanflys Victory Aftermath, find this section and add in the edited line:

Code:
BattleManager.processVictory = function() {
    $gameScreen.startTint([0, 0, 0, 0], 15) // Edit: Puts screen tint back to normal in 15 frames
    $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();
    }
};
You can change the 15 frames thing all the way down to 1 if you want, but it may be a bit jarring depending on the darkness back to normal shift, lol
Well, there's 2 problems with this. 1) The Hud doesn't get enabled again, and 2) The tint won't be right. (This is my bad, didn't think it was important, but I use different tints so I'm using a plugin that "saves" tints so I can reload them, like the built in Save BGM)

I don't know much about coding, but that "BattleStates", would it be possible to have so the game removes States (like poison) earlier?
Because that's how it normally turn the hud and tint back, by having a special State go out, it turns on the common event.

Would that be possible?

Edit: I thought of another way I could do it, X% of current HP. That way, summons can't kill the targets, though their attack gets weaker the lower hp the enemy have.
 
Last edited:

Capitán

kind of a big deal
Veteran
Joined
Jul 9, 2013
Messages
572
Reaction score
145
First Language
Engilsh
Primarily Uses
RMMV
Wrote a simple plugin for you in about 5 minutes,

Just put the id of the common event you want to run in the parameters and you should be good.
 

Attachments

Daniel B

Hidden Kitten
Veteran
Joined
Dec 8, 2012
Messages
64
Reaction score
14
First Language
Swedish
Primarily Uses
Wrote a simple plugin for you in about 5 minutes,

Just put the id of the common event you want to run in the parameters and you should be good.
Hey, this seems to work perfectly! I only have to do some light eventing, but that's fine.
Thanks a lot, Yuuta!
 

Ahuramazda

Veteran
Veteran
Joined
Nov 9, 2012
Messages
262
Reaction score
127
First Language
English
Primarily Uses
RMMZ
Yeah, my idea was only gonna work if you wanted to just re-tint back to normal and not using anything custom :p glad someone was able to assist though :)
 

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

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,853
Messages
1,016,986
Members
137,561
Latest member
visploo100
Top