Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HeapsMod

HeapsMod is a modding framework designed specifically for the Heaps game engine.

Installation

  • Run haxelib git heapsmod https://github.com/realvirtu/heapsmod.
  • Add -lib heapsmod to your hxml.

Usage

import hxd.modding.HeapsMod;

HeapsMod.init();

// Enable mods
HeapsMod.enableMod("testmod");
HeapsMod.enableMod("testmod2");
HeapsMod.enableMod("testmod3");

// Same as above, but safer as dependency checks are done
for (meta in HeapsMod.scan())
{
    HeapsMod.enableMod(meta.mod);
}

Scripting (Optional)

Installation

  • Run haxelib install hxscript.
  • Add -lib hxscript to your hxml.

Usage

import hxd.modding.script.HeapsScript;

// Should be done before loading mods

HeapsScript.addGlobalImport("package.Class");

HeapsScript.blacklistClass("dangerous.package.DangerousClass");
HeapsScript.blacklistPackage("dangerous.package");

// Should be done after loading mods

// Outputs all scripted classes
trace(HeapsScript.listClasses());

// Outputs all scripted classes that extend MyClass
trace(HeapsScript.listClasses(MyClass));

Scripted Classes

For classes to be extendable by scripted classes, they require a scripted version as done below. Although needed, scripted classes can still extend the original class.

class ScriptedDummyClass extends DummyClass implements hxscript.IScripted {}

About

Modding framework for the Heaps game engine

Resources

Stars

6 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages