Class WorldDataVariants
Handles variants of world data overrides for a more dynamic world.
Namespace: DaggerfallWorkshop.Utility.AssetInjection
Assembly: Assembly-CSharp.dll
Syntax
public static class WorldDataVariants
  Fields
| Improve this Doc View SourceAnyLocationKey
Declaration
public const int AnyLocationKey = -8
  Field Value
| Type | Description | 
|---|---|
| Int32 | 
NoVariant
Declaration
public const string NoVariant = ""
  Field Value
| Type | Description | 
|---|---|
| String | 
Methods
| Improve this Doc View SourceClear()
Declaration
public static void Clear()
  GetBlockVariant(String)
Declaration
public static string GetBlockVariant(string blockName)
  Parameters
| Type | Name | Description | 
|---|---|---|
| String | blockName | 
Returns
| Type | Description | 
|---|---|
| String | 
GetBuildingVariant(ref BlockRecordKey, String)
Declaration
public static string GetBuildingVariant(ref BlockRecordKey blockRecordKey, string blockName)
  Parameters
| Type | Name | Description | 
|---|---|---|
| BlockRecordKey | blockRecordKey | |
| String | blockName | 
Returns
| Type | Description | 
|---|---|
| String | 
GetBuildingVariant(Int32, Int32, String, Int32)
Declaration
public static string GetBuildingVariant(int regionIndex, int locationIndex, string blockName, int recordIndex)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Int32 | regionIndex | |
| Int32 | locationIndex | |
| String | blockName | |
| Int32 | recordIndex | 
Returns
| Type | Description | 
|---|---|
| String | 
GetLocationVariant(Int32, out Boolean)
Declaration
public static string GetLocationVariant(int locationKey, out bool newLocation)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Int32 | locationKey | |
| Boolean | newLocation | 
Returns
| Type | Description | 
|---|---|
| String | 
GetWorldVariationSaveData()
Declaration
public static WorldDataVariants.WorldVariationData_v1 GetWorldVariationSaveData()
  Returns
| Type | Description | 
|---|---|
| WorldDataVariants.WorldVariationData_v1 | 
RestoreWorldVariationData(WorldDataVariants.WorldVariationData_v1)
Declaration
public static void RestoreWorldVariationData(WorldDataVariants.WorldVariationData_v1 worldVariationData)
  Parameters
| Type | Name | Description | 
|---|---|---|
| WorldDataVariants.WorldVariationData_v1 | worldVariationData | 
SetBlockVariant(String, String, Int32)
Sets a variant for a block.
Declaration
public static bool SetBlockVariant(string blockName, string variant, int locationKey = -8)
  Parameters
| Type | Name | Description | 
|---|---|---|
| String | blockName | Block name  | 
      
| String | variant | Variant name  | 
      
| Int32 | locationKey | Location key if the variant is only for a specific location  | 
      
Returns
| Type | Description | 
|---|---|
| Boolean | True if overwriting an existing variant set for this location  | 
      
SetBuildingVariant(String, Int32, String, Int32)
Sets a variant for a building. (block record)
Declaration
public static bool SetBuildingVariant(string blockName, int recordIndex, string variant, int locationKey = -8)
  Parameters
| Type | Name | Description | 
|---|---|---|
| String | blockName | Block name  | 
      
| Int32 | recordIndex | |
| String | variant | Variant name  | 
      
| Int32 | locationKey | Location key if the variant is only for a specific location  | 
      
Returns
| Type | Description | 
|---|---|
| Boolean | True if overwriting an existing variant set for this location  | 
      
SetLastLocationKeyTo(Int32, Int32)
Sets the last location key to specified location in region. Used before entering buildings to ensure that the correct location specific variant can be found.
Declaration
public static void SetLastLocationKeyTo(int regionIndex, int locationIndex)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Int32 | regionIndex | |
| Int32 | locationIndex | 
SetLocationVariant(Int32, Int32, String)
Sets a variant for a location.
Declaration
public static bool SetLocationVariant(int regionIndex, int locationIndex, string variant)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Int32 | regionIndex | Region index  | 
      
| Int32 | locationIndex | Location index  | 
      
| String | variant | Variant name  | 
      
Returns
| Type | Description | 
|---|---|
| Boolean | True if overwriting an existing variant set for this location  | 
      
SetNewLocationVariant(Int32, String, String)
Sets a variant for a new location.
Declaration
public static bool SetNewLocationVariant(int regionIndex, string locationName, string variant)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Int32 | regionIndex | Region index  | 
      
| String | locationName | Location name (as index is assigned at runtime)  | 
      
| String | variant | Variant name  | 
      
Returns
| Type | Description | 
|---|---|
| Boolean | True if overwriting an existing variant set for this location  |