Guard Skill Command

Discussion in 'RGSS3 Scripts (RMVX Ace)' started by Tsukihime, Nov 19, 2013.

  1. Tsukihime

    Tsukihime Veteran Veteran

    Messages:
    8,230
    Likes Received:
    3,067
    Location:
    Toronto
    First Language:
    English
    [​IMG]


    This script changes your guard command depending on a variety of conditions.


    The guard command can be based on what states are applied, what your actor


    has currently equipped, or what their class is.


    By default, the guard command uses the guard skill, which is the second skill.


    However, by adding a few simple tags and some priorities, you can customize


    what the guard command is.


    Get it at Hime Works!
     
    Last edited by a moderator: Nov 19, 2013
    #1
    Shaz, JiM83 and Darkanine like this.
  2. Nugem

    Nugem The Hobbit Veteran

    Messages:
    93
    Likes Received:
    0
    Location:
    Brazil
    First Language:
    PT-BR
    That's reeaally cool!!

    Thanks again, Hime!
     
    #2
  3. Tsukihime

    Tsukihime Veteran Veteran

    Messages:
    8,230
    Likes Received:
    3,067
    Location:
    Toronto
    First Language:
    English
    You can now define dynamic guard skills using formulas.

    <guard skill>id: a.hp < a.mhp * 0.2 ? 10 : 20priority: 10</guard skill>This means that if HP is less than 20%, then the guard skill will be skill 10, otherwise it will be skill 20.Only one-liner formulas are supported unfortunately.
     
    #3
  4. Rayhaku808

    Rayhaku808 Chubbizard Veteran

    Messages:
    206
    Likes Received:
    53
    Location:
    Hawaii, USA
    First Language:
    English
    Primarily Uses:
    N/A
    What can't you do?
     
    #4
  5. Andar

    Andar Veteran Veteran

    Messages:
    28,627
    Likes Received:
    6,574
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    Very usefull

    One question:

    Does that assignment override skill availability or does it switch to another default when a skill is not usable?

    For example, if the skill 10 is not learned or if the actor has not enough MP to pay the skill cost, will it still be executed or will the game switch to skill 20 if skill 10 is impossible to use?

    If it overrides the checks you could make a skill that is only usable at the given condition but not at other times without adding more conditional/tagging scripts: Simply have that conditioned skill not available anywhere to the actor, but it will switch in for guard if the condition is fullfilled...
     
    #5
  6. Tsukihime

    Tsukihime Veteran Veteran

    Messages:
    8,230
    Likes Received:
    3,067
    Location:
    Toronto
    First Language:
    English
    The command obeys skill use conditions. If it is not usable, then it will be grayed out and unselectable.


    The script is currently set up so that it picks the highest priority guard skill as the guard command, however I guess an option would be to tag it so that it will NOT be selected if it is not usable.
     
    #6

Share This Page