Class ContentReader
General interface between DaggerfallConnect API reader classes and Unity.
Namespace: DaggerfallWorkshop.Utility
Assembly: Assembly-CSharp.dll
Syntax
public class ContentReader
Constructors
| Improve this Doc View SourceContentReader(String)
Declaration
public ContentReader(string arena2Path)
Parameters
Type | Name | Description |
---|---|---|
String | arena2Path |
Properties
| Improve this Doc View SourceBlockFileReader
Declaration
public BlocksFile BlockFileReader { get; }
Property Value
Type | Description |
---|---|
BlocksFile |
FactionFileReader
Declaration
public FactionFile FactionFileReader { get; }
Property Value
Type | Description |
---|---|
FactionFile |
FlatsFileReader
Declaration
public FlatsFile FlatsFileReader { get; }
Property Value
Type | Description |
---|---|
FlatsFile |
IsReady
Declaration
public bool IsReady { get; }
Property Value
Type | Description |
---|---|
Boolean |
MapFileReader
Declaration
public MapsFile MapFileReader { get; }
Property Value
Type | Description |
---|---|
MapsFile |
MonsterFileReader
Declaration
public MonsterFile MonsterFileReader { get; }
Property Value
Type | Description |
---|---|
MonsterFile |
PaintFileReader
Declaration
public PaintFile PaintFileReader { get; }
Property Value
Type | Description |
---|---|
PaintFile |
WoodsFileReader
Declaration
public WoodsFile WoodsFileReader { get; }
Property Value
Type | Description |
---|---|
WoodsFile |
Methods
| Improve this Doc View SourceGetBlock(String, out DFBlock)
Attempts to get a Daggerfall block from BLOCKS.BSA.
Declaration
public bool GetBlock(string name, out DFBlock blockOut)
Parameters
Type | Name | Description |
---|---|---|
String | name | Name of block. |
DFBlock | blockOut | DFBlock data out. |
Returns
Type | Description |
---|---|
Boolean | True if successful. |
GetFactionFilePath()
Gets path to FACTION.TXT file in StreamingAssets/Factions folder.
Declaration
public string GetFactionFilePath()
Returns
Type | Description |
---|---|
String | Full path to file. |
GetLocation(Int32, Int32, out DFLocation)
Attempts to get a Daggerfall location from MAPS.BSA.
Declaration
public bool GetLocation(int regionIndex, int locationIndex, out DFLocation locationOut)
Parameters
Type | Name | Description |
---|---|---|
Int32 | regionIndex | Index of region. |
Int32 | locationIndex | Index of location. |
DFLocation | locationOut | DFLocation data out. |
Returns
Type | Description |
---|---|
Boolean | True if successful. |
GetLocation(String, String, out DFLocation)
Attempts to get a Daggerfall location from MAPS.BSA.
Declaration
public bool GetLocation(string regionName, string locationName, out DFLocation locationOut)
Parameters
Type | Name | Description |
---|---|---|
String | regionName | Name of region. |
String | locationName | Name of location. |
DFLocation | locationOut | DFLocation data out. |
Returns
Type | Description |
---|---|
Boolean | True if successful. |
GetQuestLocation(Int32, out DFLocation)
Attempts to get a Daggerfall location from MAPS.BSA using a locationId from quest system. The locationId is different to the mapId, which is derived from location coordinates in world. At this time, best known way to determine locationId is from LocationRecordElementHeader data. This is linked to mapId at in EnumerateMaps(). Note: Not all locations have a locationId, only certain key locations
Declaration
public bool GetQuestLocation(int locationId, out DFLocation locationOut)
Parameters
Type | Name | Description |
---|---|---|
Int32 | locationId | LocationId of map from quest system. |
DFLocation | locationOut | DFLocation data out. |
Returns
Type | Description |
---|---|
Boolean | True if successful. |
HasLocation(Int32, Int32)
Determines if the current WorldCoord has a location.
Declaration
public bool HasLocation(int mapPixelX, int mapPixelY)
Parameters
Type | Name | Description |
---|---|---|
Int32 | mapPixelX | Map pixel X. |
Int32 | mapPixelY | Map pixel Y. |
Returns
Type | Description |
---|---|
Boolean | True if there is a location at this map pixel. |
HasLocation(Int32, Int32, out ContentReader.MapSummary)
Determines if the current WorldCoord has a location.
Declaration
public bool HasLocation(int mapPixelX, int mapPixelY, out ContentReader.MapSummary summaryOut)
Parameters
Type | Name | Description |
---|---|---|
Int32 | mapPixelX | Map pixel X. |
Int32 | mapPixelY | Map pixel Y. |
ContentReader.MapSummary | summaryOut |
Returns
Type | Description |
---|---|
Boolean | True if there is a location at this map pixel. |
LocationIdToMapId(Int32)
Converts LocationId from quest system to a MapId for map lookups.
Declaration
public int LocationIdToMapId(int locationId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | locationId | LocationId from quest system. |
Returns
Type | Description |
---|---|
Int32 | MapId if present or -1. |