Battle A.I.

OmnislashXX

Veteran
Veteran
Joined
Mar 30, 2012
Messages
599
Reaction score
3,686
First Language
English
Primarily Uses
RMMV
Short of downloading Yanfly Battle A.I., is there any way to make monsters specifically target another monster? I want them to use buffs on one specific monster, but my experience with the A.I suggests that they won't do so. Either that or buff something different.
 

Milennin

"With a bang and a boom!"
Veteran
Joined
Feb 7, 2013
Messages
2,511
Reaction score
1,642
First Language
English
Primarily Uses
RMMV
If it's always the same monster it gets used on, it should be easy to cast an empty skill, link it to a battle event, and manually apply it to the monster with Add State command.
If it's another random monster, apply a filler state to all monsters on the field. Have an empty self target skill that removes that filler state, link it to a common event that rolls 1-8 variable for each possible monster on the field, checks if the corresponding monster is applied with the filler state, and if they are, use Add State on them for the skill buff. Then re-apply the filler state again.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,355
Reaction score
7,668
First Language
German
Primarily Uses
RMMV
Only few users know that target rate works for monsters as well - it's just that most of the time the players don't use that form of random targeting.

so you can have a troop event assign states with target rates to manipulate all random enemy skills at a time towards the same enemy - but that's it, you can't have different random skills be targeted at different enemies in the same turn without a plugin or extremely convoluted common events
 

gstv87

Veteran
Veteran
Joined
Oct 20, 2015
Messages
2,248
Reaction score
1,250
First Language
Spanish
Primarily Uses
RMVXA
short answer, yes.
any enemy is an ally from the enemies' point of view, and when you target something you pick specific members of specific selections of battlers taken from the lot of *combatants* that take part in the battle.
"target any ally" is basically "target anyone from the lot of [members of the active battler's party], from the battle"
and [members of the active battler's party], is conditioned to the active battler, which changes at every turn.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,355
Reaction score
7,668
First Language
German
Primarily Uses
RMMV
@gstv87 but that doesn't target a specific enemy like the OP asked, just a random enemy ally of your vailable selection (which is why I pointed toward the target rate to manipulate that random selection)
 

gstv87

Veteran
Veteran
Joined
Oct 20, 2015
Messages
2,248
Reaction score
1,250
First Language
Spanish
Primarily Uses
RMVXA
@Andar, random or specific, doesn't matter.
I was stating that the actual selection is just a pick from a selection from a larger group based on who's the battler in use.
so, it's just a matter of knowing who's the battler, and separating the selection inversely: instead of "enemies" and "allies", it should be "adequate to use this skill on" and "not adequate to use this skill on"
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,355
Reaction score
7,668
First Language
German
Primarily Uses
RMMV
@gstv87 it does matter because that is what the OP asked for.

He asked for the option to target one specific monster of the current troop of monsters, and that is something that the "ally" targeting can only do for the player. If an enemy uses a skill with "one ally" as a target, then the skill will randomly select one other enemy, it has no way to specify which enemy to target if there are several ones in the troop.

But that random selection still takes the target rate into account, so you can manipulate the chance of which specific enemy is targeted by the "one ally" skill if you place target rate states on the enemy
 

OmnislashXX

Veteran
Veteran
Joined
Mar 30, 2012
Messages
599
Reaction score
3,686
First Language
English
Primarily Uses
RMMV
I tried the first option by @Milennin but so far not getting any results. The skills meant to target the heroes work fine, but not any that target themselves.

Edit: I'll post some screens. They might help.

Edit again: Here are the screens. Let me know if I setup anything wrong.











Ah. Maybe the problem lies with the putting the State on the monster before it appears. Unfortunately, I may not be able to find out because my headphones may have just died.



After careful consideration, I have decided that Yanfly's Battle A.I Core was the way to go. I simply had no option to do so otherwise. Every action was met by something that I just could not do. So at least now, the skills actually get cast.
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,355
Reaction score
7,668
First Language
German
Primarily Uses
RMMV
You completely misunderstood how the action patterns and the state works, and what you made does not follow my suggestions at all.

The target me state does nothing in itself, and it is applied to the dark knight. If you want that state to increase the chance of targeting the dark knight by default, then you need to give it an extremely high target rate - or use a plugin that checks the states for targeting. In this form it will do nothing.

A state condition on action pattern only checks the enemy for that state - since the bat will never have it, it will never use that skill. You need a different state for "now use this skill" if you want to follow that pattern.

Basically you're mixing up two or three different ways to solve your problem. you need to tell us which way you want to use and then stick to that until it works or is discarded for another way. mixing solutions will never work.
 

Tiamat-86

old jrpg gamer
Veteran
Joined
Dec 5, 2017
Messages
554
Reaction score
229
First Language
english
Primarily Uses
RMMV
the issue is the code in ur bats AI. u have skill writen all capitalized. only cap the S.
the only reason the skill is being used is because how its setup in database
but with the capitals being wrong in the plugin notetag that notetag gets ignored entirely

State === State 20: Skill 61, First
not
State === State 20: SKILL 61, First

Edit: you'll also want to fix the 1 for Skill 60
and possibly set database for bat skill 61 to Turn+X so its not spaming that buff 1/2 the time because that target state is always a cleared condition. also higher priority so it doesn't get skipped on those turns. (unless the DRK is dead then it wont use skill 61 ever)
the target state is for the targeting condition not the skill casting condition
 
Last edited:

OmnislashXX

Veteran
Veteran
Joined
Mar 30, 2012
Messages
599
Reaction score
3,686
First Language
English
Primarily Uses
RMMV
Alright. I will try and follow your instructions.

Please excuse my earlier outburst. Being frustrated and cranky is a mixture for trouble.

Edit: Yeah, the boss fight is actually the knight. The witch is just there for distraction. The bats she summons are the ones that are supposed to buff the knight, and they can be defeated. But she will just summon more of them, so they will have to kill them again.

I will work on these suggestions. Many thanks and once again, sorry for earlier.
 
Last edited:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,355
Reaction score
7,668
First Language
German
Primarily Uses
RMMV
just tell us which instructions you want to follow - as before you've been given two different description for two different methods and they can't be mixed.
 

OmnislashXX

Veteran
Veteran
Joined
Mar 30, 2012
Messages
599
Reaction score
3,686
First Language
English
Primarily Uses
RMMV
I'm going to try Tiamat's suggestion first.

Alright. I changed the code to:

<AI Level: 80>

<AI Priority>

State === State 20: Skill 61, First

Always: Skill 60, Random

</AI Priority>

Lets see if it works.

EDIT: Nope. Not at all. It just uses one enemy skill to attack the heroes. Here are the screens. Maybe you can all locate what it is that I'm doing wrong.




I don't even know if the State is even being applied. I think it is, testing the other states.
 
Last edited:

OmnislashXX

Veteran
Veteran
Joined
Mar 30, 2012
Messages
599
Reaction score
3,686
First Language
English
Primarily Uses
RMMV
I adjusted the Target Rate of the Dark Knight himself in his Trait parameter. That seemed to do the trick. I adjusted the spell so it goes off in 3 turns and increased the priority to 9. So I guess that's all that it required. Great. I guess were done here.

EDIT: Sorry Andar. I didn't know what exactly you were talking about. But now that I understand how things work, your posts now make everything crystal clear. Thanks for being patient with me.
 

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