Class RDBLayout
Helper for laying out RDB (dungeon block) data in scene.
Namespace: DaggerfallWorkshop.Utility
Assembly: Assembly-CSharp.dll
Syntax
public static class RDBLayout
Fields
| Improve this Doc View SourceRDBSide
Declaration
public const float RDBSide = 51.2F
Field Value
Type | Description |
---|---|
Single |
Methods
| Improve this Doc View SourceAddActionDoors(GameObject, Dictionary<Int32, RDBLayout.ActionLink>, ref DFBlock, Int32[], Boolean)
Add actions doors to block.
Declaration
public static void AddActionDoors(GameObject go, Dictionary<int, RDBLayout.ActionLink> actionLinkDict, ref DFBlock blockData, int[] textureTable, bool serialize = true)
Parameters
Type | Name | Description |
---|---|---|
GameObject | go | |
Dictionary<Int32, RDBLayout.ActionLink> | actionLinkDict | |
DFBlock | blockData | |
Int32[] | textureTable | |
Boolean | serialize |
AddFixedEnemies(GameObject, DFBlock.RdbObject[], ref DFBlock, GameObject[], Boolean)
Add fixed enemies.
Declaration
public static void AddFixedEnemies(GameObject go, DFBlock.RdbObject[] editorObjects, ref DFBlock blockData, GameObject[] startMarkers, bool serialize = true)
Parameters
Type | Name | Description |
---|---|---|
GameObject | go | GameObject to add monsters to. |
DFBlock.RdbObject[] | editorObjects | Editor objects containing flats. |
DFBlock | blockData | |
GameObject[] | startMarkers | |
Boolean | serialize | Allow for serialization when available. |
AddFlats(GameObject, Dictionary<Int32, RDBLayout.ActionLink>, ref DFBlock, out DFBlock.RdbObject[], out GameObject[], out GameObject[], DFRegion.DungeonTypes)
Add all block flats.
Declaration
public static void AddFlats(GameObject go, Dictionary<int, RDBLayout.ActionLink> actionLinkDict, ref DFBlock blockData, out DFBlock.RdbObject[] editorObjectsOut, out GameObject[] startMarkersOut, out GameObject[] enterMarkersOut, DFRegion.DungeonTypes dungeonType)
Parameters
Type | Name | Description |
---|---|---|
GameObject | go | |
Dictionary<Int32, RDBLayout.ActionLink> | actionLinkDict | |
DFBlock | blockData | |
DFBlock.RdbObject[] | editorObjectsOut | |
GameObject[] | startMarkersOut | |
GameObject[] | enterMarkersOut | |
DFRegion.DungeonTypes | dungeonType |
AddLights(GameObject, ref DFBlock)
Add light prefabs.
Declaration
public static void AddLights(GameObject go, ref DFBlock blockData)
Parameters
Type | Name | Description |
---|---|---|
GameObject | go | |
DFBlock | blockData |
AddRandomEnemies(GameObject, DFBlock.RdbObject[], DFRegion.DungeonTypes, Single, ref DFBlock, GameObject[], Int32, Int32, Boolean)
Add random enemies from encounter tables based on dungeon type, monster power, and seed.
Declaration
public static void AddRandomEnemies(GameObject go, DFBlock.RdbObject[] editorObjects, DFRegion.DungeonTypes dungeonType, float monsterPower, ref DFBlock blockData, GameObject[] startMarkers, int monsterVariance = 4, int seed = 0, bool serialize = true)
Parameters
Type | Name | Description |
---|---|---|
GameObject | go | GameObject to add monsters to. |
DFBlock.RdbObject[] | editorObjects | Editor objects containing flats. |
DFRegion.DungeonTypes | dungeonType | Dungeon type selects the encounter table. |
Single | monsterPower | Value between 0-1 for lowest monster power to highest. |
DFBlock | blockData | |
GameObject[] | startMarkers | |
Int32 | monsterVariance | Adjust final index +/- this value in encounter table. |
Int32 | seed | Random seed for encounters. |
Boolean | serialize | Allow for serialization when available. |
AddWater(GameObject, Vector3, Int16)
Add dungeon water plane prefab to RDB block post layout. This is called from DaggerfallDungeon layout as water level is available from map data, not RDB data.
Declaration
public static void AddWater(GameObject parent, Vector3 position, short nativeBlockWaterLevel)
Parameters
Type | Name | Description |
---|---|---|
GameObject | parent | |
Vector3 | position | |
Int16 | nativeBlockWaterLevel | Native water level from map data. |
AssignFixedTreasure(GameObject, DFBlock.RdbObject, ref DFBlock, DFRegion.DungeonTypes, Boolean)
Declaration
public static void AssignFixedTreasure(GameObject parent, DFBlock.RdbObject obj, ref DFBlock blockData, DFRegion.DungeonTypes dungeonType, bool serialize = true)
Parameters
Type | Name | Description |
---|---|---|
GameObject | parent | |
DFBlock.RdbObject | obj | |
DFBlock | blockData | |
DFRegion.DungeonTypes | dungeonType | |
Boolean | serialize |
CreateBaseGameObject(ref DFBlock, Dictionary<Int32, RDBLayout.ActionLink>, Int32[], Boolean, DaggerfallRDBBlock, Boolean, Boolean)
Instantiate base RDB block by DFBlock data.
Declaration
public static GameObject CreateBaseGameObject(ref DFBlock blockData, Dictionary<int, RDBLayout.ActionLink> actionLinkDict, int[] textureTable = null, bool allowExitDoors = true, DaggerfallRDBBlock cloneFrom = null, bool serialize = true, bool isAutomapRun = false)
Parameters
Type | Name | Description |
---|---|---|
DFBlock | blockData | Block data. |
Dictionary<Int32, RDBLayout.ActionLink> | actionLinkDict | |
Int32[] | textureTable | Optional texture table for dungeon. |
Boolean | allowExitDoors | Add exit doors to block. |
DaggerfallRDBBlock | cloneFrom | Clone and build on a prefab object template. |
Boolean | serialize | Allow for serialization of supported sub-objects. |
Boolean | isAutomapRun |
Returns
Type | Description |
---|---|
GameObject | Block GameObject. |
CreateBaseGameObject(String, Dictionary<Int32, RDBLayout.ActionLink>, out DFBlock, Int32[], Boolean, DaggerfallRDBBlock, Boolean, Boolean)
Create base RDB block by name and get back DFBlock data.
Declaration
public static GameObject CreateBaseGameObject(string blockName, Dictionary<int, RDBLayout.ActionLink> actionLinkDict, out DFBlock blockDataOut, int[] textureTable = null, bool allowExitDoors = true, DaggerfallRDBBlock cloneFrom = null, bool serialize = true, bool isAutomapRun = false)
Parameters
Type | Name | Description |
---|---|---|
String | blockName | Name of block. |
Dictionary<Int32, RDBLayout.ActionLink> | actionLinkDict | |
DFBlock | blockDataOut | DFBlock data out. |
Int32[] | textureTable | Optional texture table for dungeon. |
Boolean | allowExitDoors | Add exit doors to block. |
DaggerfallRDBBlock | cloneFrom | Clone and build on a prefab object template. |
Boolean | serialize | Allow for serialization of supported sub-objects. |
Boolean | isAutomapRun |
Returns
Type | Description |
---|---|
GameObject | Block GameObject. |
CreateBaseGameObject(String, Dictionary<Int32, RDBLayout.ActionLink>, Int32[], Boolean, DaggerfallRDBBlock, Boolean)
Create base RDB block by name.
Declaration
public static GameObject CreateBaseGameObject(string blockName, Dictionary<int, RDBLayout.ActionLink> actionLinkDict, int[] textureTable = null, bool allowExitDoors = true, DaggerfallRDBBlock cloneFrom = null, bool serialize = true)
Parameters
Type | Name | Description |
---|---|---|
String | blockName | Name of block. |
Dictionary<Int32, RDBLayout.ActionLink> | actionLinkDict | |
Int32[] | textureTable | Optional texture table for dungeon. |
Boolean | allowExitDoors | Add exit doors to block. |
DaggerfallRDBBlock | cloneFrom | Clone and build on a prefab object template. |
Boolean | serialize | Allow for serialization of supported sub-objects. |
Returns
Type | Description |
---|---|
GameObject | Block GameObject. |
IsNPCFlat(Int32)
Declaration
public static bool IsNPCFlat(int archive)
Parameters
Type | Name | Description |
---|---|---|
Int32 | archive |
Returns
Type | Description |
---|---|
Boolean |
IsTorchFlat(Int32, Int32)
Declaration
public static bool IsTorchFlat(int archive, int record)
Parameters
Type | Name | Description |
---|---|---|
Int32 | archive | |
Int32 | record |
Returns
Type | Description |
---|---|
Boolean |
LinkActionNodes(Dictionary<Int32, RDBLayout.ActionLink>)
Links action chains together.
Declaration
public static void LinkActionNodes(Dictionary<int, RDBLayout.ActionLink> actionLinkDict)
Parameters
Type | Name | Description |
---|---|---|
Dictionary<Int32, RDBLayout.ActionLink> | actionLinkDict |