Same skill but different animations depending on weapon type

Discussion in 'RPG Maker MV' started by TheSaihtam, Sep 14, 2018.

  1. TheSaihtam

    TheSaihtam I like rainbows and unicorns and rainbow unicorns! Member

    Messages:
    16
    Likes Received:
    3
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    Hai dear community,

    i made a skill called "Triplet". If you use it, the casting actor performs three attacks in a row against one enemy.
    I also made 2 different animations, 1 for swords/axes and 1 for spears.
    Means 3 slashes when sword/axe is equipped and 3 stabs when a spear is equipped.

    Is there any way to set the playing animation for each weapon type?

    Thank you and regards
    TheSaihtam
     
    #1
  2. Milennin

    Milennin "With a bang and a boom!" Veteran

    Messages:
    1,883
    Likes Received:
    868
    Location:
    Fiore
    First Language:
    English
    Primarily Uses:
    RMMV
    Make 3 separate skills that are all identical, except for their animation.
    If the same character can switch weapon types, then at the start of battle, run an event that checks for weapon equip with a conditional branch. Then, unlearn the current version of the skill, and learn the skill version matching the weapon equipped.
     
    #2
  3. TheSaihtam

    TheSaihtam I like rainbows and unicorns and rainbow unicorns! Member

    Messages:
    16
    Likes Received:
    3
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    I would do this with a common event but they dont work during battles.
    Making one common event and a battle event in every troops works but i think there are better ways...
     
    #3
  4. BK-tdm

    BK-tdm Warper Member

    Messages:
    1
    Likes Received:
    0
    First Language:
    English
    Primarily Uses:
    RMMV
    Go the "3 different skills" route but instead make each weapon "add" the skill when equipped, that way you dont have to check anything, run any process or morph the skill, you just have to add the "add skill" property to every weapon you create in the database, it can be a lot of work depending onthe quantity of weapons but in the long run is better to do this than script "checks" all around.
     
    #4
  5. TheSaihtam

    TheSaihtam I like rainbows and unicorns and rainbow unicorns! Member

    Messages:
    16
    Likes Received:
    3
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    Thats not possible to add the skill to the weapon because there are more than one class using this weapon type, but only one of them should be able to do this skill. :-/
     
    #5
  6. mmgfrcs

    mmgfrcs The Programmer Member

    Messages:
    25
    Likes Received:
    17
    First Language:
    Indonesia
    Primarily Uses:
    RMMV
    Right, so
    I would first like to say that it's not easy to do so natively. If you use Yanfly's Skill Core plugin, you can do this:
    Use the "3 different skills" route, but then on each skill you specify this:
    upload_2018-9-15_10-40-31.png
    One skill for swords, one for axes and one for spears
    That will disable/enable the skill depending on weapon type. We're halfway. To do the other half (based on actor), you use a very useful notetag:
    Code:
    <Custom Requirement>
    if(user.actorId === id) value = true;
    else value = false;
    </Custom Requirement>
    Replace id with the Actor's ID
    This will disable/enable the skill depending on actor.

    That method above works, but the skill will stay there on the skill list, permanently unusable, which can clutter the list. If you wanted to make it disappear, though, use this:
    Code:
    [CODE]<Custom Show Eval>
    if(user.actorId === id && user.isWtypeEquipped(typeId)) visible = true;
    else visible = false;
    </Custom Show Eval>
    [/CODE]
    id is the same as above. Replace typeId with the ID of the weapon type in the database. Put the notetag on the notes section of all 3 skills.
     
    #6
  7. TheSaihtam

    TheSaihtam I like rainbows and unicorns and rainbow unicorns! Member

    Messages:
    16
    Likes Received:
    3
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    Thank you, i will give it a try later! :)
     
    #7

Share This Page