EHR Template How-To

How to Use EHR Templates

Set up automatic lobby messages one step at a time. Start with the thing you want to do, copy an example, then add timing, filters, variables, and placeholders only when you need them.

Search filters the guide as you type. Clear it to show everything again.

Pick Your Goal

Most people only need one of these patterns. Choose the closest one, copy it, and change the words.

Welcome Players

Greet each person as they join and include the room code, map, or Discord link.

See welcome examples

Send Reminders

Post lobby notifications, first-meeting notes, or meeting-specific instructions.

Choose a trigger

Target A Situation

Only send a message for certain maps, roles, ranks, lobby sizes, presets, or meetings.

Add bracket rules

Personalize Text

Use placeholders like player name, host name, map, player count, date, and time.

View placeholders
No matching guide items yet. Try a shorter word like "role", "map", "delay", or "welcome".

Start Here

If you have never made a template before, do this first. You can make more advanced templates later.

1

Open template.txt

This is where your lobby messages live. Each template starts on its own line with a tag.

2

Add a welcome

Paste welcome:Welcome to the lobby!. The word before the colon is the trigger.

3

Save the file

Save your changes, then trigger the tag in game or let the automatic event happen.

4

Test it

Use /template welcome or /t welcome to send that template manually.

The simplest format is tag:message. You do not need brackets unless you want extra control.
Everything after the first colon is the message players will see.
Use clear tag names like welcome, rules, motd, or strategy.
Run /template with no arguments to list all available tags in the file.
You can press Enter to write a message across multiple lines. You no longer need \n, though it still works if you prefer it.

Choose When It Sends

Some tag names are automatic. Other tags are only sent when you run them manually.

Automatic system tags are triggered by the game. You do not call them yourself.
I want a message when someone joins

Use the welcome tag.

welcome:Welcome {{PlayerName}}! Code is {{RoomCode}}.
I want a repeating lobby reminder

Use the notification tag. The repeat timing comes from the auto-message settings.

  • Enable Auto-Message toggles the feature on or off.
  • The Auto-Message Is Sent Every X seconds controls how often it fires.
OnFirstMeeting:This is the first meeting. Crewmates, use the /myrole command to see your role info.
notification:{{PlayerCount}} players in lobby.

That example sends one first-meeting reminder and one repeating lobby notification.

I want a meeting message

Use OnMeeting for every meeting, or OnFirstMeeting for only the first one.

OnFirstMeeting:This is the first meeting. Use /myrole if you need your role info.
OnMeeting[meeting=2]:Second meeting. Start narrowing it down.
I want a message I can run myself

Make your own tag name, then trigger it with /template [tagname].

rules:Please read the lobby rules before joining voice.

To send it, run /template rules or /t rules.

Add Rules With Brackets

Brackets are optional. Use them when a message should only send in a specific situation.

Basic property syntax: tag[property=value]:message.
Multiple properties are separated by commas: tag[property=value, property=value]:message.
A template with no properties still works exactly as before. Properties are fully optional.
How do I delay a message?

Add delay=N, where N is 1-30 seconds. Delayed messages always send.

welcome:This sends right away.
welcome[delay=5]:This sends 5 seconds later.
welcome[delay=15]:This sends 15 seconds later.
How do I pick one random message?

Use the same tag more than once. Add weight=N if one should show more often.

motd[weight=8]:Remember to vote every meeting.
motd[weight=2]:Rare tip: check who is avoiding tasks.

Weights can be 1-10. Higher weight means that entry gets picked more often.

How do I send only on certain maps?

Use map=X. Separate multiple maps with |.

Valid map values are Skeld, MiraHQ, Polus, Airship, Fungle, and Dleks.

mapinfo[map=Skeld]:You are on Skeld!
mapinfo[map=Polus|Fungle]:You are on Polus or Fungle.
How do I send only to certain players?

Use role for in-game roles or rank for Host, Admin, Mod, Moderator, or VIP.

strategy[role=Jester]:Act suspicious, but survive long enough.
strategy[role=!Impostor]:You are not an Impostor. Work together and find them.
strategy:A generic tip for anyone else.

access[rank=Mod|Admin|Host]:Welcome, prestigious member!

You can add a fallback template with no role or rank condition for everyone else.

How do I check lobby size, preset, or meeting number?

Use players, preset, or meeting.

Player count supports >, >=, <, <=, =, and !=.

lobbysize[players>=15]:Big lobby! Starting soon.
lobbysize[players<6]:Still waiting for more players to join.
welcome[preset=2|3]:This message appears on Preset 2 or 3.
OnMeeting[meeting=3|4]:Meeting 3 or 4. Time is running out.
How do I hide a tag from the list?

Use hidden. The tag will not show in the /template listing, but it can still trigger.

ping[hidden]:Just an unfinished hidden message.

Regex Message Triggers

Regex is a search pattern. In templates, it lets a message send automatically when a player's chat message matches words, commands, numbers, or phrases you choose.

Template syntax: tag[regex="pattern"]:message.
Regex checks the raw chat message and is not case-sensitive.
Use ^ and $ when you want an exact full-message match.
Backslashes should be doubled in template files, like \\b or \\d+.
Build an autoresponder

Fill this out to make a template that watches chat and answers automatically. The generated line can go directly into template.txt.

This is the tag name. Use letters, numbers, or underscores.
This is what a player types in chat.
Useful for autoresponders because players trigger them by chat.
This is the response EHR sends when the trigger matches.

Generated template

What is regex?

Regex, short for regular expression, is a compact way to describe text you want to find. Instead of checking one exact sentence, you can check a pattern such as "starts with !rules", "contains body", or "has any number in it."

For EHR templates, the pattern goes inside regex="...". When someone sends chat, EHR tests that chat against the pattern. If it matches, the template sends.

rules[regex="^!rules$"]:Please read the lobby rules before the game starts.
Regex for dummies

Start with normal words, then add symbols only when you need them.

body Matches any message containing body, including "where is body?"
^!rules$ Matches exactly !rules and nothing else.
body|report Matches body or report.
\\bbody\\b Matches body as its own word.
\\d+ Matches one or more numbers.
.* Matches anything. Use carefully because it is very broad.
How does EHR use it?

EHR reads every template with a regex property, compiles that pattern, then checks incoming chat with it. If the pattern matches and any other bracket rules also pass, EHR sends the template.

help[regex="^!help$"]:Available commands: !rules, !discord, !settings

discord[regex="^!discord$"]:Join the Discord: discord.gg/maul

bodyhelp[regex="\\b(body|report|dead)\\b"]:
If you found a body, say where it was and who was nearby.

In practice, a player typing !discord triggers the Discord line. A player typing where was body? triggers the body help line.

If you want the simplest autoresponder, make the word people type the regex and make the text after the colon the answer.

discord[regex="^discord$"]:discordlink

That means: if someone says exactly discord, EHR replies with discordlink. Replace discordlink with the real invite when you are ready.

How do I combine regex with other rules?

Regex can sit next to other bracket rules. Separate properties with commas. This example only responds to !settings on Preset 2 or 3.

settings[regex="^!settings$", preset=2|3]:
Current setup: {{Map}} | {{PlayerCount}} players | Preset {{Preset}}

You can also hide regex-triggered templates so they do not appear in the manual /template list.

rules[regex="^!rules$", hidden]:
No slurs, no teaming, no stream sniping, and keep meetings readable.
Common mistakes
  • Use quotes around the regex value: regex="^!rules$".
  • Double backslashes in regex shortcuts: write \\d+, not \d+.
  • Use ^ and $ for commands so random sentences do not trigger them.
  • Use | for "or", such as body|report|dead.
  • Keep broad patterns like .* rare because they match almost everything.

Reuse Text With Variables

Variables are handy for links, lobby summaries, and repeated lines you do not want to type over and over.

How do I make a variable?

Put the variable on its own line, then use it later with @name.

@discord = discord.gg/ehr
@session = {{Date}} | {{Time}}
@lobby = {{Map}} | {{PlayerCount}} players | Code: {{RoomCode}}

welcome:
@lobby
Join our server at @discord!

Placeholders inside variables are filled when the message sends.

What should I avoid?
  • Do not define variables in the middle of a message.
  • Do not put comments at the end of a template line.
  • Start comments on their own line with #. Comment lines are ignored entirely.
  • If a variable is not defined, it stays as-is in the final message.
# This is a comment
welcome: Greetings!

Copy-Friendly Examples

Start with one of these, then edit the message text for your lobby.

A simple welcome setup
@discord = discord.gg/ehr
@lobby = {{Map}} | {{PlayerCount}} players | Code: {{RoomCode}}

welcome:
Welcome {{PlayerName}}!
@lobby
Join our server at @discord!
A first-meeting reminder
OnFirstMeeting:
This is the first meeting.
Use /myrole if you need your role info.
Remember to vote before time runs out.
A big-lobby reminder
lobbysize[players>=15]:
Big lobby! Starting soon.
Please stay in lobby and avoid spam joining.
A map-specific tip
mapinfo[map=Polus|Fungle]:
This map has a lot of space.
Pay attention to where bodies are found and who was nearby.
A chat command that answers itself
rules[regex="^!rules$", hidden]:
Rules: no slurs, no teaming, no stream sniping, and keep meetings readable.

discord[regex="^!discord$", hidden]:
Join the lobby Discord: discord.gg/maul

Players can type !rules or !discord in chat and EHR will answer automatically.

discord[regex="^discord$", hidden]:discord.gg/maul

This version answers when someone types discord without the exclamation mark.

Full Template File Example

This small template.txt example puts most features together in one place.

@discord = discord.gg/ehr

# Welcome messages with weighted random pick
welcome[weight=7]:Welcome to {{HostName}}'s lobby! Join our Discord: @discord
welcome[weight=3]:Glad you joined! Find us at @discord

# Send a message 10 seconds after the welcome fires
welcome[delay=10]:Hope you have an unforgettable experience in my lobby!

# Auto-message shown in lobby every X seconds
notification:{{PlayerCount}} players | {{Map}} | Preset: {{Preset}}

# Chat command auto-responses
rules[regex="^!rules$", hidden]:No slurs, no teaming, no stream sniping, and keep meetings readable.
discord[regex="^!discord$", hidden]:Join the lobby Discord: @discord

# First meeting reminder
OnFirstMeeting:First meeting! Think before you vote.

# Target a specific meeting
OnMeeting[meeting=3]:Third meeting. Crewmates need to figure this out.

# Only show on big lobbies
OnMeeting[players>=12]:Big game with {{PlayerCount}} players. Stay focused.

# Role-specific tips
strategy[role=Jester]:You are the Jester. Get voted out to win.
strategy[role=!Impostor]:You are Crew. Find the Impostors!
strategy:Play smart and have fun.

# Rank-only template hidden from listing
ping[rank=Mod|Admin|Host, hidden]:Lobby check | {{PlayerCount}} players | {{Map}} | {{Time}}

Placeholders

Placeholders are wrapped in double braces and filled dynamically when a message is sent.

Player And Lobby

{{PlayerName}}Name of the receiving player
{{HostName}}Name of the current host
{{RoomCode}}Lobby join code
{{Map}}Name of the current map
{{PlayerCount}}Total players in the lobby
{{AlivePlayerCount}}Number of players currently alive
{{DeadPlayerCount}}Number of players currently dead
{{Players}}Names of all players, comma separated
{{AlivePlayers}}Names of alive players, comma separated
{{DeadPlayers}}Names of dead players, comma separated

Game Settings

{{KillCooldown}}Kill cooldown in seconds
{{DiscussionTime}}Discussion time in seconds
{{VotingTime}}Voting time in seconds
{{EmergencyCooldown}}Emergency button cooldown in seconds
{{NumEmergencyMeetings}}Emergency meetings allowed per player
{{PlayerSpeedMod}}Player speed multiplier
{{CrewLightMod}}Crewmate vision multiplier
{{ImpostorLightMod}}Impostor vision multiplier
{{NumCommonTasks}}Number of common tasks
{{NumLongTasks}}Number of long tasks
{{NumShortTasks}}Number of short tasks

Game State

{{MeetingCount}}Number of meetings held so far
{{GameDuration}}Elapsed game time as mm:ss
{{Preset}}Name of the active preset, such as Preset 1

Version And Time

{{AmongUsVersion}}Among Us version
{{InternalVersion}}EHR internal version number
{{ModVersion}}EHR display version
{{Date}}Current date
{{Time}}Current time

Troubleshooting

If a template does not send the way you expected, check these first.

It does not show in /template

Make sure the tag is not marked hidden. Hidden templates can still trigger, but they do not show in the list.

The message does not send

Check the bracket rules. A map, role, rank, player count, preset, or meeting condition may not be met.

A variable appears as text

Make sure the variable is defined on its own line, like @discord = discord.gg/ehr.

Delay feels different than expected

Immediate entries go through weighted picks. Delayed entries always fire after their delay.

Made with reference to Zypherus' EHR template guide and code.