Skip to main content

Distribution<TThis, T, TItem, TFestivityGroup>.BaseItem

A class in Root.Township, Alta.Caves.

One weighted entry in a distribution: the result object and how its weight changes with biome attributes.

Constructors​

MemberWhat it is
BaseItem()Creates a Distribution with default values.

Fields​

4 private and internal fields
MemberWhat it is
private float baseValueStarting weight when attributes are given.
private AttributeCurveRange[] multipliersAttribute curves that scale the weight by attribute value.
private float noAttributeValueWeight used when no attribute set is passed.
private T topicBacking field for Topic.

Properties​

MemberWhat it is
T Topic { get; }The object this entry returns when picked.

Methods​

MemberWhat it is
float GetValue(AttributeSet attributes = null)Weight of this entry: noAttributeValue with no attributes, otherwise baseValue times the topic's own evaluation (if it is an IDistributionValue) and each attribute multiplier, never below 0.
void Migrate<TThisOther, TOther, TItemOther, TFestivityGroupOther>(TItemOther other, Func<TOther, T> convert)Copies weights and multipliers from another item type, converting the topic.