Quickstart EN - Drova-Modding/Drova-Modding-API GitHub Wiki
Minimal Working Environment for a Drova Mod with MelonLoader
Before proceeding with this setup, please ensure you have completed the installation steps outlined in the previous section.
To get started with MelonLoader and establish a minimal working environment for your mod, follow these steps. This template will guide you through creating the basic structure necessary to begin developing your own mod for Drova using the Drova Modding API.
Example Code Structure
using MelonLoader;
using Drova_Modding_API.Access;
//Main Class for MelonLoader, Your Mod Name, Version in format 0.0.0, Author Name
[assembly: MelonInfo(typeof(DrovaAPIWikiExample.DrovaAPIWikiExample_Main), "Drova API Wiki Example", "1.0.0", "Your Author Name", null)]
// For what game is the Mod? Let unchanged.
[assembly: MelonGame("Just2D", "Drova")]
// Set Drova_Modding_API as dependencies
[assembly: MelonAdditionalDependencies("Drova_Modding_API")]
namespace DrovaAPIWikiExample
{
public class DrovaAPIWikiExample_Main : MelonMod
{
public override void OnInitializeMelon()
{
LoggerInstance.Msg("Hello World!");
}
}
}
- Using Directives: Include the necessary namespaces for your mod.
- Assembly Attributes:
- Specify your mod’s name, version, author, and the game it’s intended for.
- Main Class: Create a class that inherits from
MelonMod
.
Instructions
- Open your project in Visual Studio 2022.
- Create a new class file and set up the class as described above.
- Replace placeholders with your mod’s specific details:
YourModNamespace
YourModClass
"Mod Name"
"Version"
"Author Name"
Summary
With this setup, you will have a basic structure to start developing your MelonLoader mod. Once you have your mod's class set up, you can begin implementing the functionality and features you desire.
For further details and tutorials on mod development with MelonLoader, refer to the official documentation.
And be aware you need only one MelonMod
class as your entrypoint!