Difference between revisions of "Modding:Event data"

From Stardew Valley Wiki
Jump to navigation Jump to search
m (→‎Basic format: addObject fixed and expanded, had incorrect usage)
 
(139 intermediate revisions by 38 users not shown)
Line 3: Line 3:
 
This page explains how the game stores and parses event data. This is an advanced guide for mod developers.
 
This page explains how the game stores and parses event data. This is an advanced guide for mod developers.
  
==Source==
+
==Raw data==
Events are stored in <tt>'''Content\Data\Events\*.xnb'''</tt> (one file per location), which can be [[Modding:Editing XNB files#Getting started|unpacked using XNB Extract]].
+
Events are stored in <samp>Content\Data\Events\*.xnb</samp> (one file per location), which can be [[Modding:Editing XNB files#unpacking|unpacked to edit]]. Here's the raw data for events in [[Trailer|Pam's trailer]] as of {{version|1.5.1}} for reference:
  
Here's the raw data for saloon events as of 1.3.27 for reference (excluding XNB headers):
+
{{collapse|Data|content=<syntaxhighlight lang="json">
{{Collapse|Code|content=<source lang="yaml">
+
{
    40/f Elliott 1000/p Gus/t 1500 2200: "playful/11 20/farmer 14 24 0 Elliott -30 -30 0 Clint 18 22 2 Marnie 9 22 3 Pam 7 18 1 Lewis 8 22 1 Pierre 4 22 2 Demetrius 3 23 1 Gus 14 18 2 Emily 16 18 3/skippable/move farmer 0 -3 3/faceDirection Pierre 1 true/move farmer -3 0 0/faceDirection Pierre 2 true/move farmer 0 -1 0/faceDirection Marnie 0 true/faceDirection Gus 3/speak Gus \"Hi. I'll take your order in a few moments.\"/faceDirection Gus 2/move Emily 2 0 1/faceDirection Marnie 3 true/pause 800/move Emily -2 0 0/pause 1000/faceDirection Clint 3 true/move Emily 2 0 1/warp Elliott 14 24/playSound doorClose/pause 500/move Elliott 0 -3 3/faceDirection farmer 2 true/move Elliott -2 0 0/move Elliott 0 -1 0/faceDirection farmer 1/faceDirection Elliott 3/speak Elliott \"Hello, @! What a pleasant surprise!#$b#I was just stopping in to relax after an eight hour writing session.$h\"/pause 400/faceDirection Elliott 1/speak Elliott \"Bartender! Two of your finest ales, please!^Bartender! Fetch me your finest ale. And bring some wine for the lady!\"/faceDirection Gus 3/faceDirection farmer 0/speak Gus \"...$u\"/move Gus 3 0 0/move Gus 0 -1 0/faceDirection Emily 2/playSound openBox/pause 400/playSound Milking/move Pam -6 0 0/move Gus 0 1 3/move Gus -5 0 2/faceDirection Elliott 0/pause 500/speak Gus \"There you go, sir.$u\"/pause 500/faceDirection Elliott 3/faceDirection farmer 1/speak Elliott \"$q 28376 null#Wait. I propose a toast! To...#$r 28376 25 event_toast4#To Pelican Town!#$r 28376 50 event_toast2#To our friendship!#$r 28376 -10 event_toast1#To my good health!#$r 28376 -50 event_toast3#To your doom!\"/faceDirection Elliott 2/faceDirection farmer 2/pause 900/showFrame Elliott 16/animate Elliott false false 120 16 17 18 19 19 18 18 19 19 18 18 19 19 18 18 19 19 18 18 17 16/pause 500/farmerEat 346/pause 900/pause 1100/stopAnimation farmer/faceDirection farmer 1/speak Elliott \"*Hic*... Strong stuff...$h\"/pause 800/animate Elliott false false 400 20 21 22 21 20 21 22 21 20 21 22 21 20 21 22 21 16/pause 1000/faceDirection farmer 1/pause 800/faceDirection farmer 2/animate farmer false true 100 102 103/pause 1000/globalFade/viewport -1000 -1000/pause 600/stopAnimation farmer/end warpOut" #!String
+
  "35/f Penny 1000/p Penny": "50s/-1000 -1000/farmer -30 30 0 Penny 12 7 0 Pam -100 -100 0/skippable/specificTemporarySprite pennyMess/viewport 12 7 true/pause 1000/speak Penny \"Ughh... It's so dirty in here.$s\"/pause 500/warp farmer 12 9/playSound doorClose/pause 500/faceDirection Penny 2/pause 500/emote Penny 16/pause 300/speak Penny \"@! Um... Sorry that it's such a mess. I was about to clean up.$u\"/pause 500/move farmer 0 -1 0/pause 600/emote Penny 32/pause 300/speak Penny \"You'll help me? You really mean it?$h\"/pause 500/faceDirection Penny 1/faceDirection farmer 1/speak Penny \"Okay, you can get started over there. I'll clean the kitchen.\"/move farmer 2 0 1/move farmer 0 -2 1/move farmer 1 0 1/move Penny -1 0 0/animate Penny false true 100 24 25/animate farmer false true 100 35/pause 200/playSound dwop/removeSprite 16 6/pause 200/move Penny -1 0 0/animate Penny false true 100 24 25/stopAnimation farmer/faceDirection farmer 0/pause 1200/stopAnimation Penny/removeSprite 10 5/playSound dwop/move Penny -1 0 0/animate Penny false true 100 24 25/pause 900/animate farmer false true 100 41/pause 300/playSound dwop/removeSprite 15 5/stopAnimation farmer/pause 1400/stopAnimation Penny/move Penny 1 0 0/pause 800/warp Pam 12 9/playSound doorClose/stopMusic/move Pam 0 -1 0/faceDirection Penny 2/faceDirection farmer 3/faceDirection Pam 1/pause 500/faceDirection Pam 3/speak Pam \"Whaddya think you're doing?!$u\"/faceDirection Pam 1/faceDirection Pam 3/faceDirection Pam 0/speak Pam \"Stop it! I had everything just the way I like it!$u\"/move Penny 2 0 2/pause 500/emote Penny 28/pause 500/speak Penny \"Mom, the house is a total mess. @ and I were just trying to tidy things up a bit.#$b#*sniff* *sniff*... Were you at the saloon just now? You smell like beer...$s\"/pause 300/move Pam -1 0 3/emote Pam 12/pause 400/speak Pam \"It's none of your damn business where I go!$4\"/pause 500/speak Penny \"It IS my business! I don't want you destroying yourself!$a#$b#Don't you realize your choices have an effect on me? Stop being so selfish!$a\"/faceDirection Pam 0/shake Pam 5000/pause 600/speak Pam \"Selfish? I put a roof over your head and clothes on your back and you call me selfish!? You ungrateful little...$u\"/pause 500/emote farmer 28/pause 500/faceDirection Pam 1/faceDirection Penny 1/move farmer -2 0 2/move farmer 0 2 3/pause 500/speak Pam \"You'd better go. I'm sorry you had to see this, kid.$4\"/pause 500/move farmer -1 0 2/move farmer 0 1 2/pause 500/faceDirection farmer 0/faceDirection Penny 2/pause 700/faceDirection farmer 2/pause 500/warp farmer -40 -40/playSound doorClose/pause 500/move Pam 0 -1 1/pause 300/faceDirection Penny 3/speak Pam \"He's a nice young man...^She's a nice young lady...\"/speak Pam \"But I don't want you tellin' others to clean up my house! It's embarrassing! You understand?$4\"/pause 300/faceDirection Penny 2/pause 600/showFrame Penny 23/pause 700/speak Penny \"...Yes, mother.$s\"/pause 1000/mail PennyCleanTrailer/end warpOut",
    96/f Gus 1000/f Pam 500/p Gus: "jaunty/10 21/farmer -100 -100 0 Gus 10 21 2 Pam -101 -101 0/skippable/pause 200/emote Gus 28/pause 500/playSound doorClose/warp farmer 14 24/pause 500/faceDirection Gus 1 true/move farmer 0 -3 3/speak Gus \"Oh, Hello there, buddy.^Hi, @.\"/pause 500/faceDirection Gus 2/move farmer -3 0 2/pause 800/faceDirection farmer 3/pause 400/emote farmer 8/pause 700/speak Gus \"*sigh*...I'm just looking over last month's earnings... and It's not looking very good, @.$s#$b#The worst thing... and I hate to say this because she's my friend... is Pam! She hasn't paid off her tab in weeks!$s#$b#...But I can't ask her to do it. I know she'll get defensive, and I don't want to hurt her feelings.$s\"/pause 600/faceDirection Gus 1/speak Gus \"@, you gotta help me!$s\"/stopMusic/pause 500/playSound doorClose/warp Pam 14 24/move Pam 0 -3 3/faceDirection Gus 1 true/faceDirection farmer 1/emote Gus 16/speak Pam \"Hiya!$h#$b#Gus... I'm awful thirsty, if you catch my drift.\"/emote Gus 28/speak Gus \"Er... Well, okay Pam.$s\"/emote Gus 28/pause 700/emote Pam 8/pause 400/speak Pam \"$q 207 null#@, what's going on here?#$r 207 -50 event_credit1#You need to pay your tab right now!#$r 208 15 event_credit2#The saloon isn't doing well, financially\"/pause 400/faceDirection Pam 1/emote Pam 12/speak Pam \"....$u#$b#*sigh* ...Well, I guess I'd better pay off that tab, then.$s\"/move Pam -2 0 0/move Pam 0 -1 3/move Pam -2 0 2/faceDirection Gus 0/faceDirection farmer 3/playSound money/pause 500/speak Gus \"Thanks, Pam!$h\"/pause 500/faceDirection Gus 1/speak Gus \"And thank you, @.$u\"/pause 500/faceDirection Gus 0/speak Gus \"Now, let's get you that drink, Pam.$h\"/friendship Gus 50/end dialogue Gus \"Thanks for your help, @. This cash is going to be a big help to the saloon.\"" #!String
+
  "36/f Penny 1500/p Penny": "musicboxsong/9 7/farmer -30 30 0 Penny 9 7 0/skippable/pause 1000/playSound doorClose/warp farmer 12 9/pause 400/faceDirection Penny 2/pause 300/speak Penny \"@, you came at a good time!#$b#I'm just about finished cooking a new recipe I invented!$h\"/pause 400/move farmer 0 -2 3/faceDirection Penny 1/move farmer -2 0 3/speak Penny \"Let me just finish up real quick.\"/pause 200/faceDirection Penny 0/pause 200/animate Penny false true 120 29 30/playSound crafting/pause 320/playSound crafting/pause 320/playSound crafting/pause 320/playSound crafting/pause 320/stopAnimation Penny/pause 500/playSound openBox/showFrame Penny 29/pause 400/playSound furnace/showFrame Penny 30/pause 1500/playSound clank/faceDirection Penny 0/pause 500/faceDirection Penny 1 true/showFrame Penny 28/speak Penny \"Here, give that a little taste.\"/pause 800/faceDirection farmer 2/farmerEat 200/showFrame Penny 4/pause 2500/stopAnimation farmer/pause 500/playSound gulp/animate farmer false true 350 104 105/pause 500/specificTemporarySprite pennyCook/pause 1500/faceDirection farmer 2/pause 500/speak Penny \"$q 72 null#...well?#$r 72 50 event_cook1#(Lie) Mmm! That was delicious!#$r 73 -50 event_cook2#Uh... can I get the rest to go?#$r 73 0 event_cook3#Well it's definitely unique... how did you get it so rubbery?\"/pause 500/speak Penny \"$p 72#Hey, since you're the first person to try it, I'm going to name this one 'Chili de @'.$h|Well, I guess this recipe was a failure...$s\"/stopAnimation farmer/faceDirection farmer 3/pause 600/speak Penny \"Um... so how about we watch a movie or something?\"/pause 500/move farmer 5 0 0 true/move Penny 5 0 0 true/globalFade/viewport -1000 -1000/end dialogue Penny \"Thanks for being my taste-tester.$h\"",
    97/f Clint 750/t 1900 2300/d Tue Wed Thu Fri Sat Sun: "none/4 18/farmer 14 24 0 Clint 4 19 2 Emily 10 11 0 Gus 15 18 1 Shane 7 18 1/skippable/move farmer 0 -3 3/emote Clint 28/pause 500/move Clint 0 -1 3/move Clint -3 0 0/pause 500/playSound openBox/pause 150/playSound shiny4/pause 400/playMusic desolate/move Clint 3 0 2/move Clint 0 1 2/move farmer -3 0 0/move farmer 0 -1 3/faceDirection Shane 2 true/move farmer -3 0 3/faceDirection Shane 1 true/move farmer -3 0 3/faceDirection Clint 1/speak Clint \"Hello, @... care to join me?\"/pause 400/faceDirection farmer 0/pause 800/faceDirection farmer 3/faceDirection Clint 2/speak Clint \"Let me just go ahead and tell you what's on my mind.$u#$b#I have terrible luck with women, @...*sigh*$s#$b#I'm a nice guy if you get to know me, I swear!$u\"/pause 500/faceDirection farmer 0/emote farmer 28/pause 500/faceDirection farmer 3/speak Clint \"The girls all seem to like you, @...^You're a girl, @...\"/speak Clint \"$q 211 null#Got any tips?^What advice can you give me?#$r 211 25 event_advice1#Impress women with your strength and charm#$r 211 25 event_advice1#Act crazy, to keep people guessing#$r 211 0 event_advice2#Just act natural... be yourself#$r 211 50 event_advice1#Treat women the same as men\"/speed Emily 4/move Emily -6 0 2/speed Emily 2/move Emily 0 4 2/doAction 4 16/playSound openBox/stopMusic/move Emily 0 3 1/move Emily 1 0 2/move Emily 0 1 3/pause 400/pause 700/speak Emily \"Hi Clint, what can I get for you tonight?$h\"/pause 600/faceDirection Clint 1/pause 200/speak Clint \"Yes!\"/pause 300/speak Clint \"Er.. I mean, I'll have the Big n' Cheesy. With extra sauce, please.$s#$b#...$u\"/faceDirection Clint 3/faceDirection Emily 2/pause 300/faceDirection Clint 2/speak Emily \"Hi @.\"/pause 300/faceDirection farmer 0/faceDirection Clint 1/speak Clint \"Er... *ahem* Th...Thanks, Emily. For... taking my order.#$b#Um, Emily? I was...*gulp*... I was wondering...$h\"/pause 300/faceDirection Emily 3/emote Emily 8/pause 400/speak Emily \"Yes, Clint?$u\"/pause 500/emote Clint 28/pause 1200/speak Clint \"... nevermind.$s\"/faceDirection Clint 0/playMusic sadpiano/pause 300/faceDirection Emily 2/pause 300/faceDirection Emily 3/pause 500/move Emily 0 -1 1/move Emily 1 0 1/faceDirection Shane 3/speak Emily \"Hi, Shane! Here's your beverage.$h\"/pause 300/faceDirection Shane 1/pause 400/addObject 8 17 346 1/playSound woodyStep/pause 400/faceDirection Shane 3/pause 300/faceDirection Clint 1/speak Shane \"Thanks, Emily!$h#$b#So... How's your shift coming along?\"/speak Emily \"It's fine! Thanks for asking, Shane!$h#$b#Do you have any new chicken stories for me?\"/pause 600/emote Clint 28/pause 500/faceDirection Clint 2/pause 800/speak Clint \"*sigh*$s#$b#I'm doomed...$s\"/end warpOut" #!String
+
  "963313/n pamPotatoJuice": "playful/10 7/farmer -100 -100 0 Pam 10 7 0/mail pamNewChannel/skippable/pause 3000/speak Pam \"Heheh... I see the delivery came in.$h\"/pause 500/speak Pam \"Let's have a little taste.$h\"/pause 1000/playSound coin/showFrame Pam 32/pause 2000/animate Pam false true 400 33 34/playSound glug/pause 800/playSound glug/pause 800/playSound glug/pause 800/playSound glug/pause 790/stopAnimation Pam/showFrame Pam 32/pause 400/emote Pam 40/pause 800/showFrame Pam 35/textAboveHead Pam \"Ptooey!\"/playSound slimedead/shake Pam 2000/pause 2000/animate Pam false true 400 28 29/speak Pam \"I said potato, not fermented baboon kidney!$u\"/pause 2000/end dialogue Pam \"The juice? Yeah, I tried it, kid. $4#$b#How'd it taste? ...Some things are better left unsaid. Let's just leave it at that.$4\""
    911526/f Alex 2500/t 1900 2200/n joshMessage: "gusviolin/-1000 -1000/farmer 5 5 1 Gus 10 6 2 Alex 9 5 3 Emily 9 17 2/skippable/showFrame 117/showFrame Alex 39/positionOffset farmer 12 8/positionOffset Alex -12 0/animate Gus false true 723 16 17/viewport 7 4 true/pause 23000/stopAnimation Gus/pause 1000/faceDirection Gus 3/speak Alex \"Thanks, Gus. That was great.\"/move Gus 0 1 1/move Gus 1 0 2/move Gus 0 1 2/doAction 11 9/move Gus 0 3 1/move Gus 12 0 3 true/speak Alex \"This is nice... I've never dined in here before.\"/pause 1000/emote Alex 40/speak Alex \"Um, anyway... I reserved this private room so we could talk...$l\"/warp Emily 11 11 true/playSound woodyStep/move Emily 0 -4 3/move Emily -4 0 0/move Emily 0 -1 0/speak Emily \"I've got a linguini with mushroom cream sauce for Mr. @.^I've got a kale and walnut salad for the lady.#$b#...and a grilled steak for Alex.^And a grilled steak for the gentleman.\"/playSound woodyHit/specificTemporarySprite joshDinner/speak Alex \"Thanks.\"/move Emily 4 0 2/move Emily 0 5 1/move Emily 11 0 1 true/speak Alex \"So, what I wanted to say was...$9\"/playMusic musicboxsong/speak Alex \"*gulp*$s\"/pause 600/speak Alex \"Well... when we first met, I was instantly drawn to you. It was confusing... I'd never felt that way about anyone.$l^When I first met you, I thought you were really cute.$l#$b#I kept telling myself 'You can't have these kinds of feelings for another guy'.$l^Normally, when I have a crush on someone, the feeling goes away pretty quick...$l\"/pause 800/speak Alex \"...But my heart was telling me something else.^...But with you, it kept growing.$l\"/pause 400/emote Alex 40/pause 600/question fork1 \"#I feel the same way.#I'm sorry... I don't feel that way about you.\"/pause 400/fork rejectJosh/speak Alex \"...$l#$b#I can't believe it took this long to say that to each other.$l\"/emote Alex 32/pause 800/animate Alex false false 400 40 41 41 40 41 41 40 41 41 40 41 41 40/pause 800/playSound eat/pause 800/playSound eat/pause 800/playSound eat/pause 800/playSound gulp/pause 400/speak Alex \"Mmm... this steak is outsanding. Can you smell that fragrant sauce?$10\"/eyes 1 -4000/animate Alex false false 400 40 41 41 40 41 41 40/pause 1000/specificTemporarySprite alexDiningDog/playSound dogWhining/pause 1000/globalFade/viewport -1000 -1000/pause 6000/end dialogue Alex \"...$l\"" #!String
+
}
    rejectJosh: "pause 100/playMusic none/shake Alex 2000/emote Alex 28/speak Alex \"...Oh...$s#$b#I...I'm sorry if I made you uncomfortable...$s\"/pause 2000/speak Alex \"I'm not hungry anymore...$s\"/viewport move 1 1 5000/globalFade/viewport -1000 -1000/pause 4000/end dialogue Alex \"...$l\"" #!String
+
</syntaxhighlight>}}
    195099/f Shane 2500/f Sebastian 2500/f Sam 2500/f Harvey 2500/f Alex 2500/f Elliott 2500/o Abigail/o Penny/o Leah/o Emily/o Maru/o Haley/o Shane/o Harvey/o Sebastian/o Sam/o Elliott/o Alex/e 911526/e 528052/e 9581348/e 43/e 384882/e 233104/i 446/k 195013: "playful/-1000 -1000/farmer 27 19 1 Sam 36 20 1 Sebastian 37 19 2 Harvey 39 19 2 Shane 40 17 2 Elliott 41 19 2 Alex 42 20 3/animate Shane false true 200 20 20 20 20 20 20 20 20 20 20 21 22 23 24 24 24 24 23 22 21 20 20 20 20/pause 1000/message \"For some reason, you decide to place your hand in your pocket...\"/pause 500/message \"You touch the rabbit's foot, and feel a sense of relief...\"/move farmer 5 0 1 true/viewport 37 19 true/move false/pause 500/faceDirection Sam 3 true/faceDirection Elliott 3 true/faceDirection Harvey 3 true/faceDirection Alex 3 true/faceDirection Shane 3 true/faceDirection Sebastian 3 true/textAboveHead Sam \"Hey!\"/textAboveHead Alex \"What's up?\"/textAboveHead Shane \"Oh, hey\"/pause 2000/move farmer 3 0 1/emote farmer 32/pause 500/speak Harvey \"You showed up just in time for the first ever Pelican Town 8-ball tournament!\"/pause 500/speak Elliott \"Don't worry, I've never played before, either.$h\"/pause 500/speak Shane \"It's easy, you just gotta put some mustard on the cue ball...$h\"/pause 500/fade/viewport -1000 -1000/pause 1500/message \"You played a round of pool with the boys.\"/pause 1000/message \"Sebastian won, of course... but it was still a lot of fun!\"/pause 500/end" #!String
 
    195013/f Shane 2500/f Sebastian 2500/f Sam 2500/f Harvey 2500/f Alex 2500/f Elliott 2500/o Abigail/o Penny/o Leah/o Emily/o Maru/o Haley/o Shane/o Harvey/o Sebastian/o Sam/o Elliott/o Alex/e 911526/e 528052/e 9581348/e 43/e 384882/e 233104/k 195099: "playful/-1000 -1000/farmer 27 19 1 Sam 36 20 1 Sebastian 37 19 2 Harvey 39 19 2 Shane 40 17 2 Elliott 41 19 2 Alex 42 20 3/animate Shane false true 200 20 20 20 20 20 20 20 20 20 20 21 22 23 24 24 24 24 23 22 21 20 20 20 20/move farmer 5 0 1 true/viewport 37 19 true/move false/pause 500/startJittering/faceDirection farmer 2 true/animate farmer false true 100 94/jump farmer/pause 2000/stopAnimation farmer/showFrame farmer 0/stopJittering/playSound thudStep/faceDirection farmer 3 true/showFrame farmer 7 true/startJittering/faceDirection Sam 3 true/faceDirection Elliott 3 true/faceDirection Harvey 3 true/faceDirection Alex 3 true/faceDirection Shane 3 true/faceDirection Sebastian 3 true/textAboveHead Sam \"Not so fast!\"/textAboveHead Alex \"Hold it!\"/textAboveHead Shane \"Stop!\"/pause 3000/stopJittering/showFrame farmer 6 true/pause 500/faceDirection farmer 1/move farmer 3 0 1/playMusic none/emote farmer 28/pause 500/speak Sam \"Never thought you'd find all your 'boyfriends' in one room, huh @?$a\"/pause 500/speak Harvey \"You tricked all of us into thinking we loved you...$s^@... I thought you wanted to get married and start a family with me... What did I do wrong?$s\"/pause 500/speak Shane \"The last shred of hope I had left is completely destroyed... Thanks, @. Are you happy now?$s\"/pause 500/speak Alex \"@? I thought... I thought we were 'one of a kind'... But you were just using me?$s^What are you looking at *me* for? You think I'm gonna come to your rescue?$a\"/pause 500/speak Elliott \"For once, I'm at a loss for words... $a\"/pause 500/playMusic wedding/speak Sam \"Well, we're not going to put up with your abuse any longer!$a^We all know the truth, now! And we're not going to tolerate this!$a\"/textAboveHead Alex \"That's right!\"/pause 500/speak Sebastian \"Well? What do you have to say for yourself?$a\"/pause 1000/question fork1 \"#I'm sorry... what I did was wrong.#Guys, calm down! I can explain...#\"/fork choseToExplain/pause 500/textAboveHead Alex \"Sure...\"/pause 500/speak Shane \"Nice try, but that's not going to cut it...$a\"/pause 1000/playMusic none/speak Sam \"...so we've come to a decision... isn't that right, fellas?$u\"/pause 500/speak Harvey \"...yes.$s\"/speak Elliott \"Absolutely.$a\"/pause 1000/jump Sam/jump Sebastian/jump Elliott/jump Shane/jump Alex/jump Harvey/pause 1000/speak Sam \"We're all giving you the cold shoulder!$a\"/faceDirection farmer 2 true/animate farmer false true 100 94/jump farmer/playSound slimedead/pause 2000/fade/viewport -2000 -2000/dump guys 3/end warpOut" #!String
 
    choseToExplain: "pause 100/textAboveHead Shane \"I doubt it...\"/pause 500/resetVariable/question fork2 \"#You were all too pushy with me! You made it difficult to say 'no'!#Pierre pressured me! He wanted to sell more bouquets!#(Start crying)/pause 100/fork crying/textAboveHead Sam \"Liar!\"/textAboveHead Alex \"Yeah, right!\"/speak Elliott \"Don't blame others for your mistakes! You're just losing more respect with us...$a\"/pause 1000/faceDirection Sam 2/playMusic none/speak Sam \"...I think we've come to a decision... isn't that right, boys?$u\"/pause 500/speak Harvey \"...yes.$s\"/speak Sebastian \"Absolutely.$a\"/faceDirection Sam 3/pause 1000/jump Sam/jump Sebastian/jump Elliott/jump Shane/jump Alex/jump Harvey/pause 1000/jump Sam/jump Sebastian/jump Elliott/jump Shane/jump Alex/jump Harvey/pause 1000/jump Sam/jump Sebastian/jump Elliott/jump Shane/jump Alex/jump Harvey/pause 1000/speak Sam \"We're all giving you the cold shoulder!$a\"/faceDirection farmer 2 true/animate farmer false true 100 94/jump farmer/playSound slimedead/pause 2000/fade/viewport -2000 -2000/dump guys 4/end warpOut" #!String
 
    crying: "pause 100/faceDirection farmer 0/emote farmer 28/pause 1000/emote Harvey 12 true/emote Sebastian 12 true/emote Shane 12 true/emote Sam 12 true/emote Elliott 12 true/emote Alex 12 true/speak Harvey \"That's not going to work! You won't be preying on our sympathies this time!$a\"/speak Alex \"I'll assume this is just another act...$a^Typical...$a\"/pause 100/speak Sebastian \"You need to take responsibility for what you've done...$a\"/pause 1000/faceDirection Sam 2/playMusic none/speak Sam \"...I think we've come to a decision... isn't that right, boys?$u\"/pause 500/speak Harvey \"...yes.$s\"/speak Sebastian \"Absolutely.$a\"/faceDirection Sam 3/pause 1000/jump Sam/jump Sebastian/jump Elliott/jump Shane/jump Alex/jump Harvey/pause 1000/jump Sam/jump Sebastian/jump Elliott/jump Shane/jump Alex/jump Harvey/pause 1000/jump Sam/jump Sebastian/jump Elliott/jump Shane/jump Alex/jump Harvey/pause 1000/speak Sam \"We're all giving you the cold shoulder!$a\"/faceDirection farmer 2 true/animate farmer false true 100 94/jump farmer/playSound slimedead/pause 2000/fade/viewport -2000 -2000/dump guys 4/end warpOut" #!String
 
</source>}}
 
  
 
==Event preconditions==
 
==Event preconditions==
Each event has a key which includes an event ID and any preconditions. Event preconditions include any number of the following arguments (separated by <tt>/</tt>). For example, Clint's Saloon heart event preconditions are <code>97/f Clint 750/t 1900 2300/d Tue Wed Thu Fri Sat Sun</code>, which (per the tables below) means ''event #97, requires 3 hearts with Clint, between 7pm and 11pm on Monday''.
+
Each event has a key which includes an event ID and any preconditions. Event IDs are a max of 10 digits, with a maximum value of 2147483647 (based on the game coding).
 +
 
 +
You may use any ID for testing '''BUT When you are ready to publish, you are recommended to use the four or five digit mod ID you get from Nexus (found in the mod page URL) as the prefix instead'''. ''Note that any other id (like last 4 digit of user id is not guarenteed to be unique across other mods)'' You can actually reserve an ID for your mod in Nexus by creating the page without clicking "Publish". Of course, this is not a rule, but a good convention to prevent mods from clashing. If uploading to Moddrop or another site instead, adjust according to the number of digits found in that site's IDs.
 +
 
 +
Event preconditions include any number of the following arguments (separated by <samp>/</samp>). For example, Clint's Saloon heart event preconditions are <code>97/f Clint 750/t 1900 2300/d Tue Wed Thu Fri Sat Sun</code>, which (per the tables below) means ''event #97, requires 3 hearts with Clint, between 7pm and 11pm on Monday''.
  
 
Notes:
 
Notes:
 
* 'NPC name' means their internal English name, not the translatable display name.
 
* 'NPC name' means their internal English name, not the translatable display name.
* Most text is case-sensitive (e.g. <tt>Mon</tt> is not the same as <tt>mon</tt>).
+
* Most text is case-sensitive (''e.g.,'' <samp>Mon</samp> is not the same as <samp>mon</samp>).
* The game's logic for these codes is in <tt>GameLocation::checkEventPrecondition</tt>.
+
* The game's logic for these codes is in <samp>GameLocation::checkEventPrecondition</samp>.
  
 
===Context===
 
===Context===
Line 35: Line 34:
 
! precondition
 
! precondition
 
|-
 
|-
| <tt>A {{t|dialogue ID}}</tt>
+
| <samp>A {{t|dialogue ID}}</samp>
| The special dialogue event with the given ID is ''not'' in progress. This can be a custom event ID, but these are the in-game IDs: <tt>cc_Boulder</tt>, <tt>cc_Bridge</tt>, <tt>cc_Bus</tt>, <tt>cc_Greenhouse</tt>, <tt>cc_Minecart</tt>, <tt>dumped_Girls</tt>, <tt>dumped_Guys</tt>, <tt>Introduction</tt>, <tt>joja_Begin</tt>, <tt>pamHouseUpgrade</tt>, <tt>pamHouseUpgradeAnonymous</tt>, <tt>secondChance_Girls</tt>, <tt>secondChance_Guys</tt>, <tt>willyCrabs</tt>.
+
| The special dialogue event with the given ID (including [[Modding:Dialogue#Conversation_topics|Conversation Topics]]) is '''not''' in progress. This can be a custom event ID, but these are the in-game IDs: <samp>cc_Begin</samp>, <samp>cc_Boulder</samp>, <samp>cc_Bridge</samp>, <samp>cc_Bus</samp>, <samp>cc_Complete</samp>, <samp>cc_Greenhouse</samp>, <samp>cc_Minecart</samp>, <samp>dumped_Girls</samp>, <samp>dumped_Guys</samp>, <samp>Introduction</samp>, <samp>joja_Begin</samp>, <samp>pamHouseUpgrade</samp>, <samp>pamHouseUpgradeAnonymous</samp>, <samp>secondChance_Girls</samp>, <samp>secondChance_Guys</samp>, <samp>shaneSaloon1</samp>, <samp>shaneSaloon2</samp>, <samp>willyCrabs</samp>.
 +
|-
 +
| <samp>F</samp>
 +
| Today is '''not''' a festival day.
 
|-
 
|-
| <tt>F</tt>
+
| <samp>U {{t|day count}}</samp>
| Today is ''not'' a festival day.
+
| There are no festivals within the specified number of days from today.
 
|-
 
|-
| <tt>d {{t|day of week}}</tt>
+
| <samp>d {{t|day of week}}</samp>
| Today is ''not'' one of the specified days (may specify multiple days). Valid values: Mon, Tue, Wed, Thu, Fri, Sat, Sun.
+
| Today is '''not''' one of the specified days (may specify multiple days). Valid values: Mon, Tue, Wed, Thu, Fri, Sat, Sun.
 
|-
 
|-
| <tt>r {{t|number}}</tt>
+
| <samp>r {{t|number}}</samp>
| A random probability check, where {{t|number}} is the probability between 0 and 1 (e.g. 0.2 for 20% chance).
+
| A random probability check, where {{t|number}} is the probability between 0 and 1 (''e.g.,'' 0.2 for 20% chance).
 
|-
 
|-
| <tt>v {{t|name}}</tt>
+
| <samp>v {{t|name}}</samp>
 
| The specified NPC is not invisible (regardless of whether they're on-screen).
 
| The specified NPC is not invisible (regardless of whether they're on-screen).
 
|-
 
|-
| <tt>w {{t|weather}}</tt>
+
| <samp>w {{t|weather}}</samp>
 
| Current weather matches {{t|weather}}. Valid values: rainy, sunny.
 
| Current weather matches {{t|weather}}. Valid values: rainy, sunny.
 
|-
 
|-
| <tt>y {{t|year}}</tt>
+
| <samp>y {{t|year}}</samp>
 
| If {{t|year}} is 1, must be in the first year. Otherwise, year must be at least this value.
 
| If {{t|year}} is 1, must be in the first year. Otherwise, year must be at least this value.
 
|-
 
|-
| <tt>z {{t|season}}</tt>
+
| <samp>z {{t|season}}</samp>
| Current season is ''not'' {{t|season}}.
+
| Current season is '''not''' {{t|season}}.
 +
|-
 +
| <samp>N {{t|number}}</samp>
 +
| The players in total have found at least this many golden walnuts.
 
|}
 
|}
  
Line 68: Line 73:
 
! precondition
 
! precondition
 
|-
 
|-
| <tt>D {{t|name}}</tt>
+
| <samp>B</samp>
 +
| Current player has a double bed in the farmhouse if married; single bed if roommates (Krobus excluded).
 +
|-
 +
| <samp>D {{t|name}}</samp>
 
| Current player is dating the given NPC name.
 
| Current player is dating the given NPC name.
 
|-
 
|-
| <tt>J</tt>
+
| <samp>J</samp>
 
| Current player has finished the [[Joja Warehouse]].
 
| Current player has finished the [[Joja Warehouse]].
 
|-
 
|-
| <tt>M {{t|number}}</tt>
+
| <samp>L</samp>
 +
| Event is in the FarmHouse and the FarmHouse has been upgraded at least twice (has nursery but not necessarily cellar). Only works inside the FarmHouse, always false outside.
 +
|-
 +
| <samp>M {{t|number}}</samp>
 
| Current player has at least this much money.
 
| Current player has at least this much money.
 
|-
 
|-
| <tt>S {{t|secret note ID}}</tt>
+
| <samp>O {{t|name}}</samp>
 +
| Current player is married to that NPC.
 +
|-
 +
| <samp>S {{t|secret note ID}}</samp>
 
| Current player has seen the [[Secret Notes|Secret Note]] with the given ID.
 
| Current player has seen the [[Secret Notes|Secret Note]] with the given ID.
 
|-
 
|-
| <tt>a {{t|x}} {{t|y}}</tt>
+
| <samp>a {{t|x}} {{t|y}}</samp>
| Current player is on that tile position.
+
| Current player entered the map on that tile position. Note that since events are only checked for while entering a map, you can only use tiles that other maps warp to.
 
|-
 
|-
| <tt>b {{t|number}}</tt>
+
| <samp>b {{t|number}}</samp>
| Current player has reached the bottom floor of the [[Mines]] at least that many times.
+
| Current player has reached the bottom floor of the [[The Mines|Mines]] at least that many times.
 
|-
 
|-
| <tt>c {{t|number}}</tt>
+
| <samp>c {{t|number}}</samp>
 
| Current player has at least that many free inventory slots.
 
| Current player has at least that many free inventory slots.
 
|-
 
|-
| <tt>e {{t|event ID}}</tt>
+
| <samp>e {{t|event ID}}</samp>
 
| Current player has seen the specified event (may contain multiple event IDs).
 
| Current player has seen the specified event (may contain multiple event IDs).
 +
Usage:
 +
''/e <event ID>'' means has seen that event, then ''/e <event ID> <event ID>'' means has seen EITHER events, and ''/e <event ID>/e <event ID>'' means has seen BOTH events.
 
|-
 
|-
| <tt>f {{t|name}} {{t|number}}</tt>
+
| <samp>f {{t|name}} {{t|number}}</samp>
 
| Current player has at least {{t|number}} [[friendship|friendship points]] with the {{t|name}} NPC. Can specify multiple name and number pairs, in which case the player must meet all of them.
 
| Current player has at least {{t|number}} [[friendship|friendship points]] with the {{t|name}} NPC. Can specify multiple name and number pairs, in which case the player must meet all of them.
 
|-
 
|-
| <tt>g {{t|gender}}</tt>
+
| <samp>g {{t|gender}}</samp>
| Current player is the specified gender (<tt>male</tt> or <tt>female</tt>).
+
| Current player is the specified gender (<samp>male</samp> or <samp>female</samp>).
 
|-
 
|-
| <tt>h {{t|pet}}</tt>
+
| <samp>h {{t|pet}}</samp>
| Current player does not already have a pet, and their preference matches {{t|pet}} ("cat" or "dog").
+
| Current player does '''not''' already have a pet, and their preference matches {{t|pet}} ("cat" or "dog").
 
|-
 
|-
| <tt>i {{t|item ID}}</tt>
+
| <samp>i {{t|item ID}}</samp>
 
| Current player has specified item in their inventory.
 
| Current player has specified item in their inventory.
 
|-
 
|-
| <tt>j {{t|number}}</tt>
+
| <samp>j {{t|number}}</samp>
 
| Current player has played ''more'' than {{t|number}} days.
 
| Current player has played ''more'' than {{t|number}} days.
 
|-
 
|-
| <tt>k {{t|event ID}}</tt>
+
| <samp>k {{t|event ID}}</samp>
| Current player has ''not'' seen that event (may contain multiple event IDs).
+
| Current player has '''not''' seen that event (may contain multiple event IDs).
 
|-
 
|-
| <tt>l {{t|letter ID}}</tt>
+
| <samp>l {{t|letter ID}}</samp>
 
| Current player has '''not''' received that mail letter or non-mail flag.
 
| Current player has '''not''' received that mail letter or non-mail flag.
 
|-
 
|-
| <tt>m {{t|number}}</tt>
+
| <samp>m {{t|number}}</samp>
 
| Current player has earned at least this much money (regardless of how much they currently have).
 
| Current player has earned at least this much money (regardless of how much they currently have).
 
|-
 
|-
| <tt>n {{t|letter ID}}</tt>
+
| <samp>n {{t|letter ID}}</samp>
 
| Current player has received that mail letter or non-mail flag.
 
| Current player has received that mail letter or non-mail flag.
 
|-
 
|-
| <tt>o {{t|name}}</tt>
+
| <samp>o {{t|name}}</samp>
| Current player is ''not'' married to that NPC.
+
| Current player is '''not''' married to that NPC.
 
|-
 
|-
| <tt>p {{t|name}}</tt>
+
| <samp>p {{t|name}}</samp>
 
| Specified NPC is in the current player's location.
 
| Specified NPC is in the current player's location.
 
|-
 
|-
| <tt>q {{t|dialogue ID}}</tt>
+
| <samp>q {{t|dialogue ID}}</samp>
 
| Current player has chosen the given answer in a dialogue. May contain multiple dialogue IDs, in which case they must all have been selected.
 
| Current player has chosen the given answer in a dialogue. May contain multiple dialogue IDs, in which case they must all have been selected.
 
|-
 
|-
| <tt>s {{t|item ID}} {{t|number}}</tt>
+
| <samp>s {{t|item ID}} {{t|number}}</samp>
| Current player has shipped at least {{t|number}} of the specified item. Can specify multiple item and number pairs, in which case all of them must be met.
+
| Current player has shipped at least {{t|number}} of the specified item. Can specify multiple item and number pairs, in which case all of them must be met. This only works for the items tracked by the game for shipping stats (shown in the [[Shipping#Collection|shipping collections menu]]).
 
|-
 
|-
| <tt>t {{t|min time}} {{t|max time}}</tt>
+
| <samp>t {{t|min time}} {{t|max time}}</samp>
| Current time is between between the specified times.
+
| Current time is between between the specified times. Can range from 600 to 2600.
 
|-
 
|-
| <tt>u {{t|day of month}}</tt>
+
| <samp>u {{t|day of month}}</samp>
 
| Current day of month is one of the specified values (may contain multiple days).
 
| Current day of month is one of the specified values (may contain multiple days).
 
|-
 
|-
| <tt>x {{t|event ID}} {{t|letter ID}}</tt>
+
| <samp>x {{t|letter ID}}</samp>
| For the current player: mark the specified ID as seen, add the specified letter to tomorrow's mail, then return false (so the event doesn't trigger).
+
| For the current player: mark this event as seen, add the specified letter to tomorrow's mail, then return false (so that nothing further happens). Use the format "x letterid true" to send the letter immediately.
 
|}
 
|}
  
Line 149: Line 165:
 
! precondition
 
! precondition
 
|-
 
|-
| <tt>C</tt>
+
| <samp>C</samp>
| Host player has not finished the [[community center]], or has not seen the grand reopening yet.
+
| Host player has finished the [[Community Center]] or [[Joja Warehouse]].
 
|-
 
|-
| <tt>H</tt>
+
| <samp>X</samp>
 +
| Host player has not finished the [[Community Center]] or [[Joja Warehouse]].
 +
|-
 +
| <samp>H</samp>
 
| Current player is the host player.
 
| Current player is the host player.
 
|-
 
|-
| <tt>Hl {{t|letter ID}}</tt>
+
| <samp>Hl {{t|letter ID}}</samp>
 
| Host player has '''not''' received that mail letter or non-mail flag.
 
| Host player has '''not''' received that mail letter or non-mail flag.
 
|-
 
|-
| <tt>Hn {{t|letter ID}}</tt>
+
| <samp>Hn {{t|letter ID}}</samp>
 
| Host player has received that mail letter or non-mail flag.
 
| Host player has received that mail letter or non-mail flag.
 
|-
 
|-
| <tt>*l {{t|letter ID}}</tt>
+
| <samp>*l {{t|letter ID}}</samp>
 
| Host player ''and'' current player have '''not''' received that mail letter or non-mail flag.
 
| Host player ''and'' current player have '''not''' received that mail letter or non-mail flag.
 
|-
 
|-
| <tt>*n {{t|letter ID}}</tt>
+
| <samp>*n {{t|letter ID}}</samp>
 
| Host player ''and'' current player have received that mail letter or non-mail flag.
 
| Host player ''and'' current player have received that mail letter or non-mail flag.
 
|}
 
|}
Line 170: Line 189:
 
==Event scripts==
 
==Event scripts==
 
===Basic format===
 
===Basic format===
Each event has a value which is the event script. This specifies what happens in the event — everything from lighting and music to NPC movement and dialogue. The script consists of multiple commands separated by <tt>/</tt> characters.
+
Each event has a value which is the event script. This specifies what happens in the event — everything from lighting and music to NPC movement and dialogue. The script consists of multiple commands separated by <samp>/</samp> characters.
  
 
Every script must start with three commands in this exact order:
 
Every script must start with three commands in this exact order:
Line 181: Line 200:
 
|-
 
|-
 
| 0
 
| 0
| <tt>{{t|music ID}}</tt>
+
| <samp>{{t|music ID}}</samp>
| The background music to play. Some example values are <tt>jaunty</tt>, <tt>ocean</tt>, and <tt>rain</tt>.
+
| The background music or ambient background track to play. Can be changed later using <samp>playMusic <newmusic></samp>, or stopped entirely using <samp>stopMusic</samp>. This can also be <samp>none</samp> (which stops any existing music and uses the default ambient background noise for the location), or <samp>continue</samp> (which keeps playing the current background song). Refer to [https://docs.google.com/spreadsheets/d/1CpDrw23peQiq-C7F2FjYOMePaYe0Rc9BwQsj3h6sjyo/edit#gid=239695361 the great ID spreadsheet] for music choices.
 
|-
 
|-
 
| 1
 
| 1
| <tt>{{t|x}} {{t|y}}</tt>
+
| <samp>{{t|x}} {{t|y}}</samp>
 
| The tile coordinates the camera should center on at the start of the event.
 
| The tile coordinates the camera should center on at the start of the event.
 
|-
 
|-
 
| 2
 
| 2
| <tt>{{t|npc ID}} {{t|x}} {{t|y}} {{t|direction}}</tt>
+
| <samp>[{{t|character ID}} {{t|x}} {{t|y}} {{t|direction}}]+</samp>
| Initialises an NPC's starting tile position and [[#Directions|direction]]. The NPC ID can be <tt>farmer</tt> or an NPC name like <tt>Abigail</tt>.
+
| Initialises one or more characters' starting tile positions and [[#Directions|directions]]. The character ID can be <samp>farmer</samp> or an NPC name like <samp>Abigail</samp>.
 
|}
 
|}
  
Line 200: Line 219:
 
! description
 
! description
 
|-
 
|-
| <tt>addBigProp {{t|x}} {{t|y}} {{t|object ID}}</tt>
+
| <samp>addBigProp {{t|x}} {{t|y}} {{t|object ID}}</samp>
| Adds an object at the specified tile from the <tt>TileSheets\Craftables.png</tt> sprite sheet.
+
| Adds an object at the specified tile from the <samp>TileSheets\Craftables.png</samp> sprite sheet.
 +
|-
 +
| <samp>addConversationTopic {{t|ID}} {{o|length}}</samp>
 +
| Starts a [[Modding:Dialogue#Conversation topics|conversation topic]] with the given ID and day length (or 4 days if no length given).
 
|-
 
|-
| <tt>addCookingRecipe {{t|recipe}}</tt>
+
| <samp>addCookingRecipe {{t|recipe}}</samp>
 
| Adds the specified cooking recipe to the player.
 
| Adds the specified cooking recipe to the player.
 
|-
 
|-
| <tt>addCraftingRecipe {{t|recipe}}</tt>
+
| <samp>addCraftingRecipe {{t|recipe}}</samp>
 
| Adds the specified crafting recipe to the player.
 
| Adds the specified crafting recipe to the player.
 
|-
 
|-
| <tt>addFloorProp {{t|prop index}} {{t|x}} {{t|y}} {{o|solid width}} {{o|solid height}} {{o|display height}}</tt>
+
| <samp>addFloorProp {{t|prop index}} {{t|x}} {{t|y}} {{o|solid width}} {{o|solid height}} {{o|display height}}</samp>
 
| Add a non-solid prop from the current festival texture. Default solid width/height is 1. Default display height is solid height.
 
| Add a non-solid prop from the current festival texture. Default solid width/height is 1. Default display height is solid height.
 
|-
 
|-
| <tt>addLantern {{t|row in texture}} {{t|x}} {{t|y}} {{t|light radius}}</tt>
+
| <samp>addLantern {{t|row in texture}} {{t|x}} {{t|y}} {{t|light radius}}</samp>
| Adds a glowing temporary sprite at the specified tile from the <tt>Maps\springobjects.png</tt> sprite sheet. A light radius of <tt>0</tt> just places the sprite.
+
| Adds a glowing temporary sprite at the specified tile from the <samp>Maps\springobjects.png</samp> sprite sheet. A light radius of <samp>0</samp> just places the sprite.
 
|-
 
|-
| <tt>addMailReceived {{t|letter ID}}</tt>
+
| <samp>addMailReceived {{t|letter ID}}</samp>
 
| Set a letter as received.
 
| Set a letter as received.
 
|-
 
|-
| <tt>addObject {{t|x}} {{t|y}} {{t|row in texture}} {{o|layer}} </tt>
+
| <samp>addObject {{t|x}} {{t|y}} {{t|sprite index}} {{o|layer}} </samp>
| Adds a temporary sprite at the specified tile from the <tt>Maps\springobjects.png</tt> sprite sheet.
+
| Adds a temporary sprite at the specified tile from the <samp>Maps\springobjects.png</samp> sprite sheet.
 
|-
 
|-
| <tt>addProp {{t|prop index}} {{t|x}} {{t|y}} {{o|solid width}} {{o|solid height}} {{o|display height}}</tt>
+
| <samp>addProp {{t|prop index}} {{t|x}} {{t|y}} {{o|solid width}} {{o|solid height}} {{o|display height}}</samp>
 
| Add a solid prop from the current festival texture. Default solid width/height is 1. Default display height is solid height.
 
| Add a solid prop from the current festival texture. Default solid width/height is 1. Default display height is solid height.
 
|-
 
|-
| <tt>addQuest {{t|quest ID}}</tt>
+
| <samp>addQuest {{t|quest ID}}</samp>
 
| Add the specified quest to the quest log.
 
| Add the specified quest to the quest log.
 
|-
 
|-
| <tt>addTemporaryActor {{t|character}} {{t|sprite width}} {{t|sprite height}} {{t|tile x}} {{t|tile y}} {{t|facing}} {{o|breather}} {{o|Character|Animal|Monster}} {{o|animal name}}</tt>
+
| <samp>addTemporaryActor {{t|character}} {{t|sprite width}} {{t|sprite height}} {{t|tile x}} {{t|tile y}} {{t|facing}} {{o|breather}} {{o|Character|Animal|Monster}} {{o|animal name}}</samp>
 
| Add a temporary actor. 'breather' is boolean. The category determines where the texture will be loaded from, default is Character. Animal name only applies to animal.
 
| Add a temporary actor. 'breather' is boolean. The category determines where the texture will be loaded from, default is Character. Animal name only applies to animal.
 
|-
 
|-
| <tt>addToTable {{t|x}} {{t|y}} {{t|object ID}}</tt>
+
| <samp>addToTable {{t|x}} {{t|y}} {{t|object ID}}</samp>
| Places on object on the furniture at a position. If the location is FarmHouse, then it will always be placed on the initial table.
+
| Places on object on the furniture at a position. UNLESS the location is FarmHouse, then it will always try to place an item onto the first piece of furniture, regardless if it's a table or not (and probably throw an error if there's no furniture.) It'll also actually replace the item on that piece of furniture if there was one previously. Not recommended for use in the farmhouse. May not be used by vanilla at all.
 
|-
 
|-
| <tt>addTool {{t|Sword|Wand}}</tt>
+
| <samp>addTool {{t|Sword|Wand}}</samp>
| Adds either a Battered Sword or Return Scepter (teleports you to your farm, unobtainable in vanilla) to the player's inventory.
+
| Adds either a Battered Sword or Return Scepter to the player's inventory. The ''Battered Sword'' is unobtainable in vanilla and is incomplete and not implemented.
 
|-
 
|-
| <tt>advancedMove {{t|npc}} {{t|loop}} {{t|x y}}...</tt>
+
| <samp>advancedMove {{t|actor}} {{t|loop}} {{t|x y}}... OR {{t|direction duration}}</samp>
| Set multiple movements for an NPC.  You can set True to have NPC walk the path continuously. Example: /advancedMove Robin false 0 3 2 0 0 2 -2 0 0 -2 2 0/
+
| Set multiple movements for an actor.  You can set True to have the actor walk the path continuously. Example: <code>/advancedMove Robin false 0 3 2 0 0 2 -2 0 0 -2 2 0/</code>
 +
 
 +
To make the actor move along the x axis (left/right), use the number of tiles to move and 0. For example, <code>-3 0</code> will cause the actor to walk three tiles to the left while facing left. <code>2 0</code> will cause the actor to walk two tiles to the right while facing right.
 +
 
 +
To make the actor move along the y axis (up/down), use 0 and the number of tiles to move. For example, <code>0 1</code> will cause the actor to walk one tile down while facing down. <code>0 -5</code> will cause the actor to walk five tiles up while facing up.
 +
 
 +
To make an actor pause, use the direction to face and the number of milliseconds to pause. 1 is right, 2 is down, 3 is left, and 4 is up. The reason 4 is up and not 0 is so that advancedMove can tell the difference between a pause command and a move up/down command.
 +
 
 +
The code can tell the difference between a move command and a pause command because a move command must have 0 for either x or y. A pause command must have non-zero numbers for both numbers in the pair.
 +
 
 +
Example: <code>/advancedMove Clint true 4 0 2 5000 -4 0 1 3000/</code> Clint will have continuous movement moving 4 tiles to the right, facing down upon arriving, waiting for 5 seconds, then moving 4 tiles to the left, facing right upon arriving, then waiting for 3 seconds, then loops because the loop was set to true(see above).
 +
 
 +
Example: <code>/advancedMove Pam true 5 0 0 3 3 5000 -6 0 0 -4/</code> Pam first moves 5 tiles to the right, then directly moves 3 tiles downward, faces the to the left upon arriving then waits 5 seconds before moving 6 tiles to the left then moves up 4 tiles directly.
 
|-
 
|-
| <tt>ambientLight {{t|r}} {{t|g}} {{t|b}}</tt>
+
| <samp>ambientLight {{t|r}} {{t|g}} {{t|b}}</samp>
| Modifies the ambient light level, with RGB values from 0 to 255. Note that it works by ''removing'' colors from the existing light ambience, so ''"ambientLight 1 80 80"'' would reduce green and blue and leave the light with a reddish hue.
+
| Modifies the ambient light level, with RGB values from 0 to 255.
 
|-
 
|-
| <tt>animalNaming</tt>
+
| <samp>animalNaming</samp>
 
| Show the animal naming menu if no other menu is open. Uses the current location as Coop. Appears to only work for 'hatched' animals.
 
| Show the animal naming menu if no other menu is open. Uses the current location as Coop. Appears to only work for 'hatched' animals.
 
|-
 
|-
| <tt>animate {{t|actor}} {{t|flip}} {{t|loop}} {{t|frame duration}} {{t|frames...}}</tt>
+
| <samp>animate {{t|actor}} {{t|flip}} {{t|loop}} {{t|frame duration}} {{t|frames...}}</samp>
| Animate a named actor, using the one or more {{t|frames}} from their spritesheet, for {{t|frame duration}} milliseconds per frame. {{t|flip}} indicates whether to flip the sprites along the Y axis; {{t|loop}} indicates whether to repeat the animation.
+
| Animate a named actor, using one or more {{t|frames}} from their sprite sheet, for {{t|frame duration}} milliseconds per frame. {{t|frames}} are indexed numerically, based on 16x32 peices of the image. This index increases as you go from left to right, starting from 0. {{t|flip}} indicates whether to flip the sprites along the Y axis; {{t|loop}} indicates whether to repeat the animation until <samp>stopAnimation</samp> is used. If you're animating the farmer, it may be helpful to reference [[Modding:Farmer_sprite#Sprite_Index_Breakdown]]
 
|-
 
|-
| <tt>attachCharacterToTempSprite {{t|actor}}</tt>
+
| <samp>attachCharacterToTempSprite {{t|actor}}</samp>
 
| Attach an actor to the most recent temporary sprite.
 
| Attach an actor to the most recent temporary sprite.
 
|-
 
|-
| <tt>awardFestivalPrize</tt>
+
| <samp>awardFestivalPrize</samp>
 
| Awards the festival prize to the winner for the easter egg hunt and ice fishing contest.
 
| Awards the festival prize to the winner for the easter egg hunt and ice fishing contest.
 
|-
 
|-
| <tt>awardFestivalPrize {{t|item type}}</tt>
+
| <samp>awardFestivalPrize {{t|item type}}</samp>
| Awards the specified item to the player. Possible item types are "pan", "sculpture", "rod", "sword", "hero", "joja", and "slimeegg".
+
| Awards the specified item to the player. Possible item types are "pan", "sculpture", "rod", "sword", "hero", "joja", "slimeegg", "emilyClothes", and "jukebox".
 +
|-
 +
| <samp>beginSimultaneousCommand</samp>
 +
| This command states that the next event commands will all be done at the same time.  Must also have endSimultaneousCommand after the commands needed to execute at the same time.
 
|-
 
|-
| <tt>catQuestion</tt>
+
| <samp>broadcastEvent [local]</samp>
 +
| Makes the event a "broadcast event", forcing others players connected to also see it. Any players connected will be forced to warp to this event. This is used in some vanilla events like when Lewis shows the farmer the abandoned Community Center.
 +
 
 +
If the "local" option is given (not a boolean), then client players will see the event as if the "farmer" actor was their own farmer instead of the Host farmer. The "local" option isn't used anywhere in the vanilla game.
 +
|-
 +
| <samp>catQuestion</samp>
 
| Trigger question about adopting your pet.
 
| Trigger question about adopting your pet.
 
|-
 
|-
| <tt>cave</tt>
+
| <samp>cave</samp>
 
| Trigger the question for the farm cave type. This will work again later, however changing from bats to mushrooms will not remove the mushroom spawning objects.
 
| Trigger the question for the farm cave type. This will work again later, however changing from bats to mushrooms will not remove the mushroom spawning objects.
 
|-
 
|-
| <tt>changeLocation {{t|location}}</tt>
+
| <samp>changeLocation {{t|location}}</samp>
 
| Change to another location and run the remaining event script there.
 
| Change to another location and run the remaining event script there.
 
|-
 
|-
| <tt>changeMapTile {{t|layer}} {{t|x}} {{t|y}} {{t|tile index}}</tt>
+
| <samp>changeMapTile {{t|layer}} {{t|x}} {{t|y}} {{t|tile index}}</samp>
 
| Change the specified tile to a particular value.
 
| Change the specified tile to a particular value.
 
|-
 
|-
| <tt>changePortrait {{t|npc}} {{t|portrait}}</tt>
+
| <samp>changeName {{t|actor}} {{t|displayName}}
| Change the NPC's portrait to be from "Portraits/{{t|actor}}_<sprite&gt".
+
| Sets the display name of the actor to displayName, with underscores replaced by spaces.
 
|-
 
|-
| <tt>changeSprite {{t|actor}} {{t|sprite}}</tt>
+
| <samp>changePortrait {{t|npc}} {{t|portrait}}</samp>
 +
| Change the NPC's portrait to be from "Portraits/{{t|actor}}_{{t|portrait}}".
 +
|-
 +
| <samp>changeSprite {{t|actor}} {{t|sprite}}</samp>
 
| Change the actor's sprite to be from "Characters/{{t|actor}}_{{t|sprite}}".
 
| Change the actor's sprite to be from "Characters/{{t|actor}}_{{t|sprite}}".
 
|-
 
|-
| <tt>changeToTemporaryMap {{t|map}} {{o|pan}}</tt>
+
| <samp>changeToTemporaryMap {{t|map}} {{o|pan}}</samp>
| Change the location to a temporary one loaded from the map file specified by {{t|map}}. The {{o|pan}} argument indicates the tile coordinates to pan to (defaults to <tt>0, 0</tt>).
+
| Change the location to a temporary one loaded from the map file specified by {{t|map}}. If the {{o|pan}} argument is omitted, also pan to tile coordinates <samp>0, 0</samp> on the new map. If any value is given for {{o|pan}}, no panning occurs.
 
|-
 
|-
| <tt>changeYSourceRectOffset {{t|npc}} {{t|offset}}</tt>
+
| <samp>changeYSourceRectOffset {{t|npc}} {{t|offset}}</samp>
| Change the NPC's vertical texture offset (?).
+
| Changes the NPC's vertical texture offset. Example: <samp>changeYSourceRectOffset Abigail 96</samp> will offset her sprite sheet, showing her looking left instead of down. This persists for the rest of the event. This is only used in Emily's ''Clothing Therapy'' event to display the various outfits properly.
 
|-
 
|-
| <tt>characterSelect</tt>
+
| <samp>characterSelect</samp>
 
| Seemingly unused. Sets Game1.gameMode to 5 and Game1.menuChoice = 0.
 
| Seemingly unused. Sets Game1.gameMode to 5 and Game1.menuChoice = 0.
 
|-
 
|-
| <tt>cutscene {{t|cutscene}}</tt>
+
| <samp>cutscene {{t|cutscene}}</samp>
| Activate a cutscene. See cutscene list. (TODO: Pull list from my event editor)
+
| Activate a cutscene. See [[Modding:Event_data#Cutscenes|cutscene list]].
 
|-
 
|-
| <tt>doAction {{t|x}} {{t|y}}</tt>
+
| <samp>doAction {{t|x}} {{t|y}}</samp>
| TODO: Explain GameLocation.checkAction(new Location(x,y), viewport, player)
+
| Acts as if the player had clicked the specified x/y coordinate and triggers any relevant action. It is commonly used to open doors from inside events, but it can be used for other purposes. If you use it on an NPC you will talk to them, and if the player is holding an item they will give that item as a gift. <samp>doAction</samp> activates objects in the main game world (their actual location outside of the event), so activating NPCs like this is very tricky, and their reaction varies depending on what the player is holding.
 
|-
 
|-
| <tt>elliotbooktalk</tt>
+
| <samp>dump {{t|group}}</samp>
 +
| Starts the special "cold shoulder" and "second chance" dialogue events for the given group (women if group is <samp>girls</samp> and men if it is anything else.) The cold shoulder event has an id of <samp>dumped_Girls</samp> or <samp>dumped_Guys</samp> and lasts 7 days; the second chance event has an id of <samp>secondChance_Girls</samp> or <samp>secondChance_Guys</samp> and lasts 14 days. During open beta testing of version 1.3 there was a second parameter which determined the amount of hearts lost, but support for that parameter was removed before release.
 +
|-
 +
| <samp>endSimultaneousCommand</samp>
 +
| Sets the end of all commands that are to be done simultaneously.  Format: <samp>beginSimultaneousCommand/<Event Commands>.../endSimultaneousCommand</samp>
 +
|-
 +
| <samp>elliotbooktalk</samp>
 
| Elliot book talk.
 
| Elliot book talk.
 
|-
 
|-
| <tt>emote {{t|actor}} {{t|emote ID}}</tt>
+
| <samp>emote {{t|actor}} {{t|emote ID}}</samp>
| Make the given NPC name perform an emote, which is a little icon shown above the NPC's head. Emotes are stored in <tt>Content\TileSheets\emotes.xnb</tt> (see [https://www.reddit.com/r/StardewValley/comments/5s5m9g/help_annoyed_squiggle/ddd33qg/ list of emotes]).
+
| Make the given NPC name perform an emote, which is a little icon shown above the NPC's head. Emotes are stored in <samp>Content\TileSheets\emotes.xnb</samp>; see [[#Emotes|list of emotes]].
 +
|-
 +
| <samp>end</samp>
 +
| Ends the current event by fading out, then resumes the game world and places the player on the square where they entered the zone. All <samp>end</samp> parameters do this by default ''unless otherwise stated''.
 +
|-
 +
| <samp>end bed</samp>
 +
| Same as <samp>end</samp>, but warps the player to the x/y coordinate of their most recent bed. This does not warp them to the farmhouse, only to the x/y coordinate of the bed regardless of map.
 +
|-
 +
| <samp>end beginGame</samp>
 +
| ''Used only during the introduction sequence in the bus stop event.'' It sets the game mode to <samp>playingGameMode</samp>, warps the player to the farmhouse (9, 9), ends the current event, and starts a new day.
 +
|-
 +
| <samp>end credits</samp>
 +
| ''Not used in any normal events.'' Clears debris weather, changes the music to wedding music, sets game mode to <samp>creditsMode</samp> and ends the current event.
 +
|-
 +
| <samp>end dialogue {{t|NPC}} {{t|"Text for next chat"}}</samp>
 +
| Same as <samp>end</samp>, and additionally clears the existing NPC dialogue for the day and replaces it with the line(s) specified at the end of the command. Example usage: ''end dialogue Abigail "It was fun talking to you today.$h"''
 +
|-
 +
| <samp>end dialogueWarpOut {{t|NPC}} {{t|"Text for next chat"}}</samp>
 +
| See <samp>end dialogue</samp> and <samp>end warpOut</samp>.
 +
|-
 +
| <samp>end invisible {{t|NPC}}</samp>
 +
| Same as <samp>end</samp>, and additionally turns the specified NPC invisible (cannot be interacted with until the next day).
 +
|-
 +
| <samp>end invisibleWarpOut {{t|NPC}}</samp>
 +
| See <samp>end invisible</samp> and <samp>end warpOut</samp>.
 
|-
 
|-
| <tt>end</tt>
+
| <samp>end newDay</samp>
| Ends the current event by fading out, then resumes the game world and places the player on the square where they entered the zone.
+
| Ends both the event and the day (warping player to their bed, saving the game, selling everything in the shipping box, etc).
 
|-
 
|-
| <tt>end position {{t|x}} {{t|y}}</tt>
+
| <samp>end position {{t|x}} {{t|y}}</samp>
| Ends the current event by fading out, then resumes the game world and places the player on the coordinates specified in ''x y''.
+
| Same as <samp>end</samp>, and additionally warps the player to the map coordinates specified in ''x y''.
 
|-
 
|-
| <tt>end newDay</tt>
+
| <samp>end warpOut</samp>
| Ends the current event by fading out, then ends the day (saving the game, selling everything in the sell box, etc).
+
| Same as <samp>end</samp>, and additionally finds the first warp out of the current location (second warp if male and in the bathhouse), and warps the player to its endpoint.
 
|-
 
|-
| <tt>end dialogue {{t|NPC}} {{t|\"Text for next chat\"}}</tt>
+
| <samp>end wedding</samp>
| Ends the current event by fading out, then resumes the game world and places the player on the square where they entered the zone. Additionally, the NPC will say the line(s) specified at the end of the command. Example usage: ''end dialogue Abigail \"It was fun talking to you today.$h\"''
+
| ''Used only in the hardcoded wedding event.'' Changes the character's clothes back to normal, sets Lewis' post-event chat to ''"That was a beautiful ceremony. Congratulations!$h"'', and warps the player to their farm.
 
|-
 
|-
| <tt>extendSourceRect {{t|actor}} reset
+
| <samp>extendSourceRect {{t|actor}} reset</samp>
 
| Resets the actors sprite.
 
| Resets the actors sprite.
 
|-
 
|-
| <tt>extendSourceRect {{t|actor}} {{t|horizontal}} {{t|vertical}} {{o|ignoreUpdates}}</tt>
+
| <samp>extendSourceRect {{t|actor}} {{t|horizontal}} {{t|vertical}} {{o|ignoreUpdates}}</samp>
 
| TODO: Explain Character.extendSourceRect
 
| TODO: Explain Character.extendSourceRect
 
|-
 
|-
| <tt>eyes {{t|eyes}} {{t|blink}}</tt>
+
| <samp>eyes {{t|eyes}} {{t|blink}}</samp>
| Change the player's eyes.
+
| Change the player's eyes. Eyes is represented by and Integer from 0 - 5 (open, closed, right, left, half closed, wide open).  Blink is a timer that is represented with a negative number. -1000 is the default timer.  
 
|-
 
|-
| <tt>faceDirection {{t|actor}} {{t|direction}} {{o|continue}}</tt>
+
| <samp>faceDirection {{t|actor}} {{t|direction}} {{o|continue}}</samp>
 
| Make a named NPC face a [[#Directions|direction]]. If no parameter is supplied for [continue], the game will pause.
 
| Make a named NPC face a [[#Directions|direction]]. If no parameter is supplied for [continue], the game will pause.
 
|-
 
|-
| <tt>fade {{o|fadeOut}}</tt>
+
| <samp>fade {{o|unfade}}</samp>
| If 'fadeOut' is not specified, it will fade in. (?)
+
| Fades out to black if no parameter is supplied. If the parameter is <samp>unfade</samp> (not <samp>true</samp>), fades in from black.
 
|-
 
|-
| <tt>farmerAnimation {{t|anim}}</tt>
+
| <samp>farmerAnimation {{t|anim}}</samp>
| Sets the farmer's current animation.
+
| Briefly sets the farmer's sprite to {{t|anim}} for a variable (depending on sprite) interval. Only used once in vanilla events. Using <samp>showFrame farmer <sprite></samp> twice (to set a new frame and back) is more powerful as it lets you control the interval using <samp>pause n</samp>.
 
|-
 
|-
| <tt>farmerEat {{t|object ID}}</tt>
+
| <samp>farmerEat {{t|object ID}}</samp>
| Make the player eat an object
+
| Make the player eat an object. (The farmer actually does eat the object, so buffs will apply, healing will occur, etc.)
 
|-
 
|-
| <tt>fork {{t|event ID}} {{o|req}}</tt>
+
| <samp>fork {{o|req}} {{t|event ID}}</samp>
| End the current command script and starts a different script with the given ID, but only if the {{o|req}} condition is met. The {{o|req}} condition can be a mail ID or dialogue answer ID; if not specified, it checks if the <tt>specialEventVariable1</tt> variable was set (e.g. by a <tt>question</tt> command). The new script should have the same format as a normal event script, but without the mandatory three start fields.
+
| End the current command script and starts a different script with the given ID, but only if the {{o|req}} condition is met. (Example: <samp>/fork choseWizard finalBossWizard</samp> in the ''"Necromancer"'' script of Sebastian's 6-heart event.) The {{o|req}} condition can be a mail ID or dialogue answer ID; if not specified, it checks if the <samp>specialEventVariable1</samp> variable was set (''e.g.,'' by a <samp>question</samp> event command or <samp>%fork</samp> dialogue command). The new script should have the same format as a normal event script, but without the mandatory three start fields.
 
|-
 
|-
| <tt>friendship {{t|npc}} {{t|amount}}</tt>
+
| <samp>friendship {{t|npc}} {{t|amount}}</samp>
 
| Add the given number of friendship points with the named NPC. (There are 250 points per heart.)
 
| Add the given number of friendship points with the named NPC. (There are 250 points per heart.)
 
|-
 
|-
| <tt>globalFade {{o|speed}}</tt>
+
| <samp>globalFade {{o|speed}} {{o|continue}}</samp>
| Fade to black at a particular speed (default 0.007). If no speed is specified, the event will continue immediately; otherwise, it will continue after the fade is finished. The fade effect disappears when this command is done; to avoid that, use the <tt>viewport</tt> command to move the camera off-screen.
+
| Fade to black at a particular speed (default 0.007). If <samp>continue</samp> is specified, the event continues as the fade occurs, else the event pauses until the fade is finished. The fade effect disappears when this command is done; to avoid that, use the <samp>viewport</samp> command to move the camera off-screen.
|-
 
| <tt>globalFadeToClear {{o|speed}}</tt>
 
| Fade to clear (unfade?) at a particular speed (default 0.007). If no speed is specified, the event will continue immediately; otherwise, it will continue after the fade is finished.
 
 
|-
 
|-
| <tt>glow {{t|r}} {{t|g}} {{t|b}} {{t|hold}}</tt>
+
| <samp>globalFadeToClear {{o|speed}} {{o|continue}}</samp>
| Make the screen glow once, fading into and out of the {{t|r}} {{t|g}} {{t|b}} values over the course of a second. If {{t|hold}} is <tt>true</tt> it will fade to and hold that color until <tt>stopGlowing</tt> is used.
+
| Fade to clear (unfade?) at a particular speed (default 0.007). If <samp>continue</samp> is specified, the event continues as the fade occurs, else the event pauses until the fade is finished.
 
|-
 
|-
| <tt>grabObject {{t|object ID}}</tt>
+
| <samp>glow {{t|r}} {{t|g}} {{t|b}} {{t|hold}}</samp>
| Causes the player to hold an object.
+
| Make the screen glow once, fading into and out of the {{t|r}} {{t|g}} {{t|b}} values over the course of a second. If {{t|hold}} is <samp>true</samp> it will fade to and hold that color until <samp>stopGlowing</samp> is used.
 
|-
 
|-
| <tt>grandpaCandles</tt>
+
| <samp>grandpaCandles</samp>
 
| Do grandpa candles
 
| Do grandpa candles
 
|-
 
|-
| <tt>grandpaEvaluation</tt>
+
| <samp>grandpaEvaluation</samp>
 
| Do grandpa evaluation
 
| Do grandpa evaluation
 
|-
 
|-
| <tt>grandpaEvaluation2</tt>
+
| <samp>grandpaEvaluation2</samp>
 
| Do grandpa evaluation (manually resummoned)
 
| Do grandpa evaluation (manually resummoned)
 
|-
 
|-
| <tt>halt</tt>
+
| <samp>halt</samp>
 
| Make everyone stop.
 
| Make everyone stop.
 
|-
 
|-
| <tt>hospitaldeath</tt>
+
| <samp>hideShadow {{t|actor}} {{t|true/false}}</samp>
 +
| Hide the shadow of the named actor. False unhides it.
 +
|-
 +
| <samp>hospitaldeath</samp>
 
|  
 
|  
 
|-
 
|-
| <tt>itemAboveHead {{o|type}}</tt>
+
| <samp>ignoreCollisions {{t|character ID}}</samp>
| Show an item above the player's head. The {{o|type}} can be "pan", "hero", "sculpture", "joja", "slimeEgg", "rod", "sword", or "ore". If no item is specified, then they will 'hold' nothing?
+
| Make a character ignore collisions when moving for the remainder of the event. For example, they'll walk through walls if needed to reach their destination. The character ID can be <samp>farmer</samp> or an NPC name like <samp>Abigail</samp>.
 +
|-
 +
| <samp>ignoreEventTileOffset</samp>
 +
| Tile positions in farm events are offset to match the farmhouse position. If an event shouldn't be based on the farmhouse position, add an ignoreEventTileOffset command to disable the offset for that event. This must be the 4th command (after the 3 initial setup ones) to take effect.
 +
|-
 +
| <samp>itemAboveHead {{o|type}}</samp>
 +
| Show an item above the player's head. The {{o|type}} can be "pan", "hero", "sculpture", "joja", "slimeEgg", "rod", "sword", or "ore". If no item is specified, then they will 'hold' nothing? Arbitrary items are not supported.
 
|-
 
|-
| <tt>jump {{t|actor}} {{o|intensity}}</tt>
+
| <samp>jump {{t|actor}} {{o|intensity}}</samp>
| Make a the named NPC jump. The default <tt>intensity</tt> is 8.
+
| Make a the named NPC jump. The default <samp>intensity</samp> is 8.
 
|-
 
|-
| <tt>loadActors {{t|layer}}</tt>
+
| <samp>loadActors {{t|layer}}</samp>
 
| Load the actors from a layer in the map file.
 
| Load the actors from a layer in the map file.
 
|-
 
|-
| <tt>mail {{t|letter ID}}</tt>
+
| <samp>makeInvisible {{t|x}} {{t|y}} {{o|x-dimension}} {{o|y-dimension}}</samp>
| Queue a letter to be received tomorrow (see <tt>Content\Data\mail.xnb</tt> for available mail).
+
| Temporarily hides selected objects or terrain features: the tile(s) will become passable for the duration of the event. Useful for clearing a walking area during events, especially in the FarmHouse. (Example: <samp>/makeInvisible 8 14</samp> hides any object or terrain feature at tile 8, 14 in the current map.) The optional {{o|x-dimension}} and {{o|y-dimension}} arguments allow you to specify a larger area to be cleared. (Example: <samp>/makeInvisible 68 36 13 7</samp> in Leah's 14-heart event clears a 13 × 7 tile rectangular area with the top-left corner at coordinate 68, 36.). Known bugs: some furniture may not re-appear immediately?
 
|-
 
|-
| <tt>message "{{t|text}}"</tt>
+
| <samp>mail {{t|letter ID}}</samp>
 +
| Queue a letter to be received tomorrow (see <samp>Content\Data\mail.xnb</samp> for available mail).
 +
|-
 +
| <samp>message "{{t|text}}"</samp>
 
| Show a dialogue box (no speaker). See [[#Dialogue format|dialogue format]] for the {{t|text}} format.
 
| Show a dialogue box (no speaker). See [[#Dialogue format|dialogue format]] for the {{t|text}} format.
 
|-
 
|-
| <tt>minedeath</tt>
+
| <samp>minedeath</samp>
 
| TODO.
 
| TODO.
 
|-
 
|-
| <tt>move {{t|actor}} {{t|x}} {{t|y}} {{t|facing}} {{t|continue}}</tt>
+
| <samp>money {{t|amount}}</samp>
| Make a named NPC move by the given tile offset from their current position (along one axis ''only''), and face the given [[#Directions|direction]] when they're done. To move along multiple axes, you must specify multiple <tt>move</tt> commands. By default the event pauses while a move command is occurring, but if {{t|continue}} is set to ''true'' the movement is asynchronous and will run simultaneously with other event commands.
+
| Adds/removes the specified amount of money.  
 
|-
 
|-
| <tt>pause {{t|duration}}</tt>
+
| <samp>move {{t|actor}} {{t|x}} {{t|y}} {{t|facing}} {{t|continue}}</samp>
 +
| Make a named NPC move by the given tile offset from their current position (along one axis ''only''), and face the given [[#Directions|direction]] when they're done. To move along multiple axes, you must specify multiple <samp>move</samp> commands. By default the event pauses while a move command is occurring, but if {{t|continue}} is set to ''true'' the movement is asynchronous and will run simultaneously with other event commands. You can also move multiple people at a time in a single event command with move - an example of <samp>/move Abigail 1 0 1 Sam 0 1 1 Sebastian 2 0 1/</samp> will have Abigail, Sam, and Sebastian all move at the same time in their respective directions.
 +
 
 +
|-
 +
| <samp>pause {{t|duration}}</samp>
 
| Pause the game for the given number of milliseconds.
 
| Pause the game for the given number of milliseconds.
 
|-
 
|-
| <tt>playMusic {{t|track}}</tt>
+
| <samp>playMusic {{t|track}}</samp>
 
| Play the specified music track ID. If the track is 'samBand', the track played will change depend on certain dialogue answers (76-79).
 
| Play the specified music track ID. If the track is 'samBand', the track played will change depend on certain dialogue answers (76-79).
 
|-
 
|-
| <tt>playSound {{t|sound}}</tt>
+
| <samp>playSound {{t|sound}}</samp>
 
| Play a given sound ID from the game's sound bank.
 
| Play a given sound ID from the game's sound bank.
 
|-
 
|-
| <tt>playerControl</tt>
+
| <samp>playerControl</samp>
 
| Give the player control back.
 
| Give the player control back.
 
|-
 
|-
| <tt>positionOffset {{t|actor}} {{t|x}} {{t|y}}</tt>
+
| <samp>positionOffset {{t|actor}} {{t|x}} {{t|y}}</samp>
 
| Offset the position of the named NPC by the given number of pixels. This happens instantly, with no walking animation.
 
| Offset the position of the named NPC by the given number of pixels. This happens instantly, with no walking animation.
 
|-
 
|-
| <tt>proceedPosition {{t|actor}}</tt>
+
| <samp>proceedPosition {{t|actor}}</samp>
 
| TODO: Explain
 
| TODO: Explain
 
|-
 
|-
| <tt>question null "{{t|question}}#{{t|answer1}}#{{t|answer2}}"</tt>
+
| <samp>question null "{{t|question}}#{{t|answer1}}#{{t|answer2}}"</samp>
 
| Show a dialogue box with some answers and an optional question. When the player chooses an answer, the event script continues with no other effect.
 
| Show a dialogue box with some answers and an optional question. When the player chooses an answer, the event script continues with no other effect.
 
|-
 
|-
| <tt>question fork{{t|answer index}} "{{t|question}}#{{t|answer 0}}#{{t|answer 1}}#..."</tt>
+
| <samp>question fork{{t|answer index}} "{{t|question}}#{{t|answer 0}}#{{t|answer 1}}#..."</samp>
| Show a dialogue with some answers and an optional question. When the player chooses the answer matching the <tt>fork{{t|answer index}}</tt> (like <tt>fork0</tt> for the first answer), the <tt>specialEventVariable1</tt> variable is set. Usually followed by a <tt>fork</tt> command.
+
| Show a dialogue with some answers and an optional question. When the player chooses the answer matching the <samp>fork{{t|answer index}}</samp> (like <samp>fork0</samp> for the first answer), the <samp>specialEventVariable1</samp> variable is set. Usually followed by a <samp>fork</samp> command. Example:
 +
<syntaxhighlight lang="json">.../question fork0 \"#answer0#answer1#answer3\"/fork eventidhere/..."</syntaxhighlight>
 
|-
 
|-
| <tt>removeItem {{t|object ID}}</tt>
+
| <samp>quickQuestion {{t|question}}#{{t|answer1}}#{{t|answer2}}#{{t|answer3}}(break){{t|answer1 script}}(break){{t|answer2 script}}(break){{t|answer3 script}}</samp>
 +
| Show a dialogue box with an optional question and some answers. The answer scripts are sequences of commands separated by <samp>\\</samp>. When the player chooses an answer, the relevant answer script is executed and then the event continues. Usually used when an NPC's response will depend on the answer chosen but nothing else in the event has to depend on it.
 +
*Note: If quickQuestion is used immediately at the start of an event block (Example: "ExampleEvent": "quickQuestion [rest of the event]"), it will cause a dialogue loop. Adding another command in front of quickQuestion resolves this issue (Example: "ExampleEvent": "pause 1/quickQuestion [rest of the event]").
 +
|-
 +
| <samp>removeItem {{t|object ID}}</samp>
 
| Remove the first of an object from a player's inventory.
 
| Remove the first of an object from a player's inventory.
 
|-
 
|-
| <tt>removeObject {{t|x}} {{t|y}}</tt>
+
| <samp>removeObject {{t|x}} {{t|y}}</samp>
 
| Remove the prop at a position.
 
| Remove the prop at a position.
 
|-
 
|-
| <tt>removeQuest {{t|quest ID}}</tt>
+
| <samp>removeQuest {{t|quest ID}}</samp>
 
| Remove the specified quest from the quest log.
 
| Remove the specified quest from the quest log.
 
|-
 
|-
| <tt>removeSprite {{t|x}} {{t|y}}</tt>
+
| <samp>removeSprite {{t|x}} {{t|y}}</samp>
 
| Remove the temporary sprite at a position.
 
| Remove the temporary sprite at a position.
 
|-
 
|-
| <tt>removeTemporarySprites</tt>
+
| <samp>removeTemporarySprites</samp>
 
| Remove all temporary sprites.
 
| Remove all temporary sprites.
 
|-
 
|-
| <tt>removeTile {{t|x}} {{t|y}} {{t|layer}}</tt>
+
| <samp>removeTile {{t|x}} {{t|y}} {{t|layer}}</samp>
 
| Remove a tile from the specified layer.
 
| Remove a tile from the specified layer.
 
|-
 
|-
| <tt>resetVariable</tt>
+
| <samp>resetVariable</samp>
| Set the first event variable to false.
+
| Set the <samp>specialEventVariable1</samp> to false.
 
|-
 
|-
| <tt>rustyKey</tt>
+
| <samp>rustyKey</samp>
 
| Gives the player the rusty key. (Sewer key)
 
| Gives the player the rusty key. (Sewer key)
 
|-
 
|-
| <tt>screenFlash {{t|alpha}}</tt>
+
| <samp>screenFlash {{t|alpha}}</samp>
| Game1.flashAlpha = alpha;
+
| Flashes the screen white for an instant. An alpha value from <samp>0</samp> to <samp>1</samp> adjusts the brightness, and values from <samp>1</samp> and out flashes pure white for <samp>x</samp> seconds.
 
|-
 
|-
| <tt>setRunning</tt>
+
| <samp>setRunning</samp>
 
| Set the player as running.
 
| Set the player as running.
 
|-
 
|-
| <tt>shake {{t|actor}} {{t|duration}}</tt>
+
| <samp>shake {{t|actor}} {{t|duration}}</samp>
 
| Shake the named NPC for the given number of milliseconds.
 
| Shake the named NPC for the given number of milliseconds.
 
|-
 
|-
| <tt>showFrame farmer flip</tt>
+
| <samp>showFrame farmer {{t|frame}} {{t|flip}}</samp>
| Flip the farmer's current sprite along the Y axis. TODO: Behavior with farmer looks strange?
+
| Flip the farmer's current sprite along the Y axis. Farmer looks strange if not facing the correct direction prior to 1.6. Flip is a true/false value.
 
|-
 
|-
| <tt>showFrame {{t|actor}} {{t|frame ID}}</tt>
+
| <samp>showFrame {{t|actor}} {{t|frame ID}}</samp>
| Set the named NPC's current frame in their <tt>Content\Characters\*.xnb</tt> spritesheet. Note that setting the farmer's sprite only changes ''parts'' of the sprite (some times arms, some times arms and legs and torso but not the head, etc). To rotate the whole sprite, use ''faceDirection farmer {{t|0/1/2/3}}'' first before modifying the sprite with ''showFrame''.
+
| Set the named NPC's current frame in their <samp>Content\Characters\*.xnb</samp> spritesheet. Note that setting the farmer's sprite only changes ''parts'' of the sprite (some times arms, some times arms and legs and torso but not the head, etc). To rotate the whole sprite, use ''faceDirection farmer {{t|0/1/2/3}}'' first before modifying the sprite with ''showFrame''. Frame ID starts from 0. If farmer is the one whose frame is being set, "farmer" can be eliminated, ''i.e.,'' both <samp>showFrame farmer {{t|frame ID}}</samp> and <samp>showFrame {{t|frame ID}}</samp> would work.
 
|-
 
|-
| <tt>showRivalFrame {{t|frame}}</tt>
+
| <samp>showRivalFrame {{t|frame}}</samp>
 
| Set the 'rival' actor's sprite to a specific frame.
 
| Set the 'rival' actor's sprite to a specific frame.
 
|-
 
|-
| <tt>skippable</tt>
+
| <samp>skippable</samp>
 
| Allow skipping this event.
 
| Allow skipping this event.
 
|-
 
|-
| <tt>speak {{t|character}} "{{t|text}}"</tt>
+
| <samp>speak {{t|character}} "{{t|text}}"</samp>
 
| Show dialogue text from a named NPC; see [[#Dialogue format|dialogue format]].
 
| Show dialogue text from a named NPC; see [[#Dialogue format|dialogue format]].
 
|-
 
|-
| <tt>specificTemporarySprite {{t|sprite}} {{o|other params}}</tt>
+
| <samp>specificTemporarySprite {{t|sprite}} {{o|other params}}</samp>
| Shows the given temporary sprite. Parameters change depending on the sprite.
+
| Shows the given temporary sprite. Parameters change depending on the sprite. '''These are quite hardcoded and probably not easily reusable, other than the little heart.'''
 
|-
 
|-
| <tt>speed farmer {{t|modifier}}</tt>
+
| <samp>speed farmer {{t|modifier}}</samp>
| Add a speed modifier to the farmer. TODO: for the next action only?
+
| Add a speed modifier to the farmer. Is persistent and you will have to use the command again to return to normal speed.
 
|-
 
|-
| <tt>speed {{t|actor}} {{t|speed}}</tt>
+
| <samp>speed {{t|actor}} {{t|speed}}</samp>
| Sets the named NPC's speed (default speed is 3). Not applicable to the farmer. TODO: for the next action only?
+
| Sets the named NPC's speed (default speed is 3). Not applicable to the farmer. Applies only through the end of the next movement or animation on that NPC.
 
|-
 
|-
| <tt>splitSpeak {{t|actor}} "{{t|text}}"</tt>
+
| <samp>splitSpeak {{t|actor}} "{{t|text}}"</samp>
 
| Dialogue, but chosen based on previous answer. ('~' is the separator used.)
 
| Dialogue, but chosen based on previous answer. ('~' is the separator used.)
 
|-
 
|-
| <tt>startJittering</tt>
+
| <samp>startJittering</samp>
 
| Make the player start jittering.
 
| Make the player start jittering.
 
|-
 
|-
| <tt>stopAdvancedMoves</tt>
+
| <samp>stopAdvancedMoves</samp>
 
| Stop movement from advancedMove.
 
| Stop movement from advancedMove.
 
|-
 
|-
| <tt>stopAnimation farmer</tt>
+
| <samp>stopAnimation farmer</samp>
 
| Stop the farmer's current animation.
 
| Stop the farmer's current animation.
 
|-
 
|-
| <tt>stopAnimation {{t|actor}} {{t|end frame}}</tt>
+
| <samp>stopAnimation {{t|actor}} {{o|end frame}}</samp>
 
| Stop the named NPC's current animation. Not applicable to the farmer.
 
| Stop the named NPC's current animation. Not applicable to the farmer.
 
|-
 
|-
| <tt>stopGlowing</tt>
+
| <samp>stopGlowing</samp>
 
| Make the screen stop glowing.
 
| Make the screen stop glowing.
 
|-
 
|-
| <tt>stopJittering</tt>
+
| <samp>stopJittering</samp>
 
| Make the player stop jittering.
 
| Make the player stop jittering.
 
|-
 
|-
| <tt>stopMusic</tt>
+
| <samp>stopMusic</samp>
 
| Stop any currently playing music.
 
| Stop any currently playing music.
 
|-
 
|-
| <tt>stopRunning</tt>
+
| <samp>stopRunning</samp>
 
| Make the farmer stop running.
 
| Make the farmer stop running.
 
|-
 
|-
| <tt>stopSwimming {{t|actor}}</tt>
+
| <samp>stopSwimming {{t|actor}}</samp>
 
| Make an actor stop swimming.
 
| Make an actor stop swimming.
 
|-
 
|-
| <tt>swimming {{t|actor}}</tt>
+
| <samp>swimming {{t|actor}}</samp>
 
| Make an actor start swimming.
 
| Make an actor start swimming.
 
|-
 
|-
| <tt>switchEvent {{t|event ID}}</tt>
+
| <samp>switchEvent {{t|event ID}}</samp>
 
| Changes the current event (ie. event commands) to another event in the same location.
 
| Changes the current event (ie. event commands) to another event in the same location.
 
|-
 
|-
| <tt>taxvote</tt>
+
| <samp>taxvote</samp>
 
| Trigger voting for or against a 3% shipping tax. (No effect on game?)
 
| Trigger voting for or against a 3% shipping tax. (No effect on game?)
 
|-
 
|-
| <tt>temporarySprite {{t|x}} {{t|y}} {{t|row in texture}} {{t|animation length}} {{t|animation interval}} {{t|flipped}} {{t|loop count}}</tt>
+
| <samp>temporarySprite {{t|x}} {{t|y}} {{t|row in texture}} {{t|animation length}} {{t|animation interval}} {{t|flipped}} {{t|layer depth}}</samp>
| Create a temporary sprite with the given parameters.
+
| Create a temporary sprite with the given parameters, from the resource <samp>TileSheets/animations</samp>.
 
|-
 
|-
| <tt>textAboveHead {{t|actor}} "{{t|text}}"</tt>
+
| <samp>textAboveHead {{t|actor}} \"{{t|text}}\"</samp>
 
| Show a small text bubble over the named NPC's head with the given text; see [[#Dialogue format|dialogue format]].
 
| Show a small text bubble over the named NPC's head with the given text; see [[#Dialogue format|dialogue format]].
 
|-
 
|-
| <tt>tutorialMenu</tt>
+
| <samp>tutorialMenu</samp>
 
| Show the tutorial menu if no other menu is open.
 
| Show the tutorial menu if no other menu is open.
 
|-
 
|-
| <tt>updateMinigame {{t|event data}}</tt>
+
| <samp>updateMinigame {{t|event data}}</samp>
 
| Send an event to the current minigame.
 
| Send an event to the current minigame.
 
|-
 
|-
| <tt>viewport move {{t|x}} {{t|y}} {{t|duration}}</tt>
+
| <samp>viewport move {{t|x}} {{t|y}} {{t|duration}}</samp>
| Pan the the camera in the direction (and with the velocity) defined by ''x/y'' for the given duration in milliseconds. Example: ''"viewport move 2 -1 5000"'' moves the camera 2 pixels right and 1 pixel up for 5 seconds.
+
| Pan the the camera in the direction (and with the velocity) defined by ''x/y'' for the given duration in milliseconds. Example: ''"viewport move 2 -1 5000"'' moves the camera 2 pixels right and 1 pixel up for 5 seconds. The total distance moved is based on framerate, rather than time, and may be inconsistent.
 
|-
 
|-
| <tt>viewport {{t|x}} {{t|y}} [true [unfreeze]&#124;clamp [true&#124;unfreeze]]</tt>
+
| <samp>viewport {{t|x}} {{t|y}} [true [unfreeze]&#124;clamp [true&#124;unfreeze]]</samp>
 
| Instantly reposition the camera to center on the given X, Y tile position. TODO: explain other parameters.
 
| Instantly reposition the camera to center on the given X, Y tile position. TODO: explain other parameters.
 
|-
 
|-
| <tt>waitForKey {{t|key}} {{t|message on finish}}</tt>
+
| <samp>waitForAllStationary</samp>
| TODO: Explain
+
| Waits for all actors to stop moving before executing the next command.
 
|-
 
|-
| <tt>waitForOtherPlayers</tt>
+
| <samp>waitForOtherPlayers</samp>
 
| Wait for other players (vanilla MP).
 
| Wait for other players (vanilla MP).
 
|-
 
|-
| <tt>warp {{t|actor}} {{t|x}} {{t|y}}</tt>
+
| <samp>warp {{t|actor}} {{t|x}} {{t|y}}</samp>
 
| Warp the named NPC to a position to the given X, Y tile coordinate. This can be used to warp characters off-screen.
 
| Warp the named NPC to a position to the given X, Y tile coordinate. This can be used to warp characters off-screen.
 
|-
 
|-
| <tt>weddingSprite {{t|frame}}</tt>
+
| <samp>weddingSprite {{t|frame}}</samp>
 
| Sets the actor known as 'WeddingOutfits' to a particular frame.
 
| Sets the actor known as 'WeddingOutfits' to a particular frame.
 
|}
 
|}
 +
 +
Some commands are broken or unusable:
 +
{| class="wikitable"
 +
|-
 +
! command
 +
! description
 +
|-
 +
| <samp>grabObject {{t|object ID}}</samp>
 +
| '''Broken.''' Triggers a generic animation. The item ID is ignored and the item isn't added.
 +
|-
 +
| <samp>end busIntro</samp>
 +
| Supposed to start the bus intro scene, presumably the one that was cut before release.
 +
|}
 +
 +
===Comments===
 +
A command which begins with <code>--</code> is ignored. This can be used to insert comments or to disable commands temporarily while debugging an event. The comment ends at the next slash delimiter (<code>/</code>), so it can't contain slashes.
 +
 +
For example:
 +
<syntaxhighlight lang="js">
 +
"666/": "none/-1000 -1000/farmer 5 7 0/skippable/viewport 5 7 10/--set viewport near door/pause 2000/end"
 +
</syntaxHighlight>
  
 
===Directions===
 
===Directions===
Line 553: Line 667:
 
| 3
 
| 3
 
| looking left
 
| looking left
 +
|}
 +
 +
===Cutscenes===
 +
The <code>cutscene</code> command will accept the following values:
 +
 +
{| class="wikitable"
 +
|-
 +
! Value
 +
! In-game scene
 +
|-
 +
| AbigailGame
 +
| Sets up <samp>Journey of the Praire King</samp> mini-game with Abigail
 +
|-
 +
| addSecretSantaItem
 +
| Feast of the Winter Star gift scene
 +
|-
 +
| balloonChangeMap
 +
| Changes to the "in the balloon" map for Harvey's 10 heart event
 +
|-
 +
| balloonDepart
 +
| Balloon taking off in Harvey's 10 heart event
 +
|-
 +
| bandFork
 +
| Plays correct scene for Sam's 8 heart event, based on response given in 2 heart event
 +
|-
 +
| boardGame
 +
| Sets up <samp>Solarion Chronicles</samp> mini-game
 +
|-
 +
| clearTempSprites
 +
| Removes all temporary sprites from map
 +
|-
 +
| eggHuntWinner
 +
| Egg Hunt winner scene
 +
|-
 +
| governorTaste
 +
| Luau soup scene
 +
|-
 +
| greenTea
 +
| Caroline sunroom scene from her 2 heart event
 +
|-
 +
| haleyCows
 +
| Haley meeting the cows from her 8 heart event
 +
|-
 +
| iceFishingWinner
 +
| Festival of Ice fishing contest winner scene
 +
|-
 +
| iceFishingWinnerMP
 +
| Sets up text message displayed when leaving Festival of Ice
 +
|-
 +
| linusMoneyGone
 +
| ??? (seems to be unused)
 +
|-
 +
| marucomet
 +
| Maru Comet scene from her 14 heart event
 +
|-
 +
| plane
 +
| Plane flying by from Harvey's 8 heart scene
 +
|-
 +
| robot
 +
| MarILDA taking off from Maru's 10 heart scene
 
|}
 
|}
  
 
===Dialogue format===
 
===Dialogue format===
 
See [[Modding:Dialogue#Format]].
 
See [[Modding:Dialogue#Format]].
 +
 +
==Common values==
 +
===Emotes===
 +
An ''emote'' is an animated icon bubble shown above an NPC's head to indicate a mood or reaction. Emote icons are stored in the <samp>TileSheets\emotes</samp> asset.
 +
 +
{| class="wikitable"
 +
|-
 +
! ID
 +
! <samp>Character</samp> constant
 +
|-
 +
| 4
 +
| <samp>emptyCanEmote</samp>
 +
|-
 +
| 8
 +
| <samp>questionMarkEmote</samp>
 +
|-
 +
| 12
 +
| <samp>angryEmote</samp>
 +
|-
 +
| 16
 +
| <samp>exclamationEmote</samp>
 +
|-
 +
| 20
 +
| <samp>heartEmote</samp>
 +
|-
 +
| 24
 +
| <samp>sleepEmote</samp>
 +
|-
 +
| 28
 +
| <samp>sadEmote</samp>
 +
|-
 +
| 32
 +
| <samp>happyEmote</samp>
 +
|-
 +
| 36
 +
| <samp>xEmote</samp>
 +
|-
 +
| 40
 +
| <samp>pauseEmote</samp>
 +
|-
 +
| 44
 +
| ''unused''
 +
|-
 +
| 48
 +
| ''unused''
 +
|-
 +
| 52
 +
| <samp>videoGameEmote</samp>
 +
|-
 +
| 56
 +
| <samp>musicNoteEmote</samp>
 +
|-
 +
| 60
 +
| <samp>blushEmote</samp>
 +
|}
  
 
==See also==
 
==See also==
 +
*[https://docs.google.com/spreadsheets/d/1CpDrw23peQiq-C7F2FjYOMePaYe0Rc9BwQsj3h6sjyo/edit#gid=239695361 List of sound and music IDs]
 
* [https://gist.github.com/Pathoschild/95efc5ba5a23dc2c4da219ca2ddde679 JavaScript to parse an event precondition string]
 
* [https://gist.github.com/Pathoschild/95efc5ba5a23dc2c4da219ca2ddde679 JavaScript to parse an event precondition string]
 +
* [https://gist.github.com/Pathoschild/4e0af42158583983a4206d4d734bfc0b LINQ script] to format an event for [[Modding:Modder Guide/APIs/Translation| translations (i18n)]]
  
 
[[Category:Modding]]
 
[[Category:Modding]]
 +
 +
[[pt:Modificações:Dados de Eventos]]
 +
[[ru:Модификации:События]]

Latest revision as of 03:02, 29 March 2024

Index

This page explains how the game stores and parses event data. This is an advanced guide for mod developers.

Raw data

Events are stored in Content\Data\Events\*.xnb (one file per location), which can be unpacked to edit. Here's the raw data for events in Pam's trailer as of 1.5.1 for reference:

Data 
{
  "35/f Penny 1000/p Penny": "50s/-1000 -1000/farmer -30 30 0 Penny 12 7 0 Pam -100 -100 0/skippable/specificTemporarySprite pennyMess/viewport 12 7 true/pause 1000/speak Penny \"Ughh... It's so dirty in here.$s\"/pause 500/warp farmer 12 9/playSound doorClose/pause 500/faceDirection Penny 2/pause 500/emote Penny 16/pause 300/speak Penny \"@! Um... Sorry that it's such a mess. I was about to clean up.$u\"/pause 500/move farmer 0 -1 0/pause 600/emote Penny 32/pause 300/speak Penny \"You'll help me? You really mean it?$h\"/pause 500/faceDirection Penny 1/faceDirection farmer 1/speak Penny \"Okay, you can get started over there. I'll clean the kitchen.\"/move farmer 2 0 1/move farmer 0 -2 1/move farmer 1 0 1/move Penny -1 0 0/animate Penny false true 100 24 25/animate farmer false true 100 35/pause 200/playSound dwop/removeSprite 16 6/pause 200/move Penny -1 0 0/animate Penny false true 100 24 25/stopAnimation farmer/faceDirection farmer 0/pause 1200/stopAnimation Penny/removeSprite 10 5/playSound dwop/move Penny -1 0 0/animate Penny false true 100 24 25/pause 900/animate farmer false true 100 41/pause 300/playSound dwop/removeSprite 15 5/stopAnimation farmer/pause 1400/stopAnimation Penny/move Penny 1 0 0/pause 800/warp Pam 12 9/playSound doorClose/stopMusic/move Pam 0 -1 0/faceDirection Penny 2/faceDirection farmer 3/faceDirection Pam 1/pause 500/faceDirection Pam 3/speak Pam \"Whaddya think you're doing?!$u\"/faceDirection Pam 1/faceDirection Pam 3/faceDirection Pam 0/speak Pam \"Stop it! I had everything just the way I like it!$u\"/move Penny 2 0 2/pause 500/emote Penny 28/pause 500/speak Penny \"Mom, the house is a total mess. @ and I were just trying to tidy things up a bit.#$b#*sniff* *sniff*... Were you at the saloon just now? You smell like beer...$s\"/pause 300/move Pam -1 0 3/emote Pam 12/pause 400/speak Pam \"It's none of your damn business where I go!$4\"/pause 500/speak Penny \"It IS my business! I don't want you destroying yourself!$a#$b#Don't you realize your choices have an effect on me? Stop being so selfish!$a\"/faceDirection Pam 0/shake Pam 5000/pause 600/speak Pam \"Selfish? I put a roof over your head and clothes on your back and you call me selfish!? You ungrateful little...$u\"/pause 500/emote farmer 28/pause 500/faceDirection Pam 1/faceDirection Penny 1/move farmer -2 0 2/move farmer 0 2 3/pause 500/speak Pam \"You'd better go. I'm sorry you had to see this, kid.$4\"/pause 500/move farmer -1 0 2/move farmer 0 1 2/pause 500/faceDirection farmer 0/faceDirection Penny 2/pause 700/faceDirection farmer 2/pause 500/warp farmer -40 -40/playSound doorClose/pause 500/move Pam 0 -1 1/pause 300/faceDirection Penny 3/speak Pam \"He's a nice young man...^She's a nice young lady...\"/speak Pam \"But I don't want you tellin' others to clean up my house! It's embarrassing! You understand?$4\"/pause 300/faceDirection Penny 2/pause 600/showFrame Penny 23/pause 700/speak Penny \"...Yes, mother.$s\"/pause 1000/mail PennyCleanTrailer/end warpOut",
  "36/f Penny 1500/p Penny": "musicboxsong/9 7/farmer -30 30 0 Penny 9 7 0/skippable/pause 1000/playSound doorClose/warp farmer 12 9/pause 400/faceDirection Penny 2/pause 300/speak Penny \"@, you came at a good time!#$b#I'm just about finished cooking a new recipe I invented!$h\"/pause 400/move farmer 0 -2 3/faceDirection Penny 1/move farmer -2 0 3/speak Penny \"Let me just finish up real quick.\"/pause 200/faceDirection Penny 0/pause 200/animate Penny false true 120 29 30/playSound crafting/pause 320/playSound crafting/pause 320/playSound crafting/pause 320/playSound crafting/pause 320/stopAnimation Penny/pause 500/playSound openBox/showFrame Penny 29/pause 400/playSound furnace/showFrame Penny 30/pause 1500/playSound clank/faceDirection Penny 0/pause 500/faceDirection Penny 1 true/showFrame Penny 28/speak Penny \"Here, give that a little taste.\"/pause 800/faceDirection farmer 2/farmerEat 200/showFrame Penny 4/pause 2500/stopAnimation farmer/pause 500/playSound gulp/animate farmer false true 350 104 105/pause 500/specificTemporarySprite pennyCook/pause 1500/faceDirection farmer 2/pause 500/speak Penny \"$q 72 null#...well?#$r 72 50 event_cook1#(Lie) Mmm! That was delicious!#$r 73 -50 event_cook2#Uh... can I get the rest to go?#$r 73 0 event_cook3#Well it's definitely unique... how did you get it so rubbery?\"/pause 500/speak Penny \"$p 72#Hey, since you're the first person to try it, I'm going to name this one 'Chili de @'.$h|Well, I guess this recipe was a failure...$s\"/stopAnimation farmer/faceDirection farmer 3/pause 600/speak Penny \"Um... so how about we watch a movie or something?\"/pause 500/move farmer 5 0 0 true/move Penny 5 0 0 true/globalFade/viewport -1000 -1000/end dialogue Penny \"Thanks for being my taste-tester.$h\"",
  "963313/n pamPotatoJuice": "playful/10 7/farmer -100 -100 0 Pam 10 7 0/mail pamNewChannel/skippable/pause 3000/speak Pam \"Heheh... I see the delivery came in.$h\"/pause 500/speak Pam \"Let's have a little taste.$h\"/pause 1000/playSound coin/showFrame Pam 32/pause 2000/animate Pam false true 400 33 34/playSound glug/pause 800/playSound glug/pause 800/playSound glug/pause 800/playSound glug/pause 790/stopAnimation Pam/showFrame Pam 32/pause 400/emote Pam 40/pause 800/showFrame Pam 35/textAboveHead Pam \"Ptooey!\"/playSound slimedead/shake Pam 2000/pause 2000/animate Pam false true 400 28 29/speak Pam \"I said potato, not fermented baboon kidney!$u\"/pause 2000/end dialogue Pam \"The juice? Yeah, I tried it, kid. $4#$b#How'd it taste? ...Some things are better left unsaid. Let's just leave it at that.$4\""
}

Event preconditions

Each event has a key which includes an event ID and any preconditions. Event IDs are a max of 10 digits, with a maximum value of 2147483647 (based on the game coding).

You may use any ID for testing BUT When you are ready to publish, you are recommended to use the four or five digit mod ID you get from Nexus (found in the mod page URL) as the prefix instead. Note that any other id (like last 4 digit of user id is not guarenteed to be unique across other mods) You can actually reserve an ID for your mod in Nexus by creating the page without clicking "Publish". Of course, this is not a rule, but a good convention to prevent mods from clashing. If uploading to Moddrop or another site instead, adjust according to the number of digits found in that site's IDs.

Event preconditions include any number of the following arguments (separated by /). For example, Clint's Saloon heart event preconditions are 97/f Clint 750/t 1900 2300/d Tue Wed Thu Fri Sat Sun, which (per the tables below) means event #97, requires 3 hearts with Clint, between 7pm and 11pm on Monday.

Notes:

  • 'NPC name' means their internal English name, not the translatable display name.
  • Most text is case-sensitive (e.g., Mon is not the same as mon).
  • The game's logic for these codes is in GameLocation::checkEventPrecondition.

Context

These check the current time, date, weather, etc. They're not player-specific.

syntax precondition
A <dialogue ID> The special dialogue event with the given ID (including Conversation Topics) is not in progress. This can be a custom event ID, but these are the in-game IDs: cc_Begin, cc_Boulder, cc_Bridge, cc_Bus, cc_Complete, cc_Greenhouse, cc_Minecart, dumped_Girls, dumped_Guys, Introduction, joja_Begin, pamHouseUpgrade, pamHouseUpgradeAnonymous, secondChance_Girls, secondChance_Guys, shaneSaloon1, shaneSaloon2, willyCrabs.
F Today is not a festival day.
U <day count> There are no festivals within the specified number of days from today.
d <day of week> Today is not one of the specified days (may specify multiple days). Valid values: Mon, Tue, Wed, Thu, Fri, Sat, Sun.
r <number> A random probability check, where <number> is the probability between 0 and 1 (e.g., 0.2 for 20% chance).
v <name> The specified NPC is not invisible (regardless of whether they're on-screen).
w <weather> Current weather matches <weather>. Valid values: rainy, sunny.
y <year> If <year> is 1, must be in the first year. Otherwise, year must be at least this value.
z <season> Current season is not <season>.
N <number> The players in total have found at least this many golden walnuts.

Current player

These check the current player (the one playing this instance of the game).

syntax precondition
B Current player has a double bed in the farmhouse if married; single bed if roommates (Krobus excluded).
D <name> Current player is dating the given NPC name.
J Current player has finished the Joja Warehouse.
L Event is in the FarmHouse and the FarmHouse has been upgraded at least twice (has nursery but not necessarily cellar). Only works inside the FarmHouse, always false outside.
M <number> Current player has at least this much money.
O <name> Current player is married to that NPC.
S <secret note ID> Current player has seen the Secret Note with the given ID.
a <x> <y> Current player entered the map on that tile position. Note that since events are only checked for while entering a map, you can only use tiles that other maps warp to.
b <number> Current player has reached the bottom floor of the Mines at least that many times.
c <number> Current player has at least that many free inventory slots.
e <event ID> Current player has seen the specified event (may contain multiple event IDs).

Usage: /e <event ID> means has seen that event, then /e <event ID> <event ID> means has seen EITHER events, and /e <event ID>/e <event ID> means has seen BOTH events.

f <name> <number> Current player has at least <number> friendship points with the <name> NPC. Can specify multiple name and number pairs, in which case the player must meet all of them.
g <gender> Current player is the specified gender (male or female).
h <pet> Current player does not already have a pet, and their preference matches <pet> ("cat" or "dog").
i <item ID> Current player has specified item in their inventory.
j <number> Current player has played more than <number> days.
k <event ID> Current player has not seen that event (may contain multiple event IDs).
l <letter ID> Current player has not received that mail letter or non-mail flag.
m <number> Current player has earned at least this much money (regardless of how much they currently have).
n <letter ID> Current player has received that mail letter or non-mail flag.
o <name> Current player is not married to that NPC.
p <name> Specified NPC is in the current player's location.
q <dialogue ID> Current player has chosen the given answer in a dialogue. May contain multiple dialogue IDs, in which case they must all have been selected.
s <item ID> <number> Current player has shipped at least <number> of the specified item. Can specify multiple item and number pairs, in which case all of them must be met. This only works for the items tracked by the game for shipping stats (shown in the shipping collections menu).
t <min time> <max time> Current time is between between the specified times. Can range from 600 to 2600.
u <day of month> Current day of month is one of the specified values (may contain multiple days).
x <letter ID> For the current player: mark this event as seen, add the specified letter to tomorrow's mail, then return false (so that nothing further happens). Use the format "x letterid true" to send the letter immediately.

Host player

These check the host player (the one running a multiplayer farm, not necessarily the current player). If single-player, this is always the current player.

syntax precondition
C Host player has finished the Community Center or Joja Warehouse.
X Host player has not finished the Community Center or Joja Warehouse.
H Current player is the host player.
Hl <letter ID> Host player has not received that mail letter or non-mail flag.
Hn <letter ID> Host player has received that mail letter or non-mail flag.
*l <letter ID> Host player and current player have not received that mail letter or non-mail flag.
*n <letter ID> Host player and current player have received that mail letter or non-mail flag.

Event scripts

Basic format

Each event has a value which is the event script. This specifies what happens in the event — everything from lighting and music to NPC movement and dialogue. The script consists of multiple commands separated by / characters.

Every script must start with three commands in this exact order:

index syntax description
0 <music ID> The background music or ambient background track to play. Can be changed later using playMusic <newmusic>, or stopped entirely using stopMusic. This can also be none (which stops any existing music and uses the default ambient background noise for the location), or continue (which keeps playing the current background song). Refer to the great ID spreadsheet for music choices.
1 <x> <y> The tile coordinates the camera should center on at the start of the event.
2 [<character ID> <x> <y> <direction>]+ Initialises one or more characters' starting tile positions and directions. The character ID can be farmer or an NPC name like Abigail.

Those three commands may be followed by any sequence of the following commands:

command description
addBigProp <x> <y> <object ID> Adds an object at the specified tile from the TileSheets\Craftables.png sprite sheet.
addConversationTopic <ID> [length] Starts a conversation topic with the given ID and day length (or 4 days if no length given).
addCookingRecipe <recipe> Adds the specified cooking recipe to the player.
addCraftingRecipe <recipe> Adds the specified crafting recipe to the player.
addFloorProp <prop index> <x> <y> [solid width] [solid height] [display height] Add a non-solid prop from the current festival texture. Default solid width/height is 1. Default display height is solid height.
addLantern <row in texture> <x> <y> <light radius> Adds a glowing temporary sprite at the specified tile from the Maps\springobjects.png sprite sheet. A light radius of 0 just places the sprite.
addMailReceived <letter ID> Set a letter as received.
addObject <x> <y> <sprite index> [layer] Adds a temporary sprite at the specified tile from the Maps\springobjects.png sprite sheet.
addProp <prop index> <x> <y> [solid width] [solid height] [display height] Add a solid prop from the current festival texture. Default solid width/height is 1. Default display height is solid height.
addQuest <quest ID> Add the specified quest to the quest log.
addTemporaryActor <character> <sprite width> <sprite height> <tile x> <tile y> <facing> [breather] [Character|Animal|Monster] [animal name] Add a temporary actor. 'breather' is boolean. The category determines where the texture will be loaded from, default is Character. Animal name only applies to animal.
addToTable <x> <y> <object ID> Places on object on the furniture at a position. UNLESS the location is FarmHouse, then it will always try to place an item onto the first piece of furniture, regardless if it's a table or not (and probably throw an error if there's no furniture.) It'll also actually replace the item on that piece of furniture if there was one previously. Not recommended for use in the farmhouse. May not be used by vanilla at all.
addTool <Sword|Wand> Adds either a Battered Sword or Return Scepter to the player's inventory. The Battered Sword is unobtainable in vanilla and is incomplete and not implemented.
advancedMove <actor> <loop> <x y>... OR <direction duration> Set multiple movements for an actor. You can set True to have the actor walk the path continuously. Example: /advancedMove Robin false 0 3 2 0 0 2 -2 0 0 -2 2 0/

To make the actor move along the x axis (left/right), use the number of tiles to move and 0. For example, -3 0 will cause the actor to walk three tiles to the left while facing left. 2 0 will cause the actor to walk two tiles to the right while facing right.

To make the actor move along the y axis (up/down), use 0 and the number of tiles to move. For example, 0 1 will cause the actor to walk one tile down while facing down. 0 -5 will cause the actor to walk five tiles up while facing up.

To make an actor pause, use the direction to face and the number of milliseconds to pause. 1 is right, 2 is down, 3 is left, and 4 is up. The reason 4 is up and not 0 is so that advancedMove can tell the difference between a pause command and a move up/down command.

The code can tell the difference between a move command and a pause command because a move command must have 0 for either x or y. A pause command must have non-zero numbers for both numbers in the pair.

Example: /advancedMove Clint true 4 0 2 5000 -4 0 1 3000/ Clint will have continuous movement moving 4 tiles to the right, facing down upon arriving, waiting for 5 seconds, then moving 4 tiles to the left, facing right upon arriving, then waiting for 3 seconds, then loops because the loop was set to true(see above).

Example: /advancedMove Pam true 5 0 0 3 3 5000 -6 0 0 -4/ Pam first moves 5 tiles to the right, then directly moves 3 tiles downward, faces the to the left upon arriving then waits 5 seconds before moving 6 tiles to the left then moves up 4 tiles directly.

ambientLight <r> <g> <b> Modifies the ambient light level, with RGB values from 0 to 255.
animalNaming Show the animal naming menu if no other menu is open. Uses the current location as Coop. Appears to only work for 'hatched' animals.
animate <actor> <flip> <loop> <frame duration> <frames...> Animate a named actor, using one or more <frames> from their sprite sheet, for <frame duration> milliseconds per frame. <frames> are indexed numerically, based on 16x32 peices of the image. This index increases as you go from left to right, starting from 0. <flip> indicates whether to flip the sprites along the Y axis; <loop> indicates whether to repeat the animation until stopAnimation is used. If you're animating the farmer, it may be helpful to reference Modding:Farmer_sprite#Sprite_Index_Breakdown
attachCharacterToTempSprite <actor> Attach an actor to the most recent temporary sprite.
awardFestivalPrize Awards the festival prize to the winner for the easter egg hunt and ice fishing contest.
awardFestivalPrize <item type> Awards the specified item to the player. Possible item types are "pan", "sculpture", "rod", "sword", "hero", "joja", "slimeegg", "emilyClothes", and "jukebox".
beginSimultaneousCommand This command states that the next event commands will all be done at the same time. Must also have endSimultaneousCommand after the commands needed to execute at the same time.
broadcastEvent [local] Makes the event a "broadcast event", forcing others players connected to also see it. Any players connected will be forced to warp to this event. This is used in some vanilla events like when Lewis shows the farmer the abandoned Community Center.

If the "local" option is given (not a boolean), then client players will see the event as if the "farmer" actor was their own farmer instead of the Host farmer. The "local" option isn't used anywhere in the vanilla game.

catQuestion Trigger question about adopting your pet.
cave Trigger the question for the farm cave type. This will work again later, however changing from bats to mushrooms will not remove the mushroom spawning objects.
changeLocation <location> Change to another location and run the remaining event script there.
changeMapTile <layer> <x> <y> <tile index> Change the specified tile to a particular value.
changeName <actor> <displayName> Sets the display name of the actor to displayName, with underscores replaced by spaces.
changePortrait <npc> <portrait> Change the NPC's portrait to be from "Portraits/<actor>_<portrait>".
changeSprite <actor> <sprite> Change the actor's sprite to be from "Characters/<actor>_<sprite>".
changeToTemporaryMap <map> [pan] Change the location to a temporary one loaded from the map file specified by <map>. If the [pan] argument is omitted, also pan to tile coordinates 0, 0 on the new map. If any value is given for [pan], no panning occurs.
changeYSourceRectOffset <npc> <offset> Changes the NPC's vertical texture offset. Example: changeYSourceRectOffset Abigail 96 will offset her sprite sheet, showing her looking left instead of down. This persists for the rest of the event. This is only used in Emily's Clothing Therapy event to display the various outfits properly.
characterSelect Seemingly unused. Sets Game1.gameMode to 5 and Game1.menuChoice = 0.
cutscene <cutscene> Activate a cutscene. See cutscene list.
doAction <x> <y> Acts as if the player had clicked the specified x/y coordinate and triggers any relevant action. It is commonly used to open doors from inside events, but it can be used for other purposes. If you use it on an NPC you will talk to them, and if the player is holding an item they will give that item as a gift. doAction activates objects in the main game world (their actual location outside of the event), so activating NPCs like this is very tricky, and their reaction varies depending on what the player is holding.
dump <group> Starts the special "cold shoulder" and "second chance" dialogue events for the given group (women if group is girls and men if it is anything else.) The cold shoulder event has an id of dumped_Girls or dumped_Guys and lasts 7 days; the second chance event has an id of secondChance_Girls or secondChance_Guys and lasts 14 days. During open beta testing of version 1.3 there was a second parameter which determined the amount of hearts lost, but support for that parameter was removed before release.
endSimultaneousCommand Sets the end of all commands that are to be done simultaneously. Format: beginSimultaneousCommand/<Event Commands>.../endSimultaneousCommand
elliotbooktalk Elliot book talk.
emote <actor> <emote ID> Make the given NPC name perform an emote, which is a little icon shown above the NPC's head. Emotes are stored in Content\TileSheets\emotes.xnb; see list of emotes.
end Ends the current event by fading out, then resumes the game world and places the player on the square where they entered the zone. All end parameters do this by default unless otherwise stated.
end bed Same as end, but warps the player to the x/y coordinate of their most recent bed. This does not warp them to the farmhouse, only to the x/y coordinate of the bed regardless of map.
end beginGame Used only during the introduction sequence in the bus stop event. It sets the game mode to playingGameMode, warps the player to the farmhouse (9, 9), ends the current event, and starts a new day.
end credits Not used in any normal events. Clears debris weather, changes the music to wedding music, sets game mode to creditsMode and ends the current event.
end dialogue <NPC> <"Text for next chat"> Same as end, and additionally clears the existing NPC dialogue for the day and replaces it with the line(s) specified at the end of the command. Example usage: end dialogue Abigail "It was fun talking to you today.$h"
end dialogueWarpOut <NPC> <"Text for next chat"> See end dialogue and end warpOut.
end invisible <NPC> Same as end, and additionally turns the specified NPC invisible (cannot be interacted with until the next day).
end invisibleWarpOut <NPC> See end invisible and end warpOut.
end newDay Ends both the event and the day (warping player to their bed, saving the game, selling everything in the shipping box, etc).
end position <x> <y> Same as end, and additionally warps the player to the map coordinates specified in x y.
end warpOut Same as end, and additionally finds the first warp out of the current location (second warp if male and in the bathhouse), and warps the player to its endpoint.
end wedding Used only in the hardcoded wedding event. Changes the character's clothes back to normal, sets Lewis' post-event chat to "That was a beautiful ceremony. Congratulations!$h", and warps the player to their farm.
extendSourceRect <actor> reset Resets the actors sprite.
extendSourceRect <actor> <horizontal> <vertical> [ignoreUpdates] TODO: Explain Character.extendSourceRect
eyes <eyes> <blink> Change the player's eyes. Eyes is represented by and Integer from 0 - 5 (open, closed, right, left, half closed, wide open). Blink is a timer that is represented with a negative number. -1000 is the default timer.
faceDirection <actor> <direction> [continue] Make a named NPC face a direction. If no parameter is supplied for [continue], the game will pause.
fade [unfade] Fades out to black if no parameter is supplied. If the parameter is unfade (not true), fades in from black.
farmerAnimation <anim> Briefly sets the farmer's sprite to <anim> for a variable (depending on sprite) interval. Only used once in vanilla events. Using showFrame farmer <sprite> twice (to set a new frame and back) is more powerful as it lets you control the interval using pause n.
farmerEat <object ID> Make the player eat an object. (The farmer actually does eat the object, so buffs will apply, healing will occur, etc.)
fork [req] <event ID> End the current command script and starts a different script with the given ID, but only if the [req] condition is met. (Example: /fork choseWizard finalBossWizard in the "Necromancer" script of Sebastian's 6-heart event.) The [req] condition can be a mail ID or dialogue answer ID; if not specified, it checks if the specialEventVariable1 variable was set (e.g., by a question event command or %fork dialogue command). The new script should have the same format as a normal event script, but without the mandatory three start fields.
friendship <npc> <amount> Add the given number of friendship points with the named NPC. (There are 250 points per heart.)
globalFade [speed] [continue] Fade to black at a particular speed (default 0.007). If continue is specified, the event continues as the fade occurs, else the event pauses until the fade is finished. The fade effect disappears when this command is done; to avoid that, use the viewport command to move the camera off-screen.
globalFadeToClear [speed] [continue] Fade to clear (unfade?) at a particular speed (default 0.007). If continue is specified, the event continues as the fade occurs, else the event pauses until the fade is finished.
glow <r> <g> <b> <hold> Make the screen glow once, fading into and out of the <r> <g> <b> values over the course of a second. If <hold> is true it will fade to and hold that color until stopGlowing is used.
grandpaCandles Do grandpa candles
grandpaEvaluation Do grandpa evaluation
grandpaEvaluation2 Do grandpa evaluation (manually resummoned)
halt Make everyone stop.
hideShadow <actor> <true/false> Hide the shadow of the named actor. False unhides it.
hospitaldeath
ignoreCollisions <character ID> Make a character ignore collisions when moving for the remainder of the event. For example, they'll walk through walls if needed to reach their destination. The character ID can be farmer or an NPC name like Abigail.
ignoreEventTileOffset Tile positions in farm events are offset to match the farmhouse position. If an event shouldn't be based on the farmhouse position, add an ignoreEventTileOffset command to disable the offset for that event. This must be the 4th command (after the 3 initial setup ones) to take effect.
itemAboveHead [type] Show an item above the player's head. The [type] can be "pan", "hero", "sculpture", "joja", "slimeEgg", "rod", "sword", or "ore". If no item is specified, then they will 'hold' nothing? Arbitrary items are not supported.
jump <actor> [intensity] Make a the named NPC jump. The default intensity is 8.
loadActors <layer> Load the actors from a layer in the map file.
makeInvisible <x> <y> [x-dimension] [y-dimension] Temporarily hides selected objects or terrain features: the tile(s) will become passable for the duration of the event. Useful for clearing a walking area during events, especially in the FarmHouse. (Example: /makeInvisible 8 14 hides any object or terrain feature at tile 8, 14 in the current map.) The optional [x-dimension] and [y-dimension] arguments allow you to specify a larger area to be cleared. (Example: /makeInvisible 68 36 13 7 in Leah's 14-heart event clears a 13 × 7 tile rectangular area with the top-left corner at coordinate 68, 36.). Known bugs: some furniture may not re-appear immediately?
mail <letter ID> Queue a letter to be received tomorrow (see Content\Data\mail.xnb for available mail).
message "<text>" Show a dialogue box (no speaker). See dialogue format for the <text> format.
minedeath TODO.
money <amount> Adds/removes the specified amount of money.
move <actor> <x> <y> <facing> <continue> Make a named NPC move by the given tile offset from their current position (along one axis only), and face the given direction when they're done. To move along multiple axes, you must specify multiple move commands. By default the event pauses while a move command is occurring, but if <continue> is set to true the movement is asynchronous and will run simultaneously with other event commands. You can also move multiple people at a time in a single event command with move - an example of /move Abigail 1 0 1 Sam 0 1 1 Sebastian 2 0 1/ will have Abigail, Sam, and Sebastian all move at the same time in their respective directions.
pause <duration> Pause the game for the given number of milliseconds.
playMusic <track> Play the specified music track ID. If the track is 'samBand', the track played will change depend on certain dialogue answers (76-79).
playSound <sound> Play a given sound ID from the game's sound bank.
playerControl Give the player control back.
positionOffset <actor> <x> <y> Offset the position of the named NPC by the given number of pixels. This happens instantly, with no walking animation.
proceedPosition <actor> TODO: Explain
question null "<question>#<answer1>#<answer2>" Show a dialogue box with some answers and an optional question. When the player chooses an answer, the event script continues with no other effect.
question fork<answer index> "<question>#<answer 0>#<answer 1>#..." Show a dialogue with some answers and an optional question. When the player chooses the answer matching the fork<answer index> (like fork0 for the first answer), the specialEventVariable1 variable is set. Usually followed by a fork command. Example:
.../question fork0 \"#answer0#answer1#answer3\"/fork eventidhere/..."
quickQuestion <question>#<answer1>#<answer2>#<answer3>(break)<answer1 script>(break)<answer2 script>(break)<answer3 script> Show a dialogue box with an optional question and some answers. The answer scripts are sequences of commands separated by \\. When the player chooses an answer, the relevant answer script is executed and then the event continues. Usually used when an NPC's response will depend on the answer chosen but nothing else in the event has to depend on it.
  • Note: If quickQuestion is used immediately at the start of an event block (Example: "ExampleEvent": "quickQuestion [rest of the event]"), it will cause a dialogue loop. Adding another command in front of quickQuestion resolves this issue (Example: "ExampleEvent": "pause 1/quickQuestion [rest of the event]").
removeItem <object ID> Remove the first of an object from a player's inventory.
removeObject <x> <y> Remove the prop at a position.
removeQuest <quest ID> Remove the specified quest from the quest log.
removeSprite <x> <y> Remove the temporary sprite at a position.
removeTemporarySprites Remove all temporary sprites.
removeTile <x> <y> <layer> Remove a tile from the specified layer.
resetVariable Set the specialEventVariable1 to false.
rustyKey Gives the player the rusty key. (Sewer key)
screenFlash <alpha> Flashes the screen white for an instant. An alpha value from 0 to 1 adjusts the brightness, and values from 1 and out flashes pure white for x seconds.
setRunning Set the player as running.
shake <actor> <duration> Shake the named NPC for the given number of milliseconds.
showFrame farmer <frame> <flip> Flip the farmer's current sprite along the Y axis. Farmer looks strange if not facing the correct direction prior to 1.6. Flip is a true/false value.
showFrame <actor> <frame ID> Set the named NPC's current frame in their Content\Characters\*.xnb spritesheet. Note that setting the farmer's sprite only changes parts of the sprite (some times arms, some times arms and legs and torso but not the head, etc). To rotate the whole sprite, use faceDirection farmer <0/1/2/3> first before modifying the sprite with showFrame. Frame ID starts from 0. If farmer is the one whose frame is being set, "farmer" can be eliminated, i.e., both showFrame farmer <frame ID> and showFrame <frame ID> would work.
showRivalFrame <frame> Set the 'rival' actor's sprite to a specific frame.
skippable Allow skipping this event.
speak <character> "<text>" Show dialogue text from a named NPC; see dialogue format.
specificTemporarySprite <sprite> [other params] Shows the given temporary sprite. Parameters change depending on the sprite. These are quite hardcoded and probably not easily reusable, other than the little heart.
speed farmer <modifier> Add a speed modifier to the farmer. Is persistent and you will have to use the command again to return to normal speed.
speed <actor> <speed> Sets the named NPC's speed (default speed is 3). Not applicable to the farmer. Applies only through the end of the next movement or animation on that NPC.
splitSpeak <actor> "<text>" Dialogue, but chosen based on previous answer. ('~' is the separator used.)
startJittering Make the player start jittering.
stopAdvancedMoves Stop movement from advancedMove.
stopAnimation farmer Stop the farmer's current animation.
stopAnimation <actor> [end frame] Stop the named NPC's current animation. Not applicable to the farmer.
stopGlowing Make the screen stop glowing.
stopJittering Make the player stop jittering.
stopMusic Stop any currently playing music.
stopRunning Make the farmer stop running.
stopSwimming <actor> Make an actor stop swimming.
swimming <actor> Make an actor start swimming.
switchEvent <event ID> Changes the current event (ie. event commands) to another event in the same location.
taxvote Trigger voting for or against a 3% shipping tax. (No effect on game?)
temporarySprite <x> <y> <row in texture> <animation length> <animation interval> <flipped> <layer depth> Create a temporary sprite with the given parameters, from the resource TileSheets/animations.
textAboveHead <actor> \"<text>\" Show a small text bubble over the named NPC's head with the given text; see dialogue format.
tutorialMenu Show the tutorial menu if no other menu is open.
updateMinigame <event data> Send an event to the current minigame.
viewport move <x> <y> <duration> Pan the the camera in the direction (and with the velocity) defined by x/y for the given duration in milliseconds. Example: "viewport move 2 -1 5000" moves the camera 2 pixels right and 1 pixel up for 5 seconds. The total distance moved is based on framerate, rather than time, and may be inconsistent.
viewport <x> <y> [true [unfreeze]|clamp [true|unfreeze]] Instantly reposition the camera to center on the given X, Y tile position. TODO: explain other parameters.
waitForAllStationary Waits for all actors to stop moving before executing the next command.
waitForOtherPlayers Wait for other players (vanilla MP).
warp <actor> <x> <y> Warp the named NPC to a position to the given X, Y tile coordinate. This can be used to warp characters off-screen.
weddingSprite <frame> Sets the actor known as 'WeddingOutfits' to a particular frame.

Some commands are broken or unusable:

command description
grabObject <object ID> Broken. Triggers a generic animation. The item ID is ignored and the item isn't added.
end busIntro Supposed to start the bus intro scene, presumably the one that was cut before release.

Comments

A command which begins with -- is ignored. This can be used to insert comments or to disable commands temporarily while debugging an event. The comment ends at the next slash delimiter (/), so it can't contain slashes.

For example:

"666/": "none/-1000 -1000/farmer 5 7 0/skippable/viewport 5 7 10/--set viewport near door/pause 2000/end"

Directions

When event commands refer to a facing direction, they'll use one of these values:

Value Meaning
0 looking up
1 looking right
2 looking down
3 looking left

Cutscenes

The cutscene command will accept the following values:

Value In-game scene
AbigailGame Sets up Journey of the Praire King mini-game with Abigail
addSecretSantaItem Feast of the Winter Star gift scene
balloonChangeMap Changes to the "in the balloon" map for Harvey's 10 heart event
balloonDepart Balloon taking off in Harvey's 10 heart event
bandFork Plays correct scene for Sam's 8 heart event, based on response given in 2 heart event
boardGame Sets up Solarion Chronicles mini-game
clearTempSprites Removes all temporary sprites from map
eggHuntWinner Egg Hunt winner scene
governorTaste Luau soup scene
greenTea Caroline sunroom scene from her 2 heart event
haleyCows Haley meeting the cows from her 8 heart event
iceFishingWinner Festival of Ice fishing contest winner scene
iceFishingWinnerMP Sets up text message displayed when leaving Festival of Ice
linusMoneyGone ??? (seems to be unused)
marucomet Maru Comet scene from her 14 heart event
plane Plane flying by from Harvey's 8 heart scene
robot MarILDA taking off from Maru's 10 heart scene

Dialogue format

See Modding:Dialogue#Format.

Common values

Emotes

An emote is an animated icon bubble shown above an NPC's head to indicate a mood or reaction. Emote icons are stored in the TileSheets\emotes asset.

ID Character constant
4 emptyCanEmote
8 questionMarkEmote
12 angryEmote
16 exclamationEmote
20 heartEmote
24 sleepEmote
28 sadEmote
32 happyEmote
36 xEmote
40 pauseEmote
44 unused
48 unused
52 videoGameEmote
56 musicNoteEmote
60 blushEmote

See also