The Mod Manifest
The mod manifest is the central file of a mod.
Every element of the mod needs to be declared inside it so the mod loader knows how to
handle it. The file must be named Mod.xml
and placed inside the root directory of the mod.
The root element of the file is the Mod
element:
<Mod>
...
</Mod>
The remaining element are described below.
Basic Metadata
Name (String) (required)
<Name>Some Mod</Name>
The name of the mod.
Author (String) (required)
<Author>Your Name</Author>
The name of the author (or authors) that wrote the mod.
Version (Version) (required)
<Version>1.0.0</Version>
Version of the mod. Format: Major.Minor.Build, each component is an integer.
Please do change the version element when releasing new versions of a mod. This triggers some maintenance that should always be done when a new version of a mod is installed to prevent old data lingering.
Description (String) (required)
<Description>This is some mod that does something.</Description>
or
<Description>
This is some mod that also does something,
but it needs a few more words to say so.
</Description>
Short description of the mod. Displayed in the mod list. Should be no longer than two lines, otherwise it will be shortened in the list. Can be written on multiple lines, the game handles removing preceding and trailing whitespace.
Icon (Texture) (optional)
<Icon name="some-icon-texture-name" />
Square icon of the mod. Displayed in the mod list and, if WorkshopThumbnail
is not set,
used for the workshop when uploaded.
See Common Elements for a guide on how Texture
elements are used.
WorkshopThumbnail (Texture) (optional)
<WorkshopThumbnail name="some-thumbnail-texture-name" />
Texture resource used as thumbnail when uploading the mod to the workshop. If this is not present, the Icon texture is used instead.
This can be set to have different icons in the mod list and in the workshop.
See Common Elements for a guide on how Texture
elements are used.
MultiplayerCompatible (Boolean) (required)
<MultiplayerCompatible>True</MultiplayerCompatible>
Specifies whether the mod can be used in multiplayer sessions. Writing a mod to work correctly in multiplayer is more complex than writing one to only work in singleplayer, but singleplayer-only mods are more limiting to player of course. Once a singleplayer-only mod was loaded, the player must restart the game before a multiplayer session can be started/joined since the mod can't be unloaded.
LoadInTitleScreen (optional)
<LoadInTitleScreen />
Including this makes the mod be loaded immediately once the game is started. Without it, mods are only loaded once the player actually enters the game. Only use this if there is a good reason for it! It makes the mod significantly less player-friendly, as disabling it (for example to join a multiplayer session without it) will always require restarting the game.
LoadOrder (Integer) (optional)
<LoadOrder>1</LoadOrder>
Can be used to ensure a mod is loaded after another mod. The default value is 0 and mods are loaded in ascending load order, i.e. first mods with load order 0, then 1, etc.
If a mod has a dependency on another mod, use this to ensure it is loaded after the dependency.
Note that the LoadInTitleScreen element overrides the order specified using this, mods with that are always loaded before mods without it. The load order can still be used to control in which order multiple mods with LoadInTitleScreen are loaded.
Debug (Boolean) (optional)
<Debug>True</Debug>
Setting this to true will enable runtime reloading of various values in your mod. It will also provide additional warnings and error messages. For further information on this, see Debug Mode.
Elements of a mod
Assemblies (Assembly[]) (optional)
<Assemblies>
<Assembly path="SomeAssembly.dll" />
</Assemblies>
Assemblies containing custom code to be loaded into the game. See Custom Code for more information.
Blocks (Block[]) (optional)
<Blocks>
<Block path="SomeBlock.xml" />
</Blocks>
Custom blocks that the mod adds to the game. See Blocks for more information.
Entities (Entity[]) (optional)
<Entities>
<Entity path="SomeEntity.xml" />
</Entities>
Custom entities that the mod adds to the game. See Entities for more information.
Triggers (Trigger[]) (optional)
<Triggers>
<Trigger>
...
</Trigger>
</Triggers>
Custom triggers for the logic system that the mod adds to the game. See Logic for more information.
Events (Event[]) (optional)
<Events>
<Event>
...
</Event>
<Event path="SomeEvent.xml" />
</Events>
Custom events for the logic system that the mod adds to the game. See Logic for more information.
Keys (Key[]) (optional)
<Keys>
<Key name="some-key" defaultModifier="LeftControl" defaultTrigger="L" />
</Keys>
Key bindings to be managed by the mod loader. See Keys for more information.
Resources (Resource[]) (optional)
<Resources>
<Mesh name="some-mesh" path="someMesh.obj" />
<Texture name="some-texture" path="someTexture.png" />
...
</Resources>
Resources to be managed by the mod loader. See Resource Handling for more information.
ID (Guid)
The ID element is automatically generated when the mod is loaded the first time and inserted at the end of the manifest. It should not be changed manually.