Join a second client to the running session
joinBrings an existing character into an active tModLoader session, waiting until that client sends a live, world-ready heartbeat.
Instructions
Bring another character into the session that is already running.
Args:
player: Character name. Must already exist — -player does not create
one — and must not be one this session already has, in any casing.
timeout: Seconds to wait for that client to report a live, world-ready
heartbeat of its own.
The protocol has supported several clients since answers became per-player; the LIFECYCLE supported one, so the arrangement that work exists to make safe could only be reached by spawning a game by hand. This is that, with the waiting done properly.
It waits for THIS client, not for a process. A new pid says something
started — not that a character loaded, that the join was accepted, or that
a world is under it. And it watches only that player's own tokened
heartbeat: the unsuffixed <mod>-hooks.txt is a shared slot holding
whichever client booted last, so accepting it would return against the
heartbeat of the game that was already here.
Address the new client by name — diag(target=...), shot(target=...) —
which already works, because addressing was never the half that was
missing. stop takes it down with everything else the session started.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| player | Yes | ||
| timeout | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| joined | Yes | ||
| player | Yes | ||
| started_pids | Yes |