Class BookFile
Reads a Daggerfall book file.
Namespace: DaggerfallConnect.Arena2
Assembly: Assembly-CSharp.dll
Syntax
public class BookFile
Properties
| Improve this Doc View SourceAuthor
Declaration
public string Author { get; }
Property Value
Type | Description |
---|---|
String |
IsNaughty
Declaration
public bool IsNaughty { get; }
Property Value
Type | Description |
---|---|
Boolean |
PageCount
Declaration
public int PageCount { get; }
Property Value
Type | Description |
---|---|
Int32 |
Price
Declaration
public int Price { get; }
Property Value
Type | Description |
---|---|
Int32 |
Title
Declaration
public string Title { get; }
Property Value
Type | Description |
---|---|
String |
Methods
| Improve this Doc View SourceGetPageTokens(Int32)
Reads the TextResource tokens for this page record.
Declaration
public TextFile.Token[] GetPageTokens(int page)
Parameters
Type | Name | Description |
---|---|---|
Int32 | page | Page index. |
Returns
Type | Description |
---|---|
TextFile.Token[] | TextResource token array. |
messageToBookFilename(Int32)
Converts the internal Daggerfall "message" field to a filename that can be found in ARENA2/BOOKS
Declaration
public static string messageToBookFilename(int message)
Parameters
Type | Name | Description |
---|---|---|
Int32 | message | The int32 message field that encodes the book's ID |
Returns
Type | Description |
---|---|
String | A string that represents a file that should exist in the ARENA2/BOOKS directory (but this isn't verified on the filesystem) |
OpenBook(Byte[], String)
Open a book file from binary data.
Declaration
public bool OpenBook(byte[] data, string name)
Parameters
Type | Name | Description |
---|---|---|
Byte[] | data | Byte array to parse as a book file. |
String | name | Name to describe book. |
Returns
Type | Description |
---|---|
Boolean |
OpenBook(String, String, FileUsage, Boolean)
Opens the specified book file.
Declaration
public bool OpenBook(string arena2, string name, FileUsage fileUsage = FileUsage.UseMemory, bool readOnly = true)
Parameters
Type | Name | Description |
---|---|---|
String | arena2 | Arena2 path. |
String | name | Name of book to open. |
FileUsage | fileUsage | |
Boolean | readOnly |
Returns
Type | Description |
---|---|
Boolean |