Skip to content

Flags & Relationships ​

Nostalgic Dialog remembers three things about every player. They're saved with the player, kept when they die, and separate for each player on a server.

WhatLooks likeSet byChecked by
FlagsOn/off markers: met_elder, quest_wood_doneflag action, /dialog flagflag condition
RelationshipsA number per character: elder = 7relationship action, /dialog relationshiprelationship condition
Seen dialogsWhich conversations were finishedFinishing a conversationseen condition

Flags ​

Flags are the simplest memory: something happened, or it didn't. Name them however you like, and keep the names clear, since you'll use them across many files.

Common uses:

  • First meeting: set met_elder in the first greeting, then branch on it at the start
  • Quest steps: quest_wood_started, then quest_wood_done
  • One-time rewards: set got_map when the gift is given, and skip the gift node when it's set
  • Choices that matter later: sided_with_guard, then another character reacts to it

Flags are shared between dialogs

Every dialog sees the same flags. The guard can react to something the player told the elder.

Relationships ​

A relationship is a number of points with a character. It starts at 0 and can go up or down. The name ("npc": "elder") is just a word you pick: it doesn't have to match a speaker, and several dialogs can share one.

A simple scale you could use:

PointsStageExample
below 0DislikedShort, cold answers
0 to 4StrangerPolite small talk
5 to 14FriendShares stories, offers help
15 or moreConfidantTeaches secrets, unlocks memories

Then branch on it:

json
"start": {
  "next": [
    { "conditions": [ { "type": "relationship", "npc": "elder", "min": 15 } ], "goto": "greet_confidant" },
    { "conditions": [ { "type": "relationship", "npc": "elder", "min": 5 } ], "goto": "greet_friend" },
    { "conditions": [ { "type": "relationship", "npc": "elder", "max": -1 } ], "goto": "greet_cold" },
    { "goto": "greet_stranger" }
  ]
}

Points can also come from outside a conversation: an FTB Quests reward or a command block can run /dialog relationship add <player> elder 3.

Seen dialogs ​

Every finished conversation is remembered. seen is handy for "have you heard the whole story yet?", but remember that leaving with Esc doesn't count. For "have we met?", a flag set in the greeting is more reliable.

Checking and resetting ​

While building, these commands help:

/dialog info <player>                            show flags, relationships and seen count
/dialog flag set|clear <players> <flag>
/dialog relationship get <player> <npc>
/dialog relationship add|set <players> <npc> <points>
/dialog reset <players>                          clear everything
/dialog reset <players> flags|relationships|seen clear one kind

All Rights Reserved.