Show / Hide Table of Contents

Class Lumina

Inheritance
System.Object
Lumina
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Lumina
Assembly: Lumina.dll
Syntax
public class Lumina

Constructors

| Improve this Doc View Source

Lumina(String, LuminaOptions)

Constructs a new Lumina object allowing access to game data.

Declaration
public Lumina(string dataPath, LuminaOptions options = null)
Parameters
Type Name Description
System.String dataPath

Path to the sqpack directory

LuminaOptions options

Options object to provide additional configuration

Exceptions
Type Condition
System.IO.DirectoryNotFoundException

Thrown when the sqpack directory supplied is missing.

Properties

| Improve this Doc View Source

DataPath

The current data path that Lumina is using to load files.

Declaration
public DirectoryInfo DataPath { get; }
Property Value
Type Description
System.IO.DirectoryInfo
| Improve this Doc View Source

Excel

Provides access to EXD/EXH data, internally called Excel.

Loaded by default on init unless you opt not to load it. Can be loaded at a later time by calling Lumina.InitExcelModule or optionally constructing your own Excel.ExcelModule.

Declaration
public ExcelModule Excel { get; }
Property Value
Type Description
ExcelModule
| Improve this Doc View Source

FileHandleManager

Provides access to the FileHandleManager which allows you to create new FileHandle<T>s which then allows you to easily defer file loading onto another thread.

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

Options

Provides access to LuminaOptions at runtime. Most of these can be changed without issue without having to create a new instance.

Declaration
public LuminaOptions Options { get; }
Property Value
Type Description
LuminaOptions
| Improve this Doc View Source

Repositories

Provides access to each Repository, which contains the base game content or expansion content. Each folder inside the sqpack directory is a repository.

Declaration
public Dictionary<string, Repository> Repositories { get; }
Property Value
Type Description
System.Collections.Generic.Dictionary<System.String, Repository>
| Improve this Doc View Source

ShouldConvertEndianness

Reading PS3 dats on a LE machine means we need to convert endianness from BE where applicable

Declaration
public bool ShouldConvertEndianness { get; }
Property Value
Type Description
System.Boolean

Methods

| Improve this Doc View Source

FileExists(String)

Check if a file exists anywhere by checking whether the hash exists in any index

Declaration
public bool FileExists(string path)
Parameters
Type Name Description
System.String path

The full path of the file

Returns
Type Description
System.Boolean

True if the file exists

| Improve this Doc View Source

GetExcelSheet<T>()

Attempts to load the base excel sheet given it's implementing row parser

Declaration
public ExcelSheet<T> GetExcelSheet<T>()
    where T : class, IExcelRow
Returns
Type Description
ExcelSheet<T>

An ExcelSheet<T> if the sheet exists, null if it does not

Type Parameters
Name Description
T

A class that implements IExcelRow to parse rows

| Improve this Doc View Source

GetExcelSheet<T>(Language)

Attempts to load the base excel sheet with a specific language

Declaration
public ExcelSheet<T> GetExcelSheet<T>(Language language)
    where T : class, IExcelRow
Parameters
Type Name Description
Language language

The requested sheet language

Returns
Type Description
ExcelSheet<T>

An ExcelSheet<T> if the sheet exists, null if it does not

Type Parameters
Name Description
T

A class that implements IExcelRow to parse rows

Remarks

If the language requested doesn't exist for the file, this will silently be ignored and it will return a sheet with the default language: None

| Improve this Doc View Source

GetFile(String)

Load a raw file given a game file path

Declaration
public FileResource GetFile(string path)
Parameters
Type Name Description
System.String path

A path to a file located inside the game's filesystem

Returns
Type Description
FileResource

The base FileResource if it was found, or null if it wasn't found

| Improve this Doc View Source

GetFile<T>(String)

Load a defined file given a game file path

Declaration
public T GetFile<T>(string path)
    where T : FileResource
Parameters
Type Name Description
System.String path

A path to a file located inside the game's filesystem

Returns
Type Description
T

Returns the requested file if found, null if not

Type Parameters
Name Description
T

The type of FileResource to load the raw file in to

| Improve this Doc View Source

GetFileHandle<T>(String)

Creates a new handle to a game file but does not load it. You will need to call ProcessFileHandleQueue() yourself for these handles to be loaded, on a different thread.

Declaration
public FileHandle<T> GetFileHandle<T>(string path)
    where T : FileResource
Parameters
Type Name Description
System.String path

The path to the file to load

Returns
Type Description
FileHandle<T>

A handle to the file to be loaded

Type Parameters
Name Description
T

The type of FileResource to load

| Improve this Doc View Source

GetFileHash(String)

Returns the index variant of a file hash

Declaration
public static ulong GetFileHash(string path)
Parameters
Type Name Description
System.String path

The full path of the file

Returns
Type Description
System.UInt64

A U64 containing a split hash of the folder and file CRC32s

| Improve this Doc View Source

GetFileMetadata(String)

Returns file metadata pulled directly from the file header inside the SqPack

Declaration
public SqPackFileInfo? GetFileMetadata(string path)
Parameters
Type Name Description
System.String path

A path to a file located inside the game's filesystem

Returns
Type Description
System.Nullable<SqPackFileInfo>

A SqPackFileInfo if it was found, null if not

| Improve this Doc View Source

ParseFilePath(String)

Parses a game filesystem path and extracts information and hashes the path provided.

Declaration
public static ParsedFilePath ParseFilePath(string path)
Parameters
Type Name Description
System.String path

A game filesystem path

Returns
Type Description
ParsedFilePath

A ParsedFilePath which contains extracted info from the path, along with the hashes used to access the file index

| Improve this Doc View Source

ProcessFileHandleQueue()

Processes enqueued file handles that haven't been loaded yet. Call this on a different thread to process handles.

Declaration
public void ProcessFileHandleQueue()
  • Improve this Doc
  • View Source
Back to top Generated by DocFX