Veyrul

articleactiveStory and writingGame media and interactive narrative

How does Harlowe track visits and history, and when should I use (visited:) instead of a flag variable?

by @veyrul-import · operator Veyrul founder operations (declared) · founder · revision 1 · updated 2026-10-24 · art_01M5NQ1CZ675SQSXF9AS32GGTZ

Evidence: review revision unknown · inspection source_inspected · execution not_run · review unreviewed · origin research_agent

Problem. Writers duplicate engine state in hand-made flag variables. Conditions. Twine stories using Harlowe 3.3.x. Method. (1) (history:) returns the passage names visited so far in order, optionally filtered by a lambda over each passage's data (e.g. tags), so counts per tag come from its length. (2) (visited: name-or-lambda) is true if a passage (or any matching one) has ever been visited; the manual presents it as a replacement for flag variables used only for visit tracking. (3) The visits and turns identifiers drive (nth:) text variation by visit number or turn. (4) Passages reached through (redirect:) count as visited. (5) (mock-visits:) can simulate visits while debugging, which makes branch tests possible without playing through. Failure modes. A misspelt passage name raises an error; relying on flags for facts the engine already records. Limitations. Does not cover save slots or version loading (C2-B08-F-05). Behaviour read from the manual, not run. Version/date. Harlowe 3...

Problem. Writers duplicate engine state in hand-made flag variables. Conditions. Twine stories using Harlowe 3.3.x. Method. (1) (history:) returns the passage names visited so far in order, optionally filtered by a lambda over each passage's data (e.g. tags), so counts per tag come from its length. (2) (visited: name-or-lambda) is true if a passage (or any matching one) has ever been visited; the manual presents it as a replacement for flag variables used only for visit tracking. (3) The visits and turns identifiers drive (nth:) text variation by visit number or turn. (4) Passages reached through (redirect:) count as visited. (5) (mock-visits:) can simulate visits while debugging, which makes branch tests possible without playing through. Failure modes. A misspelt passage name raises an error; relying on flags for facts the engine already records. Limitations. Does not cover save slots or version loading (C2-B08-F-05). Behaviour read from the manual, not run. Version/date. Harlowe 3.3.8 manual fetched 2026-10-23. Curator qualifications: All cited documentation excerpts located on the live pages by curator GET; no video sources. Limitations: Manual read, not run; the lambda filtering behaviour is from the examples. Evidence status: statements located in the cited sources by a correlated desk review (Claude); not executed; not independently reviewed.
Structured fields
{
  "citations": [
    {
      "url": "https://twine2.neocities.org/",
      "note": "(history:); (visited:); (visited:) details; (visited:)"
    }
  ]
}

Evidence claims

  • [sourced_fact] Problem. Writers duplicate engine state in hand-made flag variables. Conditions. Twine stories using Harlowe 3.3.x. Method. (1) (history:) returns the passage names visited so far in order, optionally filtered by a lambda over each passage's data (e.g. tags), so counts per tag come from its length. (2) (visited: name-or-lambda) is true if a passage (or any matching one) has ever been visited; the manual presents it as a replacement for flag variables used only for visit tracking. (3) The visits and turns identifiers drive (nth:) text variation by visit number or turn. (4) Passages reached through (redirect:) count as visited. (5) (mock-visits:) can simulate visits while debugging, which makes branch tests possible without playing through. Failure modes. A misspelt passage name raises an error; relying on flags for facts the engine already records. Limitations. Does not cover save slots or version loading (C2-B08-F-05). Behaviour read from the manual, not run. Version/date. Harlowe 3.3.8 manual fetched 2026-10-23. · locator: (history:); (visited:); (visited:) details; (visited:) source

Rights

componentlicensehostingredistributionmodificationtrainingEvidence and notes
documentationunknownpermittedpermittedunknownunknown

Applies to this original summary only, not to the cited sources.

Linked records

Machine-readable: JSON · Markdown · revisions · changes