Start Here
Merlin is an app for playing text games, with scripts, triggers, aliases, timers, highlights, gags, macros, and mapping.
This guide gets you started with Dragon's Gate.
Coming from another client? See Coming from another client? for how Merlin’s tools differ.
1. Open the game
In the launcher, choose Dragon's Gate, then click Play.
The main window opens when Merlin connects. Enter your account information when the game prompts you.
2. Log in
At the Username: prompt, type your answer in the command line, then press Enter. Answer the rest of the game’s questions the same way.
Note: Merlin doesn’t store responses to login prompts or include them in the session log.
3. Get to know the window
| What you see | What it is |
|---|---|
| Game panel | Everything the game says |
| Command line | Where you type commands. Press the Up Arrow key to recall earlier commands. A command you type several times in a row appears only once in the history. |
| Vitals bar | Health, fatigue, and other vitals |
| Hands bar | What you’re holding in each hand and the delay before you can act again |
| Side panels | Your character, inventory, skills, wounds, map, and game chat |
Arrange the panels
- To move a panel, drag its tab to a new spot.
- To float a panel, drag its tab out of the window.
- To close a panel, hover over its tab and click the ×.
Reopen panels from the Panels menu. Open the map from the Maps menu.
4. Type a command
- Click the command line, then type
look. - Press Enter.
Merlin marks commands with >. The game’s response appears below the command.
5. Make it yours
Choose a theme from the Themes menu to change the appearance of panels, bars, and game text.
Merlin has panel themes and chat themes. To create one:
- Choose Settings > Panel Theme or Settings > Chat Theme.
- Click the New theme button (+), enter a name, then click Create.
Tip: Give a panel theme and chat theme the same name to group them in the Themes menu and switch both at once.
Click Theme defaults to restore a theme’s original settings. To rename a theme you created, click the Rename theme button (the pencil) next to the theme picker.
Chat themes also set the game text font. To enlarge game text without changing the layout, use the font scale in Settings > Accessibility. To change text size for an individual panel, use its Text size button.
6. Keep the window you built
Merlin keeps your arrangement as you go. If you quit with a panel floating, it’s still floating the next time you open Merlin.
Your saved arrangements appear in the Layout menu.
- To switch layouts, choose one from the Layout menu.
- To rename, duplicate, or delete layouts, choose Layout > Manage Layouts.
Layouts are stored as files in the game’s Layouts folder and can be shared with other Merlin users.
The Layouts folder is inside the game folder in your Merlin folder:
| Platform | Location |
|---|---|
| macOS | ~/Library/Merlin |
| Windows | %APPDATA%\Merlin Files |
| Linux | ~/Documents/Merlin |
Coming from another client?
In many clients, you build your own panels, such as a health bar or a chat window. Then you write triggers to fill them. Merlin’s panels come ready and fill themselves, so most of those triggers aren’t needed here.
In those clients, one trigger can do almost anything: color a line, hide it, play a sound, send commands, and run a long chain of steps. Merlin gives each job its own tool.
| To | Use |
|---|---|
| Do one thing every time the game prints a line | A trigger |
| Do one thing when you walk into a room | A trigger with On room entry |
| Do a job with steps, waits, or choices | A script |
| Do something on a schedule | A timer |
| Make words stand out | A highlight |
| Hide words | A gag |
| Change the words you see | A substitute |
| Type a short word in place of a command | An alias |
| Send a command with one key | A macro |
Trigger or script?
A trigger is simple. When one line appears, it does one thing, right away. A script can be as big as the job. It takes steps, waits for the game, makes choices, and repeats.
Jobs for a trigger:
| When | The trigger |
|---|---|
| The game says you’re hungry | Sends eat bread |
| You get knocked down | Sends stand |
| Someone says your name | Plays a sound |
Jobs for a script:
- Fight every creature in the room, one at a time.
- Treat yourself until your health is full, then go back to fighting.
- Look through all your bags and put each item where it belongs.
- Buy, sell, or practice something many times in a row.
Here’s a script that does a job no trigger could:
// Fight every rat in the room, one at a time.
action send stand when knocks you down
repeat 20
repeat 30
send attack rat
pause 1
stopon I don't see
until is dead
if $health < 50 then gosub Treat
until I don't see
echo No rats left.
stop
Treat:
repeat 30
send treat $firstname
pause 2
until eval $health >= 100
returnHere’s what it does:
- It attacks a rat once a second until the game says the rat is dead.
- After each rat, if your health is under 50, it treats you every 2 seconds until your health is full.
- It goes back to fighting the next rat. When the game says there’s no rat to attack, it tells you no rats are left and stops.
- The whole time, the
actionline stands you back up if you’re knocked down. An action is a trigger that lives inside the script, and it stops when the script stops.
$health is your health, and $firstname is your character’s name. Merlin keeps both up to date. Which names you can use depends on your game. To see them, go to Settings > Variables.
In many clients, a job like this takes several triggers that start each other. In Merlin, it’s one script you can read from top to bottom. To start it when a line appears, have a trigger run it.
What works differently
- Merlin waits for you. In many clients, nothing waits on its own. To wait for the game, you set timers or build triggers that start each other. In Merlin, a script waits right where it is:
pausewaits out the delay, andwaitforwaits for the game’s words. Scripts, triggers, and timers also wait for the game to answer before they send the next command. That keeps the game’s queue empty, so a command never goes out after you’ve stopped wanting it. Commands you type go out right away, ahead of anything waiting. Typing during a delay is one of the few ways a queue can form. - A trigger does one thing. In many clients, one trigger can hold a whole program. In Merlin, a trigger sends a command, runs a script, or runs one script line, and it can add a sound or a spoken alert. A short trigger is easy to read and easy to test. Anything with steps belongs in a script, because a script can wait.
- Highlights, gags, and substitutes are tools of their own. In many clients, they’re settings on a trigger. In Merlin, each does one job, so it can’t do another by mistake. A highlight only colors text; it never hides or sends anything. When a highlight and a gag match the same words, the highlight wins, so words you marked stay on screen. A substitute changes only what you read; it never sends anything.
- A gag hides only the words it matches. In many clients, a gag removes the whole line from the screen. In Merlin, a gag removes only the words it matches, and the rest of the line stays. To hide a whole line, use the whole line as the gag. Gags apply to Game (Filtered) and your gameplay log. The Game panel always shows everything, so a gag never hides anything for good.
- Plain words match whole words. In many clients, plain text either matches inside other words, so a trigger on
ratfires onrations, or it must match the whole line, soratdoesn’t even fire onA rat bites you.In Merlin, plain text matches whole words anywhere in the line.ratfires onA rat bites you., but not onYou eat some rations.This keeps short words from catching other words by accident. As in most clients, capital letters must match. A highlight ofRosemarks the name Rose, but not the flower ina red rose. To match inside words, set a trigger to matches a Regex. - An alias sends one command. In many clients, one alias can send several commands at once, such as
attack rat;attack rat;attack rat. In Merlin, an alias sends one command, and a semicolon is just part of the text. Commands sent all at once don’t wait for the game. If the rat dies on the first attack, the game still runs the other two. To do several things with one word, have the alias run a script. A script sends each command only when the game is ready.
To learn more, see Triggers and Scripting.
Learn more
Find these guides in the Help menu:
| Guide | What it covers |
|---|---|
| Core Panels | Panels, layouts, themes, and features common to every game |
| Dragon's Gate Panels | The panels and bars that come with Dragon's Gate |
| Macros | Assigning actions to keys |
| Triggers | Acting automatically on game output |
| Timers | Running actions on a schedule |
| Scripting | Writing and running scripts |
| Scripting in Dragon's Gate | Tips and everyday scripts for Dragon's Gate |
| Aliases | Short names for longer commands |
| Gags and Substitutes | Hiding or replacing text |
| Highlights | Making selected text stand out |
| Mapper | Mapping and click-to-walk |
Under Help > Social, you can find the Discord servers for Merlin and Dragon's Gate.