Dialogues

Add more immersion with companion dialogues

Dialogue strings source

Dialogue strings are loaded from standard NPC dialogue resource Characters/Dialogue/<NPC> using custom dialogue keys. You can write these dialogue with the Content Patcher or with the content API in your SMAPI mod.

Characters/Dialogue/Abigail
Characters/Dialogue/Maru
Characters/Dialogue/Harvey
...

An example of defining companion dialogues using Content Patcher

{
  "Format": "1.26.0",
  "Changes": [
    {
      "LogName": "Companion dialogues for Abigail",
      "Action": "EditData",
      "Target": "Characters/Dialogue/Abigail",
      "Entries": {
        "companionAccepted": "You wanna go on an adventure with me?#$b#Well, @, what are we waiting for? Let's go!$1",
        "companionAccepted_Spouse": "I'd love to, @!$1#$b#Do you want to check out the mines today?",
        "companionRejected": "Sounds cool, but I can't go today, sorry.",
        "companionRejectedNight": "It's too late to go exploring now!$3",
        "companionRejectedNight_Spouse": "Sorry, @, I'm feeling tired. I'll be going to bed soon.",
        "companionDismiss": "Thanks for bringing me with you, @, I had fun.$1#$b#I hope to do it again sometime soon, see ya!$1",
        "companionDismiss_Spouse": "I had a great time, @, but I should head back to the farm now anyways.#$b#Stay safe, I love you!$1",
        "companionDismissAuto": "Hey, @, it's getting late and I'm tired.#$b#I'm gonna go home now, but I had fun! Let's do it again soon.$1",
        "companionDismissAuto_Spouse": "I'm gonna go, @.#$b#You should head to bed soon too honey. Be safe!",
        "companionRecruited": "Can we go to the mines, @?#$b#I'm always up for that!$1",
        "companionRecruited_Spouse": "I'm excited, @! I always love our time together.$4",
        "companionSuggest": "Hey, listen! I'm thinking about exploring today.#$q -1 -1#What do you think, @?#$r -1 0 Yes#It's dangerous to go alone! Take me with you.#$r -1 0 No#I would love to go, but my sword is in another bag.",
        "companionSuggest_Yes": "Okay, let's go find some trouble!$1",
        "companionSuggest_No": "That's no good, @. A real adventurer should always be prepared!",
        /* ... */
      }
    }
  ]
}

Define dialogues via i18n

If there is no variant for dialogue line for concrete companion doesn't exists in the standard dialogue resource, the mod tries to fallback load the line from i18n file in the mod or content pack (for NPC Adventures) folder. These lines are under i18n key format dialogue_<NPC>.<DialogueKey>, if the i18n dialogue key for concrete NPC is not defined, it tries i18n key format dialogue.<DialogueKey> and if this key also is not defined, you'll see the dialogue key name in the dialogue box when NPC try speak undefined companion dialogue.

dialogue_Abigail.companionAccepted # adventure acceptal dialogue key for Abigail
dialogue.companionAccepted # general adventure acceptal dialogue key (for any NPC if the line for concrete NPC is not defined)

If you define a companion dialogues in NPC Adventures content pack (not via Content Patcher) via the i18n translation file(s), you can define them for companions defined by disposition file inside this content pack only. Also dialogues defined in this way can't be randomized fith (~<int>) or (^<float>) suffix.

If no dialogue is not defined in the standard resource (via CP) and in proper (NPC Adventures) content pack too, the mod tries to load it from the mod's i18n translation file(s) as a general fallback.

Ask and recruit dialogues

companionAccepted  # NPC accepted a companion request
companionRejected  # NPC rejected a companion request 
companionRejectedMoney # NPC rejected a companion request due to player has no enough money
companionRejectedNight  # NPC rejected request and it's night right now
companionDismiss  # NPC companion was released from companion recruitment
companionDismissAuto  # NPC companion was automatic released (due to night after 22h)
companionRecruited  # NPC companion was recruited

All listed ask&recruit dialogue keys has a variant with suffix _Spouse or _Dating for marriage/spouse or dating dialogues. Also there can be defined custom acceptal or rejection dialogues by reference in the Rule action.

Example:

"companionAccepted": "Do you want to go for an adventure with me?$u#$b# Well @, what are you waiting for? Let's go!$h",
"companionAccepted_Spouse": "Adventure? Oh, of course I will @!$l#$b#I hope we can delve into the mines today.$h",
"companionRejected": "Sounds interesting, but I cannot go. Sorry.$s",
"companionRejectedMoney": "Sorry, but this mission is too dangerous and it's not worth the money.",
"companionRejectedNight": "Sorry, it's too late to go exploring today.$s",
"companionRejectedNight_Spouse": "Sorry @ I'm feeling tired. I'll be going to bed soon.$s",
"companionDismiss": "Thanks for bringing me with you @, it was exciting.$h#$b#I hope to do it again sometime. See ya.$h",
"companionDismiss_Spouse": "I had a great time @.$h#$b#But it's time for me to head back to the farm now, stay safe. I love you <$h",
"companionDismissAuto": "Hey @, it's getting late and I'm tired.#$b# I'm going to go home now. If you ever need an adventure partner, Goodnight.$h",
"companionDismissAuto_Spouse": "It's time to go.#$b#You should go to bed soon too honey.$2",
"companionRecruited": "Can we go to the mines @?$9 I've always wanted to explore them.$6",
"companionRecruited_Spouse": "I can't wait to go on an adventure with you @!$h#Shall we go into the mines today?$6",

Suggestion dialogues

{
  "companionSuggest": "<companion suggest dialogue>#$q -1 -1#<question for farmer>#$r -1 0 Yes#<yes farmer answer text>#$r -1 0 No#<no farmer answer text>",
  "companionSuggest_Yes": "<companion's reaction to farmer accepted>",
  "companionSuggest_No": "<companion's reaction to farmer rejected>",
}

Example

{
  "companionSuggest": "I'm getting the itch for an adventure.#$q -1 -1#Hey @, wanna tag team for a little bit?#$r -1 0 Yes#Sure, lets find some trouble!#$r -1 0 No#Hmmmm, probably not today. Don't count me out next time though.",
  "companionSuggest_Yes": "I knew you'd be down! Where should we go first?$h",
  "companionSuggest_No": "Boo. Guess I'll need to find some fun with someone else today.",
}

Skill specific dialogues

All listed skill specific dialogue keys has a variant with suffix _Spouse or _Dating for marriage/spouse or dating dialogues.

Doctor dialogues

heal # NPC say this dialogue line after they heals a farmer
nomedkits # NPC say this dialogue when farmer try to ask for heal, but NPC has no medkits (speak only once)

Example

{
  "heal": "Let's get you patched up.$3",
  "nomedkits": "I'll have to stop by Harvey's Clinic, I haven't got any more bandages.$6",
}

Forager dialogues

giveForages # This dialogue is shown when forager gives collected forages to farmer
farmerRunAway # If farmer run away, forager yell this dialogue

Example

{
  "farmerRunAway": "Hey, @! Wait for me!",
  "giveForages": "@, I found some good stuff! Here, take this.",
}

Location various dialogues

The dialogue key for companion for specific game location has this format:

companion_<location> # Standard location dialogue. Can be spoken only once per day (companion recruitment session). Can be variated
companionEnter_<location> # Standard location dialogue triggered only when companion enter location
companionOnce_<location> # This kind of dialogue will be spoken only once in game save. This dialogue key can't be variated (no variant can be used)
companionOnceEnter_<location> # Once dialogue triggered only when companion enter location
companionRepeat_<location> # This dialogues can be repeated every enter to location or every game time changed. Can be variated.
companionRepeatEnter_<location> # Repeat dialogue triggered only when companion enter location

The location must be a valid game location name starts with capital letter.

All thoose companion location dialogues are generated when farmer and companion entered a location or game time changed in that location. If you want specify dialogue which is generated only when player and companion enter location, define key variant with Enter base suffix. All dialogues can be variated except the *Once* base key variant. Every line can be pushed to companion dialogue stack when player and companion enters a location or game time changed (ten minutes update). Only the dialogues which base of key contaiins part Enter can be pushed only when player and companion enters a location, not in game time was changed.

Example:

companion_Town
companion_Farm
companionRepeatEnter_Farm
companion_Mine
companionEnter_Mine
companion_Mountain
companionOnce_Mountain # this dialogue will be spoken only once in game

Once spoken location dialogues

This kind of dialogues will be spoken only once per game save and will be never repeated. This dialogue has a priority over ordinary location dialogues and can't be variated (see variations below). If both companion_<location> and companionOnce_<location> are defined for the same location, then the companionOnce will be shown during first interaction with the NPC in mentioned location. No other dialogue will be added to the stack. After leaving that location and entering it again, dialogue companion will be loaded, dialogue companion will be loaded and can be spoken repeately when we enter again.

Only once spoken dialogues can't be variated.

Repeat dialogues

Standard location dialogue can be shown only once per day (companion recruit session). Dialogue lines which key contains a part called Repeat can be shown many times per day (in companion session). I recommend use Repeat in combination with Enter base key suffix. It's better use repeat dialogues only when companion enter location than everytime. Restrict to enter location only you avoid wtf dialogue repeats when game time was changed (ten minutes update).

Dialogue variations

Location dialogues can be variated. We can specify a dialog for some location, season, day, week day, Day/Night, specific Weather, Friendship heart level and etc.

The variation keys has following formats and will be checked in this order:

companion_<location>_<time>_<condition>[<friendship>]
companion_<location>_<condition>[<friendship>]
companion_<location>_<time>[<friendship>]
companion_<location>[<friendship>]

The <time> is a time based dialogue key (eg. spring, Monday, and some time variations), <condition> is a game state condition (Player is married, is night, Rainy weather and etc) and <friendship> is a friendship heart level.

For example:

companion_Town_fall_Monday_Rainy8
companion_Town_fall_Rainy
companion_Town_Night6
companion_Town_Night
companion_Town4
companion_Town

Time based dialogues

Time based dialogues has following format checked in this order:

*_<season>_<dayOfMonth>
*_<season>_<dayOfWeek>
*_<dayOfWeek>
*_<season>

Example:

*_spring_4
*_fall_Tuesday
*_Saturday
*_Summer

Condition based dialogues

Dialogues can be conditioned by game state. Conditions are:

  • Is player married or dating with this NPC?
  • Is day or night?
  • Whats is a weather? Rainy? Sunny or something else?
  • and combinations of this conditions

This keys has a following format and checked in this order:

*_Night_<weather>_Spouse
*_<weather>_Spouse
*_Spouse
*_Night_<weather>_Dating
*_<weather>_Dating
*_Dating
*_Night_<weather>
*_Night
*_<weather>

Key <weather> can use this values: Rainy, Snowy, Stormy, Cloudy and Sunny.

The friendship

Dialogues can be conditioned by friendship heart level. Friendship dialogue is checked decreased in scale: 12, 8, 6, 4 and 2 hearts. If friendship heart level for this NPC is betwen two numbers in scale, then using nearest lower than scale anchor. For example: With Abigail I has a 7 hearts. Gamme use existing dialogue for 6 hearts. If this dialogue is not defined, then Game try use 4 hearts dialogue. If this exists, then use it. If game not found any friendship level dialogue, then fallback to a dialogue without friendship.

Example:

companion_Town8
companion_Town_Spring4
companion_Town_fall_Spouse8
companion_Town_fall_Spouse

Tile message reaction dialogue

For some action tiles which triggers a dialogue message can be specify concrete companion reaction. This reaction is shown when you have recruited a companion for whom this kind of dialogue is defined. If you have no companion or the dialogue is not defined for that tile message action, the original tile message will be displayed.

companionReaction_<key> # The key is the dialogue key after the `Message` string in `TileData` under `Action` field defined in map
{
  "companionReaction_BathHouse_WomensLocker.3": "Don't ...!$7",
  "companionReaction_SeedShop.7": "Do you want to play Prairie king?#$b#I am ready to beat them!"
}

Randomize dialogues

You can randomize dialogue. If you can suffix with ~<number|word|character> dialogue key, then game select random dialogue text with specified key.

Example:

companion_Mine_Abigail: "Be blessed my sword!",
companion_Mine_Abigail~1: "I love adventure in mines!",
companion_Mine_Abigail~2: "Do you are taking me to mines, @?",
companion_Mine_Abigail~3: "I love it!",

If game requests a dialogue with key Mine_Abigail, then a random text is selected. In this case game selects a random dialogue text and view it in speech bubble above Abigail's head.

You can randomize any dialogue or speech bubble**
Dialogues defined in i18n file can't be randomized!

Random chance dialogues

You can define which chance has dialogue to be show. Add at end of key ^<number in %> to define what chance has this line to be pushed into NPC's dialogue stack.

Example

companion_Mine^30 # 30% chance to be added this dialogue to stack

Chance dialogues (^) can't be combined with random dialogues (~). You can use only one of this effects or none of them. If you are defining dialogues in i18n file, you can't use random chance dialogues.

The format

All dialogues has a vanilla game dialogue format. For more info see Official SDV wiki