Enemy AI State (Ace)

Mr. Bubble

Makes stuff.
Member
Joined
Mar 1, 2012
Messages
853
Reaction score
163
Enemy AI State (Ace)


Original VX Script by Mithran


Ported to VX Ace by Mr. Bubble


Summary


This script makes an actor mimic the Action Patterns of an enemy by using a state. When the state is inflicted, the character will auto-battle using the Action Patterns of the enemy specified by the state. Certain enemy actions can be excluded altogether.


Script


Get it here: http://db.tt/oPQSKYDK


Credits & Thanks


Thanks to Mithran for the original script and giving permission to port over to Ace. Please do not redistribute without asking.
 
Last edited by a moderator:

Nosleinad

Storyteller
Veteran
Joined
Dec 12, 2012
Messages
351
Reaction score
29
First Language
Portuguese
Primarily Uses
Very interesting script, i will test it in my project.
 

Mr. Bubble

Makes stuff.
Member
Joined
Mar 1, 2012
Messages
853
Reaction score
163
Hello, I was working on using the auto-battle script by Mithran as ported to VX ace by Mr. Bubble. And after adding the

enemy ai to my auto-battle state, I get this

 

Game_action' line 100: NoMethodError occurred.

 

undefined method 'for_dead_friend?' for nil:NilClass

 

and the battle test crashes. What does this mean?
 

It means that Game_Action#item is returning nil.

 

Standard questionnaire:

 

Are you using other custom scripts? If so, what are they? How do you know it is or isn't a script compatibility issue? Can you isolate the culprit script if you are using other custom scripts?
 

CWells

Storyteller/Artist
Veteran
Joined
Apr 22, 2013
Messages
731
Reaction score
40
First Language
English
Primarily Uses
 

 

It means that Game_Action#item is returning nil.

 

Standard questionnaire:

 

Are you using other custom scripts? If so, what are they? How do you know it is or isn't a script compatibility issue? Can you isolate the culprit script if you are using other custom scripts?
It wasn't until I applied your script that this error message occurred, Which led me to believe that it was this auto-battle script causing the problem. However, I am using other scripts as well. Since this state, the auto battle state should be applied instantly to some actors given the type of game I am making, I have used the auto-effect script from Tsukihime to apply this state directly to characters that are meant to be auto-battle only. So I have Tsukihimes Effect Manager.

I did not place your script below Tsukihimes Effect Manager though because your script is different.

This auto-battle script is a biggie for my project. I hope I can get this working. I am going to see what happens when I push your script under Tsukihime's Effect Manager...

Nope. No change when I move the scripts around. i still have the error.
 
Last edited by a moderator:

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
It wasn't until I applied your script that this error message occurred
ofc, becoz it was most probably that this script is incompatible with other scripts ur using...

Since it relies on Tsukihime's script, you can still try to put it below tsukihime's script...

btw, what are ALL of the custom scripts that ur using? especially the battle related ones
 
Last edited by a moderator:

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
@Mr. Bubble: Looked at the script... I have a question: Is it fine not to have Game_Battler not inherit Game_BattlerBase?

@CWells: have you tried running it on playtest rather than battle test?
 
Last edited by a moderator:

Mr. Bubble

Makes stuff.
Member
Joined
Mar 1, 2012
Messages
853
Reaction score
163
Sorry it was taking me a while to find my other one:

http://www.rpgmakervxace.net/topic/7596-auto-states/

And this one:

http://himeworks.wordpress.com/2013/06/20/effect-reflect-damage/

That's it. There are no more custom scripts other than these. Tsuki so far has been so helpful with all of these scripts.
I've updated the script to v1.01.

It was a compatibility issue with the Auto-States script. I don't know what the exact problem was, but I was able to check for the error and avoid it. It looks like everything works fine, but more testing is needed.

Please remember to provide all pertinent information next time you ask for help.

@Mr. Bubble: Looked at the script... I have a question: Is it fine not to have Game_Battler not inherit Game_BattlerBase?
A VX remnant I didn't notice in the conversion since there's no Game_BattlerBase in VX. It doesn't produce errors and I'm not referencing anything outside the scope of Game_Battler in that section. I don't know if there are side-effects, but I've fixed it regardless.
 

CWells

Storyteller/Artist
Veteran
Joined
Apr 22, 2013
Messages
731
Reaction score
40
First Language
English
Primarily Uses
So far things are indeed better thank you.

After some time mixing and matching with an enemy. Changing skills and testing action patterns. It isn't that much different from normal auto-battle. I am not seeing my enemy state Actor use any support abilities on its own at all. It will do the basic guard and attack but everything else that has to do with other kinds of state actions or common event skills, it will not use them. I would love to see the AI pay more attention to these sorts of things too, especially the support skills. Maybe in future versions if you work on it some more, this could be an addition?
 
Last edited by a moderator:

CWells

Storyteller/Artist
Veteran
Joined
Apr 22, 2013
Messages
731
Reaction score
40
First Language
English
Primarily Uses
Enemy AI State (Ace)

Original VX Script by Mithran

Ported to VX Ace by Mr. Bubble

Summary

This script makes an actor mimic the Action Patterns of an enemy by using a state. When the state is inflicted, the character will auto-battle using the Action Patterns of the enemy specified by the state. Certain enemy actions can be excluded altogether.

Script

Get it here: http://db.tt/oPQSKYDK

Credits & Thanks

Thanks to Mithran for the original script and giving permission to port over to Ace. Please do not redistribute without asking.
This script is indeed awesome and has been such great use for me. And yet there is one thing that has just come up when finally putting in all the meat to my actors and enemy states.

They will not use skills that require TP use.

I did several tests to see what the issue is. My last guess is it must be the scripted state to use Enemy AI. Here is what I did:

First, I tried just giving the actors the enemy AI states with the desired skill set. I noticed they were not casting certain skills. I checked various things, even removed all the skills they would cast to see if it would increase the odds of them using the ignored skills. They did not do anything.

I then checked the skills, noticed they all required TP for use. I changed the TP to MP and finally they started casting. But this means that in order for any character, enemy or not, to use a skill like an uppercut, or a charging attack which wouldn't require MP, so long as I have this scripted state applied, I would have to make it use up MP.

I then checked to see what an enemy would do without your script. Just a normal enemy. They were casting their TP skills with no problem.

So if I applied the enemy state to an actor, they would completely ignore TP. If a default enemy were to use the TP using skills, they would do so just fine...
 

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