Skip to content

Nex APIΒΆ

The Nex API/Interface lets you edit nex tables while the game is running.

Note

The FF16Tools.Files NuGet Package is required to get the schemas necessary to be able to read rows.

First, grab a INextExcelDBApiManaged:

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

Then, 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.

Warning

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).