Changes

Jump to navigation Jump to search
→‎Schedule points: Document special behavior of "bed" schedule location point.
Line 97: Line 97:  
| Applies (in any season) on the given day of week.<br /><small>Example: <samp>spring_Mon</samp></small>
 
| Applies (in any season) on the given day of week.<br /><small>Example: <samp>spring_Mon</samp></small>
 
|-
 
|-
| <samp>{{t|season}}_{{t|day of week}}_{{t|hearts}}</samp>
+
| <samp>spring</samp>
| Applies in the given season, if ''any'' player has at least that many [[friendship|hearts]] with the NPC. If multiple schedules apply, the one with the highest heart number is used.<br /><small>Example: <samp>spring_Mon_6</samp></small>
+
| Always applies. This schedule is also used as a default in some cases. DO NOT REMOVE THIS ENTRY. THAT WILL BREAK THE GAME.
 
|-
 
|-
| <samp>spring</samp>
+
| <samp>default</samp>
| Always applies.
+
| Also used as a default sometimes. It's okay for this one to not exist, spring will be used instead.
 
|}
 
|}
   Line 148: Line 148:  
|-
 
|-
 
| <samp>location</samp>
 
| <samp>location</samp>
| <p>''(optional)'' The location name the NPC should walk towards. If omitted, defaults to the [[Bus Stop|bus stop]] (if married to a player) or their default location.</p><p>'''Note:''' the game has special logic for unlockable locations. If this is JojaMart/Railroad and it's not available yet, the game gets the replacement destination from the first entry in the <samp>{{t|location}}_Replacement</samp> schedule if available; otherwise it switches to the <samp>default</samp> schedule if available, else <samp>spring</samp>. If this is CommunityCenter and it's not available yet, the game switches to the <samp>default</samp> schedule if available, else <samp>spring</samp>.</p>
+
| <p>''(optional)'' The location name the NPC should walk towards. If omitted, defaults to the previous map, or if it's the first, it defaults to the [[Bus Stop|bus stop]] (if married to a player) or their default location.</p><p>'''Note:''' the game has special logic for unlockable locations. If this is JojaMart/Railroad and it's not available yet, the game gets the replacement destination from the first entry in the <samp>{{t|location}}_Replacement</samp> schedule if available; otherwise it switches to the <samp>default</samp> schedule if available, else <samp>spring</samp>. If this is CommunityCenter and it's not available yet, the game switches to the <samp>default</samp> schedule if available, else <samp>spring</samp>.</p><p>'''Note also:''' if the location is <code>bed</code>, the game will ignore the remaining parameters from this schedule point and attempt to load a "home" destination (map and coordinates): the warp out of <code>BusStop</code> back to the <code>Farm</code> for married NPCs, or for unmarried ones, the last schedule entry from the <code>default</code> or <code>spring</code> schedule (or the NPC's default location, if neither schedule can be loaded or parsed correctly). The NPC's [[Modding:NPC_data#Sleep_animation|sleeping animation]] (<code>&lt;lowercase name&gt;_sleep</code>) from <code>Data/animationDescriptions</code> will be set to play on arrival if it is defined.</p>
 
|-
 
|-
 
| <samp>tileX</samp><br /><samp>tileY</samp>
 
| <samp>tileX</samp><br /><samp>tileY</samp>
Line 157: Line 157:  
|-
 
|-
 
| <samp>animation</samp>
 
| <samp>animation</samp>
| ''(optional)'' The animation to play when the NPC reaches the destination. This must be a key that appears in the <samp>Content/Data/animationDescriptions.xnb</samp> file. Each key entry has three parts: pre animation/looping animation/post animation. The numbers on them refer to the [[Modding:NPC data#Overworld sprites|overworld sprite frame]]. The pre animation will play after arriving at the schedule point. Then the looping animation will loop until the end of schedule time. Finally, the post animation will play before moving on to the next schedule point. Note that each frame is around 120ms so duplicates of frame is used to get desired looking animation. <br /><br />There are a few special animations. <samp>NPCName_sleep</samp> causes the NPC to go to sleep (which, among other things, prevents players from gifting or talking to the NPC while the animation is active.) This animation is also automatically used by spouses when they turn in for the night, and by NPCs coming home from Ginger Island. <samp>square_X_Y_facing</samp> causes NPCs to walk in a rectangle of at most X by Y (it can be less). They will occasionally pause and face the <samp>facing</samp> direction. <samp>change_beach</samp> and <samp>change_normal</samp> cause NPCs to change into and out of their beach outfits, and is used by Ginger Island resort schedules.
+
| ''(optional)'' The animation to play when the NPC reaches the destination. This must be a key that appears in the <samp>Content/Data/animationDescriptions.xnb</samp> file. Each key entry has three required parts: entry frames/repeat frames/leaving frames. The numbers on them refer to the [[Modding:NPC data#Overworld sprites|overworld sprite frame]]. The entry frames will play after arriving at the schedule point. Then the repeat frames will loop until the end of schedule time. Finally, the leaving frames will play before moving on to the next schedule point. Note that each frame is around 120ms so duplicates of frame is used to get desired looking animation. <br /><br /> The full format is <samp>entry frames/repeat frames/leaving frames/message key/offset X Y/laying_down</samp>. If a message key is given, the NPC will repeat that message if you talk to them while they are performing the animation. (TODO: this is likely a "busy chat", which has fewer heart points, crosscheck.) <samp>offset X Y</samp> lets you offset their sprite (in pixels). <samp>laying_down</samp> will hide the shadow. If you want to use offset or laying_down without a message, leave that spot empty. Example: offset/laying down without message: <samp>"haley_beach_towel": "20 20 21 21 21 21 21/22/21 21 20//laying_down/offset 0 16"</samp><br /><br />Additionally, there are a few special animations. <samp>sleep</samp> anywhere in an animation name causes the NPC to go to sleep (which, among other things, prevents players from gifting or talking to the NPC while the animation is active.) The specific animation <samp>NPCName_sleep</samp> (with the NPCName fully lowercased) automatically used by spouses when they turn in for the night, and by NPCs coming home from Ginger Island. <samp>square_X_Y_facing</samp> causes NPCs to make random movements in a rectangle of at most X by Y (it can be less), centered at the schedule point. They will occasionally pause and face the <samp>facing</samp> direction. <samp>change_beach</samp> and <samp>change_normal</samp> cause NPCs to change into and out of their beach outfits, and is used by Ginger Island resort schedules.
 
|-
 
|-
 
| <samp>dialogue</samp>
 
| <samp>dialogue</samp>
| <p>''(optional)'' The dialogue the NPC should use when they reach their destination. This must be an [[Modding:Modder Guide/APIs/Content|asset name]] and entry key in this exact format (including quotes): <samp>"assetName:key"</samp>. Any slashes in the asset name should be double backslashes (<samp>\\</samp>). The format of the entry key doesn't matter, it just needs to match one in the file.</p><p>For example, <samp>"Strings\\schedules\\Abigail:Sun.000"</samp> means "open the file at <samp>Strings\schedules\Abigail.xnb</samp> and get the text of the <samp>Sun.000</samp> key".
+
| <p>''(optional)'' The dialogue the NPC should use when they reach their destination. This must be an [[Modding:Modder Guide/APIs/Content|asset name]] and entry key in this exact format (including quotes): <samp>"assetName:key"</samp>. Any slashes in the asset name should be double backslashes (<samp>\\</samp>). The format of the entry key doesn't matter, it just needs to match one in the file.</p><p>For example, <samp>"Strings\\schedules\\Abigail:Sun.000"</samp> means "open the file at <samp>Strings\schedules\Abigail.xnb</samp> and get the text of the <samp>Sun.000</samp> key".</p><p><small>Tip: If you want schedule dialogue in marriage schedules, include the exact string <samp>marriage</samp> somewhere in the key, that will only show it to the npc's spouse.</small>
 
|}
 
|}
   Line 173: Line 173:  
[[Category:Modding]]
 
[[Category:Modding]]
    +
[[es:Modding:Datos de horarios]]
 
[[ru:Модификации:Расписание]]
 
[[ru:Модификации:Расписание]]
16

edits

Navigation menu