Message Variables Reference
Overview
Variables are placeholders wrapped in curly braces that are substituted with live iRacing data when a button is pressed. They can be used in any message field and in the Speak Text field.
If a variable is used in a message but has no current value, the entire message line is suppressed (or replaced by the fallback message if one is configured).
Your Car
| Variable | Description |
|---|
{CAR#} | Your car number |
{CARTYPE} | Your car model / type |
{CARLAP} | Your current lap (with decimal fraction) |
{DRIVER} | Your driver name |
{FLAG} | Current flag colour (e.g. Green, Yellow, Red, Black, Checkered) |
Crash Variables
Available only when a crash is currently active (within the crash timeout window).
| Variable | Description |
|---|
{CRASHCAR} | Car number of the crashed car |
{CRASHNAME} | Driver name of the crashed car |
{CRASHDIR} | Relative direction of the crash (Ahead / Behind / Left / Right) |
{CRASHLAP} | Lap number at which the crash occurred |
Incident Variables
Available only when an incident is currently active (within the incident timeout window).
| Variable | Description |
|---|
{INCCAR} | Car number involved in the incident |
{INCNAME} | Driver name involved in the incident |
{INCDIR} | Relative direction of the incident |
{INCLAP} | Lap number at which the incident occurred |
Cars Around You
| Variable | Description |
|---|
{CARAHEAD} / {CARAHEAD1} | Car number of the 1st car ahead |
{CARAHEAD2} | Car number of the 2nd car ahead |
{CARAHEAD3} | Car number of the 3rd car ahead |
{NAMEAHEAD} / {NAMEAHEAD1} | Driver name of the 1st car ahead |
{NAMEAHEAD2} | Driver name of the 2nd car ahead |
{NAMEAHEAD3} | Driver name of the 3rd car ahead |
{CARBEHIND} / {CARBEHIND1} | Car number of the 1st car behind |
{CARBEHIND2} | Car number of the 2nd car behind |
{CARBEHIND3} | Car number of the 3rd car behind |
{NAMEBEHIND} / {NAMEBEHIND1} | Driver name of the 1st car behind |
{NAMEBEHIND2} | Driver name of the 2nd car behind |
{NAMEBEHIND3} | Driver name of the 3rd car behind |
{CLOSECAR1} | Closest car number (any direction) |
{CLOSECAR2} | 2nd closest car number |
{CLOSECAR3} | 3rd closest car number |
{CLOSENAME1} | Closest driver name (any direction) |
{CLOSENAME2} | 2nd closest driver name |
{CLOSENAME3} | 3rd closest driver name |
{GAPHEAD} / {GAPHEAD1} | Gap in seconds to 1st car ahead |
{GAPHEAD2} | Gap in seconds to 2nd car ahead |
{GAPHEAD3} | Gap in seconds to 3rd car ahead |
{GAPBEHIND} / {GAPBEHIND1} | Gap in seconds to 1st car behind |
{GAPBEHIND2} | Gap in seconds to 2nd car behind |
{GAPBEHIND3} | Gap in seconds to 3rd car behind |
{TOPX} | Comma-separated list of top X race leaders by position (e.g. #3, #11, #27) |
Timing Controls
| Variable | Description |
|---|
{PAUSE:N} | Insert a pause of N milliseconds between message segments |
Conditional Blocks
Wrap part of a message in a condition so it is only included when the condition is true:
{IF:CONDITION}text shown when true{/IF}| Condition | True when |
|---|
{IF:CRASH} | A crash is currently active |
{IF:NOCRASH} | No crash is currently active |
{IF:INCIDENT} | An incident is currently active |
{IF:NOINCIDENT} | No incident is currently active |
{IF:FLAG=Yellow} | Current flag matches the specified colour |
{IF:GAPHEAD<5} | Gap to car ahead is less than 5 seconds |
{IF:GAPHEAD>5} | Gap to car ahead is greater than 5 seconds |
{IF:GAPBEHIND<5} | Gap to car behind is less than 5 seconds |
{IF:CARLAP>10} | Current lap is greater than 10 |