Mod Manager API¶
Note
This page is intended for programmers with knowledge in C#.
As of fftivc.utility.modloader 1.2.0, a modding interface/API is now exposed.
This API can be leveraged to create file mods through your own C# code.
Setting Up¶
- Setup a development environment for Reloaded-II mods.
- Create a New Project using the Reloaded II Mod template.
- Add the
fftivc.utility.modloader.InterfacesNuGet package to your project. - Add
fftivc.utility.modloadertoModDependenciesin ModConfig.json.
Usage¶
Refer to the Dependencies Consumption documentation to understand the concept behind shared libraries.
Features¶
Mod File Management¶
In your mod's constructor, grab a reference to IFFTOModPackManager:
// Fetch IFFTOModPackManager to add files
if (!_modLoader.GetController<IFFTOModPackManager>()?.TryGetTarget(out IFFTOModPackManager modPackManager!))
{
// IFFTOModPackManager not loaded, handle error.
return;
}
// Adding a new modded file
modPackManager.AddModdedFile(_modConfig.ModId, FFTOGameMode.<GameType>, "path to mod's data directory", "game path i.e nxd/ui.en.nxd");
// Removing a modded file
if (modPackManager.RemoveModdedFile(FFTOGameMode.<GameType>, "path to file"))
{
// File was removed
}
Changes will be applied to pack files once the mod loader has loaded all other mods, including yours.
Table Management¶
Used to alter hardcoded tables through an interface, which is intended to be used for greater compatibility between mods (rather than a single code mod doing memory patches)
Controllers:
IFFTOAbilityDataManagerIFFTOItemDataManagerIFFTOJobCommandDataManager
Example TODO.
Tip
Not all hardcoded tables are currently supported, but the mod loader can be extended to support more. Feel free to contribute!
Other Frameworks¶
- FaithFramework (Github), for:
- Editing Nex Tables at Runtime
- ImGui Interface overlay for Mods (currently broken with overlays, please contribute!)