Yanfly's Battle Engine Ace + Hime's Enemy Reinforcements Bug?

Discussion in 'RGSSx Script Support' started by Raythalos, Nov 15, 2014.

    Tags:
  1. Raythalos

    Raythalos Just a regular Alicef@g~ Veteran

    Messages:
    54
    Likes Received:
    0
    Location:
    Gensokyo
    First Language:
    Indonesian
    I'm using Yanfly's Death Common Events script right now, (which triggers a common event every time an enemy dies in battle)

    Mostly I never noticed this because most of the common events I used are single enemy based (boss death) or variable based (adding enemy kill count) but after an extensive usage of it in making a Multi-Man Smash styled fight where you have to beat 100 enemies, (utilizing Hime's Enemy Reinforcements script and Battle Rules) I've started to notice the quirks.

    The common events sometimes will not trigger.

    At first I thought it was because, "Well, 100 enemies, it will eventually lag and die out probably so I'll just reduce it..." but I noticed the bugs started happening as early as the third kill (and the enemies hasn't actually respawned yet. The troop starts with 4 enemies.)

    Then I thought it was something wrong with Yanfly's Enemy HP Bar script since the HP bars sometimes bug out and not pop up when an enemy is dying and then popping up simultaneously after the turn ends, but removing it had no result.

    And then after that I thought it was the fancy animations from moghunter for enemy spawns but disabling that had no effect either.

    Changing the death common event to only modify a variable and then calling a separate common event per turn to respawn depending on how many opponents were killed that turn via that variable did not work.

    I already put the script as low as possible with my other scripts as well, and it only used aliases and new methods.

    Can anyone help me with this?

    EDIT: Also, killing the enemies with F8 always triggers the common event. Does it have anything to do with Yanfly's Battle Engine? As far as I know perform_collapse_effect is generally unchanged...

    EDIT2: It seems the bugs start to occur when I add enemies into the battle through Enemy Reinforcements.

    EDIT3: An example https://mega.co.nz/#!GdlVCAKC!Qx94oGwdAErKNzp9dIik44bx1mp8vVum627ihJC2spw

    EDIT4: Editted the title of the topic in light of new info
     
    Last edited by a moderator: Nov 16, 2014
    #1
  2. Tsukihime

    Tsukihime Veteran Veteran

    Messages:
    8,230
    Likes Received:
    3,062
    Location:
    Toronto
    First Language:
    English
    Last edited by a moderator: Nov 16, 2014
    #2
  3. Raythalos

    Raythalos Just a regular Alicef@g~ Veteran

    Messages:
    54
    Likes Received:
    0
    Location:
    Gensokyo
    First Language:
    Indonesian
    The chance of it occuring is pretty random but it usually happens at the 10 or so mark in the demo (less than 4 in my original project)

    During my own testing earlier, some slimes do not disappear on death. Their sprites are still there, but they can't be selected. Eventually running out of slimes you can select, the game crashes.

    EDIT: I added the script and it seems to be working in fixing the common events, but if only one enemy is present. I don't use any multi-targetting skills but they're still not running sometimes. I'm not really sure what's wrong anymore- I even tested it with only one battler and only used a single targetting attack per turn.
     
    Last edited by a moderator: Nov 16, 2014
    #3
  4. Tsukihime

    Tsukihime Veteran Veteran

    Messages:
    8,230
    Likes Received:
    3,062
    Location:
    Toronto
    First Language:
    English
    When I took out yanfly's battle engine, all of the enemies seem to be spawning correctly. I'm not sure what that might be.


    Basically, I kill slime A, and that creates slime E.


    I then kill slime B, but slime B doesn't disappear. As a result, the death event is not called (because the death event is triggered by the collapse effect, rather than on death).


    It seems like when a new enemy appears, an existing enemy no longer collapses.


    This can be consistently reproduced by first killing slime A, and then killing slime B.


    If you kill slime B first, then it dies and slime E is created, but slime C doesn't collapse.


    If you skill slime B and then slime A, they both collapse, and two slimes are created. However, slime C and slime D do not collapse anymore.


    Either I'm supposed to be doing something special when a new enemy enters the battle, or there's something wrong with the way the battle engine handles new enemies.
     
    Last edited by a moderator: Nov 16, 2014
    #4
  5. Raythalos

    Raythalos Just a regular Alicef@g~ Veteran

    Messages:
    54
    Likes Received:
    0
    Location:
    Gensokyo
    First Language:
    Indonesian
    The errors only start when I call in Enemy Reinforcements in general with the Ace Battle Engine on, including the slime I sent you earlier.

    [​IMG]

    This was the only event page in the troop

    [​IMG]

    And the slimes I used in that troop doesn't have any death common events.

    My guess is probably how the battle engine handles collapsing, but I might be wrong.

    Pressing F8, the debug option given by the battle engine to instantly kill all enemies in the map works even without the common event queue script which calls:

    for enemy in $game_troop.alive_members      enemy.hp = 0      enemy.perform_collapse_effectendEDIT:

    I would go with the latter.

    EDIT2: I found a temporary solution!

    Removing a line in Yanfly's Battle Engine from

    def can_collapse? return false unless dead? unless actor? return false unless sprite.battler_visible array = [:collapse, :boss_collapse, :instant_collapse] return false if array.include?(sprite.effect_type) end return trueendinto

    def can_collapse? return false unless dead? unless actor? array = [:collapse, :boss_collapse, :instant_collapse] return false if array.include?(sprite.effect_type) end return trueendseems to be making it work perfectly, but I'm not sure what this will do to the engine in the long run.
     
    Last edited by a moderator: Nov 16, 2014
    #5

Share This Page