Changes

m
Text replacement - "[[Copper Pan|" to "[[Pans|"
Line 4: Line 4:     
==Raw data==
 
==Raw data==
Object data is stored in <tt>Content\Data\Mail.xnb</tt>, which can be [[Modding:Editing XNB files#unpacking|unpacked for editing]]. Here's the raw data as of {{version|1.4.5}} for reference:
+
Object data is stored in <samp>Content\Data\Mail.xnb</samp>, which can be [[Modding:Editing XNB files#unpacking|unpacked for editing]]. Here's the raw data as of {{version|1.5.1}} for reference:
   −
{{collapse|Data|content=<source lang="json">
+
{{collapse|Data|content=<syntaxhighlight lang="json">
 
{
 
{
 
   "Robin": "Hey there!^I had some extra wood lying around... I thought maybe you could use it. Take care!  ^  -Robin %item object 388 50 %%[#]A Gift From Robin",
 
   "Robin": "Hey there!^I had some extra wood lying around... I thought maybe you could use it. Take care!  ^  -Robin %item object 388 50 %%[#]A Gift From Robin",
Line 70: Line 70:  
   "taxRejected": "Dear @,^the shipping tax was rejected. Your shipping profits will remain as they are. Fees for public services will remain the same as well. See you soon. ^  -Mayor[#]Tax Rejected",
 
   "taxRejected": "Dear @,^the shipping tax was rejected. Your shipping profits will remain as they are. Fees for public services will remain the same as well. See you soon. ^  -Mayor[#]Tax Rejected",
 
   "quest10": "@,^I've heard you've been giving some people a hand around town! Everyone seems really thankful. I'm awarding you this month's \"Best Neighbor\" award (with a small cash prize). Keep it up! ^  -Mayor%item money 500 501 %%[#]Best Neighbor",
 
   "quest10": "@,^I've heard you've been giving some people a hand around town! Everyone seems really thankful. I'm awarding you this month's \"Best Neighbor\" award (with a small cash prize). Keep it up! ^  -Mayor%item money 500 501 %%[#]Best Neighbor",
   "quest35": "Dear @,^you've been such a help around town since you moved here... everyone keeps telling me all the wonderful things you've done for them! Please accept this thank-you prize. ^  -Mayor%item money 2500 2501 %%[#]Thank-you From Lewis",
+
   "quest35": "Dear @,^You've been such a help around town since you moved here... everyone keeps telling me all the wonderful things you've done for them! Please accept this thank-you prize. ^  -Mayor%item money 2500 2501 %%[#]Thank-you From Lewis",
 
   "quest100": "@,^I am pleased to announce that you've been chosen as \"Neighbor of the year\"! That comes with a 10,000g prize! Congratulations! Everyone in town wants to say 'thanks' for all you've done. ^  -Mayor%item money 10000 10001 %%[#]Neighbor Of The Year",
 
   "quest100": "@,^I am pleased to announce that you've been chosen as \"Neighbor of the year\"! That comes with a 10,000g prize! Congratulations! Everyone in town wants to say 'thanks' for all you've done. ^  -Mayor%item money 10000 10001 %%[#]Neighbor Of The Year",
 
   "hero_update": "@,^it's time for the quarterly Stardew Hero rankings! I've enclosed them in a separate envelope. Good luck this season!  ^  -The Mayor[#]Stardew Hero Rankings",
 
   "hero_update": "@,^it's time for the quarterly Stardew Hero rankings! I've enclosed them in a separate envelope. Good luck this season!  ^  -The Mayor[#]Stardew Hero Rankings",
Line 95: Line 95:  
   "EmilyCamping": "@,^Let's go camping! ^^ Meet me in the secret woods after 10pm.^^ Love, Emily[#]Emily's Invitation",
 
   "EmilyCamping": "@,^Let's go camping! ^^ Meet me in the secret woods after 10pm.^^ Love, Emily[#]Emily's Invitation",
 
   "EmilyDoneCamping": "Thanks for joining me last night... I had a great time.^I'm actually glad that bear showed up!^^See you soon^^  Love, Emily[#]Emily's Note",
 
   "EmilyDoneCamping": "Thanks for joining me last night... I had a great time.^I'm actually glad that bear showed up!^^See you soon^^  Love, Emily[#]Emily's Note",
   "foundLostTools": "Dear @,^Someone dropped your tools into the lost and found bin last night.^^I came in and set them next to your bed.^Hope I didn't wake you... ^^  -Mayor Lewis[#]Lost Tools",
+
   "foundLostTools": "Dear @,^Someone dropped your tools into the lost and found bin last night.^^Stop by the mayor's office to pick them up. ^^  -Mayor Lewis[#]Lost Tools",
 
   "fishing2": "I've got some new items in stock...^A deluxe fishing pole and some bait that you can attach to it!^You can use bait to make fish bite faster. Hope to see you soon! ^  -Willy[#]Willy's New Items",
 
   "fishing2": "I've got some new items in stock...^A deluxe fishing pole and some bait that you can attach to it!^You can use bait to make fish bite faster. Hope to see you soon! ^  -Willy[#]Willy's New Items",
 
   "fishing6": "Come by the shop and check out the new rods I'm selling.^They're the best money can buy... and you can customize them with different kinds of tackle!^Hope to see you soon! ^  -Willy[#]Willy's New Items #2",
 
   "fishing6": "Come by the shop and check out the new rods I'm selling.^They're the best money can buy... and you can customize them with different kinds of tackle!^Hope to see you soon! ^  -Willy[#]Willy's New Items #2",
Line 162: Line 162:  
   "RarecrowSociety": "Dear @,^^Your dedication is truly impressive...^^Only a select few manage to acquire the complete Rarecrow collection!^^Please accept this blueprint to commemorate your achievement.^  -The Z.C. Rarecrow Society%item craftingRecipe Deluxe_Scarecrow %%[#]From The Rarecrow Society",
 
   "RarecrowSociety": "Dear @,^^Your dedication is truly impressive...^^Only a select few manage to acquire the complete Rarecrow collection!^^Please accept this blueprint to commemorate your achievement.^  -The Z.C. Rarecrow Society%item craftingRecipe Deluxe_Scarecrow %%[#]From The Rarecrow Society",
 
   "CarolineTea": "Dear @,^^Thanks for stopping by my sunroom yesterday. I usually drink tea alone, but it was fun to share with you!^^I've enclosed instructions on how to prepare and grow your own tea. No pressure, but if you do end up growing some, make sure to bring me a cup!^^-Caroline%item craftingRecipe Tea_Sapling %%[#]Caroline's Tea Note",
 
   "CarolineTea": "Dear @,^^Thanks for stopping by my sunroom yesterday. I usually drink tea alone, but it was fun to share with you!^^I've enclosed instructions on how to prepare and grow your own tea. No pressure, but if you do end up growing some, make sure to bring me a cup!^^-Caroline%item craftingRecipe Tea_Sapling %%[#]Caroline's Tea Note",
   "WoodChipper": "Hey @,^^Just wanted to let you know about a new item I'm carrying... it's called a 'Wood Chipper'.^^You can use it to break hardwood into several pieces of regular wood!^^I know wood can be hard to come by in the winter, so if your supply gets low, consider picking one up.^      -Robin[#]Wood Chipper Notice"
+
   "WoodChipper": "Hey @,^^Just wanted to let you know about a new item I'm carrying... it's called a 'Wood Chipper'.^^You can use it to break hardwood into several pieces of regular wood!^^I know wood can be hard to come by in the winter, so if your supply gets low, consider picking one up.^      -Robin[#]Wood Chipper Notice",
 +
  "willyBackRoomInvitation": "@,^^I've unlocked the back room of the shop.^Come by when you have a chance.^There's something I want to show you.^^-Willy[#]Willy's Back Room Invitation",
 +
  "KrobusCrafting": "@, I'm not sure how the human message system works, so I asked Wizard to help me write this letter.^^I hope you are doing okay.^^I wanted to share this with you... it's notes on how my people build a certain item.^^  -Krobus%item craftingRecipe Dark_Sign %%[#]A letter from Krobus",
 +
  "georgeGifts": "Dear @,^^Thank you so much for the leeks. They look fresh and delicious. George will love them.^^Today, I'm going to surprise him with 12 little gift-wrapped treasures (thanks to you!). Stop by if you want to be there!^^-Evelyn^^P.S. Please accept this gift. I think you'll enjoy it!%item bigobject 246 %%[#]Evelyn's thank-you note",
 +
  "robinResource": "Hey @,^^Congratulations on completing my little challenge. I'm impressed!^^As an added bonus, I've included the blueprints for a new type of chest. Enjoy!^^-Robin^^^^P.S. -- Now that you have all those resources laying around, why not swing by for some construction work?%item craftingRecipe Stone_Chest %%[#]Robin's Resource Rush",
 +
  "ClintReward": "Um, Hello...    ^Thanks for helping me clear out those monsters.^^I'm not scared at all! ...But it should make the mines safer for everyone else... right?^^Take this blueprint. (Hope it doesn't make me obsolete...)^^  -Clint, the blacksmith%item craftingRecipe Geode_Crusher %%[#]Clint's Thank-you",
 +
  "ClintReward2": "Um, Hello...    ^Thanks for helping me clear out more monsters.^^Maybe next time, I'll take care of them myself... if I have time!^^Take this item. I found it in the back room...^^  -Clint, the blacksmith%item object 286 10 287 5 231 3 %%[#]Clint's Alternate Thank-you",
 +
  "willyBugWadCutscene": "^^  -Willy%item craftingRecipe Quality_Bobber %%[#]Willy's Thank-you",
 +
  "MSB_Pierre": "Dear @,^^I guess people didn't take to 'Pierre's Prime Produce' like I'd hoped...^^Anyways, here's my old 'Mini-Shipping Bin'.^The next time you get your hands on some produce worthy of the 'Pierre's Prime' luxury brand, maybe you could have them shipped my way?^^  -Pierre%item bigobject 248 %%[#]Pierre's Prime Produce",
 +
  "MSB_Lewis": "@,^I wanted to thank you for taking care of my special order. All of the hard work you've done has been a great boost to Pelican Town's image.^Here's a 'Mini-Shipping Bin' as a token of my appreciation.^Place it anywhere and I'll be sure to make a stop when I make my rounds.^^  -Lewis%item bigobject 248 %%[#]Lewis's Thank You",
 +
  "WizardReward": "The specimen you delivered offered great insight into the machinations of the fell beings we call 'monsters'.^^I've formulated a pungent tincture that these beings find intoxicating. Use it with caution...^^  -M. Rasmodius, Wizard%item craftingRecipe Monster_Musk %%[#]The Wizard's Discovery",
 +
  "WizardReward2": "Thanks to the ectoplasm you delivered to me, I've made a major breakthrough in the field of arcane engineering.^^Enclosed, you'll find blueprints for a most useful machine...^^  -M. Rasmodius, Wizard%item craftingRecipe Mini-Obelisk %%[#]The Wizard's Breakthrough",
 +
  "DemetriusReward": "Hi @,^^Thanks for your help with the fish.^Nature is usually good at keeping things balanced, but sometimes artificial factors can cause an imbalance.^^I've enclosed a blueprint from a science magazine that you might find interesting.^^-Demetrius%item craftingRecipe Farm_Computer %%[#]Demetrius' Thank You",
 +
  "willyHours": "Good news!^^The ol' boat is seaworthy once again, thanks to you!^^Stop by the back room whenever you want a ride.^^My shop is now open at 8AM every day, so you can get an early start.^^-Willy[#]Willy's Boat",
 +
  "linusTrashCleanup": "Hi @,^^Thanks for helping me clean up around the valley.^The waters are looking much cleaner. I think everyone will appreciate it. I know I will.^As a way of saying 'thanks', I wanted to teach you how to grow your own fiber. I hope it's useful.^^-Linus%item craftingRecipe Fiber_Seeds %%[#]Linus' Thank You",
 +
  "gusGiantOmelet": "Hi @,^^Thanks for the eggs.^The yolks look amazing... I think this will be my best omelet yet!^^Please accept this gift.^^-Gus%item bigobject 216 %%[#]Gus' Famous Omelet",
 +
  "pamNewChannel": "Hey kid,^^Thanks for the 'juice'. It definitely had a ...one-of-a-kind... flavor.^^By the way, have you ever tuned in to channel 736? It's a seasonal fishing program that you might find interesting.^^Take care,^-Pam[#]Pam's Tip",
 +
  "emilyStones": "Hi @,^^Thanks again for the wonderful gemstones.^These will be perfect for my energy re-alignment work!^I wanted to thank you with this special gift. I hope you create some wonderful items with it!^^-Emily%item bigobject 247 %%[#]Emily's Gemstones",
 +
  "carolineSO": "Hi @,^^Lewis told me that you've been shipping a lot of ingredients from the island! It's great to have access to new produce... it really opens a whole new world of culinary possibilities!^I'm including a gift for you... some blueprints you might find useful.^^-Caroline%item craftingRecipe Solar_Panel %%[#]Caroline's Tropical Ingredients",
 +
  "WillyTropicalFish": "@,^^Congrats on a successful island fishing trip. I'm proud of ya!^^Here, take this special fish tank. It'll make a great piece in your house.^^-Willy%item furniture 2312 %%[#]Willy's Tropical Challenge",
 +
  "passedOutIsland": "@,^^You never showed up at the boat, so I went lookin' for ya.^^Found you sprawled out in the dirt, with a couple o' parrots pulling gold out of your pockets!^^Had to drag you all the way down to the boat. Me legs feel like two freshwater shrimp...^-Willy",
 +
  "passedOutIsland_Leo": "Hi @,^^Last night, I found you slumbering in the dark.^It wasn't a very safe place, so the bird friends air-lifted you to your bed.^Please be careful from now on.^^-Leo^^P.S. Willy helped me write this.",
 +
  "guntherBones": "Hi @,^^Thanks for all the bones. I've got a lot to sort through here! To think, each fragment belonged to a living, breathing body from the past. Fascinating.^^Please accept this unique crafting recipe as a thank-you gift!^^-Gunther%item craftingRecipe Bone_Mill %%[#]Gunther's Note",
 +
  "LeoCooking": "@,^Here's a food from my home, that me and my family enjoy. Hope you like it. ^^  -Leo^^P.S. Willy helped me write this.%item cookingRecipe %%[#]Leo's Recipe"
 
}
 
}
</source>}}
+
</syntaxhighlight>}}
    
==Format==
 
==Format==
 
===Key===
 
===Key===
Each mail entry has a unique key which identifies the message (e.g. to track whether the player already received it). For example, <tt>Robin</tt> at the start of this entry is the mail key:
+
Each mail entry has a unique key which identifies the message (''e.g.,'' to track whether the player already received it). For example, <samp>Robin</samp> at the start of this entry is the mail key:
<source lang="json">
+
<syntaxhighlight lang="json">
 
"Robin": "Hey there!^I had some extra wood lying around... I thought maybe you could use it. Take care!  ^  -Robin %item object 388 50 %%[#]A Gift From Robin"
 
"Robin": "Hey there!^I had some extra wood lying around... I thought maybe you could use it. Take care!  ^  -Robin %item object 388 50 %%[#]A Gift From Robin"
</source>
+
</syntaxhighlight>
    
The key can be one of these formats:
 
The key can be one of these formats:
Line 180: Line 203:  
! description
 
! description
 
|-
 
|-
| <tt>{{t|season}}_{{t|day of month}}_{{t|year}}</tt>
+
| <samp>{{t|season}}_{{t|day of month}}_{{t|year}}</samp>
| Sent on the given date.<br /><small>Example: <tt>spring_15_3</tt> applies on spring 15 in year 3.</small>
+
| Sent on the given date.<br /><small>Example: <samp>spring_15_3</samp> applies on spring 15 in year 3.</small>
 
|-
 
|-
| <tt>{{t|season}}_{{t|day of month}}</tt>
+
| <samp>{{t|season}}_{{t|day of month}}</samp>
| Sent on the given date in any year. This is ignored if mail was sent for the previous format.<br /><small>Example: <tt>spring_15</tt> applies on spring 15.</small>
+
| Sent on the given date in any year. This is ignored if mail was sent for the previous format.<br /><small>Example: <samp>spring_15</samp> applies on spring 15.</small>
 
|-
 
|-
 
| ''arbitrary key''
 
| ''arbitrary key''
Line 202: Line 225:  
! description
 
! description
 
|-
 
|-
| <tt>@</tt>
+
| <samp>@</samp>
| Replaced with the player name.<br /><small>Example: <tt>Hello @!</tt></small>
+
| Replaced with the player name.<br /><small>Example: <samp>Hello @!</samp></small>
 
|-
 
|-
| <tt>¦</tt>
+
| <samp>¦</samp>
| Switches between gendered versions of the letter. Male players see the text before <tt>¦</tt>, and others see the text after it. Only the first instance is recognized. If the text doesn't contain it, all players see the same version.
+
| Switches between gendered versions of the letter. Male players see the text before <samp>¦</samp>, and others see the text after it. Only the first instance is recognized. If the text doesn't contain it, all players see the same version.
 
|-
 
|-
| <tt>%item object [{{t|id}} {{t|count}}]+ %%</tt>
+
| <samp>%item object [{{t|id}} {{t|count}}]+ %%</samp>
| Attach a random item from the listed space-delimited item IDs and counts. For example, <tt>%item object 388 50 %%</tt> attaches 50 wood; <tt>%item object 388 50 390 10 %%</tt> attaches ''either'' 50 wood, or 10 stone. See [[Modding:Object data]] for a list of item IDs.
+
| Attach a random item from the listed space-delimited item IDs and counts. For example, <samp>%item object 388 50 %%</samp> attaches 50 wood; <samp>%item object 388 50 390 10 %%</samp> attaches ''either'' 50 wood, or 10 stone. See [[Modding:Items]] for a list of object IDs.
 
|-
 
|-
| <tt>%item bigobject [{{t|id}}]+ %%</tt>
+
| <samp>%item bigobject [{{t|id}}]+ %%</samp>
| Attach a random big craftable from the listed space-delimited IDs. For example, <tt>%item bigobject 144 163 %%</tt> attaches ''either'' a stone brazier or cask. See [[Modding:Big craftable data]] for a list of item IDs.
+
| Attach a random big craftable from the listed space-delimited IDs. For example, <samp>%item bigobject 144 163 %%</samp> attaches ''either'' a stone brazier or cask. See [[Modding:Items]] for a list of big craftable IDs.
 
|-
 
|-
| <tt>%item money {{t|amount}} %%</tt><br /><tt>%item money {{t|min}} {{t|max}} %%</tt>
+
| <samp>%item furniture [{{t|id}}]+ %%</samp>
| Attach the given amount of money, or a random amount between an inclusive {{t|min}} and exclusive {{t|max}} value. In either case, the value is rounded down to the nearest 10 (e.g. 156→150).
+
| Attach a random furniture item from the listed space-delimited IDs. For example, <samp>%item furniture 1142 709 %%</samp> attaches ''either'' a puzzle table or a walnut dresser. See [[Modding:Items]] for a list of furniture IDs.
 
|-
 
|-
| <tt>%item tools [{{t|type}}]+ %%</tt>
+
| <samp>%item money {{t|amount}} %%</samp><br /><samp>%item money {{t|min}} {{t|max}} %%</samp>
| Attach one or more base-quality tools. The valid types are <tt>Axe</tt>, <tt>Hoe</tt>, <tt>Can</tt> (watering can), <tt>Pickaxe</tt>, and <tt>Scythe</tt>. Invalid types are ignored. For example, <tt>%item tools Axe Scythe %%</tt> attaches both an axe and scythe.
+
| Attach the given amount of money, or a random amount between an inclusive {{t|min}} and exclusive {{t|max}} value. In either case, the value is rounded down to the nearest 10 (''e.g.,'' 156→150).
 
|-
 
|-
| <tt>%item conversationTopic {{t|key}} {{t|days}} %%</tt>
+
| <samp>%item tools [{{t|type}}]+ %%</samp>
 +
| Attach one or more base-quality tools. The valid types are <samp>Axe</samp>, <samp>Hoe</samp>, <samp>Can</samp> (watering can), <samp>Pickaxe</samp>, and <samp>Scythe</samp>. Invalid types are ignored. For example, <samp>%item tools Axe Scythe %%</samp> attaches both an axe and scythe.
 +
|-
 +
| <samp>%item conversationTopic {{t|key}} {{t|days}} %%</samp>
 
| Start an [[Modding:Dialogue#Active dialogue events|active dialogue event]] for the given number of days.
 
| Start an [[Modding:Dialogue#Active dialogue events|active dialogue event]] for the given number of days.
 
|-
 
|-
| <tt>%item cookingRecipe %%</tt>
+
| <samp>%item cookingRecipe %%</samp>
| Teach the player the cooking recipe whose requirement field starts with <tt>f {{t|npc name}}</tt>, where {{t|npc name}} is the mail key with 'Cooking' removed. For example, if the mail key is <tt>RobinCooking</tt>, this command would find a cooking recipe with a requirement starting with <tt>f Robin</tt> that the player doesn't already know.
+
| Teach the player the cooking recipe whose requirement field starts with <samp>f {{t|npc name}}</samp>, where {{t|npc name}} is the mail key with 'Cooking' removed. For example, if the mail key is <samp>RobinCooking</samp>, this command would find a cooking recipe with a requirement starting with <samp>f Robin</samp> that the player doesn't already know.
 
|-
 
|-
| <tt>%item craftingRecipe {{t|key}} %%</tt>
+
| <samp>%item craftingRecipe {{t|key}} %%</samp>
| Teach the player the crafting recipe with the given ID.
+
| Teach the player the crafting recipe with the given ID. The key is the item name. If the item name has spaces, such as "Mayonnaise Machine", use underscores in place of spaces, ie "Mayonnaise_Machine".
 
|-
 
|-
| <tt>%item itemRecovery {{t|key}} %%</tt>
+
| <samp>%item itemRecovery {{t|key}} %%</samp>
 
| Attach the item that the player asked [[Marlon]] to find in the mines, if any.
 
| Attach the item that the player asked [[Marlon]] to find in the mines, if any.
 
|-
 
|-
| <tt>%item quest {{t|quest ID}}</tt>
+
| <samp>%item quest {{t|quest ID}} %%</samp>
 
| Attach the given quest ID to the letter, so the player can choose to accept it.
 
| Attach the given quest ID to the letter, so the player can choose to accept it.
 
|-
 
|-
| <tt>%item quest {{t|quest ID}} true</tt>
+
| <samp>%item quest {{t|quest ID}} true %%</samp>
| Attach the given quest ID to the letter and add it automatically. (If the player has the <tt>NOQUEST_{{t|quest id}}</tt> mail flag set, it won't be added automatically.)
+
| Attach the given quest ID to the letter and add it automatically. (If the player has the <samp>NOQUEST_{{t|quest id}}</samp> mail flag set, it won't be added automatically.)
 
|-
 
|-
| <tt>%secretsanta</tt>
+
| <samp>%secretsanta</samp>
| Replaced with a random town NPC name if the date is winter 18–25 inclusively, else replaced with <tt>???</tt>.
+
| Replaced with a random town NPC name if the date is winter 18–25 inclusively, else replaced with <samp>???</samp>.
 
|}
 
|}
   Line 245: Line 271:  
===Overview===
 
===Overview===
 
The game tracks ''mail flags'' for each player. This is used for two purposes:
 
The game tracks ''mail flags'' for each player. This is used for two purposes:
* Tracking received letters. The key for each letter in <tt>Data\Mail</tt> is a mail flag; if the player has the flag for a letter, the game considers it to be received.
+
* Tracking received letters. The key for each letter in <samp>Data\Mail</samp> is a mail flag; if the player has the flag for a letter, the game considers it to be received.
* Tracking non-mail changes in the world. For example, <tt>artifactFound</tt> means the player has found at least one artifact, <tt>jojaMember</tt> means the player has a Joja membership, etc. These have no letter associated with them.
+
* Tracking non-mail changes in the world. For example, <samp>artifactFound</samp> means the player has found at least one artifact, <samp>jojaMember</samp> means the player has a Joja membership, etc. These have no letter associated with them.
   −
Mail flags are tracked in three main fields:
+
You can check the mail flags in-game:
 +
{| class="wikitable"
 +
|-
 +
! mod type
 +
! info
 +
|-
 +
|valign="top"| [[Modding:Content Patcher|Content Patcher]] packs
 +
| You can check mail flags using the <samp>HasFlag</samp> condition. For example:
 +
<syntaxhighlight lang="js">
 +
{
 +
    "Action": "EditImage",
 +
    "Target": "Portraits/Abigail",
 +
    "FromFile": "assets/abigail-bow.png",
 +
    "When": {
 +
        "HasFlag": "Beat_PK" // player beat the Prairie King game
 +
    }
 +
}
 +
</syntaxhighlight>
 +
|-
 +
|valign="top"| C# mods
 +
| Mail flags are tracked in three main fields:
    
{| class="wikitable"
 
{| class="wikitable"
Line 255: Line 301:  
! description
 
! description
 
|-
 
|-
| <tt>Game1.player.mailForTomorrow</tt>
+
| <samp>Game1.player.mailForTomorrow</samp>
 
| Letters to add to the player's mailbox at the start of the next day.
 
| Letters to add to the player's mailbox at the start of the next day.
 
|-
 
|-
| <tt>Game1.player.mailbox</tt>
+
| <samp>Game1.player.mailbox</samp>
 
| Letters currently in the player's mailbox.
 
| Letters currently in the player's mailbox.
 
|-
 
|-
| <tt>Game1.player.mailReceived</tt>
+
| <samp>Game1.player.mailReceived</samp>
 
| All mail flags set for the player. That includes both letters and non-mail flags.
 
| All mail flags set for the player. That includes both letters and non-mail flags.
 
|}
 
|}
   −
You need to check all three fields to know if a letter was sent or mail flag set, but the game provides a <tt>Game1.hasOrWillReceiveMail(string id)</tt> method for convenience.
+
You can either check the fields individually, or use the game's <samp>Game1.player.hasOrWillReceiveMail(string id)</samp> method to check all three.
 +
|}
    
===List===
 
===List===
There are far too many flags to list, but here are some useful non-mail flags:
+
There are far too many flags to list, but here are some useful ones:
   −
{| class="wikitable"
+
; [[Community Center]] and [[JojaMart]]&#58;
 +
:{| class="wikitable"
 
|-
 
|-
 
! flag
 
! flag
 
! meaning
 
! meaning
 
|-
 
|-
| <tt>artifactFound</tt>
+
| <samp>abandonedJojaMartAccessible</samp>
| The player has found at least one artifact.
+
| The [[Bundles#Abandoned JojaMart|abandoned JojaMart]] is accessible.
 +
|-
 +
| <samp>canReadJunimoText</samp>
 +
| The player can read the language of Junimos (''i.e.,'' the plaques in the Community Center).
 
|-
 
|-
| <tt>Beat_PK</tt>
+
| <samp>ccIsComplete</samp>
| The player has beaten the Prairie King arcade game.
+
| The player has completed the [[Community Center|community center]]. Note that this isn't set reliably; if using [[Modding:Content Patcher|Content Patcher]], use the <samp>IsCommunityCenterComplete</samp> and <samp>IsJojaMartComplete</samp> tokens instead.
 +
 
 +
These flags are set when completing each bundle (in both community center and Joja paths):
 +
* <samp>ccBoilerRoom</samp> (repairs minecarts);
 +
* <samp>ccBulletin</samp> (friendship bonus with many villagers);
 +
* <samp>ccCraftsRoom</samp> (repairs bridge to the [[quarry]]);
 +
* <samp>ccFishTank</samp> (unlocks the [[Pans|copper pan]]);
 +
* <samp>ccPantry</samp> (unlocks the [[greenhouse]]);
 +
* <samp>ccVault</samp> (repairs the bus and unlocks access to [[The Desert|the desert]]).
 +
 
 +
You can also check for Joja specifically using <samp>jojaBoilerRoom</samp>, <samp>jojaCraftsRoom</samp>, <samp>jojaFishTank</samp>, <samp>jojaPantry</samp>, and <samp>jojaVault</samp>.
 
|-
 
|-
| <tt>beenToWoods</tt>
+
| <samp>ccMovieTheater</samp><br /><samp>ccMovieTheaterJoja</samp>
| The player has entered the Secret Woods at least once.
+
| The movie theater has been constructed, either through the community path (only <samp>ccMovieTheater</samp> is set) or through Joja (both are set).
 
|-
 
|-
| <tt>canReadJunimoText</tt>
+
| <samp>jojaMember</samp>
| The player can read the language of Junimos (i.e. the plaques in the Community Center).
+
| The player bought a [[JojaMart]] membership.
 +
|}
 +
 
 +
; Found items&#58;
 +
:{| class="wikitable"
 
|-
 
|-
| <tt>ccIsComplete</tt>
+
! flag
| The player has completed the Community Center. Note that this isn't set reliably; if using [[Modding:Content Patcher|Content Patcher]], use the <tt>IsCommunityCenterComplete</tt> and <tt>IsJojaMartComplete</tt> tokens instead.  See also flags for specific sections: <tt>ccBoilerRoom</tt>, <tt>ccBulletin</tt>, <tt>ccCraftsRoom</tt>, <tt>ccFishTank</tt>, <tt>ccPantry</tt>, and <tt>ccVault</tt>. The equivalent section flags for the Joja warehouse are <tt>jojaBoilerRoom</tt>, <tt>jojaCraftsRoom</tt>, <tt>jojaFishTank</tt>, <tt>jojaPantry</tt>, and <tt>jojaVault</tt>.
+
! meaning
 
|-
 
|-
| <tt>doorUnlockAbigail</tt>
+
| <samp>artifactFound</samp>
| The player has unlocked access to Abigail's room. See also flags for other NPCs: <tt>doorUnlockAlex</tt>, <tt>doorUnlockCaroline</tt>, <tt>doorUnlockEmily</tt>, <tt>doorUnlockHaley</tt>, <tt>doorUnlockHarvey</tt>, <tt>doorUnlockJas</tt>, <tt>doorUnlockJodi</tt>, <tt>doorUnlockMarnie</tt>, <tt>doorUnlockMaru</tt>, <tt>doorUnlockPenny</tt>, <tt>doorUnlockPierre</tt>, <tt>doorUnlockRobin</tt>, <tt>doorUnlockSam</tt>, <tt>doorUnlockSebastian</tt>, <tt>doorUnlockVincent</tt>.
+
| The player has found at least one artifact.
 
|-
 
|-
| <tt>galaxySword</tt>
+
| <samp>galaxySword</samp>
 
| The player has acquired the [[Galaxy Sword]].
 
| The player has acquired the [[Galaxy Sword]].
 
|-
 
|-
| <tt>geodeFound</tt>
+
| <samp>geodeFound</samp>
 
| The player has found at least one geode.
 
| The player has found at least one geode.
 +
|}
 +
 +
; Unlocked areas & upgrades&#58;
 +
:{| class="wikitable"
 +
|-
 +
! area
 +
! flag
 +
! meaning
 +
|-
 +
| [[The Beach|Beach]]
 +
| <samp>beachBridgeFixed</samp>
 +
| The bridge to access the second beach area is repaired.
 +
|-
 +
| [[Secret Woods]]
 +
| <samp>beenToWoods</samp>
 +
| The player has entered the [[Secret Woods]] at least once.
 +
|-
 +
| [[Pelican Town|Town]]
 +
| <samp>doorUnlock*</samp>
 +
| The player has unlocked access to a given NPC's room. See the flag for each NPC: <samp>doorUnlockAbigail</samp>, <samp>doorUnlockAlex</samp>, <samp>doorUnlockCaroline</samp>, <samp>doorUnlockEmily</samp>, <samp>doorUnlockHaley</samp>, <samp>doorUnlockHarvey</samp>, <samp>doorUnlockJas</samp>, <samp>doorUnlockJodi</samp>, <samp>doorUnlockMarnie</samp>, <samp>doorUnlockMaru</samp>, <samp>doorUnlockPenny</samp>, <samp>doorUnlockPierre</samp>, <samp>doorUnlockRobin</samp>, <samp>doorUnlockSam</samp>, <samp>doorUnlockSebastian</samp>, <samp>doorUnlockVincent</samp>.
 +
|-
 +
| [[The Mountain|Mountain]]
 +
| <samp>landslideDone</samp>
 +
| The landside blocking access to [[The Mines|the mines]] has been cleared.
 +
|-
 +
| [[The Sewers|Sewers]]
 +
| <samp>openedSewer</samp>
 +
| The player has unlocked the sewers.
 +
|-
 +
| [[Fish Shop]]
 +
| <samp>willyBoatFixed</samp>
 +
| The player fixed Willy's boat, so they can now access [[Ginger Island]].
 +
|-
 +
| [[Ginger Island#Island West|Island farm]]
 +
| <samp>Island_UpgradeParrotPlatform</samp>
 +
| The player unlocked the [[Ginger Island#Parrot Express|Parrot Express]].
 +
|-
 +
| [[Ginger Island#Island West|Island farm]]
 +
| <samp>Island_UpgradeHouse</samp>
 +
| The player unlocked the island house.
 +
|-
 +
| [[Ginger Island#Island West|Island farm]]
 +
| <samp>Island_UpgradeHouse_Mailbox</samp>
 +
| The player unlocked the island mailbox.
 +
|-
 +
| [[Ginger Island#Island West|Island farm]]
 +
| <samp>Island_W_Obelisk</samp>
 +
| The player unlocked the island [[Farm Obelisk]].
 +
|-
 +
| [[Ginger Island#Island North|Island north]]
 +
| <samp>Island_FirstParrot</samp>
 +
| The player unlocked access to the norther section of the island.
 +
|-
 +
| [[Ginger Island#Island North|Island north]]
 +
| <samp>Island_UpgradeBridge</samp>
 +
| The player repaired the bridge to the [[Ginger Island#Dig Site|island dig site]].
 +
|-
 +
| [[Ginger Island#Island North|Island north]]
 +
| <samp>Island_UpgradeTrader</samp>
 +
| The player unlocked the [[Island Trader]].
 +
|-
 +
| [[Ginger Island#Island South|Island south]]
 +
| <samp>Island_Resort</samp>
 +
| The player built the island resort.
 +
|-
 +
| [[Ginger Island#Island South|Island south]]
 +
| <samp>Island_Turtle</samp>
 +
| The player unlocked access to the island farm.
 +
|-
 +
| [[Volcano Dungeon|Volcano]]
 +
| <samp>Island_VolcanoBridge</samp>
 +
| The player unlocked the bridge at the Volcano Dungeon entrance.
 +
|-
 +
| [[Volcano Dungeon|Volcano]]
 +
| <samp>Island_VolcanoShortcutOut</samp>
 +
| The player unlocked the shortcut exit from the [[Volcano Dungeon#Shop|volcano shop]].
 +
|}
 +
 +
; Completed [[Adventurer's Guild#Monster Eradication Goals|Adventurer's guild monster eradication goals]]&#58;
 +
:{| class="wikitable"
 +
|-
 +
! flag
 +
! goal
 +
! reward
 +
|-
 +
| <samp>Gil_Arcane Hat</samp>
 +
| Kill 100 mummies
 +
| {{name|Arcane Hat}}
 +
|-
 +
| <samp>Gil_Burglar's Ring</samp>
 +
| Kill 500 dust sprites
 +
| {{name|Burglar's Ring}}
 +
|-
 +
| <samp>Gil_Crabshell Ring</samp>
 +
| Kill 60 crabs
 +
| {{name|Crabshell Ring}}
 +
|-
 +
| <samp>Gil_Hard Hat</samp>
 +
| Kill 30 duggies
 +
| {{name|Hard Hat}}
 +
|-
 +
| <samp>Gil_Insect Head</samp>
 +
| Kill 125 cave insects
 +
| {{name|Insect Head}}
 +
|-
 +
| <samp>Gil_Knight's Helmet</samp>
 +
| Kill 50 pepper rexes
 +
| {{name|Knight's Helmet}}
 +
|-
 +
| <samp>Gil_Napalm Ring</samp>
 +
| Kill 250 serpents
 +
| {{name|Napalm Ring}}
 +
|-
 +
| <samp>Gil_Savage Ring</samp>
 +
| Kill 150 void spirits
 +
| {{name|Savage Ring}}
 +
|-
 +
| <samp>Gil_Skeleton Mask</samp>
 +
| Kill 50 skeletons
 +
| {{name|Skeleton Mask}}
 
|-
 
|-
| <tt>guildMember</tt>
+
| <samp>Gil_Slime Charmer Ring</samp>
 +
| Kill 1000 slimes
 +
| {{name|Slime Charmer Ring}}
 +
|-
 +
| <samp>Gil_Telephone</samp>
 +
| Kill 150 magma sprites
 +
| [[Telephone]] number for adventurer's guild
 +
|-
 +
| <samp>Gil_Vampire Ring</samp>
 +
| Kill 200 bats
 +
| {{name|Vampire Ring}}
 +
|}
 +
 
 +
; Other&#58;
 +
:{| class="wikitable"
 +
|-
 +
! flag
 +
! meaning
 +
|-
 +
| <samp>Beat_PK</samp>
 +
| The player has beaten the [[Prairie King Arcade System|Prairie King]] arcade game.
 +
|-
 +
| <samp>Farm_Eternal</samp>
 +
| The player has reached a 100% [[perfection]] score.
 +
|-
 +
| <samp>guildMember</samp>
 
| The player is a member of the [[Adventurer's Guild]].
 
| The player is a member of the [[Adventurer's Guild]].
 
|-
 
|-
| <tt>jojaMember</tt>
+
| <samp>JunimoKart</samp>
| The player bought a [[JojaMart]] membership.
+
| The player has beaten the [[Junimo Kart]] arcade game.
 +
|-
 +
| <samp>museumComplete</samp>
 +
| The player has completed the [[Museum]] artifact collection.
 
|-
 
|-
| <tt>JunimoKart</tt>
+
| <samp>qiChallengeComplete</samp>
| The player has beaten the [[Junimo Kart]] arcade game.
+
| The player completed the Qi's Challenge [[Quests|quest]] by reaching level 25 in the Skull Cavern.
 +
|}
 +
 
 +
==Custom mail formatting==
 +
You can customize mail and [[Secret Notes|secret notes]] by including three custom commands in the letter text (including the <samp>[]</samp> characters):
 +
{| class="wikitable"
 
|-
 
|-
| <tt>landslideDone</tt>
+
! command
| The landside blocking access to the [[mines]] has been cleared.
+
! effect
 
|-
 
|-
| <tt>museumComplete</tt>
+
| <samp>[letterbg {{t|index}}]</samp>
| The player has completed the [[Museum]] artifact collection.
+
| Changes the default letter background to a vanilla background from <samp>LooseSprites/letterBG</samp>. The index can be 0 (default letter), 1 (Sandy's lined paper), 2 (Wizard style), or 3 (Krobus style). This will also set the default text color for that style, unless overridden by <samp>textcolor</samp>.
 
|-
 
|-
| <tt>openedSewer</tt>
+
| <samp>[letterbg {{t|asset name}} {{t|index}}]</samp>
| The player has unlocked the sewers.
+
| Changes the default letter background to the given texture. The asset name should match a texture containing two rows: one with 320x180 pixel letter background images, and one with 24x24 pixel button backgrounds shown behind attached items. The index is the sprite to use from those rows, starting at 0 for the first one.
 +
Only the first 4 letter background images of a row will be properly displayed.
 +
Only one row of button may exist.
 +
See image below
 
|-
 
|-
| <tt>qiChallengeComplete</tt>
+
| <samp>[textcolor {{t|color}}]</samp>
| The player completed the Qi's Challenge [[quest]] by reaching level 25 in the Skull Cavern.
+
| Changes the letter text color. The valid colors are <samp>black</samp>, <samp>blue</samp>, <samp>cyan</samp>, <samp>gray</samp>, <samp>green</samp>, <samp>orange</samp>, <samp>purple</samp>, <samp>red</samp>, and <samp>white</samp>.
 
|}
 
|}
    +
 +
[[File:Lettersbglayers.png|center|thumb|Example : the letters  background images can go on the pale pink, pink and purple spaces, while the buttons can only go on the orange line.]]
 +
 +
 +
[[ru:Модификации:Почта]]
 
[[Category:Modding]]
 
[[Category:Modding]]
106,438

edits