Changes

Jump to navigation Jump to search
update for 1.6.0 build 23355 (added DayEnding trigger, added CustomFields, added multi-trigger support), simplify example
Line 22: Line 22:  
             "Entries": {
 
             "Entries": {
 
                 "SomeMod.Id_OnLeoMoved": {
 
                 "SomeMod.Id_OnLeoMoved": {
                     "Trigger": "LocationChanged",
+
                     "Trigger": "DayEnding",
                    "Location": "Farm",
   
                     "Condition": "PLAYER_HAS_FLAG Host leoMoved",
 
                     "Condition": "PLAYER_HAS_FLAG Host leoMoved",
 
                     "Actions": [
 
                     "Actions": [
                         "AddMail Current Abigail_LeoMoved Now",
+
                         "AddMail Current Abigail_LeoMoved",
 
                         "AddConversationTopic LeoMoved 5"
 
                         "AddConversationTopic LeoMoved 5"
 
                     ]
 
                     ]
Line 36: Line 35:  
</nowiki>|lang=js}}
 
</nowiki>|lang=js}}
   −
You can read that like: "''When the player arrives in the Farm location, if Leo has moved to the valley, then [[Modding:Mail data|send a letter]] and start [[Modding:Dialogue#Conversation topics|a conversation topic]]''".
+
You can read that like: "''When the player is going to sleep, if Leo has moved to the valley, then [[Modding:Mail data|send a letter]] and start [[Modding:Dialogue#Conversation topics|a conversation topic]]''".
    
Actions only run once by default, though you can use the <samp>MarkActionApplied</samp> action to re-enable one.
 
Actions only run once by default, though you can use the <samp>MarkActionApplied</samp> action to re-enable one.
Line 59: Line 58:  
|-
 
|-
 
| <samp>Trigger</samp>
 
| <samp>Trigger</samp>
| When to apply the trigger action. This must be a [[#Triggers|valid trigger type]].
+
| When to apply the trigger action. This must be one or more [[#Triggers|valid trigger types]] (space-delimited).
 
|-
 
|-
 
| <samp>Actions</samp>
 
| <samp>Actions</samp>
Line 77: Line 76:  
| <samp>Condition</samp>
 
| <samp>Condition</samp>
 
| ''(Optional)'' A [[Modding:Game state queries|game state query]] which indicates whether this action can be applied currently. Defaults to always true.
 
| ''(Optional)'' A [[Modding:Game state queries|game state query]] which indicates whether this action can be applied currently. Defaults to always true.
 +
|-
 +
| <samp>CustomFields</samp>
 +
| ''(Optional)'' The [[Modding:Migrate to Stardew Valley 1.6#Custom data fields|custom fields]] for this entry.
 
|}
 
|}
   Line 92: Line 94:  
| <samp>DayStarted</samp>
 
| <samp>DayStarted</samp>
 
| Raised when the player starts a day, after either sleeping or loading.
 
| Raised when the player starts a day, after either sleeping or loading.
 +
|-
 +
| <samp>DayEnding</samp>
 +
| Raised when the player is going to sleep. This happens immediately before the game changes the date, sets up the new day, and saves.
 
|-
 
|-
 
| <samp>LocationChanged</samp>
 
| <samp>LocationChanged</samp>
translators
8,447

edits

Navigation menu