Namespace Modding
Classes
BlockScript
Base class for custom BlockBehaviours. It offers various callbacks and convenience properties to assist in writing the code for your blocks.
Configuration
Provides an easy way to store configuration for mods.
Each mod gets an XDataHolder
to store its data.
The Configuration class handles saving and loading the data.
EventProperty
EventProperty is the base class for all different event properties. An event property is a value that can be configured in the logic editor on an event.
EventProperty.Choice
EventProperty class for the Choice property.
EventProperty.Choice.Option
Represents one of the available options.
EventProperty.Icon
EventProperty class for the Icon property. You cannot interact with Icon properties from code.
EventProperty.NumberInput
EventProperty class for the NumberInput property.
EventProperty.Picker
EventProperty class for the Picker property.
EventProperty.TeamButton
EventProperty class for the TeamButton property.
EventProperty.Text
EventProperty class for the Text property. You cannot interact with Text properties from code.
EventProperty.TextInput
EventProperty class for the TextInput property.
EventProperty.Toggle
EventProperty class for the Toggle property.
Events
Provides easy hooks to various things happening in the game.
Game
Provides access to some in-game state and easy methods and properties for changing it.
Game.UI
Provides methods to interact with the game UI.
GameMaterials
Gives access to shaders frequently used in the game, along with example materials that use them.
GameMaterials.BlockGhostShaders
Container for block ghost shaders. Access via GameMaterials.Shaders.BlockGhosts.
GameMaterials.BlockShaders
Container for block shaders. Access via GameMaterials.Shaders.Blocks.
GameMaterials.EntityShaders
Container for entity shaders. Access via GameMaterials.Shaders.Entities.
GameMaterials.MiscShaders
Container for miscellaneous shaders. Access via GameMaterials.Shaders.Misc.
GameMaterials.ParticleShaders
Container for particle shaders. Access via GameMaterials.Shaders.Particles.
GameMaterials.Shaders
Access to commonly-used shaders in the game.
GamePrefabs
Provides access to some useful prefabs of the game.
Message
A network message from/for the ModNetworking class.
MessageType
A message type for messages to be sent with network messages using the ModNetworking class.
ModAssetBundle
An asset bundle mod resource.
Some care must be taken when using this class, see the Remarks section for details.
ModAudioClip
An audio clip mod resource.
ModBlockBehaviour
Base class for all custom behaviours attached to modded blocks by the mod loader. This includes BlockScripts as well as the behaviour of custom modules.
ModConsole
Allows mods to interact with the in-game console. Output to the console using the Log method and add your own console commands using the RegisterCommand method.
ModEntryPoint
Every Assembly can contain one or no ModEntryPoint.
If it does and is listed in the Mod manifest, the entry point will be
instantiated by the mod loader and its OnLoad
method called when
the mod is loaded.
ModEvents
Allows registering behaviour for custom events using the RegisterCallback method.
ModIO
Provides methods for IO since large parts of the System.IO namespace are blocked for security reasons.
ModKey
Represents a keybinding that is managed by the mod loader. Keys are defined in the mod manifest.
Properties correspond to properties of the same name in the MKey class. This naming is different to that of the UnityEngine.Input class!
If the modifier is KeyCode.None, the keybinding only considers the trigger.
If the trigger is KeyCode.None, the keybinding is considered to be disabled, and all the properties always return false.
ModKeys
Keybindings managed by the mod loader. They can be rebound by the player via config files and automatically handle the possibility of being a combination of a modifier and a trigger key.
ModMesh
A mesh mod resource.
ModNetworking
Networking system for mods.
ModResource
This class provides access to the resources listed in the Resources section of the mod manifest vis static members and is the base class for the objects representing a resource.
Mods
Provides an API for querying the status of other installed mods.
This can for example be used to do additional things based on the presence of other mods, like adding some kind of interaction.
For the purposes of this class, mods are always identified by their GUIDs.
ModTexture
A texture mod resource.
ModTriggers
You can use this class in conjunction with the Triggers element in Mod.xml to define custom triggers for the level editor logic system.
ModUtility
A few utility functions that are often useful for mods.
Enums
DataType
Possible data types to be sent with network messages using the ModNetworking class.
Game.UI.BlockTab
Constants representing the official block categories.
GameMaterials.BlockGhostMaterial
Available block ghost example materials. These use shaders from Shaders.BlockGhosts.
GameMaterials.BlockMaterial
Available block example materials. These use shaders from Shaders.Blocks.
GameMaterials.EntityMaterial
Available entity example materials. These use shaders from Shaders.Entities.
GameMaterials.MiscMaterial
Available miscellaneous example materials. These use shaders from Shaders.Misc.
GameMaterials.ParticleMaterial
Available particle example materials. These use shaders from Shaders.Particles.
GamePrefabs.ExplosionType
Available types of explosion prefabs.
GamePrefabs.ProjectileType
Available types of projectile prefabs.
ModResource.ResourceType
The different resource types that can be managed by the mod loader.
Delegates
ModEvents.OnEventExecute
Delegate for callbacks registered using RegisterCallback
.
ModTriggers.OnTriggerChanged
Used in conjunction with RegisterCallback.