Vixen
c7401864
csharp
public sealed class AchievementCriterionDefinition

One thing that has to happen a number of times.

Read the guide page for this →

Remarks

Where this diverges from doc 28's G-Q3, and why. G-Q3 answers that achievements belong in Collections because "an achievement is an unlock with criteria, criteria are tag queries, and the state shape is identical". The first and third are exactly right and this library is built on them. The second covers "have all five keys" and does not cover "kill thirty boars" — a tag query is a standing test and cannot count. So an achievement here has both: Requires is the standing half, in the kernel's requirement algebra rather than a bare tag query so it can also ask about an attribute, and criteria are the counted half.

The counted half rides the kernel's event bus, which anticipated it. GameplayEventBus's own remarks name achievements and collections as the listeners it exists for. Nothing posts to achievements; combat posts kills and this counts the ones it was asked about.

⚠ The tag query here is over the subject's tags, not the player's. "Kill thirty undead" filters the victim. The player's own standing is Requires, and keeping the two apart is what stops "kill thirty things while poisoned" from silently meaning "kill thirty poisoned things".

Fields and properties (8)

  • public string Description

    What it says in the UI — "Slay thirty undead in Queensdale".

  • public string Verb

    The verb prefix it counts — Event.Kill.

  • public string Subject

    The exact subject, by address, or empty for any.

  • public string Scene

    The map, by address, or empty for anywhere.

  • public List<string> All

    Prefixes the subject must all match.

  • public List<string> Any

    Prefixes the subject must match at least one of.

  • public List<string> None

    Prefixes the subject must match none of.

  • public int Count

    How many it takes.

Used by (8)

  • AchievementCriterionVixen.Gameplay.Collections
  • AchievementDefinitionVixen.Gameplay.Collections
  • CollectionLibraryVixen.Gameplay.Collections
  • CollectionTestsVixen.Gameplay.Collections.Tests
  • ContentVixen.Gameplay.Collections.Tests
  • TypeRegistrationVixen.Gameplay.Collections
  • Vixen_Gameplay_Collections_AchievementCriterionDefinitionSerializerVixen.Gameplay.Collections
  • Vixen_Gameplay_Collections_AchievementDefinitionSerializerVixen.Gameplay.Collections