Enable battle when MP full?

● ARCHIVED · READ-ONLY
Started by Degenesis 6 posts View original ↗
  1. Here's another one for ya.

    I'm trying to create a constant check for an actor's MP that will run even during battles. Paralell process only works on the map, so it couldn't achieve the full effect I was looking for.

    Here's a very basic example.

    Code:
    Battle turn end.Actor MP above 50? Yes:   Remove autobattleNo:   Add autobattle
  2. Uh....a Common Event, perhaps?
  3. I think Hime also has a script that will allow common events to run during battle.
  4. Several of Hime's scripts could accomplish this in one way or another (my favorite probably being the Custom Page Conditions), but you can do this on your own pretty easily.  You were almost there already.

    Just make a troop event that will run every turn, and have it add a state that has the autobattle flag if the MP is greater than 50:

    for s in $game_troop.members
    if s.mp > 50
    s.add_state(29)
    end
    end

    Or, since it sounds like you're going to be doing this a lot, just have an Each Turn page in each troop that calls an "every turn processing" common event with the above code and any other stuff you want to run each turn.

    You could also check to see whether they're at 50% or more of their maximum MP using "if s.mp_rate >= 0.50" instead of "if s.mp > 50".

    Finally, I believe Hime has a script to run some troop event pages after every single action, which will provide even finer control than "each turn".
  5. Shaz said:
    I think Hime also has a script that will allow common events to run during battle.
    Wait he does? Where is that hmm(unless It's part of his extended common events script, I have no idea where that could be, runs to check)?

    Edit: OMG, couldn't even find the extended common event script, instead I found other awesome scripts(equipment check script, and a  Enemy Action Conditions script, which just wow, that will come in handy)

    Found the extended common event script, and nope, that doesn't do it.

    Edit 2: Wait a second, I just found a script that might allow common events to run in battle, Hime has a script called Global Common events which can supposedly run in almost any scene. It doesn't specifically itemize the battle scene, but it may work with that as well, you'll need to try it out(plus there's ways to disable it in scenes you don't want it to run in).

    Global Common Event Script: http://www.himeworks.com/2013/04/13/global-common-events/?relatedposts_exclude=1957