AchievementTier - jimdroberts/FishMMO GitHub Wiki

Description

Represents a single tier or milestone within an achievement, including rewards and completion data. Used to define incremental goals and associated rewards for achievements in FishMMO.


API Access

Fields

  • public uint Value

    The value required to complete this tier (e.g., number of kills, points, etc).

  • public string TierCompleteMessage

    The message shown to the player when this tier is completed.

  • public AudioClip CompleteSound

    The sound played when this tier is completed.

  • public List AbilityRewards

    List of ability templates rewarded for completing this tier.

  • public List AbilityEventRewards

    List of ability events rewarded for completing this tier.

  • public List ItemRewards

    List of item templates rewarded for completing this tier.

  • public List BuffRewards

    List of buff templates rewarded for completing this tier.

  • public List TitleRewards

    List of title strings rewarded for completing this tier.

Properties

Methods


Basic Usage

Setup

  1. Create and configure AchievementTier instances as part of an AchievementTemplate asset.
  2. Assign required values, messages, sounds, and rewards in the Inspector or via code.
  3. Reference tiers in your achievement or progression systems as needed.
  4. No additional configuration is required; tiers are ready for use after setup.

Example

// Example 1: Accessing tier data
AchievementTier tier = ...; // Reference to the tier
uint required = tier.Value;
string message = tier.TierCompleteMessage;

// Example 2: Granting rewards for a completed tier
foreach (var item in tier.ItemRewards)
{
    // Grant item to player
}
foreach (var title in tier.TitleRewards)
{
    // Grant title to player
}

Best Practices

  • Use clear, incremental values for each tier to encourage player progression.
  • Provide meaningful and varied rewards to increase player motivation.
  • Keep completion messages concise and celebratory for better user experience.
  • Ensure all reward lists are properly populated to avoid null reference errors.
⚠️ **GitHub.com Fallback** ⚠️