VE - Automatic Battlers

Victor Sant

Mar 17, 2012
Reaction score
First Language
Primarily Uses

This script allows to set a more complex AI for actors and enemies with the ‘Automatic Combat’ trait, allowing to set various conditions for the actions be used.

Victor Engine - Automatic Battlers

Author: Victor Sant

Terms of Use
Last edited by a moderator:


Aug 16, 2013
Reaction score
First Language
Primarily Uses
Hi Victor,

This script is magnificent and is what I need for my game as I tend to think that a battle is not about building power but building strategy.
I have 2 questions about this magnificent piece of work.

1. Do I have an option to set events from the past turn(s) as a condition? For example I want to make some rats battles with 3 moves from the rats (as follows, the top is with the highest priority):

- If HP is <10% then attempt to run

- If the rat was attack/damaged during the last turn then defend

- Else attack random enemy

Of course that can be used to build more complex things like tag team tactics like "if a certain battler attacked a cetain hero then attack the same hero the next turn (or the same if the action taken is decided on the moment and not in the begining of the turn)" and this may be helpful for a battle against an enemy with a pet, say tamed wolf or a dog, which attacks every opponent its master attacks.

However, I cannot seem to find a way to do this with this script. Would you please guide me here?

2. It seems that I cannot make a certain pattern of skills work.

I have a fighter and a mage against my party and I set those commands (listed below). I want them to act like this: The mage should check if she is below 25% MP and use a regen skill with the highest priority. Then she needs to make some defence buffs and she is to buff herself before her comrade. All the rest of the time she should cast an attacking spell.

The Fighter should look to drink mana potion if he has no mana (the highest priority skill). Then he needs to check if he has a certain attack buff state and cast it to himself otherwise. All the rest of the time he need to cast Cover spell so he would cover the mage and attack (50/50).

All seemed to be working except the buff spells. It seemed that both just did not want to cast buffs (maybe it is due to their "uneffectiveness" opposed to damaging spells you talked about in the script's decription section). I changed the condition of the warrior's buff from "user state off 21" to this rounds condition and it seems to cast it once each 5 turn which was more or less the goal because he can drain his mana with this buff only. However, the Mage uses mana for each and every of her moves and if I set her buffs to be casted turn based I can have a situation when she skips a single buff due to her recovering mana and this may cause the battle to be an easy winning. So, I am trying to make her check if a certain battler has not this buff but despite all my efforts I am not able to make her use her buffs properly. I tried with aiming those to highest atk/lowest atk (and it started to cast the buff but to the highest atk only which is the lower priority). I swapped the places of those strategies, changed the target again but no matter what I did I could not make this work as I want to.

So, my question is if I am wrong somewhere with the way I am trying to do this or if there is a way to make the battlers act exactly as you scripted them and not try to "re-think" the orders aiming to cast the spell which deals more damage?


<strategy: skill 8, priority 25, random>

<strategy: skill 9, priority 850, self>
user state off 32
<strategy: skill 9, priority 300, highest atk>
friend state off 32

<strategy: skill 10, priority 999, self>
self mp lower 25%


<strategy: attack, priority 25, random>

<strategy: skill 13, priority 300, self>
'$game_troop.turn_count % 2 == 0'

<strategy: skill 11, priority 780, random>
'$game_troop.turn_count % 5 == 0'

<strategy: skill 12, priority 999, random>
self mp lower 5%
Last edited by a moderator:

Latest Threads

Latest Posts

Latest Profile Posts

I've started up Pillars of Eternity. It's interesting how the game does a "select choice" cutscene using still image art for dramatic flair. I wonder if that might work for my RPGMaker project.
The self-righteous indignation of family when you expect them to pay back money you've leant to them never ceases to amaze me.
Gamedev for relaxing? yes or no?
I've been having a rough couple of months and as such let down some friends of mine in the RPG Maker community. I still need time to get back to my normal self, but it's nice to be back, to read articles, and to design again (albeit at a slow pace). Hope to give updates on Kid Crescent soon.
Friendly reminder that you don't have to be able to do absolutely everything. It's okay to scale back features or assets if things are too much - especially if you're the only one working on the game! And you can always add things in later. <3

Forum statistics

Latest member