Changes

m
Text replacement - "[[Copper Pan|" to "[[Pans|"
Line 232: Line 232:  
|-
 
|-
 
| <samp>%item object [{{t|id}} {{t|count}}]+ %%</samp>
 
| <samp>%item object [{{t|id}} {{t|count}}]+ %%</samp>
| 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: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.
 
|-
 
|-
 
| <samp>%item bigobject [{{t|id}}]+ %%</samp>
 
| <samp>%item bigobject [{{t|id}}]+ %%</samp>
| 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:Big craftables 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.
 +
|-
 +
| <samp>%item furniture [{{t|id}}]+ %%</samp>
 +
| 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.
 
|-
 
|-
 
| <samp>%item money {{t|amount}} %%</samp><br /><samp>%item money {{t|min}} {{t|max}} %%</samp>
 
| <samp>%item money {{t|amount}} %%</samp><br /><samp>%item money {{t|min}} {{t|max}} %%</samp>
Line 250: Line 253:  
|-
 
|-
 
| <samp>%item craftingRecipe {{t|key}} %%</samp>
 
| <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".
 
|-
 
|-
 
| <samp>%item itemRecovery {{t|key}} %%</samp>
 
| <samp>%item itemRecovery {{t|key}} %%</samp>
Line 271: Line 274:  
* 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.
 
* 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 288: Line 311:  
|}
 
|}
   −
You need to check all three fields to know if a letter was sent or mail flag set, but the game provides a <samp>Game1.hasOrWillReceiveMail(string id)</samp> 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===
Line 303: Line 327:  
|-
 
|-
 
| <samp>canReadJunimoText</samp>
 
| <samp>canReadJunimoText</samp>
| The player can read the language of Junimos (i.e. the plaques in the Community Center).
+
| The player can read the language of Junimos (''i.e.,'' the plaques in the Community Center).
 
|-
 
|-
 
| <samp>ccIsComplete</samp>
 
| <samp>ccIsComplete</samp>
Line 312: Line 336:  
* <samp>ccBulletin</samp> (friendship bonus with many villagers);
 
* <samp>ccBulletin</samp> (friendship bonus with many villagers);
 
* <samp>ccCraftsRoom</samp> (repairs bridge to the [[quarry]]);
 
* <samp>ccCraftsRoom</samp> (repairs bridge to the [[quarry]]);
* <samp>ccFishTank</samp> (unlocks the [[Copper Pan|copper pan]]);
+
* <samp>ccFishTank</samp> (unlocks the [[Pans|copper pan]]);
 
* <samp>ccPantry</samp> (unlocks the [[greenhouse]]);
 
* <samp>ccPantry</samp> (unlocks the [[greenhouse]]);
 
* <samp>ccVault</samp> (repairs the bus and unlocks access to [[The Desert|the desert]]).
 
* <samp>ccVault</samp> (repairs the bus and unlocks access to [[The Desert|the desert]]).
Line 348: Line 372:  
! meaning
 
! meaning
 
|-
 
|-
| [[Beach]]
+
| [[The Beach|Beach]]
 
| <samp>beachBridgeFixed</samp>
 
| <samp>beachBridgeFixed</samp>
 
| The bridge to access the second beach area is repaired.
 
| The bridge to access the second beach area is repaired.
Line 356: Line 380:  
| The player has entered the [[Secret Woods]] at least once.
 
| The player has entered the [[Secret Woods]] at least once.
 
|-
 
|-
| [[Town]]
+
| [[Pelican Town|Town]]
 
| <samp>doorUnlock*</samp>
 
| <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 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>.
Line 362: Line 386:  
| [[The Mountain|Mountain]]
 
| [[The Mountain|Mountain]]
 
| <samp>landslideDone</samp>
 
| <samp>landslideDone</samp>
| The landside blocking access to the [[mines]] has been cleared.
+
| The landside blocking access to [[The Mines|the mines]] has been cleared.
 
|-
 
|-
 
| [[The Sewers|Sewers]]
 
| [[The Sewers|Sewers]]
Line 495: Line 519:  
|-
 
|-
 
| <samp>qiChallengeComplete</samp>
 
| <samp>qiChallengeComplete</samp>
| The player completed the Qi's Challenge [[quest]] by reaching level 25 in the Skull Cavern.
+
| 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"
 +
|-
 +
! command
 +
! effect
 +
|-
 +
| <samp>[letterbg {{t|index}}]</samp>
 +
| 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>.
 +
|-
 +
| <samp>[letterbg {{t|asset name}} {{t|index}}]</samp>
 +
| 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
 +
|-
 +
| <samp>[textcolor {{t|color}}]</samp>
 +
| 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:Модификации:Почта]]
 
[[ru:Модификации:Почта]]
 
[[Category:Modding]]
 
[[Category:Modding]]
105,965

edits