State-dependant additional effects in skills

Discussion in 'Javascript/Plugin Support' started by Gummiwyrmz, Sep 20, 2018.

    Tags:
  1. Gummiwyrmz

    Gummiwyrmz Warper Member

    Messages:
    3
    Likes Received:
    0
    First Language:
    English
    Primarily Uses:
    RMMV
    I have a skill called "Bash" that deals moderate damage normally, but I would like it to deal much more if the target is stunned. I'm planning several other skills with effects based on things like target HP% and states also, but am pretty new to this side of RPG Maker-ing.

    So what i need to know is: how do i set a skill to have additional effects based on the target (or user's) state and/or stats? If anyone can point me to a thread (I'm sure one exists, but my Google-fu is weak) I would appreciate it.

    I'm currently using Yanfly scripts to avoid compatibility issues. I'm sure there's a way to do this within these scripts, but I is a dummy.
     
    #1
  2. mlogan

    mlogan Global Moderators Global Mod

    Messages:
    13,241
    Likes Received:
    7,296
    Location:
    Texas
    First Language:
    English
    Primarily Uses:
    RMMV

    I've moved this thread to Plugin Support. Please be sure to post your threads in the correct forum next time. Thank you.

     
    #2
  3. NinjaKittyProductions

    NinjaKittyProductions Professional Murder Hobos Veteran

    Messages:
    208
    Likes Received:
    136
    First Language:
    English
    Primarily Uses:
    RMMV
    To help with your Bash skill doing more damage, you can achieve this through the damage formula:
    b.isStateAffected(12) ? a.atk * 10 - b.def * 2 : a.atk * 4 - b.def
    Change 12 to whatever StateID your Stun state is in the database.

    As for user's state, just replace the beginning 'b' with 'a'.

    Mr. Trivel has a great post for damage formulas here that might be able to help with what you are wanting to accomplish:
    https://www.rpgmakercentral.com/topic/36290-damage-formulas-101-mv-edition/
     
    #3
  4. Gummiwyrmz

    Gummiwyrmz Warper Member

    Messages:
    3
    Likes Received:
    0
    First Language:
    English
    Primarily Uses:
    RMMV
    Thank you so much! I appreciate your help and the link!
     
    #4

Share This Page