grounds

An extensible MUSH / MUD server written in Java.


Project maintained by bhavanki Hosted on GitHub Pages — Theme by mattgraham

Markup

Grounds supports a basic markup language to format message text in several situations:

Formatting only affects messages for players who have their ansi preference set to true. Otherwise, the formatting is stripped out.

Basic Syntax

The markup language uses three-character commands to make a change to the appearance of text. Every command starts with a percent sign % and then has two more characters after it describing what to change. The changed formatting takes effect after the command and lasts until another command changes it, or until the end of the text.

Here are a couple of examples.

Fortune favors the bold, my friend

Stop, a red light

If you want a literal percent sign in your text, then double it (%%).

Any unrecognized command is ignored.

Reset

The %re command resets all formatting changes that came before it, to get you back to the defaults. You don’t need to give this command at the end of your message; Grounds will add it on if necessary.

Text Attributes

Text attributes alter the shape and decoration of text. When an attribute is turned on with its “on” command, it stays in effect until it is turned off with its “off” command, or until a reset command.

Depending on each person’s game client:

AttributeTo turn onTo turn off
Bold%Bo%Bx
Italic%It%Ix
Underline%Un%Ux
Double underline%U2%Ux
Strikethrough%St%Sx
Conceal%Co%Cx

Color

The markup language supports the 16 basic ANSI colors for both foreground (text) and background. The general pattern for the command is either f or b for foreground or background, followed by a letter indicating the color.

You can vary foreground and background colors separately: when you change the foreground color, the background color stays the same, and vice versa.

There are no “off” commands for each color; instead, do one of the following:

Depending on each person’s game client, the exact colors shown for each command will vary.

ColorForegroundBackground
black%fk%bk
red%fr%br
green%fg%bg
yellow%fy%by
blue%fb%bb
magenta%fm%bm
cyan%fc%bc
white (light gray)%fw%bw
bright black (gray)%fK%bK
bright red%fR%bR
bright green%fG%bG
bright yellow%fY%bY
bright blue%fB%bB
bright magenta%fM%bM
bright cyan%fC%bC
bright white%fW%bW
default%fd%bd