Ao no Kiseki Battle System and Effect Manager Compatibility Fix

Discussion in 'RGSSx Script Support' started by Vis_Mage, Oct 28, 2018.

  1. Vis_Mage

    Vis_Mage Novice Magician Veteran

    Messages:
    388
    Likes Received:
    141
    Location:
    Ridge Island
    First Language:
    English
    Primarily Uses:
    RMVXA
    Hey,

    I've recently ran into a particularly pesky issue with two scrips pretty important scripts to my project:

    Saba Kan's Ao no Kiseki battle system: https://forums.rpgmakerweb.com/inde...-battle-system-0-28-and-rokans-at-bonus.1128/

    And Hime's Effect Manager: http://himeworks.com/2012/10/effects-manager/

    Attempting to use both Scripts causes states to not function properly.

    In short, the state timer doesn't seem to count. States can still be removed by damage% or by the end of battle just fine, but states set to end after X turns/actions never expire.

    As a note, I have Hime below Saba, as otherwise causes the player to be unable to make any actions.

    I really hope someone will be able to help me out here. If you need any more clarification, please bebe sure to ask!

    Thank you!
     
    #1
  2. Vis_Mage

    Vis_Mage Novice Magician Veteran

    Messages:
    388
    Likes Received:
    141
    Location:
    Ridge Island
    First Language:
    English
    Primarily Uses:
    RMVXA
    Spooky bump! :kaoswt2:
     
    #2
  3. Vis_Mage

    Vis_Mage Novice Magician Veteran

    Messages:
    388
    Likes Received:
    141
    Location:
    Ridge Island
    First Language:
    English
    Primarily Uses:
    RMVXA
    Bump :kaoluv:
     
    #3
  4. Vis_Mage

    Vis_Mage Novice Magician Veteran

    Messages:
    388
    Likes Received:
    141
    Location:
    Ridge Island
    First Language:
    English
    Primarily Uses:
    RMVXA
    Bump of love :kaoluv:
     
    #4
  5. MobiusXVI

    MobiusXVI Game Maker Veteran

    Messages:
    362
    Likes Received:
    84
    First Language:
    English
    Ok, so on its own the Ao no Kiseki battle system (hereafter ANK because that's too long to type repeatedly lol) disables states ending after X "turns" because turns no longer exist. In the default battle system (DBS), a turn consists of every actor and enemy taking one action, but since in ANK you have a rolling list of actions it simply disables the turn end condition. However, states ending after X "actions" should work fine as that is still calculated correctly, and actions are treated as an individual actor's (or enemy's) turn.

    As for Hime's Effects Manager (HEM), it on its own shouldn't impact how states can end - at least as far as I can tell.

    So try this for me: use only ANK and verify whether states work as expected/described above. Then, use only HEM and verify whether states work as expected. If you get unexpected results, then go ahead and remove both and see if the problem persists.
     
    #5
    Vis_Mage likes this.
  6. Vis_Mage

    Vis_Mage Novice Magician Veteran

    Messages:
    388
    Likes Received:
    141
    Location:
    Ridge Island
    First Language:
    English
    Primarily Uses:
    RMVXA
    Alrighty, did some testing, and can confirm that states work just fine when neither script are in the project. They also work fine if I have one but not the other, there's only issues if the two are together. Of particular note, the ANK battle system does work with turn-based states just fine, at least for me.

    I don't believe my copy is edited, as from what I can tell, it has the same line count, but here's my copy nonetheless. (Now in attached project)

    EDIT: Alright, did even more testing, and turns out the rabbit hole goes even deeper.

    Created a fresh project. The two scripts still don't play nice, but the ANK script acts like you expected it to. Turns out it only works the way I want it to when paired with Battle Symphony. I don't know what exactly is happening, I'm very confused :/

    Here's a demo with all the relevant script in it. If you keep Effect Manager, the guard state will never be removed from the actor. If you delete the Effect Manager script, the guard state is removed from the actor when they next get to act.
     

    Attached Files:

    Last edited: Nov 8, 2018
    #6
  7. MobiusXVI

    MobiusXVI Game Maker Veteran

    Messages:
    362
    Likes Received:
    84
    First Language:
    English
    I took a look, and this is what I found. First, I was wrong about how ANK handles states; it should work fine with turn-based states. Second, the issue does appear to be solely an incompatibility between ANK and HEM; I couldn't find any conflicts between them and Yami's Battle Symphony (YBS).

    So here's my fix that seemed to work in my testing. Open up HEM in the script editor, go to line 600 and replace this:
    Code:
      # new. Trigger turn start effects 
      def on_turn_start
        check_turn_start_effects
      end
    
    with this:
    Code:
      # new. Trigger turn start effects 
      alias :th_effect_manager_turn_start :on_turn_start #added by Mobius_XVI
      def on_turn_start
        th_effect_manager_turn_start #added by Mobius_XVI
        check_turn_start_effects
      end
    

    Then, still in HEM, go to line 928 and delete or comment out (Ctrl+Q) these lines:
    Code:
    class Scene_Battle < Scene_Base
     
      alias :th_effect_manager_turn_start :turn_start
      def turn_start
        th_effect_manager_turn_start
        all_battle_members.each do |battler|
          battler.on_turn_start
          refresh_status
        end
      end
    end
    
     
    #7
    Vis_Mage likes this.
  8. Vis_Mage

    Vis_Mage Novice Magician Veteran

    Messages:
    388
    Likes Received:
    141
    Location:
    Ridge Island
    First Language:
    English
    Primarily Uses:
    RMVXA
    Awesome, from what I can tell it works great!

    Thank you so much for all your help! :kaoluv:
     
    #8
    MobiusXVI likes this.

Share This Page