Enemy AI - Checks & Tables

Mr. Trivel

Glasses
Veteran
Joined
Jun 9, 2014
Messages
284
Reaction score
469
First Language
Lithuanian
Primarily Uses
What does it do?

Instead of using Attack Patterns in database which don’t allow for much customization. All enemy patterns will be written in module allowing more complex and varying interactions in the battle.

 

How the AI works:

AI goes through every Check in order, checking conditions for it. Depending on condition results, it checks which Table to use.

If Table is a nil, it goes to the next check. Else it uses the Table that was set.

Repeat for all checks until Table is found.

After Table is found, it uses weighted randomness to determine which attack to use from that Table.

 

Warning: This may be a tiny little bitty bitsy complex to set up

 

Author: Mr. Trivel

Name: Enemy AI – Checks & Tables

Created: 2014-11-09

Version: 1.1

 

Instructions:

Read carefully and set up everything.

 

Script: <Link: Github>

Blog: <Link: On blog>

Sample conditions. Ask if you have no idea how to set up some specific condition.



Code:
# Any actor has less than 50% hp$game_party.battle_members.any? { |m| m.hp_rate < 0.5 }  
 
Last edited by a moderator:
Joined
Nov 6, 2013
Messages
946
Reaction score
153
First Language
Cookie
Primarily Uses
Could you add maybe some screenshots, and a demo so people can see more what it's about? It looks neat :)
 

Mr. Trivel

Glasses
Veteran
Joined
Jun 9, 2014
Messages
284
Reaction score
469
First Language
Lithuanian
Primarily Uses
@Monkeysnow,

I'm not really sure what kind of screenshots I could take to showcase anything.
 

nio kasgami

VampCat
Veteran
Joined
May 21, 2013
Messages
8,949
Reaction score
3,042
First Language
French
Primarily Uses
RMMV
interesting! do you think your script can have any incompatibility with something?
 

Mr. Trivel

Glasses
Veteran
Joined
Jun 9, 2014
Messages
284
Reaction score
469
First Language
Lithuanian
Primarily Uses
@nio kasgami,

Anything else that modifies how enemy actions are chosen, since I straight up overwrite the make_actions and set_enemy_action methods.
 
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,981
Members
137,563
Latest member
cexojow
Top