Changes

Jump to navigation Jump to search
671 bytes added ,  13:37, 17 November 2023
m
→‎Schedule points: add offset and laying_down. Hopefully this breaks nothing.
Line 160: Line 160:  
|-
 
|-
 
| <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>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.
+
| ''(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>
528

edits

Navigation menu