MongooseA living laboratory of myriad worlds.

All help topics · Link to this topic

Showing help on 'ansi-codes'

The ANSI Player Class works by either translating codes into the ANSI sequences for them, or by stripping them out before sending the rest of the text to the player. An ANSI code is made up of the name of the code with a pair of brackets ([]'s) around it. Note to put codes into the documentation, they had to be put with a [null] in between the letters, so something like [[null]green] had to be written (and to make that.. sigh)

These codes can be used in almost anything. MOOmail, messages, names, descriptions, and pages are all good places to put codes. ANSI codes are *not* allowed in player's names though because of all the problems this might cause. You can, however, use the new @ansi-title verb to put codes in your name.

The codes are seperated into 5 main groups:

colors Codes that change the text to another color. These include:
[red], [green], [yellow], [blue], [purple], [cyan],
[gray], and [white]. You can also use [magenta] instead
of [purple] and [grey] instead of [gray] but this isn't
recommended. NOTE: [gray] implies a [bold] so if you have:
[gray]This is gray. [red]This is red.[normal]
The 'This is red.' will be bright red, you must put an
[unbold] in front of it if you want it to be dark red.
These can be turned off with '@ansi-options -colors'.

bold Codes that make the text bright or not bright. These include:
[bold] and [unbold]. You can also use [bright] and
[unbright] but, again, this is not recommended. These can be
turned off with '@ansi-options -bold'. This can be used to make
bright colors by putting a [bold] in front of the color.
(for example, in: [green]A[bold]B[red]C[unbold]D[normal]
the A would be dark green, the B would be bright green, the C
would be bright red, and the D would be dark red)

blinking Codes that turn on and off the blinking. These include:
[blink] and [unblink]. They can be turned off with
'@ansi-options -blinking'.

misc. All the codes not covered by the ones above. These include:
[underline] and [inverse]. NOTE: [underline]
does not actually underline text on most computers. These can
be turned off with '@ansi-options -misc'.

extra Codes that are not really ANSI and may work even if your
terminal is not ANSI compatable . These include:
[beep]. It can be turned off with '@ansi-options -extra'.