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.
General Information
Section titled “General Information”MCI codes are composed of two characters and are prefixed with a percent (%) symbol.
![]()
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.
Relationship with Menus, Art, and Themes
Section titled “Relationship with Menus, Art, and Themes”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.
Predefined Codes
Section titled “Predefined Codes”There are many predefined MCI codes that can be used anywhere on the system (placed in any art file).
| Code | Description |
|---|---|
BN | Board Name |
VL | Version label, e.g. “ENiGMA½ v0.7.0” |
VN | Version number, e.g. “0.7.0”: the release’s major.minor.patch only (no pre-release tag or git commit; --version shows the full version) |
VR | Version revision: the git commit this install is at, e.g. “abc1234”, with “-dirty” added when tracked files are modified. Empty when it is not known (not a git checkout, unless the Docker image’s version names a commit). Meant for sysop screens such as the WFC |
SN | SysOp username |
SR | SysOp real name |
SL | SysOp location |
SA | SysOp affiliations |
SS | SysOp sex |
SE | SysOp email address |
UN | Current user’s username |
UI | Current user’s user ID |
UG | Current user’s group membership(s) |
UR | Current user’s real name |
AS | ActivityPub subject, ie: “@SomeUser@yourhost.com”, “(disabled)” if AP is not enabled for the user |
LO | Current user’s location |
UA | Current user’s age |
BD | Current user’s birthday (using theme date format) |
US | Current user’s sex |
UE | Current user’s email address |
UW | Current user’s web address |
UF | Current user’s affiliations |
UT | Current user’s theme name |
UD | Current user’s theme ID (e.g. “luciano_blocktronics”) |
UC | Current user’s login/call count |
ND | Current user’s connected node number |
IP | Current user’s IP address |
ST | Current user’s connected server name (e.g. “Telnet” or “SSH”) |
FN | Current user’s active file base filter name |
DN | Current user’s number of downloads |
DK | Current user’s download amount (formatted to appropriate bytes/megs/etc.) |
UP | Current user’s number of uploads |
UK | Current user’s upload amount (formatted to appropriate bytes/megs/etc.) |
NR | Current user’s upload/download ratio |
KR | Current user’s upload/download bytes ratio |
MS | Current user’s account creation date (using theme date format) |
PS | Current user’s post count |
PC | Current user’s post/call ratio |
MD | Current user’s status/viewing menu/activity |
MA | Current user’s active message area name |
MC | Current user’s active message conference name |
ML | Current user’s active message area description |
CM | Current user’s active message conference description |
SH | Current user’s term height |
SW | Current user’s term width |
AC | Current user’s total achievements |
AP | Current user’s total achievement points |
DR | Current user’s number of door runs |
DM | Current user’s total amount of time spent in doors |
TR | Current user’s time remaining today, in minutes, or users.unlimitedTimeText when no limit applies. See Time Limits |
TA | Current user’s time allowed today, in minutes, or users.unlimitedTimeText when no limit applies |
TD | Current user’s time used today, in minutes. Always a real figure: usage is tracked even where nothing is enforced |
DT | Current date (using theme date format) |
CT | Current time (using theme time format) |
OS | System OS (Linux, Windows, etc.) |
OA | System architecture (x86, x86_64, arm, etc.) |
SC | System CPU model |
NV | System underlying Node.js version |
AN | Current active node count |
TC | Total login/calls to the system ever |
TT | Total login/calls to the system today |
RR | Displays a random rumor |
SD | Total downloads, system wide |
SO | Total downloaded amount, system wide (formatted to appropriate bytes/megs/etc.) |
SU | Total uploads, system wide |
SP | Total uploaded amount, system wide (formatted to appropriate bytes/megs/etc.) |
TF | Total number of files on the system |
TB | Total file base size (formatted to appropriate bytes/megs/gigs/etc.) |
TP | Total messages posted/imported to the system currently |
PT | Total messages posted/imported to the system today |
FT | Total number of uploads to the system today |
FB | Total upload amount today (formatted to appropriate bytes/megs/etc. ) |
DD | Total number of downloads from the system today |
DB | Total download amount today (formatted to appropriate bytes/megs/etc. ) |
MB | System memory |
MF | System free memory |
LA | System load average (e.g. 0.25) (May not be available on some platforms) |
CL | System current load percentage (May not be available on some platforms) |
UU | System uptime in friendly format |
LC | Last caller to the system (username) |
LT | Time of last caller |
LD | Date of last caller |
TU | Total number of users on the system |
NT | Total new users today |
NM | Count of new messages address to the current user across all message areas in which they have access |
NP | Count of new private mail to the current user |
NA | Count of new messages in the current user’s active message area |
NC | Count of new messages in the current user’s active message conference (areas they can read) |
NS | Count of new messages across the current user’s new scan areas (all areas they can read if they have not chosen any) |
AT | Total messages in the current user’s active message area |
IA | Indicator as to whether the current user is available or not. See also getStatusAvailIndicators() in Themes |
IV | Indicator as to whether the current user is visible or not. See also getStatusVisibleIndicators() in Themes |
PI | Ingress bytes for the current process (since ENiGMA started up) |
PE | Egress bytes for the current process (since ENiGMA started up) |
Some additional special case codes also exist:
| Code | Description |
|---|---|
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 |
XY | A 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.
| Code | Name | Description | Notes |
|---|---|---|---|
TL | Text Label | Displays text | Static content. See Text View |
ET | Edit Text | Collect user input | Single line entry. See Edit Text |
ME | Masked Edit Text | Collect user input using a mask | See Masked Edit and Mask Edits below. |
MT | Multi Line Text Edit | Multi line edit control | Used for FSE, display of FILE_ID.DIZ, etc. See Multiline Text Edit |
BT | Button | A button | …it’s a button. See Button |
VM | Vertical Menu | A vertical menu | AKA a vertical lightbar; Useful for lists. See Vertical Menu |
HM | Horizontal Menu | A horizontal menu | AKA a horizontal lightbar. See Horizontal Menu |
FM | Full Menu | A menu that can go both vertical and horizontal. | See Full Menu |
SM | Spinner Menu | A spinner input control | Select one from multiple options. See Spinner Menu |
TM | Toggle Menu | A toggle menu | Commonly used for Yes/No style input. See Toggle Menu |
KE | Key Entry | A single key input control | Think hotkeys |
TK | Ticker | A continuously scrolling marquee | Scrolls text left or right in a fixed-width window. See Ticker View |
SB | Status Bar | An auto-refreshing text label | Re-renders MCI format codes on a timer. See Status Bar View |
TV | Table View | A list in columns | Group rows, a header and sorting; can stand in for VM. See Table View |
AV | Animation | Frames played in a box over the art | Inline frames, a frame sheet or one art file per frame. See Animation View |
Mask Edits
Section titled “Mask Edits”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-9A: 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 controlsstyleSGR2: Controls literal character colors for focused controlsstyleSGR3: Controls fill colors (characters that have not yet received input).
All of the style properties can take pipe codes such as |00|08.
View Identifiers
Section titled “View Identifiers”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.
Some rules for view IDs:
- A form holds one view per ID. Two codes with the same ID in one art file (
%TL1and%ET1) clash: the second is skipped and aDuplicate MCI view IDwarning is logged. - Codes without an ID (
%BN) get generated IDs from 100 up. - An
mcikey inmenu.hjsonortheme.hjsonis the code followed by the view ID, and nothing else:ET1,TL20. IDs in keys go up to 99. - Views are matched to
mcikeys by ID. A key whose code is not the code in the art (ET8for a%ME8) still configures that view, as it always has, but a warning is logged naming the menu, the form and the key. Fix the key to match the art. - A key that is not exactly a code and an ID (
MET3) is read from the first code and ID found in it (ET3), with a warning.
Placing Views from Configuration
Section titled “Placing Views from Configuration”A view does not need a code in the art. An mci key with a position places a view there, as if the art held the code at that spot. This is useful where a % code would draw over the art itself, such as a ticker over a logo, and it lets a theme add or move views on a stock menu without touching the art.
mci: { // no %TK50 in the art: the ticker is created at row 23, column 2 TK50: { position: { row: 23, col: 2 } width: 76 text: "Welcome to the board!" } // %TL2 is in the art: the explicit position wins and moves it TL2: { position: { row: 5, col: 40 } }}positionis{ row: <row>, col: <col> }, counted from the art’s top-left corner (row 1, column 1). For full screen art drawn from the top of the screen, that is the screen position. Art drawn lower down (a menu’s prompt below its art, a prompt drawn at a position, art a module places in part of the screen) moves its placed views with it, just as it moves its%codes.- Any view code can be placed, input views included. A placed input view takes part in the form like any other: focus order (by ID) and form data.
- With a code in the art and a
position, the position wins. - A position off the screen is skipped with a warning. Art taller than the screen that scrolls is not supported for placed views.
- Use high IDs for placed views (for example 50 to 99), so they do not clash with IDs the art uses now or later. IDs run from 1 to 99. If the art already uses the ID for a different code, the
positionis ignored with a warning, and the key’s other settings still apply to the art’s view, as any key’s do. - A theme can add a placed view to a stock menu: an
mcikey the menu does not have is added by the theme. See Themes. - A menu with no
form(an art-only display menu) needs a form for themciblock inmenu.hjson:form: { 0: { mci: { ... } } }. Adding aformto such a menu inmenu.hjsonstops it moving on to itsnextmenu by itself. Putting themciblock in the theme instead keeps that behaviour:
customization: { menus: { fullLoginSequenceUserStats: { mci: { TK50: { position: { row: 24, col: 1 } width: 79 text: "Thanks for calling!" } } } }}The Submit View
Section titled “The Submit View”Pressing Enter on a form only submits it from a view with submit: true. If no view in the form’s mci block sets submit, the view with the highest ID among the configured keys gets it (if the art has no view with that ID, no view does). Placed views (a position with no code in the art) are left out of that choice, so a theme adding a placed view with a high ID does not move submit off the form’s real field. To be sure, set submit: true on the view that should submit.
Properties & Theming
Section titled “Properties & Theming”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.
Common Properties
Section titled “Common Properties”| Property | Description |
|---|---|
textStyle | Sets the standard (non-focus) text style. See Text Styles below |
focusTextStyle | Sets focus text style. See Text Styles below |
itemSpacing | Used to separate items in menus such as Vertical Menu and Horizontal Menu Views. |
height | Sets the height of views such as menus that may be > 1 character in height |
width | Sets the width of a view |
focus | If set to true, establishes initial focus |
text | Set’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 |
submit | If set to true any accept action upon this view will submit the encompassing form. See The Submit View |
position | Places the view at { row, col } from the art’s top-left corner, with or without a code in the art. See Placing Views from Configuration |
itemFormat | Sets the format for a list entry. See Entry Formatting below |
focusItemFormat | Sets 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!
Custom Properties
Section titled “Custom Properties”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, browseInfoFormat10…N (where N is up to 99) in the file_area_list module received a fairly extensive format object that contains {fileName}, {estReleaseYear}, etc. A module may ship defaults for these; an entry in config always wins, and an empty string hides the view. See Default custom info formats.
Text Styles
Section titled “Text Styles”Standard style types available for textStyle and focusTextStyle:
| Style | Description |
|---|---|
normal | Leaves text as-is. This is the default. |
upper | ENIGMA BULLETIN BOARD SOFTWARE |
lower | enigma bulletin board software |
title | Enigma Bulletin Board Software |
first lower | eNIGMA bULLETIN bOARD sOFTWARE |
small vowels | eNiGMa BuLLeTiN BoaRD SoFTWaRe |
big vowels | EniGMa bUllEtIn bOArd sOftwArE |
small i | ENiGMA BULLETiN BOARD SOFTWARE |
mixed | EnIGma BUlLEtIn BoaRd SOfTWarE (randomly assigned) |
l33t | 3n1gm4 bull371n b04rd 50f7w4r3 |
Entry Formatting
Section titled “Entry Formatting”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.
MCI Formatting
Section titled “MCI Formatting”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 welltext: "|00|07{SD:,}"// ...or perhapstext: "|00:07{SD!countWithAbbr}"Additional Text Styles
Section titled “Additional Text Styles”Some of the text styles mentioned above are also available in the mini format language:
| Style | Description |
|---|---|
normal | Leaves text as-is. This is the default. |
toUpperCase or styleUpper | ENIGMA BULLETIN BOARD SOFTWARE |
toLowerCase or styleLower | enigma bulletin board software |
styleTitle | Enigma Bulletin Board Software |
styleFirstLower | eNIGMA bULLETIN bOARD sOFTWARE |
styleSmallVowels | eNiGMa BuLLeTiN BoaRD SoFTWaRe |
styleBigVowels | EniGMa bUllEtIn bOArd sOftwArE |
styleSmallI | ENiGMA BULLETiN BOARD SOFTWARE |
styleMixed | EnIGma BUlLEtIn BoaRd SOfTWarE (randomly assigned) |
styleL33t | 3n1gm4 bull371n b04rd 50f7w4r3 |
Additional text styles are available for numbers:
| Style | Description |
|---|---|
sizeWithAbbr | File size (converted from bytes) with abbreviation such as 1 MB, 2.2 GB, 34 KB, etc. |
sizeWithoutAbbr | Just the file size (converted from bytes) without the abbreviation. For example: 1024 becomes 1. |
sizeAbbr | Just the abbreviation given a file size (converted from bytes) such as MB or GB. |
sizeWholeWithAbbr | As sizeWithAbbr, rounded to a whole number: 137 MB rather than 137.09 MB. |
sizeWholeWithoutAbbr | As sizeWithoutAbbr, rounded to a whole number: 137 rather than 137.09. |
countWithAbbr | Count with abbreviation such as 100 K, 4.3 B, etc. |
countWithoutAbbr | Just the count |
countAbbr | Just the abbreviation such as M for millions. |
durationHours | Converts the provided hours value to something friendly such as 4 hours, or 4 days. |
durationMinutes | Converts the provided minutes to something friendly such as 10 minutes or 2 hours |
durationSeconds | Converts the provided seconds to something friendly such as 23 seconds or 2 minutes |
Examples
Section titled “Examples”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:
![]()