Flags and numbers
Flags are booleans. Numbers are integers. Both live on the player's story progress and survive conversations changes.
Flags
~ SetStoryFlag("met_her_parents")
~ RemoveStoryFlag("met_her_parents")
Branch on them:
{
- GetStoryFlag("met_her_parents"):
* Ask about dinner
-> dinner
- else:
* Keep it chill
-> chill
}
Skipr recap answers can do the same job without Ink. sets is SetStoryFlag, removes is RemoveStoryFlag. A later answer in the same jump can undo an earlier one. See Skipr.
Name status emoji
In Studio → Characters → Status you can map a flag to an emoji. Click the emoji field to pick one, or paste. When that flag is set, the emoji shows after their name in Messages, the chat header, and Contacts (1:1, first match wins). This is separate from Design → Save file route badges, which only appear on Save Files and on choices written * (ntr_route)….
Choice route badges
Design tab can map flag names to emojis for choice buttons:
* (ntr_route) Do it
See Choices.
Purge unused flags
The Story data panel (Ink editor → Flag icon → Flags tab) has a Purge unused flags button. It scans every Ink file in the story and deletes the SetStoryFlag(...) / RemoveStoryFlag(...) line for any flag that's never actually read, then saves and recompiles the affected files.
A flag counts as "read" (so it's kept) if any of these reference it, even without a GetStoryFlag call:
- Choice route hints:
* (flag_name) ... - A name status emoji (Studio → Characters)
- A Save Files route badge
- A Skipr question/answer gate, or a Skipr answer that sets or removes the flag
- A cinematic's ending (
STORY_END) condition
Validate's unused-flag warning uses the same list. A flag used only for a name status (or a route badge, Skipr gate, or cinematic ending) does not count as unused.
It shows a preview before touching anything: the unused flags, plus a checklist of every affected file grouped by main chain / side conversations / injections / DMs, each with its own line count. Every file is checked by default, but you can uncheck any of them, e.g. keep newer/WIP chapters out of it and only clean up older, finished ones. Good for cleaning up leftover flags from cut branches instead of hunting them down line by line.
Numbers
~ SetStoryNumber("suspicion", 0)
~ AddStoryNumber("suspicion", 1)
{ GetStoryNumber("suspicion") >= 3:
She knows.
-> caught
}
FansOnly can treat one story number as real currency for subscribe/tip costs. See FansOnly.
To pack a 0–15 score into four flags (Unity-style set_points / get_points), put the functions in an INCLUDE library. See INCLUDE libraries.
Shared everywhere
Main Whapp, side conversations, TheGram DMs, FansOnly DMs, and Swiper DMs all read/write the same flags and numbers. Only the Ink savedState (knot position, etc.) is local to each channel.
Don't spoil yourself in saves
Flag names can show up in creator tooling. Players don't see raw flag dumps in the chat UI, but still: name them clearly for you, not as joke spoilers you might flash in a debug screen later.
