RMMV BattleAI detect enemy state and cast buff on himself

villko05

Villager
Member
Joined
Jan 14, 2021
Messages
11
Reaction score
2
First Language
Islandic
Primarily Uses
RMMV
Hey!
I'm trying to build combat around stances.
I was trying to make the enemy detect a state and accordingly buff himself.

Player X has state 1, EnemyAI adds himself state 2 to counter.

Maybe someone would help me?
Battle A.I. Core (YEP) - Yanfly.moe Wiki

I would appreciate it if someone would help me with the additional condition.
The enemy ("user" which is enemyAI) has state 2 == use skill X (use only when the enemyAI has state 2, kind of buff himself and then use the skill if he detects the buff).
 

oooNUKEooo

Veteran
Veteran
Joined
Sep 22, 2020
Messages
49
Reaction score
10
First Language
br portuguese
Primarily Uses
RMMV
from the plugin description:

STATE === state x
STATE === state name
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
This will detect if the target scope has state x (or state name if you use
that instead). If the target does, that target is added into the pool of
valid targets. Any targets not affected by the state will be ignored.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Example: State === State 5: DeBlind, Highest ATK
State === Knockout: Life, Random

first, the skill must have the desired targeting scope. if what it needs to check is if an actor has something, the scope should be either alive actors or everyone. check the skill scope in the editor, i cant remember the exact names for those conditions.

have a skill (the skill X bellow) that applies your state 2 if said state 1 is present.
that said, try this code on a skill that targets the opposing side:

JavaScript:
State === state 1: skill X, user

where the X above is id of the skill applying the state 2.
 

villko05

Villager
Member
Joined
Jan 14, 2021
Messages
11
Reaction score
2
First Language
Islandic
Primarily Uses
RMMV
OH, yes. It seems it's working. Would you know how to apply an extra random value to use the state, 50% roll? On top of AI randomness.
 

oooNUKEooo

Veteran
Veteran
Joined
Sep 22, 2020
Messages
49
Reaction score
10
First Language
br portuguese
Primarily Uses
RMMV
im not quite sure i understand what you mean... you want a 50% chance of success of applying the state 2?
 

Latest Threads

Latest Posts

Latest Profile Posts

KenKrath wrote on RPGMakerWeb's profile.
Nevermind.
I found a book about game localization. It costs R$708,00 on Amazon. ;_;
I really wish my game was far enough along for it to be actually playable beyond certain aspects. I think I've crafted a really fun battle system thanks to ATB, fighting game, and Boost point mechanics.
Play test of my current progress on Happy Camper
Cutscene Contest Winners have been announced!

Forum statistics

Threads
109,112
Messages
1,042,192
Members
141,611
Latest member
theNaoya
Top