YEP Battle AI Core Random Skill Pool

Naveed

Veteran
Veteran
Joined
Nov 2, 2013
Messages
314
Reaction score
146
First Language
English
Primarily Uses
RMMV
What I'm trying to do is, using Yanfly's Battle A.I. Core, I want that when a specific condition is met, the enemy will use any one out of a pool of skills.

So lets say I have skills X, Y and Z. I want to set up <AI Priority> such that:

<AI Priority>

(Other checks)

Always: Skill X/ Y/ Z (Any one of the skills)

(Other checks)

</AI Priority>

I believe the plugin supports only one skill per condition(s), but I may be wrong. Is this possible? If so, how?

Thanks in advance ^_^
 

killerfer

Veteran
Veteran
Joined
Nov 4, 2015
Messages
198
Reaction score
50
First Language
Portuguese
First thing that come to my mind is to set a variable with a random value from 1-3 or whatever. Then you make 3 conditional branches for each value of the variable, each skill is used.

if var = 1 skill x is used

    else if var = 2 skill y is used

         else if var = 3 skill z is used

or something like that.
 

Fernyfer775

Veteran
Veteran
Joined
Oct 6, 2013
Messages
1,317
Reaction score
818
First Language
English
You know...this is a damn good question. I was running into a few situations where I thought: "It would be nice if one of these 3 skills were chosen at random when X condition is met".

Might be something worth inquiring about on Yanfly's main plugin thread.
 

Naveed

Veteran
Veteran
Joined
Nov 2, 2013
Messages
314
Reaction score
146
First Language
English
Primarily Uses
RMMV
@Fernyfer Ikr! It would be so helpful if this was possible. Would add more variety to the enemy's skills and not have them follow such a strict code.

I'll try asking on Yanfly's main plugin thread and see if I can get anything.
 

Internetomancer

Veteran
Veteran
Joined
Nov 16, 2015
Messages
57
Reaction score
26
First Language
English
Primarily Uses
One way to do it would be to treat it like a math problem, like this would give you one of five skills at random.


Random 20%, Skill A


Random 25%, Skill B


Random 33% Skill C


Random 50% Skill D


Always Skill E


Just use that pattern for any number of skills.  Of course you won't be able to add conditions.
 

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