Last Update: 2012.01.18
Script Download
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.
Requires the Victor Engine – Basic Module
This script settings are very advanced, full detail about it can be found on the script header.



















This is the most fun script for me
I’ll play around in this for hours and hours.
Thank you for the script, I love it! Just by glancing over it I can tell that it’ll be a staple for the more strategic battles. I’ll do my best to test it thoroughly once I’m able to. ^^
Is it possible to set turns as conditions? Like, turn number 1, 2, 3 etc…?
it’s possibe to use script codes as conditions, on the instructions there’s some examples based on turns.
‘$game_troop.turn_count % 4 == 0′ do you mean this? Can you tell me how this works? turn_count % 4 == 0 means what?
$game_temp.turn_count is the turn number, the % 4 means that the value is divided by 4 and return the rest of the operation, basically
$game_temp.turn_count % X == 0 will make tha action be valid every X turns.
How does the script handles skills with target set as ‘all enemies’? What should i write as target? Because it throws an error if i use ‘random’ with a skill that has ‘all enemies’ as target option.
This wasn’t supposed to happen at all, i will fix that.
Very nice script
Thanks
There seem to be a problem when you set in the enemy’s action something that maxhp as targets stat, something like this: strategy: skill 327, priority 200, highest maxhp will drop an error on line 439 undefined method maxhp for game_enemy.
Thanks for the report, i will fix that and soon update the script
I found a bug in your script relating to opponent state off condition.
So, for testing purposes I gave one enemy the Smart Foe example strategy (The one that poisons the enemy). I gave the enemy the automatic battler trait and all the spells it needed.
However, at the end of first turn (I assume it is when the game chooses each enemy’s actions for the next turn) game crashes with this error:
Script ‘Automatic Battlers’ line 458: Syntax Error occurred.
unexpected tIDENTIFIER, expecting $end
([] + subject.opponents_without_state(2))subject
I assume that the script chose this skill for the second turn:
opponent state off 2
‘$game_troop.turn_count % 4 == 1′
I mean this (damn comment eating my tags)
opponent state off 2
‘$game_troop.turn_count % 4 == 1′
Ah screw this, I hope you know which skill I meant.
That bug seems to appear every time either friend state or opponent state is true. And I can’t get the state check on the user to work either. If I use self state it throws an error, and if I use user state it simply doesn’t work without throwing an error. I have tried this in an empty project as well so it cannot be script incompatibility.
Great script, but sadly it is throwing an error at line 830 about undefined method “evaluate_auto” for false:FalseClass.
Tracked it down. It was an incompatibility with Yami’s Inverted Targets script. It would be nice if a compatibility patch were made but I understand if you have other things to do.
Thanks Victor, this script is brilliant and is exactly what I was looking for.
I’ve just got one issue that I am trying to get my head around with, how would you go about setting tactics trough skills? From what I read the command needs a specific ID for the actor. Is there a decent way to do it?
Don’t know if clear, what I meant was having an “Attacker” skills that set the tactic of whoever you use it on to “Attacker”, for example.
The script does’t work when searching for the “lowest” (ie: lowest hp)
Doesn’t matter which stat. You get a syntax error:
no. floating literal anymore; put 0 before dot
opponents_unit.members.any? {|member| member.175_rate < 0.25}
And when you place a self condition (like: self hp lower 99%), you get this error:
trailing ‘_’ in number
40_rate < 0.99