Sample plug-in¶
Hyperion ships with a sample plug-in, located in the user's configuration directory. On first run it is copied into the runtime plug-ins directory so you can edit it safely.
What it demonstrates¶
- Metadata table with
name,version, anddescription - Basic logging and math usage
- Drawing text overlays
- Reading player state and weapon info
Key excerpt¶
plugin = {
name = "Sample Plugin",
version = "2.0.0",
description = "A demonstration plugin showing Lua integration"
}
function onLoad()
hyperion.log("Sample Plugin loaded successfully!")
hyperion.log("Framework version: " .. hyperion.version)
end
function onTick()
if not hyperion.globals.inGame() then
return
end
hyperion.draw.text(10, 10, "Sample Plugin Active", hyperion.color.white, hyperion.draw.TEXT_SHADOW)
end
Use this file as a starting point for your own plug-ins.