Table of Contents

Class TuningDescriptionInstance

Namespace
LlamaLogic.TuningDescriptions
Assembly
LlamaLogic.TuningDescriptions.dll

Represents the description of a class of instance tuning (an Instance element), such as Buff (🔒)

public sealed class TuningDescriptionInstance : TuningDescriptionDocument
Inheritance
TuningDescriptionInstance
Inherited Members

Remarks

Members holds only the tunables the class declares; GetEffectiveMembers() adds those it inherits.

Properties

Class

Gets the Python class of the instance tuning (its class attribute)

public string Class { get; }

Property Value

string

DeletedMembers

Gets the names of the inherited tunables the class removes (its Deleted elements)

public IReadOnlyList<string> DeletedMembers { get; }

Property Value

IReadOnlyList<string>

Description

Gets the description of the class for tuners (its description attribute)

public string? Description { get; }

Property Value

string

ExportModes

Gets the destinations to which the whole class is exported (its export_modes attribute), or null if the description does not specify them

public TuningDescriptionExportModes? ExportModes { get; }

Property Value

TuningDescriptionExportModes?

InstanceType

Gets the type of instance tuning the class is (its instance_type attribute), such as buff

public string? InstanceType { get; }

Property Value

string

Members

Gets the tunables the class declares, in document order

public IReadOnlyList<TunableDescription> Members { get; }

Property Value

IReadOnlyList<TunableDescription>

Module

Gets the Python module that defines the class (its module attribute)

public string? Module { get; }

Property Value

string

Parents

Gets the classes from which the class inherits (its parents attribute), in declaration order

public IReadOnlyList<string> Parents { get; }

Property Value

IReadOnlyList<string>

Methods

GetEffectiveMembers()

Gets the tunables of the class, including those it inherits and excluding those it deletes

public IReadOnlyList<TunableDescription> GetEffectiveMembers()

Returns

IReadOnlyList<TunableDescription>

Remarks

Each tunable is the description from the first class in GetMethodResolutionOrder() that declares or deletes it, as in Python. The tunables are in the order the game collects them: walking from the most basic class to this one, each class first removes the tunables it deletes and then adds or replaces those it declares, a newly added tunable going to the end.

Exceptions

InvalidDataException

The class's inheritance cannot be resolved (see GetMethodResolutionOrder())

GetMember(string)

Gets the tunable the class declares with the specified name, or null if it declares none

public TunableDescription? GetMember(string name)

Parameters

name string

Returns

TunableDescription

GetMethodResolutionOrder()

Gets this class followed by the classes from which it inherits, in the order Python searches them (the C3 linearization of Parents)

public IReadOnlyList<TuningDescriptionInstance> GetMethodResolutionOrder()

Returns

IReadOnlyList<TuningDescriptionInstance>

Exceptions

InvalidDataException

A parent is not in the set, the inheritance is circular, or the parents cannot be linearized