Skip to main content

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).

For full details on using conditionals such as {IF:CRASH}...{ENDIF}, see the Using Conditionals in Messages page.

Your Car

VariableDescription
{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)window, or any time if No Timeout is set).

VariableDescription
{CRASHCAR}Car number of the crashed car
{CRASHNAME}Driver name of the crashed car
{CRASHDIR}Relative direction of the crash (Aheadahead / Behindbehind / Left / Right)nearby)
{CRASHLAP}Lap number at which the crash occurred

Incident Variables

Available only when an incident is currently active (within the incident timeout window)window, or any time if No Timeout is set).

VariableDescription
{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

VariableDescription
{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

VariableDescription
{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:true. The closing tag is always {ENDIF}.

{IF:CONDITION}text shown when true{/IF}ENDIF}
ConditionTrue

Multiple when

{IF:CRASH}Aconditions crashcan isappear 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 matchesin the specifiedsame colour
{IF:GAPHEAD<5}Gapmessage. toSee carthe aheadUsing isConditionals lessin thanMessages 5page seconds
{IF:GAPHEAD>5}Gapfor tofull cardetails, aheadall issupported greaterconditions, thanand 5worked seconds
{IF:GAPBEHIND<5}Gap to car behind is less than 5 seconds
{IF:CARLAP>10}Current lap is greater than 10
examples.