Addon Animation Tags

Animation Tags

By default, all animations in uMMORPG are played using the skills' names. This requires you to create a unique animation parameter and animation per skill in your game, and you cannot have multiple skills that use the same animation.

This addon solves that issue: instead of using the name, you assign a tag to each skill, and the skill animation is played using this tag (instead of the name). This allows you to reduce the amount of animation parameters and animations in your project and makes it possible to re-use the same animation for multiple skills.

Key Features:

  • Tag-Based Animations: Allows assigning tags to skills to play animations, instead of using skill names.
  • Reduction of Animation Parameters: Decreases the number of animation parameters needed in your project.
  • Animation Reuse: Enables reusing the same animation for multiple different skills.
  • Simplified Animation Management: Eases the management of animations by reducing the number of unique animations required.

Benefits:

  • Resource Optimization: Reduces the amount of animations and animation parameters, optimizing project resources.
  • Time-Saving: Simplifies the process of creating and managing animations, allowing for faster development.
  • Increased Flexibility: Provides more flexibility in skill creation by allowing the same animation to be used for different skills.
  • Visual Consistency: Maintains visual consistency by reusing animations for similar skills.

How It Works:

  • Tag Assignment: Developers assign a tag to each skill instead of using its name to play the animation.
  • Tag-Based Animation Playback: Skill animations are played using the assigned tags.
  • Parameter Reduction: Lessens the need to create unique animation parameters for each skill.
  • Efficient Reuse: Enables efficient reuse of existing animations for multiple skills, simplifying asset management.

Optimize your animation management and simplify skill development with the AnimationTag Addon, allowing for more efficient and flexible use of animations in your uMMORPG project.


Tutoriel for installation

Installation

  1. Open files PLayer.cs , Monster.cs, Pet.cs

  2. Search for this code:

                  foreach (Skill skill in skills)
            anim.SetBool(skill.name, skill.CastTimeRemaining() > 0)
  1. Replace with this code:

                                     if         (state == "CASTING")
                 {
                     // Reset all animation bools for skills
                     foreach (Skill skill in skills.skills)
    #if _iMMOANIMATIONTAGS
                     {
                         //  if (!skill.noAnimation || !skill.animationType == SkillAnimationType.NoAnimation)
                         if (skill.animationType != SkillAnimationType.NoAnimation)
                         {
                             if (skill.animationType == SkillAnimationType.ScriptableName)
                                 animator.SetBool(skill.name, false);
                             else if (skill.animationType == SkillAnimationType.AnimationTag && !string.IsNullOrEmpty(skill.animationTag) && validParameters.Contains(skill.animationTag))
                                 animator.SetBool(skill.animationTag, false);
                         }
                     }
    
                     // Set animation bool for current skill
                     foreach (Skill skill in skills.skills)
                     {
                         if (skills.skills[skills.currentSkill].name == skill.name && skill.level > 0 && !(skill.data is PassiveSkill))
                         {
                             if (skill.animationType != SkillAnimationType.NoAnimation)
                             {
                                 if (skill.animationType == SkillAnimationType.ScriptableName)
                                     animator.SetBool(skill.name, skill.CastTimeRemaining() > 0);
                                 else if (skill.animationType == SkillAnimationType.AnimationTag && !string.IsNullOrEmpty(skill.animationTag) && validParameters.Contains(skill.animationTag))
                                     animator.SetBool(skill.animationTag, skill.CastTimeRemaining() > 0);
                             }
                         }
                     }
    #else
                         animator.SetBool(skill.name, skill.CastTimeRemaining() > 0);
    #endif
                 }
  2. In Player.cs and Monster.cs:

    1. Add this code before the Start() function:
                               #        if     _iMMOANIMATIONTAGS
               List<string> validParameters = new List<string>();
           #endif
    2. Search for the Start() function and add this code before the end of the function:
                     #    if _iMMOANIMATIONTAGS
               for (int i = 0; i < animator.parameters.Length; i++)
               {
                   validParameters.Add(animator.parameters[i].name);
               }
           #endif
  3. In Pet.cs:

    1. Add this code:

                               #        if     _iMMOANIMATIONTAGS
               List<string> validParameters = new List<string>();
      
               // networkbehaviour ////////////////////////////////////////////////////////
               protected override void Start()
               {
                   for (int i = 0; i < animator.parameters.Length; i++)
                   {
                       validParameters.Add(animator.parameters[i].name);
                   }
               }
           #endif

Requirement

  1. Tools

Add Define

  1. _iMMOANIMATIONTAGS

Video Tutoriel

  1. Video Tutoriel

Addon Date

  1. Created : 2024-06-02
  2. Updated : 2024-06-02

Tutoriel Date

  1. Update : 2024-06-07 00:22:54

File Date

  1. Update : 2025-05-28

Explore Our Addons:

Inventory Order addon for uMMORPG
Inventory Order

this tiny addon allows your players to reorganize the inventory in one click

Crafting Extended addon for uMMORPG
Crafting Extended

A replacement for the default crafting system. Allows learning recipes, accessing craftstations, variable ingredient amount, variable result items and more.

Better Tab Target addon for uMMORPG
Better Tab Target

Improves the target system and allows you to change targets by pressing tab with a chosen radius, it also allows you to remove the indicator from the ground once there is no longer a target