YEP Battle Engine: End Phase Events Not Working Properly

Status
Not open for further replies.

BreakerZero

Veteran
Veteran
Joined
Jul 8, 2018
Messages
871
Reaction score
355
First Language
English (USA)
Primarily Uses
RMMV
I was originally asking in this thread for advice on intercepting or working around the battle victory sequence in the event that all enemies that have the escape skill were to use it (and no other enemies remaining after the fact). That is to say, it should say something like "they got away from us" instead of the default battle clear message... but if even one enemy is slain, then proceed as normal. Unfortunately I'm not getting the game to read end events properly and have also tried adapting existing code to do this (which is obviously not always the best solution) and it completely blacks out the game with default scripts, nullifies Yanfly Victory Aftermath, etc.

Any help would be appreciated.
 
Last edited:

Wavelength

Edge of Eternity
Global Mod
Joined
Jul 22, 2014
Messages
5,404
Reaction score
4,799
First Language
English
Primarily Uses
RMVXA
You should be able to make a troop event play before the end of battle even once all the enemies have left/died, using Hime's End Phase Triggers. Based on the way this plugin is designed, I would think it would play just fine with stuff like Yanfly's Victory Aftermath.

You're still responsible for actually tracking whether enemies escaped, of course. I would probably do that by adding to a variable (using a Common Event feature that changes the variable, or something else like a Skill Core notetag) when the Escape skill is used, and then comparing that variable to the number of battlers that were originally in the troop, or something like that. You could use Switches to track it for specific enemies escaping, if you want.
 

BreakerZero

Veteran
Veteran
Joined
Jul 8, 2018
Messages
871
Reaction score
355
First Language
English (USA)
Primarily Uses
RMMV
I did some of these already, but of course everything came after the victory sequence. I don't anticipate the same of end phase, though for the purposes here I may need an example of how to set this up, particularly if I have to do it for each individual troop (which I would prefer to avoid if possible).

EDIT: I also forgot to mention that some of these are the result of Yanfly troop replacements (because actual, real and honest randomized opponents) so I'm not 100% on how to accommodate that.
 
Last edited:

BreakerZero

Veteran
Veteran
Joined
Jul 8, 2018
Messages
871
Reaction score
355
First Language
English (USA)
Primarily Uses
RMMV
Not sure if this counts as a "double post" exception or not, but I've got the basic structure programmed in. Unfortunately it's supposed to verify the matter based off the Yanfly skill core but seemingly it's like if even one enemy uses the skill (instead of all of them which it is supposed to verify) that it triggers without regard for how many enemies remain. I have each applicable troop set to count based on how many enemies there are using one variable, and the escape count is tracked with the other using a turn event (also in the applicable troops) that is programmed to report full evac which somehow isn't happening correctly.

The escape skill is set with the following notetag to calculate evac calls:
Code:
<After Eval>
  $gameVariables.setValue(45) += 1
</After Eval>


Here are the variable definitions:


45 is the escape count, and 44 is the troop count. What I have next is a verification at turn end to verify that the two are equal:


Theoretically, I should only be getting the "runaway" result if the entire troop flees, but if even one leaves in my setup it's still triggering. Any idea of what's going on?

EDIT: Looks like I accidentally forgot to turn on most of the initial configurations, however I'm still having trouble.

EDIT 2: I have now determined through debugging that it's not adding up at all (meaning literally). Specifically, it's an "Invalid left-hand side in assignment" problem based on the console log.

EDIT 3: It would help if I had the formatting corrected. Here's the code as it should be:
Code:
<After Eval>
  $gameVariables.setValue($gameVariables.value(45) + 1);
</After Eval>
EDIT 4: I now have it to where it's calculating things as it should, but end events is not triggering at all.
 
Last edited:

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
1,703
Reaction score
1,148
First Language
EN
Primarily Uses
RMMV
Troop event page 1 should have Condition: Turn 0. "Don't Run" means it will never trigger. I think that's what you noticed in your first edit. :kaoswt:

Try setting troop event page 2 to Span: Turn. "Battle" means it will only run once per battle, i.e. at the end of turn 1. :)

Also, I'm fairly sure Yanfly's Battle Engine Core allows for events at the end of battle, so if you're using that then Hime's plugin shouldn't be necessary (haven't tested though).
 

BreakerZero

Veteran
Veteran
Joined
Jul 8, 2018
Messages
871
Reaction score
355
First Language
English (USA)
Primarily Uses
RMMV
Noticed and fixed both, but it's still not working.

EDIT: I just realized that I had something similar from before (it involved an implosion overlay sequence when you defeat a boss) but it was in sideview mode. I'm not doing a side view with my current project, though obviously if I can hack something together then maybe that will make the difference. I will try that approach when I get back to work.

EDIT 2: Still nothing (plus it messes things up significantly anyway).
 
Last edited:

BreakerZero

Veteran
Veteran
Joined
Jul 8, 2018
Messages
871
Reaction score
355
First Language
English (USA)
Primarily Uses
RMMV
Okay, so after going back through all my work it looks like end-phase battle events are not firing at all. I actually determined this from an entirely unrelated setup (it's related to achievement popups that are under construction) so I'm going to have to change this from a plugin request to a support request.
 

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
6,997
Reaction score
4,740
First Language
Dutch
Primarily Uses
RMXP

BreakerZero, please avoid double posting, as it is against the forum rules. You can use the "Edit" function on your posts to add additional information you've forgotten or respond to multiple people. You can review our forum rules here. Thank you.


I've moved this thread to Plugin Suport. Please be sure to post your threads in the correct forum next time. Thank you.

 

BreakerZero

Veteran
Veteran
Joined
Jul 8, 2018
Messages
871
Reaction score
355
First Language
English (USA)
Primarily Uses
RMMV
Ultimately it turned out that I had a version issue with the Yanfly plugins that was causing unrelated behavior problems while implementing some presentation functions, and verifying that a popup related to an achievement that relates to defeating a boss showed up as expected (I specifically set it to a zero HP condition) confirmed that fixing the presentation design additions also fixed the battle events.

For the record, I was implementing enemy animations that didn't seem to work properly (or rather, they did but only on those for which I have a Dragonbones configuration - no frame-based animations were firing on those for which I only have sprite sheets). Only after I determined that I would have to use the versions from the reference project did I get things working properly, which in the most extreme of irony for this case also managed to fix the issues with my battle events. (Also, the battle core in general may have simply been misconfigured or generally corrupt from the very start of this.) So aside from unrelated timing issues, I think I finally have this under control.
 

Wavelength

Edge of Eternity
Global Mod
Joined
Jul 22, 2014
Messages
5,404
Reaction score
4,799
First Language
English
Primarily Uses
RMVXA

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.

Closed at OP's request, since unrelated changes to the project fixed the apparent issue.
 
Status
Not open for further replies.

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

Latest Threads

Latest Posts

Latest Profile Posts

Yanfly told me the new earth all animations in MZ look a bit like summoning potatoes and now I can't unsee it. halp
Despite time and all the other things I am working on, I decided that I am going to start a Fire Emblem-like project. Follow your dreams! I'll just have to balance hours efficiently. I'm also not making this as complex as my Might and Magic inspired project, so it will be a much easier project to work on.
So I've taken to doing a test of the game, and making a list of everything I think of during the test to add/fix. Over the course of the night I check them off as I do them, and by the end of the night I always feel like I've accomplished something. :LZSexcite:
Eventz MZ? Events MZ!

Forum statistics

Threads
100,586
Messages
977,521
Members
132,181
Latest member
Reich
Top