Documentation Report an Issue

Polymod

Atomic modding framework for Haxe

Download with haxelib install polymod

Release License Issues

Polymod is an atomic modding framework for use with Haxe. It supports scripting as well as replacement of any asset.

  1. Showcase
  2. What is Polymod?
  3. Supported Platforms
  4. Features
  5. Documentation

Showcase

Here are some of the wonderful games and apps that use Polymod!

Defender's Quest꞉ Valley of the Forgotten Dicey Dungeons Defender's Quest 2

What is Polymod?

If you’re developing a game or app, and you’re looking to allow users to manage and install mods for it, the easiest way to do this is to:

  1. Make your game data-driven (expose as much of your content in the form of loose data files as possible)
  2. Let players provide their own data files

Easy enough. But what if you want players to be able to use multiple mods together? How do you manage that?

Polymod solves both problems.

First, it overrides your framework’s asset system with a custom one pointed at a mod folder (or folders) somewhere on the user’s hard drive. Whenever you request an asset via Assets.getBitmapData() or Res.loader.load() call or whatever, the custom backend first checks if the mod has a modified version of this file. If it does, it returns the mod’s modified version. If it doesn’t, it falls through to the default asset system (the assets included with the game).

Second, it combines mods atomically. Instead of supplying one mod folder, you can provide several. Polymod will go through each folder in turn and apply the changes from each mod, automatically joining them into one combined mod at runtime. Note that this means that the order you load the mods in matters, in the case that they have overlapping changes.

Supported Platforms

Polymod currently works with the following frameworks:

Polymod also supports providing a custom backend if you need it.

Polymod currently supports the following file systems:

Polymod also supports providing a custom file system if you need it.

Features

Polymod supports the following kinds of operations for your players’ mods:

Asset replacement works with ANY asset type, including but not limited to music and graphics.

Polymod also supports scripting in Haxe, allowing modders to supply custom logic you can utilize in your application.

Documentation

Click here to view the full documentation.