AchievementTier - jimdroberts/FishMMO GitHub Wiki
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.
-
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.
- Create and configure
AchievementTier
instances as part of anAchievementTemplate
asset. - Assign required values, messages, sounds, and rewards in the Inspector or via code.
- Reference tiers in your achievement or progression systems as needed.
- No additional configuration is required; tiers are ready for use after setup.
// 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
}
- 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.