MadROM Mudlet MSDP Setup Guide
This walkthrough is for players who already use Mudlet/Lua but want a reliable, repeatable setup for MSDP values on MadROM. If MSDP has ever felt weird compared to zMUD/cMUD triggers, this is the "just make it work" path.
1) Connection profile settings
- Open your MadROM profile in Mudlet.
- Go to Settings -> Special Options and keep telnet option negotiation enabled (default).
- Connect once so Mudlet and MadROM negotiate MSDP.
2) Create one script to track MSDP updates
In Mudlet, create a new script named madrom_msdp_core and paste this:
-- MadROM MSDP cache for Mudlet
madrom = madrom or {}
madrom.msdp = madrom.msdp or {}
-- Mudlet raises this event whenever MSDP values change.
-- Depending on Mudlet version, payload can appear in "arg" and/or "matches".
function madrom_on_msdp()
local payload = arg
if type(payload) ~= "table" then
payload = matches
end
if type(payload) ~= "table" then
return
end
for key, value in pairs(payload) do
madrom.msdp[key] = value
end
end
registerAnonymousEventHandler("sysDataReceive", "madrom_on_msdp")
-- Convenience helpers
function msdpNumber(name, fallback)
local v = madrom.msdp[name]
v = tonumber(v)
if v == nil then
return fallback or 0
end
return v
end
function msdpText(name, fallback)
local v = madrom.msdp[name]
if v == nil or v == "" then
return fallback or ""
end
return tostring(v)
end
3) Verify values are actually arriving
Create a second script named madrom_msdp_test:
function showMadromVitals()
cecho(string.format(
"<cyan>HP %d/%d Mana %d/%d Move %d/%d\n",
msdpNumber("HEALTH"),
msdpNumber("HEALTH_MAX"),
msdpNumber("MANA"),
msdpNumber("MANA_MAX"),
msdpNumber("MOVEMENT"),
msdpNumber("MOVEMENT_MAX")
))
end
showMadromVitals()
If that prints sane numbers, your MSDP link is good.
4) Useful MadROM MSDP fields
Common values you can read immediately:
HEALTH,HEALTH_MAXMANA,MANA_MAXMOVEMENT,MOVEMENT_MAXEXPERIENCE,EXPERIENCE_TNLROOM_NAME,ROOM_VNUM,AREA_NAMEOPPONENT_NAME,OPPONENT_HEALTH,OPPONENT_HEALTH_MAX
5) Troubleshooting when it feels cursed
- If your values stay
nil, reconnect after saving scripts. - If one key is empty, test another key first (for example
HEALTH) to confirm the event path works. - Avoid duplicate handlers: if you copy scripts around, you can accidentally register the same event multiple times.
- When in doubt, print the whole payload once:
registerAnonymousEventHandler("sysDataReceive", function() display(arg or matches) end)
Once this is stable, you can build gauges, condition warnings, auto-map notes, and combat widgets on top of
madrom.msdp without rewriting your core parser.