Change Skill Animation Based On Switch

Discussion in 'RGSS3 Script Requests' started by GaryTheGreat, May 7, 2018.

  1. GaryTheGreat

    GaryTheGreat Veteran Veteran

    Messages:
    76
    Likes Received:
    0
    First Language:
    Russian
    Primarily Uses:
    RMVXA
    I need to dynamically change skill's played animation if a certain switch is on
    Using Yanfly Battle Engine, but I only need it for actors (really don't want to create dozens of identical classes with identical skills just to have different animation for it)
     
    #1
  2. DarkHyudrA

    DarkHyudrA Actually I'm Enzonaki Veteran

    Messages:
    35
    Likes Received:
    18
    Location:
    Brazil
    First Language:
    Portuguese
    Primarily Uses:
    RMMV
    You can use action sequences and ifs to decide which animation to play, and let the animation on the skill definition blank.
     
    #2
  3. Kes

    Kes Global Moderators Global Mod

    Messages:
    16,490
    Likes Received:
    8,491
    First Language:
    English
    Primarily Uses:
    RMVXA
    @DarkHyudrA As far as I am aware, Action Sequences is only for MV and this is an Ace forum. If I am wrong, please link the appropriate web page.
     
    #3
  4. GaryTheGreat

    GaryTheGreat Veteran Veteran

    Messages:
    76
    Likes Received:
    0
    First Language:
    Russian
    Primarily Uses:
    RMVXA
    I think he just means: have a skill do nothing but run a common event, where it will force different skills with different animations based on conditions
    Still tedious
     
    #4
  5. Roninator2

    Roninator2 Gamer Veteran

    Messages:
    876
    Likes Received:
    153
    Location:
    Canada
    First Language:
    English
    Primarily Uses:
    RMVXA
    You may have to request someone to write a script for this. I had a thought but there is no script for it either...
    Have multiple skills that are the same and when the switch is on, the actor losses one skill and gains another. Both skills would be the same but different animations.
     
    #5
  6. GGZiron

    GGZiron Veteran Veteran

    Messages:
    30
    Likes Received:
    5
    Location:
    Bulgaria
    First Language:
    Bulgarian
    Primarily Uses:
    RMVXA
    You can change skill animation via this script call:
    Code:
    $data_skills[skill_id].animation_id = new_animation_id
    You have to replace skill_id with the skill id from the database, and the new_animation_id with animation id you want from the database. Problem is, that changes the skill animation for everyone, who is going to use that skill. Turning to that skill via $game_actor.skills gives the same result, the skill animation is going to be changed for everyone, which is why my script call changes it directly from the database. Is that good enough?
     
    #6
  7. GaryTheGreat

    GaryTheGreat Veteran Veteran

    Messages:
    76
    Likes Received:
    0
    First Language:
    Russian
    Primarily Uses:
    RMVXA
    Animations are unique for all actors, so that's fine
    Does that change it permanently though? So, for instance, I call this script before battle, and for the whole battle that skill will play new animation?
     
    #7
  8. GGZiron

    GGZiron Veteran Veteran

    Messages:
    30
    Likes Received:
    5
    Location:
    Bulgaria
    First Language:
    Bulgarian
    Primarily Uses:
    RMVXA
    Yes. Not only to the end of the battle, but to the end of the game. Unless you change it again to the original animation id.
    Edit: Ah, problem. It doesn't stay after saving and closing the game, then opening and loading new game.
     
    Last edited: May 16, 2018
    #8
  9. GaryTheGreat

    GaryTheGreat Veteran Veteran

    Messages:
    76
    Likes Received:
    0
    First Language:
    Russian
    Primarily Uses:
    RMVXA
    Well, if animation changes are tied to switches, and I refresh all the changes before starting any battle via common event (there's no random encounters) that shouldn't be an issue.
    Thank you!
     
    #9
  10. GGZiron

    GGZiron Veteran Veteran

    Messages:
    30
    Likes Received:
    5
    Location:
    Bulgaria
    First Language:
    Bulgarian
    Primarily Uses:
    RMVXA
    In the script call i provided earlier, the animation change is not tied to switch, but to the script call alone.
    There is a way to preserve your changes in the save file, but that will inject all the skills data into the save file (around 37 kb with the default skill database).
     
    #10
  11. GaryTheGreat

    GaryTheGreat Veteran Veteran

    Messages:
    76
    Likes Received:
    0
    First Language:
    Russian
    Primarily Uses:
    RMVXA
    What I meant is: run a conditional branch with switches, and then call script if switch is on, that's all. Before every battle. Common event.
    Makes my life easier than if I was running a common event each time a skill was used
     
    #11
  12. Kes

    Kes Global Moderators Global Mod

    Messages:
    16,490
    Likes Received:
    8,491
    First Language:
    English
    Primarily Uses:
    RMVXA
    Instead of running a common event before every battle, could you use Yanfly's Base Troop Events script for that? Set it to run at turn zero, span set to turn. Then at the beginning of each and every battle it would do the work of the common event before anything else happens.
     
    #12
  13. GaryTheGreat

    GaryTheGreat Veteran Veteran

    Messages:
    76
    Likes Received:
    0
    First Language:
    Russian
    Primarily Uses:
    RMVXA
    That's the same thing really. Doesn't warrant a script if it's easily done with a common event with the same results imo. I already have way too much scripts.
     
    #13

Share This Page