Welcome and crew messages
Send a welcome message on join, add private group chat, or broadcast server notices during a session.
Wiki home
Host scripting
CaretakerMP hosts can add Lua resources without rebuilding the server. Start small: welcome messages, custom slash commands, crew markers, checkpoints, team chat, simple activities, world metadata, and light server-side rules.
Ideas
Send a welcome message on join, add private group chat, or broadcast server notices during a session.
Place a harbor marker, create a checkpoint, or let players use a simple interaction point from the overlay or hook.
Use permissions, cooldowns, teams, activities, and world metadata to shape how your crew plays.
Create activities with objectives, participant lists, activity chat, and progress updates for small co-op goals.
Set display names, tags, synced metadata, stream-synced metadata, inventory state, or entity names for UI and overlay use.
Add optional client.lua helpers that run beside the Bridge for local UI glue, local commands, and server events.
Resource layout
resources/
my-crew-rules/
resource.json
config.json
shared.lua
server.lua
client.lua
server.lua runs on the server. client.lua is optional and runs beside the Bridge when the server publishes client-safe resources.
{
"name": "my-crew-rules",
"version": "1.0.0",
"type": "server",
"main": "server.lua",
"sharedScripts": ["shared.lua"],
"dependencies": []
}
The name should be lowercase and stable. Dependencies start before this resource.
Starter scripts
cmp.on("playerReady", function(player)
player:sendChat("Welcome to the crew, " .. player.name .. ".")
player:sendChat("Use /crewhelp for this server's custom notes.")
end)
cmp.registerCommand("crewhelp", {
description = "Show this server's custom notes."
}, function(player)
player:sendChat("Load the hosted save, stay near the harbor, and call out storms.")
end)
Good first script: no world changes, just a clear welcome and one custom command.
local harbor = { x = 0, y = 0, z = 0 }
cmp.on("resourceStart", function()
cmp.createMarker({
name = "harbor",
kind = "waypoint",
pos = harbor,
data = { label = "Crew Harbor" },
streamingRange = 250
})
cmp.createCheckpoint({
name = "crew-terminal",
pos = harbor,
radius = 5,
data = { label = "Crew Terminal" },
cooldownMs = 1500
})
end)
Markers and checkpoints are visible to Bridge client resources and the hook inbox when streamed.
cmp.registerCommand("stormmode", {
description = "Set the crew world mood.",
permission = "caretaker.world.manage"
}, function(player)
cmp.setWeather("storm")
cmp.setGameMode("crew-night")
cmp.setServerData("motd", "Storm mode is active.")
player:sendChat("Storm mode enabled.")
end)
World metadata is lightweight server state for labels, overlay UI, and future game-specific use.
cmp.log("my-crew-rules client helper loaded")
cmp.registerCommand("clientcrew", function(args)
local world = cmp.world()
cmp.log("Current weather: " .. tostring(world.weather))
return true
end)
cmp.on("serverDataChange", function(key, value)
cmp.log("Server data changed: " .. tostring(key))
end)
Client helpers are optional. They are useful for local UI glue and small convenience commands.
Install
Place your resource folder inside dist/windows-x64/resources or the custom resources folder selected in Server GUI.
Use Resource Check in Server GUI. Fix missing files, bad JSON, duplicate names, or missing dependencies before guests join.
Restart the server, or use the host resource controls to start, stop, restart, or reload Lua resources during a private session.
dist/windows-x64/resources/my-crew-rules/
If you use Server GUI, make sure the resources path points to the folder that contains your resource folders.
/opt/caretaker-mp/resources/my-crew-rules/
After copying resources to a Linux host, restart the service or use your host workflow to reload resources.
Tips
One command or one marker is easier to understand than a huge rules pack.
Treat names, chat text, and command arguments as untrusted. Keep payloads short and readable.
Check every resource before guests join. It catches common folder, manifest, and dependency mistakes.
Do not place passwords, personal save files, game files, extracted assets, or private keys inside resource folders.
Use clear command names like /crewhelp, /harbor, or /stormmode.
When the server works, use Friend Pack so players receive the clean release folder and current resources.