Skip to content

Dialogues

HIKI edited this page Oct 26, 2026 · 1 revision

Dialogue profiles and selection rules

Files: tacznpc_dialogue.json selects profiles from tacznpc_dialogues/*.json. This integration uses ADM 0.8.5.

Root key Default Meaning / bounds
enabled true Enable integrated conversations
maxDistance 5 1–16 blocks; ADM's own distance limit also applies
damageCooldownTicks 100 Recent-damage block; 0–12000
maxDurationTicks 2400 Ordinary session timeout; 20–72000
genericProfile generic Profile name without .json
genericWhenUnmatched true Use generic when no rule matches
rules [] Profile selection rules

Select a profile

{
  "genericProfile":"generic",
  "rules":[
    {"id":"guard","priority":100,"profile":"guard","genericMode":"append",
     "when":{"type":"tnpc.loadout","id":"guard"}}
  ]
}

Both generic.json and guard.json must exist. Rule fields are id, priority (default 0), profile, optional enabled (true), when (always when omitted) and genericMode (append).

Highest priority wins; ties retain file order. No implicit UUID/loadout/faction ordering exists. A matching rule ends selection; fallback does not try the next rule.

genericMode Behavior
append Add generic starting topics to the specific profile
fallback Use generic if the specific starting node has no available non-close topic
disabled Use only the specific profile

Profile names use lowercase letters, digits, underscores and hyphens. Rule IDs use lowercase letters, digits, underscores, slash and hyphen, at most 96 characters, and must be unique.

Write the profile

{
  "title":"Conversation",
  "start":"hello",
  "nodes":{
    "hello":{"text":"Need something?","choices":[
      {"text":"How is the outpost?","next":"outpost"},
      {"text":"Goodbye.","close":true}
    ]},
    "outpost":{"text":"Quiet for now.","choices":[{"text":"Back.","action":"back"}]}
  }
}

Use a fixed existing start node; random_start is rejected. next links a node, action: back returns and close: true ends the conversation. Keep choice labels short: the client can truncate long sentences. Node text is a better place for long explanations.

The integration assembles trade, questions, requests and companion orders. Authored extra topics remain available through the composed menu; do not copy internal action IDs to create fake deliveries or equipment transfers.

NPC conditions

Use in a rule's when or a choice's condition:

Type Parameters Checks
tnpc.loadout id Exact loadout
tnpc.faction id Explicit faction identity, not a positive relation
tnpc.uuid id Exact NPC UUID
tnpc.healthy min / max NPC health fraction, 0–1
tnpc.reputation min / max, or amount Effective player reputation, inclusive bounds
tnpc.can_trade Integration-provided Trade availability

Use ADM's all, any, not and expected for composition. For reputation, use integer bounds within ±2000000000; do not combine amount with min/max. Native ADM health checks the player, not the NPC.

Available choices are checked server-side. Reopen the menu to refresh visible choices after a condition changes. A greeting or condition does not bypass hostile, distance or line-of-sight restrictions. A leader's own follower has the combat/alert exception described in Companions.


Home · Configuration map · Troubleshooting

Clone this wiki locally