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?
Ways to Improve the AI
RPG Maker MV SupportI 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.
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.
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.
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.
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!
Thanks again!
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).
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).
doesn't yanfly have a AI plugin?
You're right! I had tried it but didn't read through the documentation (like a noob). Looks like this should do the trick!
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.
Original thread: https://forums.rpgmakerweb.com/threads/ways-to-improve-the-ai.67365/