Enemy AI State (Ace)

Discussion in 'RGSS3 Scripts (RMVX Ace)' started by Mr. Bubble, May 5, 2013.

  1. Mr. Bubble

    Mr. Bubble Makes stuff. Member

    Messages:
    853
    Likes Received:
    163
    Location:
    Portland, Oregon
    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: May 5, 2013
    #1
  2. Nosleinad

    Nosleinad Storyteller Veteran

    Messages:
    351
    Likes Received:
    28
    Location:
    Brazil
    First Language:
    Portuguese
    Very interesting script, i will test it in my project.
     
    #2
  3. CWells

    CWells Storyteller/Artist Veteran

    Messages:
    731
    Likes Received:
    40
    First Language:
    English
    #3
  4. Mr. Bubble

    Mr. Bubble Makes stuff. Member

    Messages:
    853
    Likes Received:
    163
    Location:
    Portland, Oregon
     

    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?
     
    #4
  5. CWells

    CWells Storyteller/Artist Veteran

    Messages:
    731
    Likes Received:
    40
    First Language:
    English
    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: Jul 3, 2013
    #5
  6. Mr. Bubble

    Mr. Bubble Makes stuff. Member

    Messages:
    853
    Likes Received:
    163
    Location:
    Portland, Oregon
    Link to the scripts you're using please.
     
    #6
  7. CWells

    CWells Storyteller/Artist Veteran

    Messages:
    731
    Likes Received:
    40
    First Language:
    English
  8. Engr. Adiktuzmiko

    Engr. Adiktuzmiko Chemical Engineer, Game Developer, Using BlinkBoy' Veteran

    Messages:
    14,457
    Likes Received:
    2,845
    Location:
    Philippines
    First Language:
    Tagalog
    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: Jul 3, 2013
    #8
  9. CWells

    CWells Storyteller/Artist Veteran

    Messages:
    731
    Likes Received:
    40
    First Language:
    English
    #9
  10. Engr. Adiktuzmiko

    Engr. Adiktuzmiko Chemical Engineer, Game Developer, Using BlinkBoy' Veteran

    Messages:
    14,457
    Likes Received:
    2,845
    Location:
    Philippines
    First Language:
    Tagalog
    @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: Jul 3, 2013
    #10
  11. Mr. Bubble

    Mr. Bubble Makes stuff. Member

    Messages:
    853
    Likes Received:
    163
    Location:
    Portland, Oregon
    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.

    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.
     
    #11
  12. CWells

    CWells Storyteller/Artist Veteran

    Messages:
    731
    Likes Received:
    40
    First Language:
    English
    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: Jul 4, 2013
    #12
  13. CWells

    CWells Storyteller/Artist Veteran

    Messages:
    731
    Likes Received:
    40
    First Language:
    English
    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...
     
    #13

Share This Page