-
Notifications
You must be signed in to change notification settings - Fork 6
en Mod Prerequisite Reference
This is the first and most crucial step.
In your mod project's build.txt, add modReferences = InnoVault@1.9.
Here, modReferences indicates the setup of the prerequisite environment, while the subsequent assignment specifies the prerequisite mod that needs to be referenced.
The basic format can be abstracted as: modReferences = [Internal Mod Name]@[Minimum Mod Version].
This expression can be extended, allowing you to use half-width commas for sequential assignments.
The basic format is modReferences = [Mod1 Internal Name]@[Mod1 Minimum Version], [Mod2 Internal Name]@[Mod2 Minimum Version].
This allows your mod to use multiple prerequisites.
For example, writing: modReferences = CalamityMod@2.0.4.3, InnoVault@1.9 lets your mod use both CalamityMod and InnoVault as prerequisites.
You can clone the project's source code and compile it in your development environment, which will allow you to find the file in the InnoVault/bin/Debug/net8.0 path.
The specific path may vary depending on individual developers' environment configurations.
Another method that does not require cloning or compiling the source code is to prepare the InnoVault.tmod file, which you can obtain by subscribing to the mod on the workshop.
Next, you can unpack it to obtain the dll file.
It is recommended to use TmodUnpacker for unpacking tmod files.
In the resource explorer of your mod project, right-click on Dependencies.

You will see this interface; click Add Project Reference on the left.

Click Browse.

Find the path where you placed the InnoVault.dll file, select the InnoVault.dll file, and click Add.

After completing the reference, your build.txt should look similar to:
displayName = MyMod
author = YourName
version = 0.1
modReferences = InnoVault@1.9
InnoVault provides the IVaultLoader interface for executing custom logic at various stages of mod loading. Your class can implement this interface to participate in InnoVault's loading pipeline:
public class MyLoader : IVaultLoader
{
// Called before Mod.Load
public void LoadData() { }
// Load client resources (at the end of Mod.Load)
public void LoadAsset() { }
// Setup data (at the end of Mod.Load)
public void SetupData() { }
// Add recipes
public void AddRecipesData() { }
// Unload data (at the end of Mod.Unload)
public void UnLoadData() { }
}Once configuration is complete, you can start using the various systems provided by InnoVault:
- VaultLoaden Auto Resource Loading
- PRT Particle System
- TP Tile Entity System
- UI System
- SaveContent Save System
- Override System
- SyncVar Network Sync
- Actor Entity System
| Previous | Next |
|---|---|
| Home | Basic VaultLoaden |