Skip to main content

Story Mode (RPG rails)

GET /story/packs

  • Returns catalog metadata for story packs.
[
{
"id": "starter-pack",
"title": "Arcadia Introduction",
"chapters": 6
}
]

POST /story/start

Request

{ "matchId": "<uuid>", "packId": "starter-pack" }

Response

{ "state": { "chapter": 1, "nodeId": "intro-1", "history": [] } }

POST /story/choose

Request

{ "matchId": "<uuid>", "nodeId": "intro-1", "choiceId": "option-a" }

Response

{
"state": {
"chapter": 2,
"nodeId": "intro-2",
"history": [
{ "nodeId": "intro-1", "choiceId": "option-a", "ts": "2024-01-01T00:00:00Z" }
]
},
"suggestion": { "timeWindow": "SatEvening", "area": "Midtown", "activity": "Side quest" }
}

POST /story/unlock-free-text

Request

{ "matchId": "<uuid>" }

Response

{ "phase": "chat" }

State object

{
"chapter": 1,
"nodeId": "intro-1",
"history": [
{ "nodeId": "intro-1", "choiceId": "option-a", "ts": "2024-01-01T00:00:00Z" }
]
}

Suggestion object

{ "timeWindow": "SatEvening", "area": "Midtown", "activity": "Arcade run" }