FF16Framework.Interfaces 1.1.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package FF16Framework.Interfaces --version 1.1.0
                    
NuGet\Install-Package FF16Framework.Interfaces -Version 1.1.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="FF16Framework.Interfaces" Version="1.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="FF16Framework.Interfaces" Version="1.1.0" />
                    
Directory.Packages.props
<PackageReference Include="FF16Framework.Interfaces" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add FF16Framework.Interfaces --version 1.1.0
                    
#r "nuget: FF16Framework.Interfaces, 1.1.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package FF16Framework.Interfaces@1.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=FF16Framework.Interfaces&version=1.1.0
                    
Install as a Cake Addin
#tool nuget:?package=FF16Framework.Interfaces&version=1.1.0
                    
Install as a Cake Tool

ff16.utility.framework

Mod Framework for FFXVI using Reloaded-II.

Currently only Nex interfaces.

Nex Interface

You should grab the FF16Tools.Files NuGet Package to be able to read rows.

First, grab a INextExcelDBApi:

_nexApi = _modLoader.GetController<INextExcelDBApi>();
if (!_nexApi.TryGetTarget(out INextExcelDBApi nextExcelDBApi))
{
    _logger.WriteLine($"[{_modConfig.ModId}] Could not get INextExcelDBApi.");
    return;
}

Optionally, subscribe to an event when the game has loaded the nex database:

nextExcelDBApi.OnNexLoaded += NextExcelDBApi_OnNexLoaded;

You can use this to apply nex changes immediately once the event fires.

Always ensure that the database is initialized before attempting to do any changes (especially if you are applying changes again from a configuration change through ConfigurationUpdated).

if (!nextExcelDBApi.Initialized)
    return;

Single-Keyed table fetching

NexTableInstance* photoTable = nextExcelDBApi.GetTable(NexTableIds.photocameraparam);
if (photoTable is null)
    return;

// Grab a mapped layout from FF16Tools.Files.
NexTableLayout layout = TableMappingReader.ReadTableLayout("photocameraparam", new Version(1, 0, 0));

for (int i = 0; i < photoTable->NumRows; i++)
{
    NexRowInstance* rowInstance = nextExcelDBApi.SearchRow(photoTable, i);
    if (rowInstance is null)
    {
        _logger.WriteLine($"[{_modConfig.ModId}] Could not get photocameraparam row {i}, skipping", _logger.ColorRed);
        continue;
    }

    Nex1KRowInfo* rowInfo = (Nex1KRowInfo*)rowInstance->RowInfo;
    byte* rowData = nextExcelDBApi.GetRowData(rowInstance);

    // You have access to the row's data here. Make use of FF16Tools.Files's defined layout to read and edit it.
    *(float*)&rowData[layout.Columns["CollisionSphereRadius"].Offset] = 69.420f;
}

Double-Keyed tables

NexTableInstance* questSequence = nextExcelDBApi.GetTable(NexTableIds.questsequence);

// Get the number of main sets (k1's) in the table
int sets = nextExcelDBApi.GetSetCount(NexTableIds.questtodo);

NexSetResult setResult = new NexSetResult();
nextExcelDBApi.GetDoubleKeyedSetCount(questSequence, &setResult, 100);
for (int i = 0; i < setResult.Count; i++)
{
    NexRowInstance* rowInstance = &setResult.Rows[i];
    Nex2KRowInfo* rowInfo = (Nex2KRowInfo*)rowInstance->RowInfo;

    var rowData = nextExcelDBApi.GetRowData(rowInstance);
    // ...
}

Triple-Keyed tables

NexTableInstance* questtodo = nextExcelDBApi.GetTable(NexTableIds.questtodo);

// Get the number of main sets (k1's) in the table
int sets = nextExcelDBApi.GetSetCount(NexTableIds.questtodo);

if (questtodo is not null && questtodo->Type == (int)NexTableType.TripleKeyed)
{
    NexSetResult res = new NexSetResult();
    nextExcelDBApi.GetTripleKeyedSubSetCount(questtodo, &res, 100, 510001);

    for (int i = 0; i < res.Count; i++)
    {
        // Get row
        NexRowInstance* rowInstance = &res.Rows[i];
        Nex3KRowInfo* rowInfo = (Nex3KRowInfo*)rowInstance->RowInfo;
    }

    // Get keys
    NexRowInstance* row = nextExcelDBApi.SearchRow(questtodo, 31070, 100, 0);
    int* keys = (int*)Marshal.AllocHGlobal(4 * (nint)3);
    if (nextExcelDBApi.GetRowKeys(row, keys, 3))
    {
        // ...
    }
    Marshal.FreeHGlobal(keys);
}
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.2.0 229 10/16/2025
1.1.2 258 4/19/2025
1.1.0 202 12/4/2024
1.0.1 198 11/10/2024
1.0.0 198 10/25/2024