[SOLVED] Error with Himeworks' Enemy Action Conditions

Discussion in 'RGSSx Script Support' started by Benja, Sep 16, 2017.

Thread Status:
Not open for further replies.
  1. Benja

    Benja Lead Developer Veteran

    Messages:
    131
    Likes Received:
    28
    First Language:
    English
    Primarily Uses:
    RMVXA
    Hi.

    I'm having some trouble using Himeworks script. I'm attempting to make an attack that damages and inflicts a status effect, and won't use it again if you still have the status effect.

    Unfortunately, any use of <action condition: 35> or </action condition>, no matter what's in it, triggers an instant error before even using any skills

    "Script 'AI' line 94: NoMethodError occurred

    Undefined method 'formula_conditions' for nil:NilClass"

    Any help is appreciated!

    Script
     
    #1
  2. Harosata

    Harosata Dramatic Lightning's BFF Veteran

    Messages:
    240
    Likes Received:
    65
    First Language:
    English
    Primarily Uses:
    RMVXA
    I'm going on a wild guess, but is 35 the ID of your Skill, or does your enemy have 35 skills? Because this script is assuming you're using the 35th skill in that list. Of course, if you don't have 35 skills for that enemy, there is technically no 35th skill.

    ---

    Let me clarify: Pretend you have an enemy that does
    Attack
    Fire
    Guard

    That means they should have a Skill ID of 1, 30, and 2, right? Instead, the Enemy Action Conditions script does not use Skill ID, but refers to a "action list" id. This means, that Attack is 1, Fire is 2, and Guard is 3. This script does not add new skills to the list.

    ---

    And in case you haven't done it yet, the notetag goes into the Enemy's notebox. The suggested formula you can try to use is p.alive_members.none? {|actor| actor.state?(NUMBER)} which means "you can use this skill if no one has that state". Unfortunately, the default script and this script by proxy does not factor in the current target when determining conditions due to the use of target randomization, so you won't be able to state your party one by one.

    Alternatively, !p.alive_members.all? {|actor| actor.state?(NUMBER)} should be "you can use this if not all have this state", meaning that it'll stop if all members have that state.
     
    Last edited: Sep 17, 2017
    #2
    Benja likes this.
  3. Benja

    Benja Lead Developer Veteran

    Messages:
    131
    Likes Received:
    28
    First Language:
    English
    Primarily Uses:
    RMVXA
    Thank you so much! It works perfectly now! This thread can be closed.
     
    #3
  4. Kes

    Kes Global Moderators Global Mod

    Messages:
    20,977
    Likes Received:
    10,677
    First Language:
    English
    Primarily Uses:
    RMVXA

    This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

     
    #4
Thread Status:
Not open for further replies.

Share This Page