Class ModelConfigList
Namespace: ValveResourceFormat.ResourceTypes.ModelData
Assembly: ValveResourceFormat.dll
The configs of a model: named sets of elements that attach other models to it and set its material group, color and body groups. An entity picks between them with the config_state block of its model_state key, starting from ModelConfigList.SpawnConfigName.
public sealed class ModelConfigListInheritance
object ← ModelConfigList
Constructors
ModelConfigList(KVObject?)
Initializes the configs from the m_pModelConfigList of a model.
public ModelConfigList(KVObject? data)Parameters
data KVObject?
The config list, or null for a model without one.
Fields
SpawnConfigName
The config an entity is built with when it spawns.
public const string SpawnConfigName = "@spawn"Field Value
string
Properties
Configs
Gets the configs, in compiled order.
public IReadOnlyList<ModelConfig> Configs { get; }Property Value
Methods
Evaluate(string, KVObject?, Random)
Builds the model the way a config and the configs its picks lead to assemble it.
public ModelConfigResult? Evaluate(string configName, KVObject? state, Random random)Parameters
configName string
The config to start from, usually ModelConfigList.SpawnConfigName.
state KVObject?
The config_state of the entity: the choice of each pick by the path of its element, and the _color and _matgrp of attached models that leave those to the entity.
random Random
Picks the choice of a random pick the state does not settle.
Returns
The result, or null when the model has no config of that name.
Find(string)
Gets a config by its name.
public ModelConfig? Find(string name)Parameters
name string
Returns
The config, or null when the model has none of that name.

