Repository navigation
π¨ Dialogue Expansion
Dialogue files are stored inside the states folder of each NPC. Each file represents a cycle (0.json, 1.json, etc.), and defines dialogues based on heart levels and conditions.
N.json β Dialogue file for cycle N
Example:
0.json β Cycle 0 dialogues
1.json β Cycle 1 dialogues
{
"default": [
"You look happy today!",
"Isn't it great to enjoy the sunshine?"
],
"I love watching the rain from my window.": {
"w": "Rainy"
}
}Key β Heart level (e.g. "0", "2", "4")
Value β Dialogue definition
String β A single dialogue line
Array β Multiple options, randomly chosen
Object β Conditional dialogue
Conditional dialogues are written as objects. Use supported condition keys (see Condition Keys ).
Example with weather condition
{
"It's a beautiful day outside, isn't it?": {
"w": "Sunny"
}
}Example with multiple conditions
{
"The spring festival is today! Let's go together.": {
"d": "spring_15",
"l": "Town"
}
}π All conditions are treated as AND (all must be true).
If you want multiple dialogue options at the same heart level:
{
"default": [
"I feel great today!",
"The weather makes me smile.",
"I had a good dream last night."
]
}One of the lines will be picked randomly.