Examples - Woospringbreak1/Luamod_Docs GitHub Wiki
Examples
These examples serve both as demonstrations of the framework’s capabilities and as functional tests for integration. As a result, they showcase the most developed, practical, and reliable systems.
Subscribe to the example content on Mod.io
The .lua scripts for these examples are included alongside the code mod .dll in [BONELAB Install Directory]/Mods/LuaMod/LuaScripts/Examples
Warning: programmer art ahead.
In-depth examples
Boss Fight - Ancient Obelisk
Something Ancient rises from the depths. use mounted laser rifles to fight an overgrown Void Turret that utilizes three attacks - a powerful laser blast, a mortar shower and summoning skeletal minions. The boss implements a Finite State Machine to drive relatively complex behavior.
The BoneRooms - procedurally generated maze
A twisting, ever growing collection of rooms at the deepest basement of the Void. The BoneRooms Pieces together a level from pre-defined sections to create an ever-changing map.
Note: the Bonerooms have quite a few visual bugs and the occasional room not generated. They will be getting a rewrite at some point.
Scripted Weapons
Laser Rifle
The laser rifle is a LuaGun that overrides standard Gun behaviour. It makes use of API_Physics.BL_Raycast and a line renderer to emulate a laser.
Heat builds up with use and is displayed on a side panel. If the rifle overheats, it must cool down before it can be fired again.

Plasma Gun
The Plasma Gun fires LuaBehaviour-based plasma projectiles. Each projectile uses both collision detection and a backward-facing raycast to achieve significantly more reliable impact detection compared to SLZ’s RigidBodyProjectile class.

Movement Skills
Spiderman webs
Allows the player to shoot webs that form a ConfigurableJoint between their hand and the point of impact, simulating a rope. If the web attaches to a non-kinematic Rigidbody, the player can either pull it, or be pulled by it depending on the relative mass.

Jetpack
Modeled after Abiotic Factor (10/10 - check it out) this jetpack will build up heat over time. An indicator on your avatars left arm will show the level of heat build up

Teleportation
Modeled after Vertigo 2 this teleporter calculates an arc that runs through the players hand and an offset point. This allows the player to teleport to the top of small obstructions.
File Access
Game-state save and load
This small examples saves the state of four buttons - each button controlling the color of a small light. This could easily be built into a level unlock system for a campaign or similar. This also serves as an example of how to integrate the circuit system into Lua and how to trigger Lua functions using ULTEvents. See the Security page for details on safe file access.
Utilities
Lua BoneMenu
BoneMenus can be defined through Lua code. This is used to enable and disable the movement skill scripts