Also known as: GENERIC-MUD-COMMUNICATION-PROTOCOL · CLIENT-DATA · CLIENTDATA
GMCP
---
What is GMCP?
GMCP stands for Generic MUD Communication Protocol. It is an out-of-band
telnet protocol used by supported clients to receive structured game data as
JSON packets. In plain terms: GMCP lets your client build health bars, room
panels, group windows, combat target panels, and channel windows without having
to scrape normal room text.
GMCP is handled automatically by clients that support it. Most players do not
need to type anything to use it.
---
Client setup
A GMCP-capable client normally sends:
Core.Hello
Core.Supports.Set
NukeFire answers with Core.Hello and then sends the packets your client says it
supports.
You can also request some packets manually from your client script, such as:
Char.Vitals
Char.Status
Char.StatusVars
Char.MaxStats
Char.GPS
Char.TargetAffects
Room.Info
Group
Comm.Channel.List
---
Core packetsCore.Hello
Sent by NukeFire when GMCP connects.
Fields:
name
version
Core.Goodbye
Sent on logout.
Core.Ping
NukeFire answers Core.Ping with Core.Ping.
---
Character vitalsChar.Vitals
Sent on login, combat start/end, vitals change, and periodic GMCP update ticks.
Fields:
hp current hit points
mhp maximum hit points
mana current mana
mmana maximum mana
move current movement
mmove maximum movement
devotion current Occultist devotion
mdevotion maximum devotion
When you have a valid combat opponent, Char.Vitals may also include:
opponent
name visible opponent name
hp opponent current hit points
mhp opponent maximum hit points
mn opponent current mana
mmn opponent maximum mana
mv opponent current movement
mmv opponent maximum movement
level opponent level
---
Character statusChar.Status
Sent on login and when level/experience status changes.
Fields:
name your character name
title your colorized title
title_plain your title without color
class your class name
level your level
exp current experience
tnl experience to next level or remort
alignment alignment value
gold credits/gold carried
bank credits/gold in bank
hitroll hitroll total
damroll damroll total
ac armor class
position current position number
wimpy wimpy threshold
Char.StatusVars
A field-definition packet for Char.Status. It tells clients what each
Char.Status field means.
---
Character maximum statsChar.MaxStats
Sent on login and when maximum values change.
Fields:
str current strength
int current intelligence
wis current wisdom
dex current dexterity
con current constitution
cha current charisma
str_base base strength
int_base base intelligence
wis_base base wisdom
dex_base base dexterity
con_base base constitution
cha_base base charisma
maxhp maximum hit points
maxmana maximum mana
maxmoves maximum movement
---
Target affectsChar.TargetAffects
This is an on-demand packet used for a specific viewed/diagnosed/stat-targeted
mob or character. It is not spammed every tick.
Common structure:
target
count
effects
If there is no valid target, NukeFire sends:
target: null
count: 0
effects: []
The exact effect entries come from NukeFire's master-modifier/affect formatter.
---
Room informationRoom.Info
Sent on login, room changes, and when requested.
Fields:
num current room vnum
name room name with colors stripped
area zone/area name with colors stripped
zone internal zone index
terrain room sector/terrain type
exits JSON object of visible exits
coords x/y/z coordinate object
Exit values:
If an exit is open, the value is the destination room vnum.
If an exit is closed, the value is the word "closed".
Coords:
x
y
z
At present, Room.Info coords are sent as 0/0/0 by this packet.
---
GPSChar.GPS
Sent on login, room changes, and when requested.
This packet is produced by the GPS system. It is separate from Room.Info and is
used by clients that support NukeFire GPS/map/path data.
---
Communication packetsComm.Channel
Sent when a supported channel message is emitted.
Fields:
chan channel name
player sender name
msg message text
Comm.Channel.List
Sent on login, after copyover resync, and when requested.
Normal channel list:
say
tell
gossip
shout
holler
grats
auction
gsay
SSF characters and immortals also receive:
ssf
Each channel entry contains:
name
caption
command
---
Group packetsgroup
NukeFire sends the group packet using lowercase "group".
Top-level fields:
groupname
leader
created
status
count
kills
exp
members
enemies
Member info fields:
hp member current hit points
mhp member maximum hit points
mn member current mana
mmn member maximum mana
mv member current movement
mmv member maximum movement
align member alignment
tnl member experience to next level/remort
qt quest timer placeholder
qs quest status placeholder
lvl member level
here 1 if in your room, 0 otherwise
Enemy info fields:
hp enemy current hit points
mhp enemy maximum hit points
mn enemy current mana
mmn enemy maximum mana
mv enemy current movement
mmv enemy maximum movement
level enemy level
here 1 if in your room, 0 otherwise
If you are not grouped, NukeFire sends an empty group packet with empty member
and enemy lists so clients can clear old group panels.
group.remove
Sent when a member is removed.
Fields:
name
---
When GMCP updates
On login:
Char.Status
Char.Vitals
Char.MaxStats
Room.Info
Char.GPS
Comm.Channel.List
group, if grouped
On logout:
Core.Goodbye
On room change:
Room.Info
Char.GPS
On combat start/end:
Char.Vitals
On vitals change:
Char.Vitals, rate-limited
On level/experience status change:
Char.Status, rate-limited
On max stat changes:
Char.MaxStats, rate-limited
On group changes:
group, rate-limited
After copyover/full resync:
Comm.Channel.List
Char.Vitals
Char.MaxStats
Char.Status
Char.GPS
group, if grouped
---
Rate limits
To avoid flooding clients, some GMCP packets are rate-limited:
Char.Vitals up to about 2 times per second
Char.MaxStats about once every 1.5 seconds
Char.Status about once per second
group about once per second normally
Large groups update more slowly:
10+ members about every 2 seconds
20+ members about every 3 seconds
---
Related
help prompt
help screenreader
help group
help ssf