Enable battle when MP full?

Degenesis

Warper
Member
Joined
Jul 23, 2014
Messages
3
Reaction score
0
First Language
English
Primarily Uses
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
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
I think Hime also has a script that will allow common events to run during battle.
 

Wavelength

MSD Strong
Global Mod
Joined
Jul 22, 2014
Messages
5,624
Reaction score
5,104
First Language
English
Primarily Uses
RMVXA
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".
 

Zoltor

Veteran
Veteran
Joined
Jan 18, 2014
Messages
1,550
Reaction score
211
First Language
English
Primarily Uses
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
 
Last edited by a moderator:

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,849
Messages
1,016,977
Members
137,563
Latest member
cexojow
Top