Skip to content

MCI Codes

ENiGMA½ supports a variety of MCI codes. Some predefined codes produce information about the current user, system, or other statistics while others are used to instantiate a View.

MCI codes are composed of two characters and are prefixed with a percent (%) symbol.

Example

Some MCI codes have additional options that may be set directly from the code itself while others — and more advanced options — are controlled via the current theme.

A MCI code that appears in a menu.hjson entry corresponds to that found in it’s associated art file. This same MCI code can be referenced in the theme.hjson in order to apply a theme.

See Menus and Themes for more information.

There are many predefined MCI codes that can be used anywhere on the system (placed in any art file).

CodeDescription
BNBoard Name
VLVersion label, e.g. “ENiGMA½ v0.0.12-beta”
VNVersion number, eg.. “0.0.12-beta”
SNSysOp username
SRSysOp real name
SLSysOp location
SASysOp affiliations
SSSysOp sex
SESysOp email address
UNCurrent user’s username
UICurrent user’s user ID
UGCurrent user’s group membership(s)
URCurrent user’s real name
ASActivityPub subject, ie: “@SomeUser@yourhost.com”, “(disabled)” if AP is not enabled for the user
LOCurrent user’s location
UACurrent user’s age
BDCurrent user’s birthday (using theme date format)
USCurrent user’s sex
UECurrent user’s email address
UWCurrent user’s web address
UFCurrent user’s affiliations
UTCurrent user’s theme name
UDCurrent user’s theme ID (e.g. “luciano_blocktronics”)
UCCurrent user’s login/call count
NDCurrent user’s connected node number
IPCurrent user’s IP address
STCurrent user’s connected server name (e.g. “Telnet” or “SSH”)
FNCurrent user’s active file base filter name
DNCurrent user’s number of downloads
DKCurrent user’s download amount (formatted to appropriate bytes/megs/etc.)
UPCurrent user’s number of uploads
UKCurrent user’s upload amount (formatted to appropriate bytes/megs/etc.)
NRCurrent user’s upload/download ratio
KRCurrent user’s upload/download bytes ratio
MSCurrent user’s account creation date (using theme date format)
PSCurrent user’s post count
PCCurrent user’s post/call ratio
MDCurrent user’s status/viewing menu/activity
MACurrent user’s active message area name
MCCurrent user’s active message conference name
MLCurrent user’s active message area description
CMCurrent user’s active message conference description
SHCurrent user’s term height
SWCurrent user’s term width
ACCurrent user’s total achievements
APCurrent user’s total achievement points
DRCurrent user’s number of door runs
DMCurrent user’s total amount of time spent in doors
DTCurrent date (using theme date format)
CTCurrent time (using theme time format)
OSSystem OS (Linux, Windows, etc.)
OASystem architecture (x86, x86_64, arm, etc.)
SCSystem CPU model
NVSystem underlying Node.js version
ANCurrent active node count
TCTotal login/calls to the system ever
TTTotal login/calls to the system today
RRDisplays a random rumor
SDTotal downloads, system wide
SOTotal downloaded amount, system wide (formatted to appropriate bytes/megs/etc.)
SUTotal uploads, system wide
SPTotal uploaded amount, system wide (formatted to appropriate bytes/megs/etc.)
TFTotal number of files on the system
TBTotal file base size (formatted to appropriate bytes/megs/gigs/etc.)
TPTotal messages posted/imported to the system currently
PTTotal messages posted/imported to the system today
FTTotal number of uploads to the system today
FBTotal upload amount today (formatted to appropriate bytes/megs/etc. )
DDTotal number of downloads from the system today
DBTotal download amount today (formatted to appropriate bytes/megs/etc. )
MBSystem memory
MFSystem free memory
LASystem load average (e.g. 0.25)
(May not be available on some platforms)
CLSystem current load percentage
(May not be available on some platforms)
UUSystem uptime in friendly format
LCLast caller to the system (username)
LTTime of last caller
LDDate of last caller
TUTotal number of users on the system
NTTotal new users today
NMCount of new messages address to the current user across all message areas in which they have access
NPCount of new private mail to the current user
IAIndicator as to whether the current user is available or not. See also getStatusAvailIndicators() in Themes
IVIndicator as to whether the current user is visible or not. See also getStatusVisibleIndicators() in Themes
PIIngress bytes for the current process (since ENiGMA started up)
PEEgress bytes for the current process (since ENiGMA started up)

Some additional special case codes also exist:

CodeDescription
CF##Moves the cursor position forward ## characters
CB##Moves the cursor position back ## characters
CU##Moves the cursor position up ## characters
CD##Moves the cursor position down ## characters
XYA special code that may be utilized for placement identification when creating menus or to extend an otherwise empty space in an art file down the screen.

A View is a control placed on a form that can display variable data or collect input. One example of a View is a Vertical Menu (%VM): Old-school BBSers may recognize this as a lightbar menu.

CodeNameDescriptionNotes
TLText LabelDisplays textStatic content. See Text View
ETEdit TextCollect user inputSingle line entry. See Edit Text
MEMasked Edit TextCollect user input using a maskSee Masked Edit and Mask Edits below.
MTMulti Line Text EditMulti line edit controlUsed for FSE, display of FILE_ID.DIZ, etc. See Multiline Text Edit
BTButtonA button…it’s a button. See Button
VMVertical MenuA vertical menuAKA a vertical lightbar; Useful for lists. See Vertical Menu
HMHorizontal MenuA horizontal menuAKA a horizontal lightbar. See Horizontal Menu
FMFull MenuA menu that can go both vertical and horizontal.See Full Menu
SMSpinner MenuA spinner input controlSelect one from multiple options. See Spinner Menu
TMToggle MenuA toggle menuCommonly used for Yes/No style input. See Toggle Menu
KEKey EntryA single key input controlThink hotkeys
TKTickerA continuously scrolling marqueeScrolls text left or right in a fixed-width window. See Ticker View
SBStatus BarAn auto-refreshing text labelRe-renders MCI format codes on a timer. See Status Bar View

Mask Edits (%ME) use the special maskPattern property to control a mask. This can be useful for gathering dates, phone numbers, so on.

maskPattern’s can be composed of the following characters:

  • #: Numeric 0-9
  • A: Alpha a-z, A-Z
  • @: Alphanumeric (combination of the previous patterns)
  • &: Any “printable” character

Any other characters are literals.

An example of a mask for a date may look like this: ##/##/####.

Additionally, the following theme stylers can be applied:

  • styleSGR1: Controls literal character colors for non-focused controls
  • styleSGR2: Controls literal character colors for focused controls
  • styleSGR3: Controls fill colors (characters that have not yet received input).

All of the style properties can take pipe codes such as |00|08.

As mentioned above, MCI codes can (and often should) be explicitly tied to a View Identifier. Simply speaking this is a number representing the particular view. These can be useful to reference in code, apply themes, etc.

A view ID is tied to a MCI code by specifying it after the code. For example: %VM1 or %SM10.

Predefined MCI codes and other Views can have properties set via menu.hjson and further themed via theme.hjson. See Themes for more information on this subject.

PropertyDescription
textStyleSets the standard (non-focus) text style. See Text Styles below
focusTextStyleSets focus text style. See Text Styles below
itemSpacingUsed to separate items in menus such as Vertical Menu and Horizontal Menu Views.
heightSets the height of views such as menus that may be > 1 character in height
widthSets the width of a view
focusIf set to true, establishes initial focus
textSet’s the view’s text if applicable, such as a TextView or EditTextView amongst others. See MCI Formatting below for advanced formatting options using the
submitIf set to true any accept action upon this view will submit the encompassing form
itemFormatSets the format for a list entry. See Entry Formatting below
focusItemFormatSets the format for a focused list entry. See Entry Formatting below

These are just a few of the properties set on various views. Use the source Luke, as well as taking a look at the default menu.hjson and theme.hjson files!

Often a module will provide custom properties that receive format objects (See Entry Formatting below). Custom property formatting can be declared in the config block. For example, browseInfoFormat10N (where N is up to 99) in the file_area_list module received a fairly extensive format object that contains {fileName}, {estReleaseYear}, etc.

Standard style types available for textStyle and focusTextStyle:

StyleDescription
normalLeaves text as-is. This is the default.
upperENIGMA BULLETIN BOARD SOFTWARE
lowerenigma bulletin board software
titleEnigma Bulletin Board Software
first lowereNIGMA bULLETIN bOARD sOFTWARE
small vowelseNiGMa BuLLeTiN BoaRD SoFTWaRe
big vowelsEniGMa bUllEtIn bOArd sOftwArE
small iENiGMA BULLETiN BOARD SOFTWARE
mixedEnIGma BUlLEtIn BoaRd SOfTWarE (randomly assigned)
l33t3n1gm4 bull371n b04rd 50f7w4r3

Various strings can be formatted using a syntax that allows width & precision specifiers, text styling, etc. Depending on the context, various elements can be referenced by {name}. Additional text styles can be supplied as well. The syntax is largely modeled after Python’s string format mini language.

For more advanced layouts, you may want to apply formatting to MCI codes. In this case, an alternative syntax is supported similar to standard Entry Formatting.

MCI codes can be surrounded by { and } in the text field in your theme.hjson for a Text Label (%TL aka Text View). Some examples:

text: "|00|07{BN!stylel33t}" // render board name in "l33t" text
// MCI codes that produce a number can use appropriate stylers as well
text: "|00|07{SD:,}"
// ...or perhaps
text: "|00:07{SD!countWithAbbr}"

Some of the text styles mentioned above are also available in the mini format language:

StyleDescription
normalLeaves text as-is. This is the default.
toUpperCase or styleUpperENIGMA BULLETIN BOARD SOFTWARE
toLowerCase or styleLowerenigma bulletin board software
styleTitleEnigma Bulletin Board Software
styleFirstLowereNIGMA bULLETIN bOARD sOFTWARE
styleSmallVowelseNiGMa BuLLeTiN BoaRD SoFTWaRe
styleBigVowelsEniGMa bUllEtIn bOArd sOftwArE
styleSmallIENiGMA BULLETiN BOARD SOFTWARE
styleMixedEnIGma BUlLEtIn BoaRd SOfTWarE (randomly assigned)
styleL33t3n1gm4 bull371n b04rd 50f7w4r3

Additional text styles are available for numbers:

StyleDescription
sizeWithAbbrFile size (converted from bytes) with abbreviation such as 1 MB, 2.2 GB, 34 KB, etc.
sizeWithoutAbbrJust the file size (converted from bytes) without the abbreviation. For example: 1024 becomes 1.
sizeAbbrJust the abbreviation given a file size (converted from bytes) such as MB or GB.
countWithAbbrCount with abbreviation such as 100 K, 4.3 B, etc.
countWithoutAbbrJust the count
countAbbrJust the abbreviation such as M for millions.
durationHoursConverts the provided hours value to something friendly such as 4 hours, or 4 days.
durationMinutesConverts the provided minutes to something friendly such as 10 minutes or 2 hours
durationSecondsConverts the provided seconds to something friendly such as 23 seconds or 2 minutes

Suppose a format object contains the following elements: userName and affils. We could create a itemFormat entry that builds a item to our specifications: |04{userName!styleFirstLower} |08- |13{affils}. This may produce a string such as this:

Example