Skip to content

Line Fields

A line, a group, a line file and a pool file can all set these fields. See How Fields Combine for which value a part uses.

FieldTypeDescription
textStringThe English text. Only on a line. See Text & Placeholders.
weightNumberHow likely the part is, compared with the others in its slot. More than 0 and at most 100. The default is 1.
actStringWhat the part does. See Acts.
asksStringThe part asks a question of this kind. See Questions and Pairs.
answersStringThe part answers a question of this kind.
aboutStringFor a question: the slot it asks about.
opensPair IDThe part opens a pair.
respondsPair IDsThe part replies to these pairs.
stance+, -, 0For, against or neutral. See Stance and Form.
formStringThe kind of statement, such as quality, claim, musing or story.
threadStringA label for what the part is about, such as weather.crops. See Threads.
setsObjectState keys that the part writes. See State.
stateObjectState conditions that must be true. See State.
perspObjectWho a person slot must be, from the speaker’s view. See Perspective.
introducesBooleanThe part can name a person slot for the first time. The default is false.
subjectsIDsSubject IDs or # tags. The part is only used for these subjects.
variants, variantStringsThe part is only used for these subject variants.
registersStringsThe part is only used in these registers. Write ! before a register to keep the part out of it.
valenceStringsThe part is only used for subjects with this valence: positive, negative or neutral.
provenanceStringsThe part is only used when the subject has at least one of these: witnessed, heard, shared.
stagesStringsThe part is only used by speakers at these life stages.
personalitiesStringsThe part is only used by speakers with one of these MCA personalities.
markedBooleanThe part uses the culture’s own phrasing. See Voices. The default is false.
simpleBooleanA marked part that children can use. The default is false.
min_linesNumberThe conversation must have at least this many lines before the part. The default is 0.
requiresStringsRequirements that must all be true.
content_tagsStringsTags for content filtering. Accepted. Townstead does not filter content yet.
Gate fieldscontext, relationship, personality_weights, relationship_weights, when, evaluation. See Gates. The gate weight multiplies weight.

Lists also take one value: "stages": "child" is the same as "stages": ["child"]. A bare ID in subjects, opens and responds means townstead:.

ActUse
greetA greeting. A line has at most one greeting part.
askA question. This is the default when the part has asks.
answerAn answer. This is the default when the part has answers.
informA statement of fact or news. This is the default for other parts.
assessA judgement or opinion.
reactA reaction to what the other villager said.
farewellA goodbye.
fillerA lead-in or bridge with little meaning, such as “Anyway.”
rhetoricalA question that needs no answer.

inform and assess are statements. After a statement, the state key form is the part’s form, or claim when it has none. Agreements can then check what they agree with. For example, “Exactly.” fits a claim, and “It really is.” fits a quality.

A part with asks asks a question. The value is a free-form name for the kind of question, such as townstead:how or townstead:sit. Write the same string in answers on the parts that answer it.

  • A question can only be in the last slot of a line.
  • A question cannot be on the final line of a conversation.
  • The other villager’s next line starts with an answer. Townstead takes it from every part whose answers matches, in any pool of the speaker’s voices.
  • The subject cannot change while a question is open.
  • A part with asks never opens a pair. The question takes the place of the pair.
  • When nothing answers a question, Townstead reports it when data loads.

With about, a question asks about one slot:

  • The question is not asked when that slot was already said in this topic.
  • The question is not asked when the subject has no such slot. For example, “Where was this?” needs a {where} slot.

The questions that Townstead’s lines use: townstead:how, townstead:opinion, townstead:sit, townstead:last, townstead:hurt, townstead:when, townstead:where, townstead:who, townstead:watch, townstead:busy, townstead:more, townstead:minute, townstead:source, townstead:confirm, townstead:help, townstead:back, townstead:okay, townstead:side, townstead:taker, townstead:source_ruler, townstead:sword and townstead:would_do.

A part with opens sets what the other villager owes. The other villager’s next line starts with a part that has this pair in responds. A required pair always gets a reply. An optional pair gets one by chance. See Pairs.

When a line has more than one part with opens, the last one counts.

A pool file often sets opens or responds for all its parts:

{ "schema": "townstead:dialogue_pool/v1", "act": "react", "responds": "joke" }

Parts with a stance change the conversation:

  • The state key stance is the stance of the last part that had one. match and oppose slots use it. See Stance.
  • Two lines in a row with the same stance raise both villagers’ interest by 0.04. Opposite stances lower it by 0.05. Two clashes make the mood tense.
  • On a thread, a villager keeps their stance for the rest of the subject. A villager who said + about weather.crops does not say - about it later.

form names the kind of statement. Townstead’s lines use story, general, quality and musing, and claim is the default. You can add your own forms, and check them with "state": {"form": "yourform"}.

persp says who a person slot must be, from the speaker’s view:

ValueThe person in the slot is
meThe speaker.
youThe listener.
theySomeone else.
{ "persp": { "who": "me" }, "lines": { "i_made_master": "I made master!" } }
{ "persp": { "who": "you" }, "lines": { "you_made_master": "You made master? Congratulations!" } }
{ "persp": { "who": "they" }, "lines": { "who_made_master": "{who} made master." } }
  • A part with persp for a slot also counts as saying that slot.
  • A part with persp can only be used after the slot was said, unless it has introduces: true. A question with persp is the other way round: it can only ask before the slot was said.
  • A part that puts a person slot in its text without persp needs that person to be someone else (they). So “{who} got married.” is never said to the person who got married.
  • {self} and {other} are always the speaker and the listener. They need no persp.

Put introduces: true on the pool or lines that first name the person, such as the claim in news: “I heard {who} got married.”

FieldMatch
stagesThe speaker’s life stage: the stage it presents as, such as child, teen, adult or senior, or the ID of a custom life stage. Babies and toddlers count as child.
personalitiesThe speaker’s MCA personality, without mca:, such as friendly, gloomy or odd.

Older and newer MCA versions use different names for six personalities. To support both, list both names:

Older nameNewer name
crabbygrumpy
upbeatpeppy
playfulwitty
introvertedshy
extrovertedconfident
relaxedlazy

For example: "personalities": ["crabby", "grumpy"].