Show / Hide Table of Contents

Class RDBLayout

Helper for laying out RDB (dungeon block) data in scene.

Inheritance
Object
RDBLayout
Namespace: DaggerfallWorkshop.Utility
Assembly: Assembly-CSharp.dll
Syntax
public static class RDBLayout

Fields

| Improve this Doc View Source

RDBSide

Declaration
public const float RDBSide = 51.2F
Field Value
Type Description
Single

Methods

| Improve this Doc View Source

AddActionDoors(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
| Improve this Doc View Source

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.

| Improve this Doc View Source

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
| Improve this Doc View Source

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
| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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
| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

IsNPCFlat(Int32)

Declaration
public static bool IsNPCFlat(int archive)
Parameters
Type Name Description
Int32 archive
Returns
Type Description
Boolean
| Improve this Doc View Source

IsTorchFlat(Int32, Int32)

Declaration
public static bool IsTorchFlat(int archive, int record)
Parameters
Type Name Description
Int32 archive
Int32 record
Returns
Type Description
Boolean
| Improve this Doc View Source

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
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX