Changes

Jump to navigation Jump to search
→‎Rain dialogue: Clarifying conditions (“one of the above” not including generic dialogue which is listed above it)
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.
 
|}
 
|}
   Line 108: Line 110:     
====Rain dialogue====
 
====Rain dialogue====
<samp>Characters\Dialogue\rainy.xnb</samp> 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.
    
====Marriage dialogue====
 
====Marriage dialogue====
Line 177: Line 179:  
====Extra dialogue====
 
====Extra dialogue====
 
<samp>Data\ExtraDialogue.xnb</samp> contains miscellaneous strings, some of which are NPC specific:
 
<samp>Data\ExtraDialogue.xnb</samp> contains miscellaneous strings, some of which are NPC specific:
  −
'''Note while this table describes the general pattern of these comments, they are actually quite hardcoded and you probably cannot add new keys.'''
      
{| class="wikitable"
 
{| class="wikitable"
Line 185: Line 185:  
! description
 
! description
 
|-
 
|-
| <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>
+
| <samp>PurchasedItem_*</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.
+
| 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_{{t|NPC}}</samp>
+
| <samp>Town_DumpsterDiveComment_Child</samp><br /><samp>Town_DumpsterDiveComment_Teen</samp><br /><samp>Town_DumpsterDiveComment_Adult</samp><br /><samp>Town_DumpsterDiveComment_Linus</samp>
| An NPC-specific comment for being caught dumpster-diving. Currently only used for Linus, who uniquely has a positive reaction.
+
| 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>
 
| <samp>SummitEvent_Dialogue3_{{t|spouse}}</samp>
| An NPC-specific dialogue line used near the end of the Summit cutscene.
+
| Shown for your NPC spouse near the start of the [[perfection]] cutscene.
 
|}
 
|}
   Line 204: Line 208:  
====Characters====
 
====Characters====
 
<samp>Strings\Characters.xnb</samp> contains miscellaneous dialogue, some of which is NPC-specific:
 
<samp>Strings\Characters.xnb</samp> contains miscellaneous dialogue, some of which is NPC-specific:
  −
'''Note while this table describes the general pattern of these comments, they are actually quite hardcoded and you probably cannot add new keys.'''
      
{| class="wikitable"
 
{| class="wikitable"
Line 212: Line 214:  
! description
 
! description
 
|-
 
|-
| <samp>MovieInvite_Invited_{{t|NPC}}</samp></br><samp>MovieInvite_Spouse_{{t|spouse}}</samp>
+
| <samp>MovieInvite_Spouse_{{t|NPC name}}</samp>
| A custom response to being invited to see a movie.
+
| 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>Phone_{{t|NPC}}_Open</samp></br><samp>Phone_{{t|NPC}}_Open_Rare</samp></br><samp>Phone_{{t|NPC}}_Closed</samp></br><samp>Phone_{{t|NPC}}_Festival</samp></br><samp>Phone_{{t|NPC}}_Working</samp></br><samp>Phone_{{t|NPC}}_Working_OneDay</samp>
+
| <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>
| Dialogue used when calling a storeowner NPC on the [[Telephone]].
+
| 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====
 
====Events====
<samp>Strings\Events.xnb</samp> contains miscellaneous dialogue related to events and festivals, some of which is NPC-specific:
+
<samp>Strings\Events.xnb</samp> contains miscellaneous dialogue related to events and festivals, some of which is NPC-specific.
 
  −
{| class="wikitable"
  −
|-
  −
! key format
  −
! description
  −
|-
  −
| <samp>SpouseFlowerDanceAccept_{{t|spouse}}</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>.
  −
|}
      
====Speech bubbles====
 
====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.
 
<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.
+
These keys are hardcoded, so new keys with the same pattern will be ignored.
 
  −
{| 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.
  −
|}
      
====Strings from CS files====
 
====Strings from CS files====
Line 283: Line 239:  
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.")
+
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:
 
Some other useful NPC-specific strings stored here are as follows:
Line 292: Line 248:  
! description
 
! description
 
|-
 
|-
| <samp>{{t|NPC}}_AfterWedding</samp></br><samp>{{t|NPC}}_Engaged</samp></br><samp>{{t|NPC}}_EngagedRoommate</samp></br><samp>{{t|NPC}}_Stardrop</samp>
+
| <samp>{{t|NPC name}}_AfterWedding</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]].
+
| 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).
 +
|-
 +
| <samp>Krobus_Stardrop</samp>
 +
| Shown when Krobus gives you the [[Stardrop#Locations|spouse stardrop]]. Other NPCs don't have an equivalent entry, and will use <samp>Strings\StringsFromCSFiles:NPC.cs.4001</samp> instead.
 +
 
 +
{{upcoming|1.6|This no longer exists; use <samp>SpouseStardrop</samp> in <samp>Characters/Dialogue/&lt;name&gt;</samp> instead.}}.
 
|}
 
|}
   Line 376: Line 340:  
|-
 
|-
 
| <samp>$0</samp>
 
| <samp>$0</samp>
| <samp>$k</samp>
+
|  
 
| Use their neutral portrait.
 
| Use their neutral portrait.
 
|-
 
|-
Line 451: Line 415:  
|-
 
|-
 
| <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 594: Line 558:  
|-
 
|-
 
| <samp>%rival</samp>
 
| <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.
+
| {{upcoming|1.6.0|This token no longer exists.}} 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 867: Line 831:  
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:
3

edits

Navigation menu