Show / Hide Table of Contents

Class PakFile

Connects to CLIMATE.PAK or POLITIC.PAK to extract and read meta-data about the Daggerfall world map.

Inheritance
Object
PakFile
Namespace: DaggerfallConnect.Arena2
Assembly: Assembly-CSharp.dll
Syntax
public class PakFile

Constructors

| Improve this Doc View Source

PakFile()

Default constructor.

Declaration
public PakFile()
| Improve this Doc View Source

PakFile(String)

Load constructor.

Declaration
public PakFile(string filePath)
Parameters
Type Name Description
String filePath

Absolute path to PAK file.

Fields

| Improve this Doc View Source

pakHeightValue

Number of PAK rows.

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

pakWidthValue

Length of each PAK row.

Declaration
public const int pakWidthValue = 1001
Field Value
Type Description
Int32

Properties

| Improve this Doc View Source

Buffer

Gets or sets extracted PAK data.

Declaration
public byte[] Buffer { get; set; }
Property Value
Type Description
Byte[]
| Improve this Doc View Source

PakRowCount

Number of rows in PAK file (always 500).

Declaration
public int PakRowCount { get; }
Property Value
Type Description
Int32
| Improve this Doc View Source

PakRowLength

Number of bytes per PAK row (always 1001).

Declaration
public int PakRowLength { get; }
Property Value
Type Description
Int32

Methods

| Improve this Doc View Source

GetDFBitmap()

Get extracted PAK data as an indexed image.

Declaration
public DFBitmap GetDFBitmap()
Returns
Type Description
DFBitmap

DFBitmap object.

| Improve this Doc View Source

GetValue(Int32, Int32)

Gets value for specified position in world map.

Declaration
public int GetValue(int x, int y)
Parameters
Type Name Description
Int32 x

X position in world map. 0 to PakRowLength-1.

Int32 y

Y position in world map. 0 to PakRowCount-1.

Returns
Type Description
Int32

Value of pak data if valid, -1 if invalid.

| Improve this Doc View Source

Load(String)

Load PAK file.

Declaration
public bool Load(string filePath)
Parameters
Type Name Description
String filePath

Absolute path to PAK file.

Returns
Type Description
Boolean

True if successful, otherwise false.

| Improve this Doc View Source

SetValue(Int32, Int32, Byte)

Sets value for specified position in world map. Allows loaded data from Pak file to be modified at runtime by mods.

Declaration
public bool SetValue(int x, int y, byte value)
Parameters
Type Name Description
Int32 x

X position in world map. 0 to PakRowLength-1.

Int32 y

Y position in world map. 0 to PakRowCount-1.

Byte value

Value of pak data to set.

Returns
Type Description
Boolean

True if pak data was set, false otherwise.

  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX