Read the mod's heartbeat
heartbeatDiagnose unresponsive tModLoader games by checking disk state to distinguish absent, stale, and still-loading client and server statuses.
Instructions
Why the game is not answering, for both sides at once.
launch already reads this file to decide readiness and keeps one bit of
it. When a launch SUCCEEDS that is all anyone needs. When it fails, the
discarded detail is the entire answer, and what comes back instead is no live heartbeat within 300s — which names the symptom and none of the four
causes:
absent — nothing ever wrote one. The mod is not loaded, is not enabled in this install, or was built without the dev bridge. For clients this is an EMPTY
clientslist, not an entry saying so.stale — a game ran and is no longer running. The file outlives the process, so this is indistinguishable from live to anything that only checks whether it exists.
live, no world — still loading. Nothing is wrong; wait longer.
live, world, not armed — loaded and ticking, bridge not listening.
clients is a LIST because two clients can share one save directory and
the old single-client shape reported whichever wrote last. Expect an entry
per client — and one more: an entry with player: null is the untokened
heartbeat every client writes before its character loads, which nothing
deletes and each new client overwrites. Treat it as a slot rather than as
a client. A real client is the one carrying a token and an advancing
polls.
Reads OFF DISK and needs no session, deliberately: a failed launch raises
without storing one, so a tool that required a session could never answer
the question it exists for. It is also the only tool here that is useful
when nothing else is.
Both sides are returned together because "the client is silent and the server is fine" is a different diagnosis from both being silent, and asking one at a time cannot see the difference.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| server | Yes | ||
| clients | Yes |