What's in it
log — prefixed console logging, so your spam is labeled when three mods print at once
util — tick(interval, fn) and after(delay, fn) timers without the LoopAsync dance
mathx — clamp, lerp, approach, round
events — a tiny pub/sub bus for your mod's internals
pawn — player controller / pawn / camera access that returns the right thing and doesn't crash, plus dump_components()
camera — FOV that actually sticks (hold_fov / release_fov)
console — run console commands from Lua
actors — find live objects by class name, dead handles filtered out
input — keybinds and toggles
config — key=value settings that survive between sessions
shortcuts — one-word aliases (A.fov(60), A.dump(), A.cmd("stat fps")…)
How to use it
- Install UE4SS for SN2 (the community fork — the regular one's scan fails on SN2): https://github.com/Subnautica2Modding/Subnautica2-UE4SS
- Drop the AlterraAPI folder into …/Subnautica2/Binaries/Win64/ue4ss/Mods/
- Add AlterraAPI : 1 to mods.txt above the Keybinds line
- Launch. Console says [AlterraAPI] loaded and you press K in-game for a wall of PASS lines proving every module works.
It's built to be cloned: copy the folder, rename it, build your mod on top of working code instead of a blank file.
Known limits
It's a starting template / toolkit, not a runtime dependency other mods import — copy what you need into your own mod.
SN2's UE4SS build has no key-release event, so everything's press/toggle based (no hold-to-do-X). The library reflects that.
MIT license. Clone it, rename it, ship your own. Do what you want with it.