Custom Classes

RuleScript with HScript lets you create reusable classes and modules without modifying the ALE Psych source. Organize custom code under scripts/classes/ just like Haxe packages.

Creating a Class

Place class files in scripts/classes/ using package folders when needed:

mods/modName/scripts/classes/pack/MyClass.hx
    

This mirrors how a Haxe project structures source/ files.

Extending Other Classes

You can extend:

Import the target class before extending it.

import scripting.haxe.ScriptSprite;

        class MySprite extends ScriptSprite {
        public function new() {
        super();
        trace('This is My Custom Sprite');
        }
        }
    

Accessing a Custom Class

Import and use your class in HScript like a normal Haxe project:

import pack.MyClass;
    

Create instances or call static methods after importing.

Developer Notes

Written by Malloy Last updated: Nov 20, 2025 Edit
ALE Psych [Rewritten] · Created by Alejo GD Official and THE VOID · Website by ImMalloy