This repository is archived. You probably want the revised version of this project: https://github.com/MCHSL/extools
Lunar Dreamland is a reverse engineering project and a Lua and C++ library for interfacing with BYOND's Dream Daemon server software. Currently it also includes a DM bytecode disassembler and debugger. It is a continuation of the old Asyncmos project.
The main feature of Lunar Dreamland is hooking procs to reimplement them in Lua. Arguments and return values are automatically translated between BYOND and Lua types. You may get and set fields & call procs of datums passed to the proc. Here is an example:
proc = require("proc")
datum = require("datum")
proc.getProc("/proc/showcase"):hook(
function(original, usr, src, some_datum)
local name = some_datum.name
name = name:gsub(" ", "_")
proc.getProc("/proc/to_chat")(datum.world, name)
some_datum.name = name
some_datum.listvar:append("Hello, world!")
some_datum.listvar["key"] = "value"
some_datum:invoke("gib", 1, 2, 3)
end
)
Hell yeah! The debugger currently depends on Lunar but it might become a serparate project entirely. At the moment, the project contains a disassembler which translates BYOND bytecode into assembly-like output. The debugger displays that output and offers the ability to set breakpoints, which stop execution of the proc and allow inspecting the proc state, such as local variable values.
A hot patching compiler is in the works! It is integrated into SpacemanDMM and the VSCode extension. It will allow you to simply recompile a proc and swap the new bytecode in, without even restarting Dream Daemon. Cool, huh? See the progress here: SpaceManiac/SpacemanDMM#104
dunno lol, use the binaries