Skip to content

Main content

Random Epistolary Story Packet Generator

Compose fictional supplied-template correspondence with prerequisite-ordered reveals, explicit reply links, relative transit days, and delegated word wrapping.

Loading tool…

Description

Compose fictional supplied-template correspondence with prerequisite-ordered reveals, explicit reply links, relative transit days, and delegated word wrapping.

A structured creative brief combines a supplied bank of fictional material with explicit sequencing, timing, or compatibility rules. IDs and tags make those constraints inspectable; they do not assess the artistic meaning or quality of a scene.

Compose fictional supplied-template correspondence with prerequisite-ordered reveals, explicit reply links, relative transit days, and delegated word wrapping.

When to use this tool

Use this generator to create reproducible epistolary story packet cases from the supplied model or bank. Inspect the returned evidence before using cases in a test or exercise.

How to use the tool and how it works

  1. Supply people, events, openingTemplates, replyTemplates, closingTemplates, delays, count, startDay, wrapWidth in the field shapes below. Set seed when you need an explicit replay.
  2. Run the tool and correct any input error. For generated controls, distinguish a successful fixture containing an invalid case from failure to generate the fixture.
  3. Read letters, revealOrder, deliveryOrder. Use the conventions below. Keep answer-bearing fields separate when presenting an exercise.

Choose two distinct correspondents, validate the supplied event dependency DAG, and reveal a ready event in each alternating letter. Expand opening/reply, event, delay, and closing templates, accumulate delivery days, and return known-event and reply references.1

Delegated operations used for this result: word wrap. Their calculation or parsing conventions apply to the corresponding result fields.2

Input fieldMeaning and unitsAccepted input
peoplePeopleRequired. Array of Object; no unknown keys.; minimum items 2; maximum items 32.
people[].idLiteral identifier used independently of display labels.Required. Text; minimum UTF-16 length 1; maximum UTF-16 length 128.
people[].nameNameRequired. Text; minimum UTF-16 length 1; maximum UTF-16 length 128.
eventsEventsRequired. Array of Object; no unknown keys.; minimum items 1; maximum items 64.
events[].idLiteral identifier used independently of display labels.Required. Text; minimum UTF-16 length 1; maximum UTF-16 length 128.
events[].textTextRequired. Text; maximum UTF-16 length 4096.
events[].requiresRequiresRequired. Array of Text; minimum UTF-16 length 1; maximum UTF-16 length 128.; minimum items 0; maximum items 64.
openingTemplatesOpening TemplatesRequired. Array of Text; maximum UTF-16 length 4096.; minimum items 1; maximum items 16.
replyTemplatesReply TemplatesRequired. Array of Text; maximum UTF-16 length 4096.; minimum items 1; maximum items 16.
closingTemplatesClosing TemplatesRequired. Array of Text; maximum UTF-16 length 4096.; minimum items 1; maximum items 16.
delaysDelaysRequired. Array of Object; no unknown keys.; minimum items 1; maximum items 16.
delays[].idLiteral identifier used independently of display labels.Required. Text; minimum UTF-16 length 1; maximum UTF-16 length 128.
delays[].minimumDaysMinimum DaysRequired. Safe integer; minimum 0.
delays[].maximumDaysMaximum DaysRequired. Safe integer; minimum 0.
delays[].textTextRequired. Text; maximum UTF-16 length 4096.
countCountRequired. Safe integer; minimum 1; maximum 32.
startDayRelative integer day origin supplied by the caller; no calendar or timezone assumptions.Required. Safe integer.
wrapWidthWrap WidthRequired. Safe integer; minimum 1; maximum 4096.
seedOptional numeric seed; takes precedence over context randomness. Without either, use the fixed tool.io default seed.Optional. Safe integer.
Output fieldInterpretationReturned shape
lettersLettersRequired. Array of Object; no unknown keys.; minimum items 1; maximum items 32.
letters[].idLiteral identifier used independently of display labels.Required. Text; minimum UTF-16 length 1; maximum UTF-16 length 128.
letters[].senderIdSender IdRequired. Text; minimum UTF-16 length 1; maximum UTF-16 length 128.
letters[].recipientIdRecipient IdRequired. Text; minimum UTF-16 length 1; maximum UTF-16 length 128.
letters[].eventIdEvent IdRequired. Text; minimum UTF-16 length 1; maximum UTF-16 length 128.
letters[].sentDaySent DayRequired. Safe integer.
letters[].receivedDayReceived DayRequired. Safe integer.
letters[].delayIdDelay IdRequired. Text; minimum UTF-16 length 1; maximum UTF-16 length 128.
letters[].delayDaysDelay DaysRequired. Safe integer; minimum 0.
letters[].replyReplyRequired. Object; no unknown keys.
letters[].reply.toToRequired. Text; minimum UTF-16 length 1; maximum UTF-16 length 128. or Null.
letters[].knownEventsBeforeKnown Events BeforeRequired. Array of Text; minimum UTF-16 length 1; maximum UTF-16 length 128.; minimum items 0; maximum items 32.
letters[].textTextRequired. Text; maximum UTF-16 length 65536.
letters[].lineCountLine CountRequired. Safe integer; minimum 0.
revealOrderReveal OrderRequired. Array of Text; minimum UTF-16 length 1; maximum UTF-16 length 128.; minimum items 1; maximum items 32.
deliveryOrderDelivery OrderRequired. Array of Text; minimum UTF-16 length 1; maximum UTF-16 length 128.; minimum items 1; maximum items 32.
randomnessReplay source and normalized 32-bit seed, or null seed for an advancing context source.Required. Object; no unknown keys.
randomness.seedOptional safe-integer replay seed; normalization and precedence are explained below.Required. Safe integer. or Null.
randomness.sourceSourceRequired. Text; one of "context", "seed".

An explicit safe-integer seed takes precedence over injected context randomness and is normalized to an unsigned 32-bit integer. With no seed and no context source, replay uses the fixed tool.io default seed. A context source must return finite values from zero inclusive to one exclusive; its advancing state must be retained separately. randomness records the source and normalized seed, or null for context. These generators are not cryptographic random sources.

json
{
  "input": {
    "people": [
      {
        "id": "m",
        "name": "Mara"
      },
      {
        "id": "i",
        "name": "Ivo"
      }
    ],
    "events": [
      {
        "id": "gate",
        "text": "The gate is open.",
        "requires": []
      },
      {
        "id": "map",
        "text": "The map is inside.",
        "requires": [
          "gate"
        ]
      }
    ],
    "openingTemplates": [
      "Dear {recipient},"
    ],
    "replyTemplates": [
      "Re {replyId},"
    ],
    "closingTemplates": [
      "From {sender}."
    ],
    "delays": [
      {
        "id": "courier",
        "minimumDays": 1,
        "maximumDays": 2,
        "text": "Transit {delayDays} days."
      }
    ],
    "count": 2,
    "startDay": 10,
    "wrapWidth": 80,
    "seed": 42
  },
  "output": {
    "letters": [
      {
        "id": "letter-1",
        "senderId": "i",
        "recipientId": "m",
        "eventId": "gate",
        "sentDay": 10,
        "receivedDay": 11,
        "delayId": "courier",
        "delayDays": 1,
        "reply": {
          "to": null
        },
        "knownEventsBefore": [],
        "text": "Dear Mara, The gate is open. Transit 1 days. From Ivo.",
        "lineCount": 1
      },
      {
        "id": "letter-2",
        "senderId": "m",
        "recipientId": "i",
        "eventId": "map",
        "sentDay": 11,
        "receivedDay": 13,
        "delayId": "courier",
        "delayDays": 2,
        "reply": {
          "to": "letter-1"
        },
        "knownEventsBefore": [
          "gate"
        ],
        "text": "Re letter-1, The map is inside. Transit 2 days. From Mara.",
        "lineCount": 1
      }
    ],
    "revealOrder": [
      "gate",
      "map"
    ],
    "deliveryOrder": [
      "letter-1",
      "letter-2"
    ],
    "randomness": {
      "seed": 42,
      "source": "seed"
    }
  }
}

Limitations and assumptions

  • Each event appears at most once and letters are sent after the previous delivery. Delivery order therefore follows letter order; this is supplied fictional correspondence, not a postal simulation or automatic factual writing.
  • A replay requires the same complete input and implementation. The stated sampling convention applies within its eligible space. A finite draw does not exhaust all possible outputs; repeats remain possible unless a distinct-selection rule is explicit.
  • The field tables state structural bounds; cross-field constraints and bounded search or output budgets also apply. Unknown keys are rejected where the object contract disallows them. Input errors are distinct from null fields and deliberate invalid controls in a successful output.

Alternative or Complementary methods

For a supplied example, inspect the returned construction or delegated check directly. To evaluate a consumer, also test cases chosen for its own boundaries; a generated finite corpus does not establish exhaustive coverage.

References

  1. Tool behavior and example: Random Epistolary Story Packet Generator — tool.io

  2. Calculation or validation: text/word-wrap — tool.io

Similar or alternative tools