Mod Class |
Namespace: spaar.ModLoader
public abstract class Mod
The Mod type exposes the following members.
Name | Description | |
---|---|---|
Author |
Author of the mod.
If there are serveral author, seperate them with commas.
| |
BesiegeVersion |
The version of Besiege the mod is targeted at.
Versions follow the format used by the game itself, 'vMajor.Minor'. If this is not equal to the currently running game version, a warning will be printed, however the mod will still be loaded. Default is the version the running mod loader is targeted at. Please only use this default if you are reasonably sure that a Besiege update will not break your mod! | |
CanBeUnloaded |
Whether the mod can be unloaded without a restart.
Only set this to true if your mod undoes all its changes to the game
in OnUnload().
Defaults to false since many mods are not able to do this by default.
| |
DisplayName |
Display name of the mod.
Can contain any symbols and be changed freely. This is the name that's presented to users. | |
Name |
Name of the mod.
Should be alphanumeric and all lowercase. If the name consists of multiple words, seperate them with hyphens, like 'my-mod'. This name should not change once a mod was published. It should also be unique among all published mod as it is used for identification by the mod loader. | |
Preload |
Whether the mod should be loaded before all mods where this is set to false.
This is useful for mods that provide an API to other mods but need to
be initialized before users of the API.
| |
Version |
Current version of the mod. Any versioning scheme can be used,
as long as it can be expressed in a Version object.
| |
VersionExtra |
An additional text part of your version. If it is overriden,
it will be appended to Version when a version is printed, with a '-'
in between.
|
Name | Description | |
---|---|---|
OnLoad |
Called when your mod is loaded.
You can perform any initialization here, such as creating game objects
to control your mod.
| |
OnUnload |
Called when your mod is unloaded.
This occurs in two cases: The user unloads the mod or the game exits.
Perform any clean-up work you need to here, such as saving
configuration and reverting modifications to the game.
If your mod is capable of reverting its changes at runtime, also set
CanBeUnloaded to true to indicate that the mod can be unloaded by the
user at runtime.
| |
ToString | (Overrides ObjectToString.) |