Show / Hide Table of Contents

Class RMBLayout

Helper for laying out RMB (city block) data in scene.

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

Fields

| Improve this Doc View Source

BulletinBoardModelID

Declaration
public const uint BulletinBoardModelID = 41739U
Field Value
Type Description
UInt32
| Improve this Doc View Source

CityGateClosedModelID

Declaration
public const uint CityGateClosedModelID = 447U
Field Value
Type Description
UInt32
| Improve this Doc View Source

CityGateOpenModelID

Declaration
public const uint CityGateOpenModelID = 446U
Field Value
Type Description
UInt32
| Improve this Doc View Source

RMBSide

Declaration
public const float RMBSide = 102.4F
Field Value
Type Description
Single
| Improve this Doc View Source

RMBTileSide

Declaration
public const float RMBTileSide = 6.4F
Field Value
Type Description
Single
| Improve this Doc View Source

RMBTilesPerBlock

Declaration
public const int RMBTilesPerBlock = 16
Field Value
Type Description
Int32
| Improve this Doc View Source

RMBTilesPerTerrain

Declaration
public const int RMBTilesPerTerrain = 128
Field Value
Type Description
Int32

Methods

| Improve this Doc View Source

AddExteriorBlockFlats(ref DFBlock, Transform, Transform, Int32, Int32, ClimateNatureSets, ClimateSeason)

Add subrecord (building) exterior block flats.

Declaration
public static void AddExteriorBlockFlats(ref DFBlock blockData, Transform flatsParent, Transform lightsParent, int mapId, int locationIndex, ClimateNatureSets climateNature = ClimateNatureSets.TemperateWoodland, ClimateSeason climateSeason = ClimateSeason.Summer)
Parameters
Type Name Description
DFBlock blockData
Transform flatsParent
Transform lightsParent
Int32 mapId
Int32 locationIndex
ClimateNatureSets climateNature
ClimateSeason climateSeason
| Improve this Doc View Source

AddGroundPlane(ref DFBlock, Transform, ClimateBases, ClimateSeason)

Add simple ground plane to block layout.

Declaration
public static GameObject AddGroundPlane(ref DFBlock blockData, Transform parent = null, ClimateBases climateBase = ClimateBases.Temperate, ClimateSeason climateSeason = ClimateSeason.Summer)
Parameters
Type Name Description
DFBlock blockData
Transform parent
ClimateBases climateBase
ClimateSeason climateSeason
Returns
Type Description
GameObject
| Improve this Doc View Source

AddLights(ref DFBlock, Transform, Transform, DaggerfallBillboardBatch)

Adds light flats and prefabs.

Declaration
public static void AddLights(ref DFBlock blockData, Transform flatsParent, Transform lightsParent, DaggerfallBillboardBatch billboardBatch = null)
Parameters
Type Name Description
DFBlock blockData
Transform flatsParent
Transform lightsParent
DaggerfallBillboardBatch billboardBatch
| Improve this Doc View Source

AddMiscBlockFlats(ref DFBlock, Transform, Int32, Int32, DaggerfallBillboardBatch, TextureAtlasBuilder, DaggerfallBillboardBatch)

Add misc block flats. Batching is conditionally supported.

Declaration
public static void AddMiscBlockFlats(ref DFBlock blockData, Transform flatsParent, int mapId, int locationIndex, DaggerfallBillboardBatch animalsBillboardBatch = null, TextureAtlasBuilder miscBillboardsAtlas = null, DaggerfallBillboardBatch miscBillboardsBatch = null)
Parameters
Type Name Description
DFBlock blockData
Transform flatsParent
Int32 mapId
Int32 locationIndex
DaggerfallBillboardBatch animalsBillboardBatch
TextureAtlasBuilder miscBillboardsAtlas
DaggerfallBillboardBatch miscBillboardsBatch
| Improve this Doc View Source

AddNatureFlats(ref DFBlock, Transform, DaggerfallBillboardBatch, ClimateNatureSets, ClimateSeason)

Add nature billboards.

Declaration
public static void AddNatureFlats(ref DFBlock blockData, Transform flatsParent, DaggerfallBillboardBatch billboardBatch = null, ClimateNatureSets climateNature = ClimateNatureSets.TemperateWoodland, ClimateSeason climateSeason = ClimateSeason.Summer)
Parameters
Type Name Description
DFBlock blockData
Transform flatsParent
DaggerfallBillboardBatch billboardBatch
ClimateNatureSets climateNature
ClimateSeason climateSeason
| Improve this Doc View Source

AlignBillboardToBase(GameObject)

Aligns billboard GameObject to centre of base. This is required for exterior billboard.

Declaration
public static void AlignBillboardToBase(GameObject go)
Parameters
Type Name Description
GameObject go

GameObject with DaggerfallBillboard component.

| Improve this Doc View Source

ClearLocationCache()

Clear the location cache. Use if block data is changed dynamically.

Declaration
public static void ClearLocationCache()
| Improve this Doc View Source

CreateBaseGameObject(ref DFBlock, Int32, Int32, DaggerfallRMBBlock)

Instantiate base RMB block by DFBlock data.

Declaration
public static GameObject CreateBaseGameObject(ref DFBlock blockData, int layoutX, int layoutY, DaggerfallRMBBlock cloneFrom = null)
Parameters
Type Name Description
DFBlock blockData

Block data.

Int32 layoutX

X coordinate in parent map layout.

Int32 layoutY

Y coordinate in parent map layout.

DaggerfallRMBBlock cloneFrom

Prefab to clone from.

Returns
Type Description
GameObject

Block GameObject.

| Improve this Doc View Source

CreateBaseGameObject(String, Int32, Int32, out DFBlock, DaggerfallRMBBlock)

Create base RMB block by name and get back DFBlock data.

Declaration
public static GameObject CreateBaseGameObject(string blockName, int layoutX, int layoutY, out DFBlock blockDataOut, DaggerfallRMBBlock cloneFrom = null)
Parameters
Type Name Description
String blockName

Name of block.

Int32 layoutX

X coordinate in parent map layout.

Int32 layoutY

Y coordinate in parent map layout.

DFBlock blockDataOut

DFBlock data out.

DaggerfallRMBBlock cloneFrom

Prefab to clone from.

Returns
Type Description
GameObject

Block GameObject.

| Improve this Doc View Source

CreateBaseGameObject(String, Int32, Int32, DaggerfallRMBBlock)

Create base RMB block by name.

Declaration
public static GameObject CreateBaseGameObject(string blockName, int layoutX, int layoutY, DaggerfallRMBBlock cloneFrom = null)
Parameters
Type Name Description
String blockName

Name of block.

Int32 layoutX

X coordinate in parent map layout.

Int32 layoutY

Y coordinate in parent map layout.

DaggerfallRMBBlock cloneFrom

Prefab to clone from.

Returns
Type Description
GameObject

Block GameObject.

| Improve this Doc View Source

GetBlockData(String, out DFBlock)

Gets block data with validation.

Declaration
public static bool GetBlockData(string blockName, out DFBlock blockDataOut)
Parameters
Type Name Description
String blockName

Block name.

DFBlock blockDataOut

DFBlock data out.

Returns
Type Description
Boolean

True if validated and successful.

| Improve this Doc View Source

GetBuildingData(in DFBlock, Int32, Int32)

Gets BuildingSummary array generated from DFBlock data. DFBlock data should be provided from RMBLayout.GetLocationBuildingData() output. Otherwise not all building data will be present.

Declaration
public static BuildingSummary[] GetBuildingData(in DFBlock blockData, int layoutX = -1, int layoutY = -1)
Parameters
Type Name Description
DFBlock blockData

DFBlock data.

Int32 layoutX

X coordindate in map layout used to generate building key.

Int32 layoutY

Y coordindate in map layout used to generate building key.

Returns
Type Description
BuildingSummary[]

BuildingSummary.

| Improve this Doc View Source

GetLocationBuildingData(in DFLocation)

Gets all RMB blocks from a location populated with building data from MAPS.BSA. This method is using "best effort" process at this point in time. However, it does yield very accurate results most of the time. Please use exception handling when calling this method for now. It will be progressed over time.

Declaration
public static DFBlock[] GetLocationBuildingData(in DFLocation location)
Parameters
Type Name Description
DFLocation location

Location to use.

Returns
Type Description
DFBlock[]
| Improve this Doc View Source

GetModelScaleVector(DFBlock.RmbBlock3dObjectRecord)

Gets the model scale vector, converting zeros to 1s if needed.

Declaration
public static Vector3 GetModelScaleVector(DFBlock.RmbBlock3dObjectRecord obj)
Parameters
Type Name Description
DFBlock.RmbBlock3dObjectRecord obj

RmbBlock3dObjectRecord structure

Returns
Type Description
Vector3

Vector3 with the scaling factors

| Improve this Doc View Source

IsNamedBuilding(DFLocation.BuildingTypes)

Checks if building type is a special named building.

Declaration
public static bool IsNamedBuilding(DFLocation.BuildingTypes buildingType)
Parameters
Type Name Description
DFLocation.BuildingTypes buildingType
Returns
Type Description
Boolean
| Improve this Doc View Source

IsRepairShop(DFLocation.BuildingTypes)

Checks if building is a shop which offers repair service.

Declaration
public static bool IsRepairShop(DFLocation.BuildingTypes buildingType)
Parameters
Type Name Description
DFLocation.BuildingTypes buildingType
Returns
Type Description
Boolean
| Improve this Doc View Source

IsResidence(DFLocation.BuildingTypes)

Checks if building is a residence.

Declaration
public static bool IsResidence(DFLocation.BuildingTypes buildingType)
Parameters
Type Name Description
DFLocation.BuildingTypes buildingType
Returns
Type Description
Boolean
| Improve this Doc View Source

IsShop(DFLocation.BuildingTypes)

Checks if building is a shop with quality text.

Declaration
public static bool IsShop(DFLocation.BuildingTypes buildingType)
Parameters
Type Name Description
DFLocation.BuildingTypes buildingType
Returns
Type Description
Boolean
| Improve this Doc View Source

IsTavern(DFLocation.BuildingTypes)

Checks if building is a tavern.

Declaration
public static bool IsTavern(DFLocation.BuildingTypes buildingType)
Parameters
Type Name Description
DFLocation.BuildingTypes buildingType
Returns
Type Description
Boolean
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX