Changes

remove {{upcoming|1.6}} & update accordingly
Line 3: Line 3:  
This page explains how the game stores dialogue text, its format, and how the game parses it. This is an advanced guide for mod developers.
 
This page explains how the game stores dialogue text, its format, and how the game parses it. This is an advanced guide for mod developers.
   −
==Overview==
+
==Dialogue data==
 
Character dialogue is stored in many different files: The <samp>Characters\Dialogue</samp> directory is where the majority of NPC-specific dialogue is stored. <samp>Data\ExtraDialogue.xnb</samp>, <samp>Strings\Characters.xnb</samp>, <samp>Strings\Events.xnb</samp>, <samp>Strings\SpeechBubbles.xnb</samp>, and <samp>Strings\StringsFromCSFiles.xnb</samp> contain various other pieces of dialogue, some generic, and some NPC-specific.
 
Character dialogue is stored in many different files: The <samp>Characters\Dialogue</samp> directory is where the majority of NPC-specific dialogue is stored. <samp>Data\ExtraDialogue.xnb</samp>, <samp>Strings\Characters.xnb</samp>, <samp>Strings\Events.xnb</samp>, <samp>Strings\SpeechBubbles.xnb</samp>, and <samp>Strings\StringsFromCSFiles.xnb</samp> contain various other pieces of dialogue, some generic, and some NPC-specific.
   −
==Characters\Dialogue directory==
+
===Characters\Dialogue directory===
===Characters\Dialogue\{{t|NPC}}.xnb===
+
====Characters\Dialogue\{{t|NPC}}.xnb====
 
An NPC's named file in <samp>Character\Dialogue</samp> contains most of their dialogue. The game will choose dialogue from one of the sections below, in the order shown here.
 
An NPC's named file in <samp>Character\Dialogue</samp> contains most of their dialogue. The game will choose dialogue from one of the sections below, in the order shown here.
   −
====Special dialogue====
+
=====Special dialogue=====
 
There are a few predefined keys for specific cases:
 
There are a few predefined keys for specific cases:
 
{| class="wikitable"
 
{| class="wikitable"
Line 21: Line 21:  
|-
 
|-
 
| <samp>MovieInvitation</samp>
 
| <samp>MovieInvitation</samp>
| An NPC's response to being invited to the [[Movie Theater]]. If not defined, the NPC will use a generic line from <samp>Strings/Characters.xnb</samp>. The specific string used depends on the NPC's [[Modding:NPC data|manners]].
+
| An NPC's response to being invited to the [[Movie Theater]]. If not defined, the NPC will use a generic line from <samp>Strings\Characters.xnb</samp>. The specific string used depends on the NPC's [[Modding:NPC data|manners]].
 
|
 
|
 
|-
 
|-
Line 48: Line 48:  
|}
 
|}
   −
====Location dialogue====
+
=====Location dialogue=====
 
Otherwise the game will choose dialogue in this order.
 
Otherwise the game will choose dialogue in this order.
   Line 55: Line 55:     
The game will check variants in this order: <samp>{{t|season}}{{t|key}}</samp>, and <samp>{{t|key}}</samp>. The variants aren't listed below for simplicity.
 
The game will check variants in this order: <samp>{{t|season}}{{t|key}}</samp>, and <samp>{{t|key}}</samp>. The variants aren't listed below for simplicity.
 +
Unlike daily dialogue, location dialogue is endlessly repeatable as long as the trigger conditions are fulfilled, ''e.g.,'' Being in the location. They will not remove daily dialogue from an npc's dialogue rotation, but will merely overwrite it when the NPC is in the specified location.
    
{| class="wikitable"
 
{| class="wikitable"
Line 72: Line 73:  
| <samp>{{t|location}}</samp>
 
| <samp>{{t|location}}</samp>
 
| Dialogue shown in the named location.<br /><small>Example: <samp>Saloon: "Now that I'm here I can finally relax and socialize a bit."</samp></small>
 
| Dialogue shown in the named location.<br /><small>Example: <samp>Saloon: "Now that I'm here I can finally relax and socialize a bit."</samp></small>
 +
*Note: Location dialogue will be accessible even if the NPC is only walking through the specified map unlike schedule strings that will only be accessible once the schedule end location is reached.
 
|}
 
|}
   −
====Generic dialogue====
+
=====Generic dialogue=====
 
Otherwise the game will choose a dialogue using one of these key formats (in precedence order):
 
Otherwise the game will choose a dialogue using one of these key formats (in precedence order):
# <samp>{{t|season}}_{{t|key}}_inlaw_{{t|spouseName}}</samp>
+
# <samp>{{t|season}}_{{t|key}}_inlaw_{{t|spouse}}</samp>
 
# <samp>{{t|season}}_{{t|key}}</samp>
 
# <samp>{{t|season}}_{{t|key}}</samp>
# <samp>{{t|key}}_inlaw_{{t|spouseName}}</samp>
+
# <samp>{{t|key}}_inlaw_{{t|spouse}}</samp>
 
# <samp>{{t|key}}</samp>
 
# <samp>{{t|key}}</samp>
   −
For each variation above: <samp>{{t|season}}</samp> is a [[#Seasons|season name]] (like <samp>spring_14</samp>); <samp>_inlaw_{{t|spouseName}}</samp> matches if the player is married to the named NPC, regardless of whether the speaking NPC is related to the named one (like <samp>Sat_inlaw_Abigail</samp>); and <samp>{{t|key}}</samp> is one of the formats listed below.
+
For each variation above: <samp>{{t|season}}</samp> is a [[#Seasons|season name]] (like <samp>spring_14</samp>); <samp>_inlaw_{{t|spouse}}</samp> matches if the player is married to the named NPC, regardless of whether the speaking NPC is related to the named one (like <samp>Sat_inlaw_Abigail</samp>); and <samp>{{t|key}}</samp> is one of the formats listed below.
    
{| class="wikitable"
 
{| class="wikitable"
Line 95: Line 97:  
|-
 
|-
 
| <samp>{{t|dayOfWeek}}{{t|hearts}}_{{t|firstOrLaterYear}}</samp>
 
| <samp>{{t|dayOfWeek}}{{t|hearts}}_{{t|firstOrLaterYear}}</samp>
| Dialogue shown on the given [[#Days of week|day of week]] if you have at least {{t|hearts}} hearts with them, in the [[#First/later year|first/later year]]. The {{t|hearts}} will be checked in the order 10, 8, 6, 4, 2 (no other value will be recognised).<br />'''Bug:''' only shown if an equivalent <samp>{{t|dayOfWeek}}{{t|hearts}}</samp> key also exists.<br /><small>Example: <samp>Thu2_2: "Well, my Dad is back. Have you met him?#$b#I'm just glad he's okay."</samp></small>
+
| Dialogue shown on the given [[#Days of week|day of week]] if you have at least {{t|hearts}} hearts with them, in the [[#First/later year|first/later year]]. The {{t|hearts}} will be checked in the order 10, 8, 6, 4, 2 (no other value will be recognised).<br /><small>Example: <samp>Thu2_2: "Well, my Dad is back. Have you met him?#$b#I'm just glad he's okay."</samp></small>
 
|-
 
|-
 
| <samp>{{t|dayOfWeek}}{{t|hearts}}</samp>
 
| <samp>{{t|dayOfWeek}}{{t|hearts}}</samp>
Line 101: Line 103:  
|-
 
|-
 
| <samp>{{t|dayOfWeek}}_{{t|firstOrLaterYear}}</samp>
 
| <samp>{{t|dayOfWeek}}_{{t|firstOrLaterYear}}</samp>
| Dialogue shown on the given [[#Days of week|day of week]] in the [[#First/later year|first/later year]].<br />'''Bug:''' only shown if an equivalent <samp>{{t|dayOfWeek}}</samp> key also exists.<br /><small>Example: <samp>Sat_1: "Dad's coming back soon!#$b#I hope he brings me some toys.$u"</samp></small>
+
| Dialogue shown on the given [[#Days of week|day of week]] in the [[#First/later year|first/later year]].<br /><small>Example: <samp>Sat_1: "Dad's coming back soon!#$b#I hope he brings me some toys.$u"</samp></small>
 
|-
 
|-
 
| <samp>{{t|dayOfWeek}}</samp>
 
| <samp>{{t|dayOfWeek}}</samp>
Line 107: Line 109:  
|}
 
|}
   −
===Characters\Dialogue\rainy.xnb===
+
====Rain dialogue====
This file contains one dialogue entry per NPC. There's a roughly 50% chance they'll use this dialogue if one of the above didn't match, it's raining, and you're not married to or divorced from them.
+
<samp>Characters\Dialogue\rainy.xnb</samp> contains one dialogue entry per NPC. There's a roughly 50% chance they'll use this dialogue if a special or location dialogue doesn’t match, it's raining, and you're not married to or divorced from them.
   −
===Data/EngagementDialogue.xnb===
+
====Marriage dialogue====
Similar to the rain dialogue, this file contains entries in the form of <samp>{{t|NPC}}0</samp> and <samp>{{t|NPC}}1</samp>, which are used when you are engaged but not yet married to an NPC, or, in the case of a roommate, when they have been invited but have not yet moved in.
  −
 
  −
====Fallback====
  −
If none of the above match, the game will show the value with key <samp>NPC.cs.4061</samp> in <samp>Strings\StringsFromCSFiles.xnb</samp>. (English version: "Hi.")
  −
 
  −
====Speech bubbles====
  −
<samp>Strings/SpeechBubbles.xnb</samp> contains dialogue spoken by NPCs through speech bubbles when '''the player''' enters a given location. This is distinct from the <samp>{{t|location}}_Entry</samp> field in an NPC's <samp>Characters/Dialogue/*.xnb</samp> file, which is triggered when '''the NPC''' enters a given location.
  −
 
  −
Entries are in the following formats. All entries which are applicable make up a pool that the game randomly chooses from.
  −
 
  −
{| class="wikitable"
  −
|-
  −
! key format
  −
! description
  −
|-
  −
| <samp>{{t|location}}_{{t|NPC}}_Spouse</samp>
  −
| Added to the pool when the given NPC is your spouse.
  −
|-
  −
| <samp>{{t|location}}_{{t|NPC}}_CloseFriends</samp>
  −
| Added to the pool when you have a certain friendship level with the NPC.
  −
|-
  −
| <samp>{{t|location}}_{{t|NPC}}_NotCloseFriends</samp>
  −
| Added to the pool when you are below a certain friendship point threshold with the NPC.
  −
|-
  −
| <samp>{{t|location}}_{{t|NPC}}_Raining</samp>
  −
| Added to the pool when it is raining. Can be suffixed with a number, in which case all entries will be added to the pool.
  −
|-
  −
| <samp>{{t|location}}_{{t|NPC}}_NotRaining</samp>
  −
| Added to the pool when it is not raining. Can be suffixed with a number, in which case all entries will be added to the pool.
  −
|-
  −
| <samp>{{t|location}}_{{t|NPC}}_Snowing</samp>
  −
| Added to the pool when it is raining. Can be suffixed with a number, in which case all entries will be added to the pool.
  −
|-
  −
| <samp>{{t|location}}_{{t|NPC}}_NotSnowing</samp>
  −
| Added to the pool when it is not raining. Can be suffixed with a number, in which case all entries will be added to the pool.
  −
|-
  −
| <samp>{{t|location}}_{{t|NPC}}_{{t|time}}</samp>
  −
| Added to the pool when it is {{t|time}}, which can be <samp>Morning</samp>, <samp>Afternoon</samp>, or <samp>Evening</samp>.
  −
|-
  −
| <samp>{{t|location}}_{{t|NPC}}_{{t|season}}</samp>
  −
| Added to the pool when it is the given season.
  −
|-
  −
| <samp>{{t|location}}_{{t|NPC}}_Not{{t|season}}</samp>
  −
| Added to the pool when it is not the given season.
  −
|-
  −
| <samp>{{t|location}}_{{t|NPC}}_Greeting</samp>
  −
| Always added to the pool. Can be suffixed with a number, in which case all entries will be added to the pool. Can also be suffixed with <samp>Male</samp> or <samp>Female</samp>, in which case only the one applicable to the player's gender will be added to the pool.
  −
|-
  −
| <samp>{{t|location}}_{{t|NPC}}_RareGreeting</samp>
  −
| Has a much lower chance of appearing than any other greeting.
  −
|}
  −
 
  −
====Miscellaneous====
  −
There are various other strings that are customizable on a per-NPC basis, stored outside of the <samp>Characters/Dialogue</samp> folder.
  −
 
  −
{| class="wikitable"
  −
|-
  −
! key format
  −
! description
  −
|-
  −
| <samp>SpouseFlowerDanceAccept_{{t|Spouse name}}</samp>
  −
| Stored in <samp>Strings/Events.xnb</samp>. If specified, it will be used when a NPC who is your spouse accepts your offer to dance at the Flower Dance. Otherwise, the NPC will use a string from <samp>Strings/StringsFromCSFiles.xnb</samp>.
  −
|-
  −
| <samp>PurchasedItem_{{t|NPC}}</samp></br><samp>PurchasedItem_{{t|NPC}}_Quality{{t|Quality}}</samp></br><samp>PurchasedItem_{{t|Number}}_Quality{{t|Quality}}_{{t|NPC}}</samp>
  −
| Stored in <samp>Data/ExtraDialogue.xnb</samp>. An NPC-specific version of the "purchased item" strings. {{t|Quality}} is Low or High. {{t|Number}} is a number from 1 to 5.
  −
|-
  −
| <samp>Town_DumpsterDiveComment_{{t|NPC}}</samp>
  −
| Stored in <samp>Data/ExtraDialogue.xnb</samp>. An NPC-specific comment for being caught dumpster-diving. Currently only used for Linus, who uniquely has a positive reaction.
  −
|-
  −
| <samp>SummitEvent_Dialogue3_{{t|Spouse name}}</samp>
  −
| Stored in <samp>Data/ExtraDialogue.xnb</samp>. An NPC-specific dialogue line used near the end of the Summit cutscene.
  −
|-
  −
| <samp>{{t|Spouse or roommate name}}_AfterWedding</samp></br><samp>{{t|Spouse or roommate name}}_Engaged</samp></br><samp>{{t|Spouse or roommate name}}_EngagedRoommate</samp></br><samp>{{t|Spouse or roommate name}}_Stardrop</samp>
  −
| Stored in <samp>Strings/StringsFromCSFiles.xnb</samp>. Currently only used for Krobus. Despite the name, <samp>AfterWedding</samp> is used when Krobus arrives at the farm. <samp>Stardrop</samp> is used when Krobus gifts you a [[Stardrop]].
  −
|-
  −
| <samp>MovieInvite_Invited_{{t|NPC}}</samp></br><samp>MovieInvite_Spouse_{{t|Spouse name}}</samp>
  −
| Stored in <samp>Strings/Characters.xnb</samp>. A custom response to being invited to see a movie.
  −
|}
  −
 
  −
===Marriage dialogue===
   
<samp>Characters\Dialogue\MarriageDialogue.xnb</samp> contains dialogue text for all spouses, and each NPC may optionally have their own dialogue file like <samp>Characters\Dialogue\MarriageDialogueAbigail.xnb</samp>. When looking up a dialogue key, it will use the one in the NPC's file if it exists, else the one in the generic file, else a default text (usually blank).
 
<samp>Characters\Dialogue\MarriageDialogue.xnb</samp> contains dialogue text for all spouses, and each NPC may optionally have their own dialogue file like <samp>Characters\Dialogue\MarriageDialogueAbigail.xnb</samp>. When looking up a dialogue key, it will use the one in the NPC's file if it exists, else the one in the generic file, else a default text (usually blank).
   Line 248: Line 170:  
|}
 
|}
   −
===Event files===
+
===Data directory===
 +
====Engagement dialogue====
 +
Similar to the rain dialogue, <samp>Data\EngagementDialogue.xnb</samp> contains entries in the form of <samp>{{t|NPC}}0</samp> and <samp>{{t|NPC}}1</samp>, which are used when you are engaged but not yet married to an NPC, or, in the case of a roommate, when they have been invited but have not yet moved in.
 +
 
 +
====Event files====
 
<samp>Data\Events\*.xnb</samp> contains event scripts, including any dialogue in the event (see [[Modding:Event data]]).
 
<samp>Data\Events\*.xnb</samp> contains event scripts, including any dialogue in the event (see [[Modding:Event data]]).
   −
===Animation descriptions===
+
====Extra dialogue====
<samp>Data\animationDescriptions.xnb</samp> contains short bits of dialogue to go with certain schedule points.
+
<samp>Data\ExtraDialogue.xnb</samp> contains miscellaneous strings, some of which are NPC specific:
   −
===Strings from CS files===
+
{| class="wikitable"
<samp>Strings\StringsFromCSFiles.xnb</samp> contains miscellaneous translations. That includes NPC dialogue defined in the code, dialogue that's shared between multiple characters, dialogue for some hardcoded events like marriage, etc.
+
|-
 +
! key format
 +
! description
 +
|-
 +
| <samp>PurchasedItem_*</samp>
 +
| Randomly shown by a non-child town NPC after you sell an edible item to a shop. These keys are hardcoded, and you can't add new keys with a similar pattern.
 +
 
 +
For keys with a number infix (like <samp>PurchasedItem_5_Cooking</samp>), the number is selected as such:
 +
* If the NPC is marked as rude in their data, they use 3.
 +
* Otherwise they randomly choose 1-5.
 +
|-
 +
| <samp>Town_DumpsterDiveComment_Child</samp><br /><samp>Town_DumpsterDiveComment_Teen</samp><br /><samp>Town_DumpsterDiveComment_Adult</samp><br /><samp>Town_DumpsterDiveComment_Linus</samp>
 +
| Shown when an NPC catches you rummaging through trash cans, depending on the NPC's age. Linus has his own dialogue, but other NPCs don't.
 +
|-
 +
| <samp>SummitEvent_Dialogue3_{{t|spouse}}</samp>
 +
| Shown for your NPC spouse near the start of the [[perfection]] cutscene.
 +
|}
 +
 
 +
====Movie theater dialogue====
 +
An NPC's reaction to a movie is stored in <samp>Data\MoviesReactions.xnb</samp>, which is structured far differently from every other dialogue file. See [[Modding:Movie theater data]] for more details.
 +
 
 +
===Strings directory===
 +
====Animation descriptions====
 +
<samp>Strings\animationDescriptions.xnb</samp> contains short bits of dialogue to go with certain schedule points. '''Not to be confused to <samp>Data\animationDescriptions.xnb</samp>, which contains the data of animations, rather than the strings for their description.'''
 +
 
 +
====Characters====
 +
<samp>Strings\Characters.xnb</samp> contains miscellaneous dialogue, some of which is NPC-specific:
 +
 
 +
{| class="wikitable"
 +
|-
 +
! key format
 +
! description
 +
|-
 +
| <samp>MovieInvite_Spouse_{{t|NPC name}}</samp>
 +
| Shown when the NPC accepts a [[Movie Ticket|movie ticket]] when they're married to you. If missing, defaults to a <samp>MovieInvite_Invited_*</samp> key.
 +
|-
 +
| <samp>MovieInvite_Invited_{{t|NPC name}}</samp><br /><samp>MovieInvite_Invited_{{t|manner}}</samp><br /><samp>MovieInvite_Invited_{{t|socialAnxiety}}</samp><br /><samp>MovieInvite_Invited_{{t|optimism}}</samp><br /><samp>MovieInvite_Invited_{{t|age}}</samp><br /><samp>MovieInvite_Invited</samp>
 +
| Shown when the NPC accepts a [[Movie Ticket|movie ticket]]. The NPC will use the first key that exists in the order listed here.
 +
 
 +
The {{t|manner}}, {{t|socialAnxiety}}, and {{t|optimism}} values are those specified in the [[Modding:NPC data|NPC's equivalent data fields]]. The {{t|age}} value is one of <samp>Child</samp>, <samp>Teen</samp>, or <samp>Adult</samp>.
 +
|-
 +
| <samp>Phone_*</samp>
 +
| Shown when calling a shop owner NPC on the [[telephone]]. These keys are hardcoded, so new keys with the same pattern will be ignored.
 +
|}
 +
 
 +
====Events====
 +
<samp>Strings\Events.xnb</samp> contains miscellaneous dialogue related to events and festivals, some of which is NPC-specific.
 +
 
 +
====Speech bubbles====
 +
<samp>Strings\SpeechBubbles.xnb</samp> contains dialogue spoken by NPCs through speech bubbles when '''the player''' enters a given location. This is distinct from the <samp>{{t|location}}_Entry</samp> field in an NPC's <samp>Characters\Dialogue\*.xnb</samp> file, which is triggered when '''the NPC''' enters a given location.
 +
 
 +
These keys are hardcoded, so new keys with the same pattern will be ignored.
 +
 
 +
====Strings from CS files====
 +
<samp>Strings\StringsFromCSFiles.xnb</samp> contains miscellaneous strings, such as dialogue that's shared between multiple characters, dialogue for some hardcoded events like marriage, etc.
    
The file has entries in the form <samp>"<key>": "dialogue string"</samp>, where the key is an arbitrary unique identifier. These must exactly match the key expected by the game, but the keys are just unique identifiers &mdash; even though most keys look like <samp>{{t|file name}}.{{t|line number}}</samp>, that's just the convention originally used to assign IDs and it has no meaning or effect (nor does it even necessarily match the current file name or line number).
 
The file has entries in the form <samp>"<key>": "dialogue string"</samp>, where the key is an arbitrary unique identifier. These must exactly match the key expected by the game, but the keys are just unique identifiers &mdash; even though most keys look like <samp>{{t|file name}}.{{t|line number}}</samp>, that's just the convention originally used to assign IDs and it has no meaning or effect (nor does it even necessarily match the current file name or line number).
 +
 +
In most situations, if the game is unable to find a string for an NPC to say, it will default to <samp>NPC.cs.4061</samp> (English version: "Hi.").
 +
 +
Some other useful NPC-specific strings stored here are as follows:
 +
 +
{| class="wikitable"
 +
|-
 +
! key format
 +
! description
 +
|-
 +
| <samp>{{t|NPC name}}_AfterWedding</samp>
 +
| Shown after marrying an NPC, when you talk to them on the farm on the same day.
 +
|-
 +
| <samp>{{t|NPC name}}_Engaged</samp></br><samp>{{t|NPC name}}_EngagedRoommate</samp>
 +
| Shown after the NPC accepts an engagement item (e.g. [[Mermaid's Pendant|mermaid's pendant]] or [[Void Ghost Pendant|void ghost pendant]] for vanilla NPCs).
 +
|}
    
===NPC-specific generic dialogue===
 
===NPC-specific generic dialogue===
Many dialogue strings are, in the vanilla Stardew Valley framework, unable to be customized on a per-NPC basis. For example, an NPC's response to being given a [[bouquet]]. A workaround to this problem is possible using {{nexus mod|1915|Content Patcher}} alone, but in modern modding, {{nexus mod|6358|Custom Fixed Dialogue}} is recommended to be used instead.
+
With some ingenuity, you can make each NPC respond differently instead of using the normal static dialogue. You can use a special mod like {{nexus mod|6358|Custom Fixed Dialogue}}, but the same effect can be achieved with just {{nexus mod|1915|Content Patcher}} with some effort. To change <samp>NPC.cs.3962</samp> and <samp>NPC.cs.3963</samp> (to give a bouquet), and <samp>NPC.cs.3980</samp> (for the mermaid pendant acceptance):
 +
 
 +
<syntaxhighlight lang="json">
 +
{
 +
  "Action": "EditData",
 +
  "Target": "Strings/StringsFromCSFiles",
 +
  "Entries": {
 +
      "NPC.cs.3962": "$q 10001 give_flowersA#?!...#$r 10001 0 give_flowersA# [Give Bouquet]",
 +
      "NPC.cs.3963": "$q 10001 give_flowersB#?!...#$r 10001 0 give_flowersB# [Give Bouquet]",
 +
      "NPC.cs.3980": "$q 10001 give_pendant#?!...#$r 10001 0 give_pendant# Will you marry me?"
 +
  }
 +
}
 +
</syntaxhighlight>
 +
 
 +
In this example, each NPC will get their response from the <samp>give_flowersA</samp>, <samp>give_flowersB</samp>, and <samp>give_pendant</samp> dialogue key in their [[Modding:Dialogue#Character-specific dialogue|character dialogue]] files. (See [[#Format|format]] below for more info on the syntax.)
 +
 
 +
Note that these should be added for all datable characters to avoid errors. For example, you could add this for Haley:
 +
 
 +
<syntaxhighlight lang="json">
 +
{
 +
  "Action": "EditData",
 +
  "Target": "Characters/Dialogue/Haley",
 +
  "Entries": {
 +
      "give_flowersA": "Oh.. these are beautiful.$1#$b#...What? You want to be my Boyfriend?$8^...What?  You want to be my Girlfriend?$8#$b#....I thought we already were together.$1",
 +
      "give_flowersB": "Ohhh, @!  I would love to be your true love.$1",
 +
      "give_pendant": ".....$8#$b#@, I don't know what to say..$8#$b#...$7#$b#Yes... I accept...$4#$b#I can't wait to tell the Mayor... Everything should take 3 days to set up.$1"
 +
  }
 +
}
 +
</syntaxhighlight>
 +
 
 +
This can be used for other generic responses, and you even can avoid the "Give Bouquet" by asking for an answered question's ID.
 +
 
    
==Algorithm==
 
==Algorithm==
Line 308: Line 335:  
|-
 
|-
 
| <samp>$0</samp>
 
| <samp>$0</samp>
| <samp>$k</samp>
+
|  
 
| Use their neutral portrait.
 
| Use their neutral portrait.
 
|-
 
|-
Line 383: Line 410:  
|-
 
|-
 
| <samp>[# # #]</samp>
 
| <samp>[# # #]</samp>
| Gives the player a random item, from the pool of item IDs within the brackets.
+
| Gives the player a random item, from the pool of [[Modding:Items/Object sprites|item IDs]] within the brackets. For example, <syntaxhighlight lang="js">"I spent the afternoon daydreaming about the ocean. So I decided to cook some seafood. [198 202 727 728]$h"</syntaxhighlight> ...gives one of 198 (Baked Fish), 202 (Fried Calamari), 727 (Chowder), or 728 (Fish Stew) as a gift.
 
|-
 
|-
 
| <samp>%revealtaste{{t|NPC}}{{t|object ID}}</samp>
 
| <samp>%revealtaste{{t|NPC}}{{t|object ID}}</samp>
Line 488: Line 515:     
===Replacer commands===
 
===Replacer commands===
Replacer commands will be replaced with the relevant string. Note that only <samp>@</samp> works in mail entries.
+
Replacer commands will be replaced with the relevant string. Note that in mail entries, only the <samp>@</samp> replacer works.
    
{| class="wikitable"
 
{| class="wikitable"
Line 524: Line 551:  
| <samp>%book</samp>
 
| <samp>%book</samp>
 
| The title of Elliott's book.
 
| The title of Elliott's book.
|-
  −
| <samp>%rival</samp>
  −
| A random first name of the Farmer's gender from StringsFromCSFiles.xnb (keys Utility.cs.5499 through Utility.cs.5560).  Will not match the Farmer's name.
   
|-
 
|-
 
| <samp>%pet</samp>
 
| <samp>%pet</samp>
Line 799: Line 823:  
A ''conversation topic'' is a temporary flag which can be checked in [[Modding:Event data|event preconditions]] and can trigger one-time NPC dialogue (if they have a matching dialogue key). They're stored in <samp>Game1.player.activeDialogueEvents</samp> while active.
 
A ''conversation topic'' is a temporary flag which can be checked in [[Modding:Event data|event preconditions]] and can trigger one-time NPC dialogue (if they have a matching dialogue key). They're stored in <samp>Game1.player.activeDialogueEvents</samp> while active.
   −
A conversation topic can be started using the <samp>addConversationTopic</samp> [[Modding:Event data|event command]], <samp>%item conversationTopic</samp> [[Modding:Mail data|mail command]], or in code by adding it to <samp>Game1.player.activeDialogueEvents</samp>.
+
A conversation topic can be started with a modder-defined length using the <samp>addConversationTopic</samp> [[Modding:Event data|event command]], <samp>%item conversationTopic</samp> [[Modding:Mail data|mail command]], or in code by adding it to <samp>Game1.player.activeDialogueEvents</samp>. A conversation topic, by default, lasts four days when added via event commands.
    
The game defines these events:
 
The game defines these events:
translators
8,404

edits