Forest Logo
search
package_2

mechanicsmod

By @hobbs04067

Roblox

Mirrored

MechanicsMod

A Roblox library that layers a per-noid movement/ability system on top of noid-manager. Register "mechanics" (jump, sprint, slide, emotes, or anything else) as their own ModuleScripts, then toggle and enable them per-instance with automatic server/client replication.

Built with Rojo and Wally, events use bindable, and lifecycle is managed by noid-manager.

Full usage guide and API reference: docs/USAGE.md Building and contributing: docs/DEVELOPMENT.md

Contents

Features

  • Ships as a noid-manager mod — attach it to any noid via NoidManager.new(rig, { MechanicsMod(), { ...mechanicIndices } }), no manual registration step required.
  • Register any number of mechanics as standalone ModuleScripts, each contributing an Enable/Disable/Toggle state machine with its own init, destroy, toggle, and cleanup hooks.
  • Separate SERVER_, REPLICATED_, and plain hooks per mechanic, so server logic, other clients' view of a mechanic, and the owning client's local prediction can all differ.
  • Mechanic modules and their toggle/enable state replicate automatically between server and client — no manual networking required.
  • Deterministic load order via loadingOrder, plus toggledOnStart/enabledOnStart defaults per mechanic.
  • Bindable events (Toggled, Enabled, Disabled) on every mechanic for hooking in UI or other systems.

Installation

Add to your wally.toml:

[dependencies]
MechanicsMod = "hobbs04067/mechanicsmod@0.1.17"

Then run:

wally install

MechanicsMod depends on noid-manager, bindable, and playereventsequencer — Wally resolves these for you.

Quick start

-- Server: register mechanics, then spawn a noid with MechanicsMod active
local NoidManager = require(ReplicatedStorage.Packages["noid-manager"])
local MechanicsMod = require(ReplicatedStorage.Packages.MechanicsMod)

local jumpMechanic = MechanicsMod.RegisterMechanic(script.JumpMechanic)
local sprintMechanic = MechanicsMod.RegisterMechanic(script.SprintMechanic)

local manager = NoidManager.new(rig, {
	MechanicsMod(),
	{ jumpMechanic, sprintMechanic },
})
-- JumpMechanic.luau — returns a MechanicInfo when required with the manager as `self`
return function(self)
	return {
		name = "Jump",
		enabledOnStart = true,
		data = {
			SERVER_toggleFunction = function(toggled)
				-- server-authoritative jump logic
			end,
		},
	}
end
-- Anywhere: enable/disable/toggle a mechanic on a manager
manager.mechanics.Jump:Enable()
manager.mechanics.Jump:Toggle(true)
manager.mechanics.Jump.Toggled:Connect(function(toggled)
	print("Jump toggled:", toggled)
end)

See docs/USAGE.md for the full mechanic lifecycle and the SERVER_/REPLICATED_ hook semantics.

License

MIT

Package Details

Install command (Click to copy)


Version

0.1.18

License

MIT

check_circle

Safe for commercial use

infoLicense identified from the packaged LICENSE file; the manifest declared none.

Automated license review — not legal advice.