Actor-Exclusive Skill Animations

Discussion in 'RGSS3 Script Requests' started by Panda_Artist, Dec 23, 2018.

  1. Panda_Artist

    Panda_Artist Humble RPG Fan Member

    Messages:
    16
    Likes Received:
    1
    First Language:
    Portuguese
    Primarily Uses:
    RMVXA
    Good Morning / Day / Afternoon / Evening everyone.

    First of all, I want to tell you all this is my first time posting on these forums. Now, on to the subject at hand.

    I am looking for a script which can do the following

    It will play a different animation depending on which actor is using it.

    For example, if actor 1 is using a Steal command it will show Animation 1, but if it's actor 2 it will show animation 2.

    A small correction!! The steal command in question counts as a skill!!
     
    Last edited: Dec 23, 2018
    #1
  2. Sauteed_Onion

    Sauteed_Onion Mmm Tasty Veteran

    Messages:
    554
    Likes Received:
    3,657
    Location:
    Perhaps on a steak or cheeseburger
    First Language:
    English
    Primarily Uses:
    RMMV
    I haven't programmed anything in RGSS3 (and not even in JavaScript really of any noteworthy level), BUT I do have a suggestion perhaps.

    Maybe try making different skills per each character? Like maybe 1 character has one variation of the steal skill, but you can make a separate steal skill for another character and use different animations/actions or even resource costs like MP instead of some other resource to help vary those actions up some. Maybe this isn't the solution you were looking for, but maybe it helps kind of get you thinking in a different way about this situation. Merry Christmas <3.
     
    #2
  3. TheoAllen

    TheoAllen Self-proclaimed jack of all trades Veteran

    Messages:
    4,080
    Likes Received:
    4,517
    Location:
    Riftverse
    First Language:
    Indonesian
    Primarily Uses:
    RMVXA
    The easiest way would be to create a different skill that has the same name. Your players will not notice it ;)
     
    #3
  4. Panda_Artist

    Panda_Artist Humble RPG Fan Member

    Messages:
    16
    Likes Received:
    1
    First Language:
    Portuguese
    Primarily Uses:
    RMVXA
    That would be a good way to solve it, yes. However. I am using Dai Ichi's skill core system

    http://dainekoichi.blogspot.com/2015/10/rmvxa-skill-core-system_5.html

    I want my characters to be very custamizable so they can really equip any skill. Unfortunately the script doesn't allow for me to make a copy of the same "skill core" even with entirely different skill ids.

    I sort of have found a way around this by playing around with battler Graphics, as I am also using Galv's animated battlers, but I would much prefer to use my own made animations for character skills.
     
    #4
  5. A-Moonless-Night

    A-Moonless-Night WINTER IS COMING Veteran

    Messages:
    476
    Likes Received:
    340
    Location:
    New Zealand
    First Language:
    English
    Primarily Uses:
    RMVXA
    Haven't tested it with Galv's battlers, but give this a shot:
    Code:
    =begin
    #==============================================================================#
    #   AMN Actor Animations
    #   Version 1.01
    #   Author: AMoonlessNight
    #   Date: 24 Dec 2018
    #   Latest: 24 Dec 2018
    #==============================================================================#
    #   UPDATE LOG
    #------------------------------------------------------------------------------#
    # 24 Dec 2018 - created the script
    #==============================================================================#
    #   TERMS OF USE
    #------------------------------------------------------------------------------#
    # - Please credit AMoonlessNight or A-Moonless-Night
    # - Free for non-commercial use
    # - Contact for commercial use
    # - I'd love to see your game if you end up using one of my scripts
    #==============================================================================#
    
    This script makes it so that you can give items and skills different animation
    IDs for different actors.
    
    Use the following notetag in skills and items:
    
    <actor ani: X Y>
    
    where X is the ID of the actor and Y is the ID of the animation.
    
    =end
    
    #==============================================================================
    #  Please do not edit below this point unless you know what you are doing.
    #==============================================================================
    
    class RPG::UsableItem
      attr_reader   :actor_ani
     
      def load_notetags_actor_ani
        @actor_ani = {}
        self.note.split(/[\r\n]+/).each { |line|
        case line
        when /<actor[ -_]+ani:*\s+(\d+)\s+(\d+)>/i
          @actor_ani[$1.to_i] = $2.to_i
        end
        }
      end
     
    end
    
    module DataManager
      class << self; alias :amn_ani_datamanager_loaddatabase :load_database; end
    
      def self.load_database
        amn_ani_datamanager_loaddatabase
        load_notetags_actor_ani
      end
    
      def self.load_notetags_actor_ani
        for group in [$data_skills, $data_items]
          for obj in group
            next if obj.nil?
            obj.load_notetags_actor_ani
          end
        end
      end
    end
    
    class Scene_Battle < Scene_Base
      alias amn_ani_scenebattle_shownormalanimation show_normal_animation
      def show_normal_animation(targets, animation_id, mirror = false)
        if @subject && @subject.is_a?(Game_Actor) && @subject.current_action && @subject.current_action.item
          if @subject.current_action.item.actor_ani.key?(@subject.id)
            animation_id = @subject.current_action.item.actor_ani[@subject.id]
          end
        end
        amn_ani_scenebattle_shownormalanimation(targets, animation_id, mirror)
      end
    end
     
    #5
    Sauteed_Onion likes this.
  6. Panda_Artist

    Panda_Artist Humble RPG Fan Member

    Messages:
    16
    Likes Received:
    1
    First Language:
    Portuguese
    Primarily Uses:
    RMVXA
    Amazing, truly remarkable!!

    I have placed a certain skill with the following notetags in this picture.

    and it worked marvelously so far!!! I do hope I used it correctly

    Thank you so much for this. Once the game is half finished I'll post a topic about it. If I encounter any problem i'll be sure to contact you!!
     

    Attached Files:

    #6
    Sauteed_Onion likes this.
  7. A-Moonless-Night

    A-Moonless-Night WINTER IS COMING Veteran

    Messages:
    476
    Likes Received:
    340
    Location:
    New Zealand
    First Language:
    English
    Primarily Uses:
    RMVXA
    Yep, looks about right. Glad it's working for you. :)
     
    #7
    Sauteed_Onion likes this.

Share This Page