Skip to content

en Mod Prerequisite Reference

hocha edited this page Oct 1, 2024 · 3 revisions

Configuring the Mod Prerequisite Environment

This is the first and most crucial step.

In your mod project's build.txt, add modReferences = InnoVault@1.0.

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.0 lets your mod use both CalamityMod and InnoVault as prerequisites.

How to Obtain InnoVault.dll

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.

Referencing External DLL Files in Your Project

In the resource explorer of your mod project, right-click on Dependencies.

en_1727245081421

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

en_1727245189752

Click Browse.

en_1727245256136

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

en_1727245359034

Clone this wiki locally