Class WorldDataReplacement
Handles import and injection of custom block data with the purpose of providing modding support. Block data is imported from mod bundles with load order or loaded directly from disk.
Namespace: DaggerfallWorkshop.Utility.AssetInjection
Assembly: Assembly-CSharp.dll
Syntax
public class WorldDataReplacement
Properties
| Improve this Doc View SourceWorldDataPath
Path to custom world data on disk.
Declaration
public static string WorldDataPath { get; }
Property Value
| Type | Description |
|---|---|
| String |
Methods
| Improve this Doc View SourceGetBuildingReplacementData(String, Int32, Int32, out BuildingReplacementData)
Checks for replacement building data within a block.
Declaration
public static bool GetBuildingReplacementData(string blockName, int blockIndex, int recordIndex, out BuildingReplacementData buildingData)
Parameters
| Type | Name | Description |
|---|---|---|
| String | blockName | Block name |
| Int32 | blockIndex | Block index |
| Int32 | recordIndex | Record index of building within block |
| BuildingReplacementData | buildingData | BuildingReplacementData output |
Returns
| Type | Description |
|---|---|
| Boolean | True if replacement data found, false otherwise |
GetBuildingReplacementFilename(String, Int32, Int32, String)
Declaration
public static string GetBuildingReplacementFilename(string blockName, int blockIndex, int recordIndex, string variant = "")
Parameters
| Type | Name | Description |
|---|---|---|
| String | blockName | |
| Int32 | blockIndex | |
| Int32 | recordIndex | |
| String | variant |
Returns
| Type | Description |
|---|---|
| String |
GetDFBlockReplacementData(Int32, String, out DFBlock)
Checks for replacement block data. Only RDB block replacement is currently possible.
Declaration
public static bool GetDFBlockReplacementData(int block, string blockName, out DFBlock dfBlock)
Parameters
| Type | Name | Description |
|---|---|---|
| Int32 | block | Block index |
| String | blockName | Block name |
| DFBlock | dfBlock | DFBlock data output |
Returns
| Type | Description |
|---|---|
| Boolean | True if replacement data found, false otherwise |
GetDFBlockReplacementFilename(String, String)
Declaration
public static string GetDFBlockReplacementFilename(string blockName, string variant = "")
Parameters
| Type | Name | Description |
|---|---|---|
| String | blockName | |
| String | variant |
Returns
| Type | Description |
|---|---|
| String |
GetDFLocationReplacementData(Int32, Int32, out DFLocation)
Checks for replacement location data.
Declaration
public static bool GetDFLocationReplacementData(int regionIndex, int locationIndex, out DFLocation dfLocation)
Parameters
| Type | Name | Description |
|---|---|---|
| Int32 | regionIndex | Region index |
| Int32 | locationIndex | Location index |
| DFLocation | dfLocation | DFLocation data output |
Returns
| Type | Description |
|---|---|
| Boolean | True if replacement data found, false otherwise |
GetDFLocationReplacementFilename(Int32, Int32, String)
Declaration
public static string GetDFLocationReplacementFilename(int regionIndex, int locationIndex, string variant = "")
Parameters
| Type | Name | Description |
|---|---|---|
| Int32 | regionIndex | |
| Int32 | locationIndex | |
| String | variant |
Returns
| Type | Description |
|---|---|
| String |
GetDFRegionAdditionalLocationData(Int32, ref DFRegion)
Checks a region for added location data. (i.e. new locations)
Declaration
public static bool GetDFRegionAdditionalLocationData(int regionIndex, ref DFRegion dfRegion)
Parameters
| Type | Name | Description |
|---|---|---|
| Int32 | regionIndex | Region index |
| DFRegion | dfRegion | DFRegion data output updated with any added locations found |
Returns
| Type | Description |
|---|---|
| Boolean | True if added blocks had indices assigned, false otherwise |
GetDFRegionReplacementFilename(Int32)
Declaration
public static string GetDFRegionReplacementFilename(int regionIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| Int32 | regionIndex |
Returns
| Type | Description |
|---|---|
| String |
GetNewDFBlockIndex(String)
Gets the index for a new added block
Declaration
public static int GetNewDFBlockIndex(string blockName)
Parameters
| Type | Name | Description |
|---|---|---|
| String | blockName | Block name |
Returns
| Type | Description |
|---|---|
| Int32 | Block index, or -1 if not found |
GetNewDFBlockName(Int32)
Gets the name for a new added block
Declaration
public static string GetNewDFBlockName(int block)
Parameters
| Type | Name | Description |
|---|---|---|
| Int32 | block | Block index |
Returns
| Type | Description |
|---|---|
| String | Block name, or null if not found |
GetNewDFLocationIndex(Int32, String)
Gets the index for a new location after region is loaded
Declaration
public static int GetNewDFLocationIndex(int regionIndex, string locationName)
Parameters
| Type | Name | Description |
|---|---|---|
| Int32 | regionIndex | Region index |
| String | locationName |
Returns
| Type | Description |
|---|---|
| Int32 | Location index, or -1 if not found |
LoadNewDFLocationVariant(Int32, Int32, String)
Declaration
public static bool LoadNewDFLocationVariant(int regionIndex, int locationIndex, string variant)
Parameters
| Type | Name | Description |
|---|---|---|
| Int32 | regionIndex | |
| Int32 | locationIndex | |
| String | variant |
Returns
| Type | Description |
|---|---|
| Boolean |
MakeLocationKey(Int32, Int32)
Construct a location key. Note this is not the same as the LocationId in the DFLocation struct but may be a good value to use for new locations.
Declaration
public static int MakeLocationKey(int regionIndex, int locationIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| Int32 | regionIndex | |
| Int32 | locationIndex |
Returns
| Type | Description |
|---|---|
| Int32 |