Ways to Improve the AI

VHStapes

Game Designer
Veteran
Joined
May 25, 2014
Messages
57
Reaction score
7
First Language
English
I'm wondering if anyone has any tips/tricks for making the ai better? Maybe a better way to ask the question is, what are methods you've used to make the ai act the way you want it to?
 

Ossra

Formerly Exhydra
Veteran
Joined
Aug 21, 2013
Messages
1,076
Reaction score
854
First Language
English
Primarily Uses
RMMV
I usually shy away from combat scenes, but in RPG Maker VXA I used Yanfly's Skill Restrictions, Skill Cost Manager, and Lunatic Targets to steer the AI of monsters toward what I wanted to happen. For example, one grapple-type monster had the skills Punch, Restrain, and Crush. The Restrain skill added the 'Restrained' state to target. Punch and Restrain checked for the 'Restrained' state, and if it was present on anyone in the player's party the skills would be disabled ... forcing the AI to choose another skill instead. Crush also checked for the 'Restrained' state, but the skill would be disabled unless the state was present. So, the monster would basically choose between using Punch and Restrain until the latter landed and the state was added, then it focused each turn to Crush'ing the person who had the state on.


For enemy healing, I made sure that the healer creature would only use the mending ability when someone in their party (aside from them) was hurt and below a certain amount of HP. The spell also targeted the worst damaged creature. I set self-healing to the highest priority, but the skill would only be available as a choice beneath a certain amount of HP. 
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,522
Reaction score
14,255
First Language
English
Primarily Uses
RMVXA
Personally, I heavily event the AI, especially for late game bosses. What this means is I may have the AI set up to do 1 of 2 actions on round 1, then 1 of 2 actions on round 2, round 3 is a free round (pick randomly from a pool of weak attacks so the party can recover), round 4 is the it's gonna hurt round (sometimes choose 1 of 2 powerful attacks, sometimes always the same attack), and so on.


Once I get a pattern of 5 - 8 rounds set up I just let it repeat, though sometimes I'll also have it throw a curveball every other loop, if the fight's even intended to last that long.


As for enemy healing, what I've done is set it up so that most healing spells are used only when the caster has < 50% HP. That way the spell is usually not a complete waste, especially if the healing spell targets all in the enemy party.


Buffs are harder. I usually set up all buffs for the enemy to be either target all enemies or target the caster only. That way I know exactly who will be buffed then. If I keep it random target it's usually a buff that you will want to dispel no matter who it is on.


Seems to be working so far, but then again most of my fights (even bosses) are meant to be over within 10 rounds, with the only exceptions the mid-game and final boss fight. 
 

VHStapes

Game Designer
Veteran
Joined
May 25, 2014
Messages
57
Reaction score
7
First Language
English
Thanks for the responses. I think heavily eventing is going to be the key, basically setting up each turn with a few possibilities. I think adding a lot of switches to the players abilities and character states so that I can target them in the monster controls is also going to help a lot. My game plays more like a card game than a typical rpg, so having the enemy player play well is pretty paramount to the game not being waaaay too easy/unpredictable. 


Thanks again! 
 

Galv

Veteran
Veteran
Joined
Oct 1, 2012
Messages
1,306
Reaction score
1,575
First Language
English
Primarily Uses
RMMZ
I have a plugin that might be of interest that I wrote for myself (but not implemented in a game yet).


https://galvs-scripts.com/2016/08/28/mv-enemy-ai/


Still uses the default way RPG Maker enemies decide what skills to use but adds the ability to also set skills to only be chosen and target battlers that meet certain conditions (have a certain state, have less than a % of hp left, etc.) I found just these skill conditions can boosts enemy smarts noticeably (with clever skill setup of course).
 

Squirrelzone

Expert at being lazy
Veteran
Joined
Aug 13, 2016
Messages
51
Reaction score
2
First Language
English
Primarily Uses
doesn't yanfly have a AI plugin?
 

Burns

Villager
Member
Joined
Jul 17, 2016
Messages
23
Reaction score
6
First Language
English
Primarily Uses
Having a challenging AI is what most RPG games lack, i'm not in this stage yet on my project but try Yanfly AI plugin.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,867
Messages
1,017,061
Members
137,575
Latest member
akekaphol101
Top