A class for interacting with Polymod, the atomic modding framework for Haxe.

Static variables

staticread onlyAPI_VERSION:String

The API version for the current version of the game. Since 0.5.0, we've just made this the game version! Minor updates rarely impact mods but major versions sometimes do.

@:value(">=0.8.0 <0.9.0")staticfinalread onlyAPI_VERSION_RULE:String = ">=0.8.0 <0.9.0"

The Semantic Versioning rule Indicates which mods are compatible with this version of the game. Using more complex rules allows mods from older compatible versions to stay functioning, while preventing mods made for future versions from being installed.

@:value([])staticloadedModIds:Array<String> = []

Static methods

staticcreateModRoot():Void

If the mods folder doesn't exist, create it.

staticforceReloadAssets():Void

Clear and reload from disk all data assets. Useful for "hot reloading" for fast iteration!

staticgetAllModIds():Array<String>

Retrieve a list of ALL mod IDs, including disabled mods.

Returns:

An array of mod IDs

staticgetAllMods():Array<ModMetadata>

Retrieve a list of metadata for ALL installed mods, including disabled mods.

Returns:

An array of mod metadata

staticgetEnabledMods():Array<ModMetadata>

Retrieve a list of metadata for all enabled mods.

Returns:

An array of mod metadata

staticloadAllMods():Void

Loads the game with ALL mods enabled with Polymod.

staticloadEnabledMods():Void

Loads the game with configured mods enabled with Polymod.

staticloadModsById(ids:Array<String>):Void

Load all the mods with the given ids.

Parameters:

ids

The ORDERED list of mod ids to load.

staticloadNoMods():Void

Loads the game without any mods enabled with Polymod.