public sealed class ProgressionStateOne character's progression: the durable half of doc 28 § Progression.
Remarks
An IRequirementContext, which is the whole point. Doc 28's own example is requires: [ Level >= 80, HasTag(Profession.Smithing), … ], and this is what makes that resolve: it supplies Level, GearScore and every profession's and faction's number, plus the tags for every rank and tier reached.
⚠ The same string names a track's tag and its number. Profession.Smithing is both "has the profession" and "the skill in it", so a designer learns one name per track rather than two — and a requirement cannot ask about a value whose tag does not exist.
⚠ Gear score is a number a game sets, not one this computes. Averaging an item level needs the inventory, and a progression library that depended on containers would make a game with no items unable to have levels. Doc 28 lists it under Progression, and this is the honest reading of that.
Fields and properties (15)
public ProgressionLibrary LibraryWhere the curves, trees and tracks come from.
public int LevelWhat level they are.
public int ExperienceHow much experience they have towards the next level.
public long TotalExperienceHow much they have ever earned.
public bool IsMaximumLevelWhether they are as high as the curve goes.
public int ToNextLevelHow much they need for the next level, or zero at the maximum.
public DefId SpecialisationWhich specialisation they chose, or None.
public float GearScoreHow good their equipment is. A number a game computes and sets.
public GameplayTagSet TagsEvery tag their progression grants: rank tags, tier tags, talents, the specialisation.
public int TalentPointsHow many talent points they have to spend. A game's rule; set it.
public IEnumerable<KeyValuePair<DefId, int>> SkillsEvery profession they have any skill in, in id order.
public IEnumerable<KeyValuePair<DefId, int>> StandingsEvery faction they have any standing with, in id order.
public IEnumerable<KeyValuePair<DefId, TalentAllocation>> AllocationsEvery tree they have taken anything in, in id order.
public static AttributeId LevelValueWhat a requirement calls the character's level.
public static AttributeId GearScoreValueWhat a requirement calls how good their equipment is.
Methods (17)
public ProgressionState(ProgressionLibrary library)Makes a fresh character at level one.
public ExperienceGain Award(int experience)Awards experience, levelling up as many times as it buys.
public void SetLevel(int level)Sets the level outright. What a boost, a template character and a test do.
public void Seat(int level, int experience, long total)Puts a level back exactly as it was, with no checks and nothing zeroed.
public void SeatSkill(DefId profession, int skill)Puts a profession's skill back with no checks. The authority's, like Seat.
public void SeatStanding(DefId faction, int standing)Puts a faction standing back with no checks. The authority's, like Seat.
public void SeatTalents(DefId tree, TalentAllocation allocation)Puts a talent allocation back with no validation at all.
public void SeatSpecialisation(DefId specialisation)Puts a specialisation back without asking whether they would still qualify.
public int SkillIn(DefId profession)How much skill they have in a profession.
public int Train(DefId profession, int amount)Adds skill in a profession, clamped to its maximum.
public int StandingWith(DefId faction)What standing they have with a faction.
public int Earn(DefId faction, int amount)Changes standing with a faction, clamped to its bounds.
public TalentAllocation AllocationIn(DefId tree)Their allocation in a talent tree.
public TalentVerdict Allocate(DefId tree, TalentAllocation allocation)Replaces an allocation, if it is legal.
public bool Specialise(DefId specialisation)Chooses a specialisation, if its requirements are met.
public int Modifiers(ModifierSource source, ICollection<Modifier> into)Everything their progression does to their stats.
public bool TryGetValue(AttributeId subject, out float value)A number the subject can be asked for.
Used by (7)
- MmoRulesMmo.Shared
- ContentVixen.Gameplay.Progression.Tests
- ExperienceTestsVixen.Gameplay.Progression.Tests
- ProgressionSectionVixen.Live.Gameplay
- ProgressionSectionTestsVixen.Live.Gameplay.Tests
- ProgressionStateTestsVixen.Gameplay.Progression.Tests
- TalentTreeTestsVixen.Gameplay.Progression.Tests