A mod loader for Sacred Gold

Sacred Gold, twenty years later, modded again

Ancaria loads mods into Sacred Gold while the game runs. Pick mods in the launcher and press Play, or write your own in Java, Kotlin, or Groovy. Your game files stay untouched.

Proof of concept

Ancaria is an experiment, not a finished product. It started with a question I couldn’t shake: could a 32-bit game from 2004 get a Forge-style mod loader? It could, and it runs today on one supported build of the game. Where it goes next depends on who shows up. If you loved Sacred, come and help.

See it running

Pick mods in the launcher, watch one react in the game, and see the tools behind both.

Picking mods in the launcher before Play
Picking mods in the launcher before Play
A mod reacting to an event in the running game
A mod reacting to an event in the running game
The IntelliJ IDEA plugin: one green arrow starts the game
The IntelliJ IDEA plugin: one green arrow starts the game
The host console passing frames between the game and the JVM
The host console passing frames between the game and the JVM

Get the mod loader

One file. No installer, and your game files stay as they are.

Version
SHA-256
  1. 1
    Drop it in

    Place Sacred Mod Loader in your Sacred Gold folder, next to the game executable.

  2. 2
    Run the launcher

    It finds your game build and Java, fetches a JDK if needed, and lists the mods.

  3. 3
    Press Play

    Tick the mods you want on the Available tab and start the game as usual.

Write mods in Kotlin

Subscribe to an event and decide what happens. GoldRushMod adds half again to every gold pickup. In Kotlin the event is a type argument, and mutate hands the new amount back to the game in one line.

1package dev.ancaria.mod.goldrush
2
3import dev.ancaria.coderpack.api.SacredMod
4import dev.ancaria.coderpack.api.event.Gold
5import dev.ancaria.coderpack.ktx.mutate
6import dev.ancaria.coderpack.ktx.on
7
8class GoldRushMod : SacredMod() {
9
10 override fun onLoad() {
11 context.on<Gold> {
12 if (!it.isSpending) mutate { Gold.Mutation.change(it.value * 3 / 2) }
13 }
14 }
15}