Jump to content

Modding:Migrate to Stardew Valley 1.7: Difference between revisions

From Stardew Valley Wiki
imported>Pathoschild
→Data asset changes: + Data/Hats data model
imported>Blueberry
 
(189 intermediate revisions by 5 users not shown)
Line 2: Line 2:


{{Modder compatibility header}}
{{Modder compatibility header}}
{{upcoming|1.6.16|message='''⚠ No upcoming Stardew Valley update has been announced.'''<br />This page describes changes accumulated in the game's pre-alpha development branch. There's no estimated release date or even assigned version number for these changes yet. Things ''will'' change before it's released!}}
{{upcoming|1.7|message='''⚠ [https://x.com/ConcernedApe/status/1961864959484412104 Stardew Valley 1.7 was announced], but has no planned release date.'''<br />There's no estimate for when the update will be released, so don't plan mod updates around the 1.7 release. Things ''will'' change before it's released!}}


This page helps mod authors prepare their mods for the next game version (tentatively {{version|1.6.16|Stardew Valley 1.6.16}}), and documents some of the changes and new functionality.
This page helps mod authors prepare their mods for the upcoming <!--{{version|1.7|Stardew Valley 1.7}}-->Stardew Valley 1.7, and documents some of the changes and new functionality.


{{TOC|limit=3}}
{{TOC|limit=3}}
Line 12: Line 12:


===What's changing?===
===What's changing?===
Stardew Valley 1.6.16 makes [[#Event changes|significant changes to event data]], but otherwise so far only has small changes for mods following the major 1.6 and 1.6.9 updates.
Stardew Valley 1.7 makes significant changes to many data assets to enable new game features and mod extensibility. See the sections below for more details.


===Is this the modapocalypse?===
===Is this the modapocalypse?===
No, the current impact on mods is expected to be minimal.
Probably not. SMAPI and Content Patcher will automatically rewrite older mods for many of the changes, so they should still work as-is. Some mods may need an update.
 
Some potential impacts:
* The [[#Event changes|event changes]] may affect mods which edit vanilla events or add pre-1.6 events with numeric IDs. Content packs for [[Modding:Content Patcher|Content Patcher]] should be mostly unaffected, since it will rewrite older content packs automatically where possible.
* Mods which use Harmony or reflection to hook deeply into game internals are fragile, and may break unexpectedly in any game update. However there are no particular changes in 1.6.16 expected to affect such mods more than usual.


===How to update your mod===
===How to update your mod===
Here's a suggested 'quick start' guide to update a mod for Stardew Valley 1.6.16.
Here's a suggested 'quick start' guide to update a mod for Stardew Valley 1.7.


; For C# mods&#58;
; For C# mods&#58;
:# [[Modding:Migrate to Stardew Valley 1.6.9#How to update your mod|Update for Stardew Valley 1.6.9]] if you haven't already.
:# [[Modding:Migrate to Stardew Valley 1.6.16#How to update your mod|Update for Stardew Valley 1.6.16]] if you haven't already.
:# Rebuild the solution.
:# Rebuild the solution.
:# Fix any build errors and review any build warnings. You can search this page and [[Modding:Index#Migration guides|previous migration guides]] for relevant info as needed.
:# Fix any build errors and review any build warnings. You can search this page and [[Modding:Index#Migration guides|previous migration guides]] for relevant info as needed.
Line 33: Line 29:


; For [[Modding:Content Patcher|Content Patcher]] packs&#58;
; For [[Modding:Content Patcher|Content Patcher]] packs&#58;
:# [[Modding:Migrate to Stardew Valley 1.6.9#How to update your mod|Update for Stardew Valley 1.6.9]] if you haven't already.
:# [[Modding:Migrate to Stardew Valley 1.6.16#How to update your mod|Update for Stardew Valley 1.6.16]] if you haven't already.
:# Skim through this page, and check any section that might be relevant to the mod.
:# Skim through this page, and check any section that might be relevant to the mod.


Line 88: Line 84:
|}
|}


For example, here's how to add new boots in 1.6.16:
For example, here's how to add new boots in 1.7:
{{Content Patcher example|<nowiki>
{{Content Patcher example|<nowiki>
     "Changes": [
     "Changes": [
Line 116: Line 112:
</nowiki>}}
</nowiki>}}


===[[Modding:Maps#Sitting on non-furniture chairs|<samp>Data/ChairTiles</samp>]]===
===[[Modding:Buffs|<samp>Data/Buffs</samp>]]===
* Fixed support for tilesheet asset names containing a dot. (For example, a tileseet asset named <code>ExampleAuthor.ModName_Tilesheet</code> now correctly uses that as the data key instead of <code>ExampleAuthor</code>.)
Added one new field to buff attributes, contained in the <samp>Effects</samp> field:
 
{| class="wikitable"
|-
! field
! effect
|-
| <samp>CustomFields</samp>
| ''(Optional)'' The [[Modding:Common data field types#Custom fields|custom fields]] for this entry.
|}
 
===[[Modding:Objects|<samp>Data/Characters</samp>]]===
The following fields have been added:
 
{| class="wikitable"
|-
! field
! effect
|-
| <samp>FlowerDanceBehavior</samp>
| ''(Optional)'' A list of behaviors to consider for use during the Flower Festival. If no matching ones are found, the default behavior for that NPC's gender is used.
 
Each entry in this list has the following fields:
{| class="wikitable"
|-
! field
! effect
|-
| <samp>Id</samp>
| An ID for this entry within the dance behavior list. This only needs to be unique within the current list.
|-
| <samp>Condition</samp>
| A game state query which indicates whether this entry is a valid choice. Default true.
|-
| <samp>Sprite</samp>
| The sprite to use for the dance, as would be passed in to the <samp>changeSprite</samp> event command. Default null.
|-
| <samp>FirstDanceFrame</samp>
| The first frame of the relevant spritesheet to use for the dance animation.
 
The animation frames after this index must still follow the standard structure.
|-
| <samp>Precedence</samp>
| The order in which this behavior should be checked, where 0 is the default value used by most behaviors.
|}
|}
 
===<samp>Data/CraftingRecipes</samp> and <samp>Data/CookingRecipes</samp>===
Crafting recipes and cooking recipes are now a data model. The data model for both are identical. Crafting recipes still live in <samp>Data/CraftingRecipes</samp>, and cooking recipes still live in <samp>Data/CookingRecipes</samp>.
 
Both assets are dictionary assets. The key is the recipe ID, the same as in 1.6, and the value is a data model with the following fields:
{| class="wikitable"
|-
! field
! effect
|-
| <samp>DisplayName</samp>
| A [[Modding:Tokenizable strings|tokenizable string]] for the display name of this recipe.
|-
| <samp>Description</samp>
| A [[Modding:Tokenizable strings|tokenizable string]] for the description of this recipe.
|-
| <samp>Ingredients</samp>
| A list of ingredients for this recipe.
{| class="wikitable"
|-
! field
! effect
|-
| <samp>Id</samp>
| TThe [[Modding:Common data field types#Unique string ID|unique string ID]] for this entry (not the item itself) within the current list.
 
This is semi-optional — if omitted, it'll be auto-generated from <samp>ItemId</samp>. However multiple entries with the same ID may cause unintended behavior, so it's often a good idea to set a globally unique ID instead.
|-
| <samp>ItemId</samp>
| The item for this ingredient. This can be either a qualified item ID, or a context tag.
 
If a context tag is specified, it needs to have a corresponding entry in <samp>[[#Context tag changes|Data/ContextTags]]</samp>.
|-
| <samp>Quantity</samp>
| The amount of this ingredient to require. Default 1.
|-
| <samp>Condition</samp>
| The [[Modding:Game state queries|game state query]] for this ingredient. If not specified, defaults to TRUE.
|-
| <samp>CustomFields</samp>
| ''(Optional)'' The [[Modding:Common data field types#Custom fields|custom fields]] for this entry.
|}
|-
| <samp>Result</samp>
| The possible results for this recipe. This is a list of [[Modding:Item queries#Item spawn fields|conditional item spawn fields]].
 
If there are multiple resulting possibilities at once, the one chosen for display in menus uses the following precedence:
# First, it checks the recipe's <samp>DisplayItemId</samp>.
# If there was no <samp>DisplayItemId</samp>, then it will search all results for the first one that is not conditional (eg. <samp>Condition</samp> is either <samp>null</samp> or <samp>TRUE</samp>).
# If no unconditional results were found, then it chooses the first result, regardless of if the condition passes.
|-
| <samp>DisplayItemId</samp>
| A qualified item ID to override the displayed item in menus.
|-
| <samp>Unlock</samp>
| The unlock conditions for this recipe.
{| class="wikitable"
|-
! field
! effect
|-
| <samp>Trigger</samp>
|
{| class="wikitable"
|-
! name
! effect
|-
| <samp>DayStart</samp>
| Checks the <samp>Condition</samp> at the beginning of each day.
|-
| <samp>Mail</samp>
| Checks the <samp>Condition</samp> at the beginning of each day, and queues <samp>MailLetterName</samp> for the mailbox if the condition passed.
|-
| <samp>LevelUp</samp>
| Appears when reaching a level <samp>RequiredSkillLevel</samp> in the <samp>RequiredSkill</samp> skill. <samp>Condition</samp> is ignored.
|-
| <samp>Default</samp>
| Added as a default recipe. <samp>Condition</samp> is ignored.
|}
|-
| <samp>Condition</samp>
| The [[Modding:Game state queries|game state query]] for this unlock. If not specified, defaults to TRUE.
|-
| <samp>RequiredSkill</samp>
| The skill for the required level for this unlock, if <samp>Trigger</samp> is equal to <samp>LevelUp</samp>.
|-
| <samp>RequiredSkillLevel</samp>
| The required level for this unlock, if <samp>Trigger</samp> is equal to <samp>LevelUp</samp>.
|-
| <samp>MailLetterName</samp>
| The name of letter sent for unlock, if <samp>Trigger</samp> is equal to <samp>Mail</samp>.
|-
| <samp>CustomFields</samp>
| ''(Optional)'' The [[Modding:Common data field types#Custom fields|custom fields]] for this entry.
|}
|-
| <samp>ExcludeFromPerfection</samp>
| Whether or not to exclude this recipe from perfection checks. Default false.
|-
| <samp>CustomFields</samp>
| ''(Optional)'' The [[Modding:Common data field types#Custom fields|custom fields]] for this entry.
|}
 
===[[Modding:Gift taste data|<samp>Data/GiftTastes</samp>]]===
Gift tastes, previously in <samp>Data/NPCGiftTastes</samp> with a localized version for every language, are now in <samp>Data/GiftTastes</samp> (taste data only) and <samp>Strings/GiftTasteReactions</samp> (reaction strings, one per language).
 
Responses to gifts are pulled from <samp>Strings/GiftTasteReactions</samp>, with the entry chosen from the following format: <samp>{NPC}_{Taste}</samp>, with <samp>{NPC}</samp> being the NPC ID, and <samp>{Taste}</samp> being the corresponding taste (ex. <samp>Penny_Love</samp> for Penny's loved gift response).
 
For the gift taste data itself, it now works based on a precedence and [[Modding:Game state queries | game state query]] system. Additionally, a gift taste can apply to multiple NPCs at once.
 
<samp>Data/GiftTastes</samp> is a list of gift taste entries, with the following format:
 
{| class="wikitable"
|-
! field
! effect
|-
| <samp>Id</samp>
| The ID of this entry.
|-
| <samp>Condition</samp>
| ''(Optional)'' The [[Modding:Game state queries | game state query]] for if this gift taste should apply, if any.
|-
| <samp>Precedence</samp>
| ''(Optional, but recommended)'' The precedence for this entry, with higher values being checked first.
 
For the precedence decided for various base game's gift tastes, see the notes after this table.
|-
| <samp>ItemId</samp>
| The item that matches this gift taste. This can be a qualified item ID, a category, or a [[Modding:Context tags | context tag]] query.
|-
| <samp>Taste</samp>
| The gift taste that applies for this entry. Possible values are <samp>Love</samp>, <samp>Like</samp>, <samp>Neutral</samp>, <samp>Dislike</samp>, and <samp>Hate</samp>.
|-
| <samp>AppliesTo</samp>
| ''(Optional)'' Who this gift taste applies to. This is a comma-separated list of NPC names.
 
If not specified, applies to all NPCs.
|-
!colspan="2"| advanced
|-
| <samp>CustomFields</samp>
| ''(Optional)'' The [[Modding:Common data field types#Custom fields|custom fields]] for this entry.


===[[Modding:Recipe data|<samp>Data/CookingRecipes</samp>]]===
|}
These cooking recipe keys were changed to match their object name (like all the other recipes):


==== Precedences for old gift taste data ====
When converting the base game's legacy gift taste data, the precedence values were determined in a way to match previous behavior.
First, a base precedence was chosen based on who it applied to and what type of match it was:
{| class="wikitable"
{| class="wikitable"
|-
|-
! old name
! base precedence
! new name
! who
! what
|-
| 0
| Specific character
| Specific item
|-
| -1000
| Specific character
| Items matching a context tag
|-
| -2000
| Universal
| Specific item
|-
| -3000
| Specific character
| Items of a specific category
|-
| -4000
| Universal
| Items matching a context tag
|-
| -5000
| Universal
| Items of a specific category
|}
 
After the base precedence is selected, an additional value is added based on the resulting gift taste.
{| class="wikitable"
|-
|-
| Cheese Cauli.
! precedence modifier
| Cheese Cauliflower
! legacy gift taste
|-
|-
| Cookies
| 400
| Cookie
| Love
|-
|-
| Cran. Sauce
| 300
| Cranberry Sauce
| Hate
|-
|-
| Dish o' The Sea
| 200
| Dish O' The Sea
| Like
|-
|-
| Eggplant Parm.
| 100
| Eggplant Parmesan
| Dislike
|-
|-
| Vegetable Stew
| 0
| Vegetable Medley
| Neutral
|}
|}


This has no effect on the display text, but mods which reference these recipe keys will need to be updated.
Additionally, the previously hard-coded behavior of everyone disliking artifacts (except Penny and the Dwarf, who like them) are now in the data, with a precedence of -1250 (universal dislike) and -1200 (Penny and Dwarf like).


===[[Modding:Event data|<samp>Data/Events/*</samp>]]===
Certain fallback behavior for cheap or negative ediblity otherwise-neutral-reaction items are still hardcoded, but still only apply if:
See ''[[#Event changes|event changes]]'' below.
* the chosen gift taste was neutral
* the chosen gift taste applies to everyone (ie. was universal)
* the chosen gift taste was for that specific item, and not an entire category or context tag


===[[Modding:Furniture|<samp>Data/Furniture</samp>]]===
===[[Modding:Furniture|<samp>Data/Furniture</samp>]]===
Line 232: Line 451:
| A single bed for a child NPC.
| A single bed for a child NPC.
|}
|}
|-
| <samp>BedUpgradeItemId</samp>
| ''(Optional)'' When the <samp>Type</samp> field is set to <samp>Bed</samp>, the item ID of the double bed to replace with for house upgrades. Default <samp>null</samp>.
If omitted, when choosing a double bed for an upgraded Farmhouse or Cabin, a legacy integer <samp>ItemId</samp> will result in a value of <samp>ItemId + 4</samp>, otherwise the default value of <samp>2052</samp> will be used.
|-
|-
| <samp>TelevisionScreenOffset</samp>
| <samp>TelevisionScreenOffset</samp>
Line 289: Line 513:
|}
|}


For example, here's how to add a new hat in 1.6.16:
For example, here's how to add a new hat in 1.7:
{{Content Patcher example|<nowiki>
{{Content Patcher example|<nowiki>
     "Changes": [
     "Changes": [
Line 317: Line 541:
</nowiki>}}
</nowiki>}}


===[[Modding:Lost items shop|<samp>Data/LostItemsShop</samp>]]===
===[[Modding:Monster data|<samp>Data/Monsters</samp>]]===
Added one new field:
Monster data has been completely rethought in Stardew Valley 1.7. In particular...
* For monster data in general:
** <samp>Data/Monsters</samp> has been been overhauled into a data model asset, with translations moved into a new <samp>Strings/Monsters</samp> asset. This includes significant new features which weren't supported with the old format.
** A new 'monster variant' concept lets multiple specific monsters share common data (e.g. <samp>Green Slime</samp> and <samp>Tiger Slime</samp> are variants of the new base <samp>Slime</samp> monster). This is particularly used for common drops.
** A new 'monster tag' system lets monster define custom tags like <samp>slime_is_prismatic</samp>, which can be used to filter monster drops.
* For monster drops:
** A rethought monster drop system supports the full range of vanilla features like [[Modding:Game state queries|conditions]], [[Modding:Item queries|item queries]], [[Modding:Common data field types#Item ID|qualified item IDs]] for non-object drops, and monster-specific concepts like repeating drop chance and mutually-exclusive drops.
** All drops are now [[Modding:Common data field types#Item ID|qualified item IDs]]. The former 'resource IDs' (formatted as negative numbers like <samp>-4</samp>) are no longer supported; items are converted into their equivalent resource debris automatically where needed.
** Nearly all monster drops are now defined in <samp>Data/Monsters</samp> (with just a few hardcoded drops common to all monsters left).
 
The data asset now consists of a string → model lookup, where...
* The key is the [[Modding:Common data field types#Unique string ID|unique string ID]].
* The value is a model with the fields listed below.
 
{| class="wikitable"
{| class="wikitable"
|-
|-
Line 324: Line 561:
! effect
! effect
|-
|-
| <samp>RequireCondition</samp>
!colspan="2"| basic info
| ''(Optional)'' The [[Modding:Game state queries|game state queries]] which must match to add this item. The <samp>Target</samp> player is the one being checked.
 
This field should generally only be used with deterministic game state queries.
|}
 
If you specify multiple criteria fields, only one is applied in this order: <samp>RequireMailReceived</samp>, then <samp>RequireEventSeen</samp>, then <samp>RequireCondition</samp>.
 
===[[Modding:Special orders|<samp>Data/SpecialOrders</samp>]]===
<ul>
<li>Added one new field:
{| class="wikitable"
|-
|-
! field
| <samp>DisplayName</samp>
! effect
| A [[Modding:Tokenizable strings|tokenizable string]] for the monster's display name.
|-
|-
| <samp>CanBeCancelled</samp>
| <samp>IsGlider</samp>
| ''(Optional)'' Whether the special order can be cancelled. In multiplayer, any player cancelling the special order will remove it for all players. Default false.
| ''(Optional)'' Whether the monster is flying (e.g. so they glide over obstacles). Default false.
|}
 
And improved one field:
{| class="wikitable"
|-
|-
! field
| <samp>IsMineMonster</samp>
! effect
| ''(Optional)'' Whether this monster spawns in the mines, and should be buffed after the player reaches the bottom. This sometimes applies to monsters that can appear elsewhere too (e.g. [[Wilderness Golem|wilderness golems]] on the farm receive mine buffs too). Default false.
|-
|-
| <samp>Duration</samp>
| <samp>ExperiencePoints</samp>
| This can now be set to <samp>"Indefinite"</samp> for a special order with no expiry. It will remain active until it's completed or cancelled. Consider enabling <samp>CanBeCancelled</samp> if applicable.
| ''(Optional)'' The combat [[Skills|experience points]] received for defeating the monster. Default 1.
|}
</ul>
 
==Changes for all mod authors==
===New [[Modding:Context tags|context tags]]===
{| class="wikitable"
|-
|-
! context tag
!colspan="2"| stats
! effect
|-
|-
| <samp>fish_skip_minigame</samp>
| <samp>Health</samp>
| If the player catches this item while fishing, it'll be caught directly without the fishing minigame. This matches the behavior when catching junk items like [[seaweed]] (which now have the context tag where needed).
| ''(Optional)'' The initial hit points. Default 20.
|}
 
===[[Modding:Console commands|Debug command]] changes===
Improved existing commands:
 
{| class="wikitable"
|-
|-
! command
| <samp>Attack</samp>
! description
| ''(Optional)'' The attack power (i.e. how much damage its hits inflict on players). Default 5.
|-
|-
| <samp>jump</samp>
| <samp>Defense</samp>
| Fixed error if the NPC doesn't exist.
| ''(Optional)'' The defense which reduces damage received by this monster. Default 0.
|-
|-
| <samp>perfection</samp>
| <samp>DodgeChance</samp>
| Fixed error when run on a save which already has some requirements partly met.
| ''(Optional)'' The percentage chance that the monster dodges an attack, as a value between 0 (never) and 1 (always). Default 0.
|}
 
===[[Modding:Event data|Event]] changes===
====Multilingual events====
All vanilla events are now multilingual, with a single copy of each event script which uses translation keys. Translations from the old per-language event files were moved into a per-language <samp>Strings/Events</samp> file.
 
For example:
{| class="wikitable"
|-
|-
! files in 1.6.15
| <samp>Speed</samp>
! files in 1.6.16
| ''(Optional)'' The default movement speed. Default 1.
|-
|-
| <pre>
| <samp>Jitteriness</samp>
Data/Events/Beach
| ''(Optional)'' How often the monster will move in random non-player directions to try to get around objects, as a value between 0 (never) and 1 (always). Default 0.1.
Data/Events/Beach.de-DE
Data/Events/Beach.es-ES
Data/Events/Beach.fr-FR
Data/Events/Beach.hu-HU
Data/Events/Beach.it-IT
Data/Events/Beach.ja-JP
Data/Events/Beach.ko-KR
Data/Events/Beach.pt-BR
Data/Events/Beach.ru-RU
Data/Events/Beach.tr-TR
Data/Events/Beach.zh-CN
</pre>
|valign="top"| <pre>
Data/Events/Beach
</pre>
|}
 
[[Modding:Content Patcher|Content Patcher]] content packs should generally be unaffected, since their edits were applied to the active version of the file automatically (which will just become the base file in all languages).
 
In rare cases, a mod which directly targets a specific localized asset name like <code>Data/Events/Beach.fr-FR</code> may no longer work or break vanilla events (depending on how it edits them). That should be a very rare case, since the APIs for both Content Patcher and SMAPI were designed to discourage doing that.
 
====Forking deprecated====
All vanilla events which used forking now use [[#New event commands|goto labels]] instead.
 
'''Forking still works like before''' for backwards compatibility, but mod events should prefer goto labels since...
* they work more consistently and intuitively with other features like skip labels;
* it's the approach that the game will be applying and developing in future versions;
* deprecated commands will be reported as an error if you use the [[#EventValidator|<samp>EventValidator</samp>]];
* and there's no guarantee forking will always work in future versions.
 
The [[#Deprecated commands|fork-related event commands are deprecated]].
 
====Precondition slash now required for numeric event IDs====
In Stardew Valley 1.6.0–15, the behavior of an event key with no <code>/</code> depended on whether the ID was numeric. A numeric event ID like <code>10040609</code> was treated as an event with no precondition, while a string event ID like <code>PlayerKilled</code> was treated as a manual script. In 1.6.16+, the behavior is now consistent: any event ID without a slash (like <code>10040609</code>) is treated as a manual script, and any with a slash (like <code>10040609/</code>) is treated as an event.
 
In other words:
 
{| class="wikitable"
|-
|-
! event key format
| <samp>DetectionDistance</samp>
! behavior in 1.6.15
| ''(Optional)'' The distance at which the monster detects a player and begins moving towards them, or -1 for unlimited. Default 4.
! &rarr;
! behavior in 1.6.16
|-
|-
| <samp>{{t|id}}</samp>
!colspan="2"| drops
| event if numeric, else manual script
| &rarr;
| manual script
|-
|-
| <samp>{{t|id}}/{{o|preconditions}}</samp>
| <samp>Drops</samp>
| event
| ''(Optional)'' The items which can drop when the monster is defeated. Default none.
| &rarr;
 
| event
All matching entries are dropped. If the player has a [[Burglar's Ring|burglar's ring]] equipped, each entry will make two attempts to drop (but fields like <samp>RepeatingChance</samp> and <samp>SkipIfDropped</samp> are independent between the two attempts).
|}


====New event commands====
This consists of a list of models with these fields:
{| class="wikitable"
{| class="wikitable"
|-
|-
! command
! field
! description
! effect
|-
| <samp>addAchievement {{t|achievement ID}}</samp>
| Unlock an [[achievement]] for the current player. The {{t|achievement ID}} can be a [[Modding:Console commands#Statistics and achievements|platform achievement ID]] (like <samp>Achievement_LocalLegend</samp>) or internal ID (like <samp>17</samp> for Gourmet Chef).
|-
| <samp>addActor {{t|x}} {{t|y}} {{t|direction}}</samp>
| Add a character or player to the event. This is mostly equivalent to adding them through the [[Modding:Event data#Basic format|character positions field]], but can be done at any point in the script (e.g. for use with <samp>goto</samp> for event variations).
|-
|-
| <samp>choose {{t|question}} [{{t|answer}} {{t|go to label}}]+</samp>
| ''common fields''
| Show a dialogue box to choose from a list of responses, then optionally skip to a label based on the selected answer.
| See [[Modding:Item queries#Item spawn fields|item spawn fields]] for the generic item fields supported for monster drops.


Arguments:
Notes:
{| class="wikitable"
* If a drop has an [[Modding:Item queries|item query]] which returns multiple item stacks, one of them will be selected at random.
* The <samp>Condition</samp> field can optionally contain the <code>%RANDOM_KEY</code> token, which is set to a unique identifier for this monster during the current tick.
|-
|-
! argument
| <samp>ForTags</samp>
! usage
| ''(Optional)'' The monster tags for which this drop applies. This can be a [[Modding:Context tags|context tag]]-like query string like <samp>!variant_frost_bat, !variant_lava_bat</samp> (not [[Frost Bat|frost bat]] or [[Lava Bat|lava bat]]). Default none, meaning it applies to all monsters with this data.
|-
|-
| {{t|question}}
| <samp>Chance</samp>
| The [[Modding:Common data field types#Translation key|translation key]] or literal text to show above the choices. This can be empty (<code>""</code>) to omit the question line.
| ''(Optional)'' A probability that this item will be found, as a value between 0 (never) and 1 (always). Default 1.
|-
|-
| {{t|answer}}
| <samp>RepeatingChance</samp>
| The [[Modding:Common data field types#Translation key|translation key]] or literal text for an answer to show.
| ''(Optional)'' A compounding probability of an extra drop, as a value between 0 (never) and .95 (nearly always). Default 0.
 
This applies after an item has been dropped based on the other fields. This chance is repeatedly checked to produce an extra drop until it fails. Each repeat drop will ignore the <samp>Chance</samp> and <samp>Condition</samp> fields, but reapply all other item spawn fields (e.g. re-selecting <samp>RandomItemId</samp> if applicable).
|-
|-
| {{t|go to label}}
| <samp>RepeatingChanceKey</samp>
| If the player chooses this answer, jump to this label in the event (see the <samp>goto</samp> command for more info). This can be <code>""</code> or <code>_</code> to continue to the next command instead.
| ''(Optional)'' When checking the <samp>RepeatingChance</samp> field, use this to seed a predictable RNG. This can be used to synchronize separate drops. Default none.
|}


For example, here's a simple choice which doesn't affect anything:
This can optionally contain the <code>%RANDOM_KEY</code> token, which is set to a unique identifier for this monster during the current tick.
<pre>choose "Do you like apples?" "I love them." _ "I hate them." _/</pre>
|-
| <samp>ExplodeStack</samp>
| ''(Optional)'' Whether to split multi-item stacks into single-item stacks. Default false.


Or you can change the course of the event based on the choice:
For example, let's say a monster would drop a stack of 15 wood. With this option enabled, it would instead drop 15 stacks of one wood each.
<pre>
|-
speak Abigail "Do you... like me?$l"/
| <samp>SkipIfDropped</samp>
choose "" "Yes!" happy "No." heartbroken/
| ''(Optional)'' Skip the current entry if one of these drop IDs have already been dropped. Default none.


label heartbroken/
This is specified as an array. For example:
speak Abigail "Oh. I understand.$s"/
<syntaxhighlight lang="js">
faceDirection Abigail left/
"SkipIfDropped": [ "ExampleDropId", "AnotherDropId" ]
pause 3000/
</syntaxhighlight>
end/
|}
 
label happy/
speak Abigail "We should explore the mines together next time!$h"/
...
</pre>
|-
|-
| <samp>conditionSpeak {{t|npc}} [{{t|dialogue}} {{o|condition}}]+</samp>
!colspan="2"| tags
| Make an NPC say a dialogue based on arbitrary conditions. The first dialogue with a matching dialogue is spoken; if none match, the command is skipped.
 
Arguments:
{| class="wikitable"
|-
|-
! argument
| <samp>ContextTags</samp>
! usage
| ''(Optional)'' The [[Modding:Context tags|context tags]] to add for this monster, in addition to those added automatically based on the other fields. Default none.
|-
|-
| {{t|npc}}
!colspan="2"| variants
| The internal name of the NPC who should speak (which can be [[Modding:Event data#Optional NPCs|marked optional]]).
|-
|-
| {{t|dialogue}}
| <samp>DefaultVariant</samp>
| The [[Modding:Common data field types#Translation key|translation key]] or literal text for the dialogue to speak. If omitted or empty, the command is skipped when the condition is matched.
| ''(Optional)'' When the game creates a monster of this type without specifying a variant, use the given variant instead of creating it from only the base data. Default false.
|-
|-
| {{o|condition}}
| <samp>Variants</samp>
| One of:
| ''(Optional)'' The possible variations of this monster. Default none.
* a [[Modding:Game state queries|game state query]];
* or <samp>ANSWERED {{t|response ID}}+</samp> as a shortcut for the <samp>PLAYER_HAS_DIALOGUE_ANSWER Current</samp> query;
* or omitted/blank to always match this dialogue if no previous one matched.
|}


For example, here Maru says a different line if the player suggested she tell the truth:
Each variant is simply a set of fields which override the base data when set. For example, this creates a variant which only differs from the base monster by name and health points:
<pre>conditionSpeak Maru "I accidentally dropped one of the samples... I'm so sorry.$s" "ANSWERED 38" "@ came in and slammed the door so loud I dropped this sample.$u"</pre>
<syntaxhighlight lang="js">
|-
"Variants": [
| <samp>goto [{{t|target}} {{o|condition}}]+</samp>
    {
| Skip forward or backward to a specific position in the event script. Each {{t|target}} can be:
        "DisplayName": "{{i18n: variant-name}}",
        "Health": 50
    }
</syntaxhighlight>


This consists of a list of models with these fields:
{| class="wikitable"
{| class="wikitable"
|-
|-
! target
! field
! description
! effect
|-
| ''monster fields''
| All monster fields (except <samp>DefaultVariant</samp> and <samp>Variants</samp>) can be set on the variant. All fields are optional, and default to the value set in the monster's base data.
|-
| <samp>InheritDrops</samp>
| ''(Optional)'' Whether to inherit drops defined in the monster's base <samp>Drops</samp> field. Default true.
 
Specifically:
* If <samp>true</samp>, the variant will combine the base <samp>Drops</samp> and variant <samp>Drops</samp> into one list.
* If <samp>false</samp>, only drops in the variant <samp>Drops</samp> field are applied.
|}
|-
|-
| <samp>end</samp>
!colspan="2"| advanced
| Jump to the last <samp>end</samp> event command in the script.
|-
|-
| ''any other value''
| <samp>CustomFields</samp>
| Jump to the first <samp>label</samp> command with this name.
| ''(Optional)'' The [[Modding:Common data field types#Custom fields|custom fields]] for this entry.
|}
|}


You can list any number of label/[[Modding:Game state queries|condition]] pairs, and it will go to the first label with a matching condition. If a condition is omitted, it defaults to always true. If none of the conditions match, it continues to the next command normally.
For example, this [[Modding:Content Patcher|Content Patcher code]] adds a new 'Pufferchick' monster which drops pufferfish when defeated. The monster's spritesheet is automatically loaded from <samp>Monsters/&lt;ID&gt;</samp>.


For example, this event script uses <samp>goto</samp> to repeat a question until a specific answer is selected:
'''Note:''' this only adds the monster data. Currently this does nothing unless you have another mod which spawns instances of the monster in-game.
<pre>
{{Content Patcher example|<nowiki>
.../
    "Changes": [
label question/
        // add data
choose Abigail "Hey! Did you have your eye on someone?" "Abigail" correct "Penny" wrong "Alex" wrong/
        {
            "Action": "EditData",
            "Target": "Data/Monsters",
            "Entries": {
                "{{ModId}}_Pufferchick": {
                    "DisplayName": "{{i18n: pufferchick.name}}",
                    "ExperiencePoints": 3,


label wrong/
                    "Health": 30,
speak Abigail "Oh?$u"/
                    "Attack": 2,
pause 500/
                    "Defense": 5,
goto question/
                    "DodgeChance": 0.3,
                    "Speed": 2,
                    "DetectionDistance": 2,


label correct/
                    "Drops": [
speak Abigail \"I thought so!$l\"/
                        {
pause 500/
                            "Id": "Pufferfish",
end
                            "ItemId": "(O)128",
</pre>
                            "Chance": 0.5,
                            "RepeatingChance": 0.1
                        }
                    ]
                }
            }
        },


You can make <samp>goto</samp> conditional using [[Modding:Game state queries|game state queries]]. For example, this will go to the <samp>divorced</samp> label if you divorced Abigail, and continue to the next command if not:
        // add texture
<pre>goto divorced "PLAYER_NPC_RELATIONSHIP Current Abigail Divorced"/</pre>
        {
|-
            "Action": "Load",
| <samp>label {{t|label}}</samp>
            "Target": "Monsters/{{ModId}}_Pufferchick",
| Set a named position in the event script, which you can go to using the <samp>goto</samp> command.
            "FromFile": "assets/pufferchick.png"
        }
    ]
</nowiki>}}


'''Note:''' you can't use <samp>end</samp> as a label name, since that automatically matches the <samp>end</samp> event command.
===[[Modding:Schedule data|Schedule data]]===
|}
Schedules have been changed into data models. Previously under <samp>Characters/schedules</samp>, now under <samp>Characters/ScheduleData</samp>.


====Improved existing commands====
{| class="wikitable"
{| class="wikitable"
|-
|-
! command
! field
! description
! effect
|-
|-
| <samp>gainSkill</samp>
| <samp>Precedence</samp>
| Added argument validation.
| The precedence of this entry. A higher precedence will be checked first.
 
Note: the hardcoded schedules for visiting [[Ginger Island]] will override everything below precedence <samp>100000</samp>.
|-
|-
| <samp>skippable</samp>
| <samp>Season</samp>
| Added an optional {{o|skip to label}} argument. If set, the event will jump to that label when the player clicks the skip button (see <samp>goto</samp> for more info). The last <samp>skippable</samp> command run before the player skips is applied.
| ''(Optional)'' The season that this schedule applies to, if any. If not specified, applies to any season.
 
This is meant to clean up or grant unlocks before the event ends. For example:
<pre>
skippable beforeEnd/
.../
label beforeEnd/
gainSkill Fishing 1/
addItem (T)TrainingRod/
end
</pre>
 
Technically you can jump to any point in the event (e.g. to cancel the skip). However, the skip action will still cancel any ongoing event behavior like ongoing player/NPC movements, so you should be careful doing this.
|-
|-
| <samp>splitSpeak</samp>
| <samp>DayOfMonth</samp>
| You should now specify each dialogue as a separate argument (though the old syntax will still work):
| ''(Optional)'' The day of month that this schedule applies to, if any. If not specified, applies to any day of the month.
<pre>// in 1.6.15
splitSpeak Sam "You think so?~Yeah... kids should play and have fun while they still have the chance."
 
// in 1.6.16
splitSpeak Sam "You think so?" "Yeah... kids should play and have fun while they still have the chance."
</pre>
 
This also now works with the new <samp>choose</samp> command too.
|-
|-
| <samp>spriteText</samp>
| <samp>WeekDay</samp>
| The {{o|text}} argument can now be a [[Modding:Common data field types#Translation key|translation key]] to get the text from.
| ''(Optional)'' The week day that this schedule applies to, if any. If not specified, applies to any day of the week.
|}


====Deprecated commands====
This accepts the short name of the day of week, ex. <samp>Mon</samp>, <samp>Tue</samp>, <samp>Wed</samp>, ...
These event commands are deprecated. '''They still work just like before''' (except the ones at the bottom of the table), but if you use the [[#EventValidator|<samp>EventValidator</samp>]] it'll report them as an error.
 
{| class="wikitable"
|-
|-
! event command
| <samp>RequiredHearts</samp>
! migration
| ''(Optional)'' The minimum amount of friendship (in hearts) for this schedule to apply, if any. If not specified, applies regardless of friendship level.
|-
|-
| <samp>fork</samp><br /><samp>resetVariable</samp><br /><samp>switchEvent</samp>
| <samp>Condition<samp>
| Use the <samp>choose</samp> or <samp>goto</samp> commands instead. If you used dialogue containing the <samp>%fork</samp> token, it should be removed and replaced with equivalent event commands.
| ''(Optional)'' A [[Modding:Game state queries|game state query]] for if this entry should apply, in addition to the other fields. If not specified, treated as <samp>TRUE</samp>.
|-
|-
| <samp>question forkX</samp>
| <samp>StartLocationOverride<samp>
| Use the <samp>choose</samp> command instead, and replace the event fork with a label.
| ''(Optional)'' Override the location to start the day in when this schedule is chosen. <samp>StartTileOverride</samp> must also be specified for this to apply.


For example, this script:
Requires <samp>StartTileOverride</samp> to be specified for this to work.
<pre>
|-
// main event
| <samp>StartTileOverride<samp>
question fork1 "#I believe in you!#Wow, you're really arrogant."/
| ''(Optional)'' Override the tile to start the day on when this schedule is chosen. <samp>StartLocationOverride</samp> must also be specified for this to apply.
fork arrogant/
speak Alex "Thanks, @. I'll remember that."/
...


// 'arrogant' event
Requires <samp>StartLocationOverride</samp> to be specified for this to work.
emote Alex 12/
|-
speak Alex "Hmmph... I think someone's a little jealous.$a"/
| <samp>StartFacingDirectionOverride<samp>
</pre>
| ''(Optional)'' Override the facing direction to start the day with when this schedule is chosen. <samp>StartLocationOverride</samp> must also be specified for this to apply.


Becomes this script:
Requires <samp>StartLocationOverride</samp> to be specified for this to work.
<pre>
choose "" "I believe in you!" believe "Wow, you're really arrogant." arrogant/
 
label believe/
speak Alex "Thanks, @. I'll remember that."/
...
 
label arrogant/
emote Alex 12/
speak Alex "Hmmph... I think someone's a little jealous.$a"/
...
</pre>
 
Forks often duplicated the end of the script. In that case, you can have both variants just <samp>goto</samp> the common ending instead.
|-
|-
| <samp>question null</samp>
| <samp>StartEndOfRouteAnimation<samp>
| Use <samp>choose</samp> with <samp>_</samp> labels instead. (Setting a label argument to <samp>_</samp> means it'll just continue to the next command instead.)
| ''(Optional)'' Override the end of route animation to start the day with when this schedule is chosen. <samp>StartLocationOverride</samp> must also be specified for this to apply.


For example, this command:
Requires <samp>StartLocationOverride</samp> to be specified for this to work.
<pre>question null "But what am I going to say to Vincent?#It's best to be honest with kids.#You did the right thing. Kids should have hope."/</pre>
 
Would become this command:
<pre>choose "But what am I going to say to Vincent?" "It's best to be honest with kids." _ "You did the right thing. Kids should have hope." _/</pre>
|-
|-
| <samp>quickQuestion</samp>
| <samp>StartEndOfRouteMessage<samp>
| Use the <samp>choose</samp> command instead. The {{t|question}} and {{t|answerX}} have matching <samp>choose</samp> arguments, while the {{t|answerX script}} arguments become labels.
| ''(Optional)'' Override the end of route message to start the day with when this schedule is chosen. <samp>StartLocationOverride</samp> must also be specified for this to apply.
 
For example, this command:
<pre>quickQuestion #I'd like to help#Nah, I'll pass...(break)emote Willy 32\speak Willy "Aye... I thought you would.$h#$b#I'll leave this door unlocked for ya... you can come drop off the materials whenever you like."(break)emote Willy 28\speak Willy "Alright, suit yourself...$s#$b#If you have a change of heart, you can always come back and help out. I'll leave this door unlocked, anyhow."/</pre>
 
Becomes this script:
<pre>
choose "" "I'd like to help" accept "Nah, I'll pass..." refuse/
 
label accept/
emote Willy 32/
speak Willy "Aye... I thought you would.$h#$b#I'll leave this door unlocked for ya... you can come drop off the materials whenever you like."/
goto resume/


label refuse/
Requires <samp>StartLocationOverride</samp> to be specified for this to work.
emote Willy 28/
speak Willy "Alright, suit yourself...$s#$b#If you have a change of heart, you can always come back and help out. I'll leave this door unlocked, anyhow."/
 
label resume/
</pre>
|-
|-
| <samp>cutscene bandfork</samp><br /><samp>elliottBookTalk</samp><br /><samp>question haleyDarkRoom</samp><br /><samp>question shaneCliffs</samp><br /><samp>question shaneLoan</samp>
| <samp>FallbackSchedules<samp>
| These commands are '''deleted''' and will no longer work. They're unlikely to be used by mod events, but see their relevant events for the new equivalents if needed.
| ''(Optional)'' A list of additional schedules options that, if the corresponding GSQ passes, will revert to that schedule instead. Intended for "fail conditions" (ex. one of the locations in this schedule are not currently accessible).
|}
 
====Changed event keys====
Events were generally unified and de-hardcoded in 1.6.16. In particular...
 
<ul>
<li>Several events were previously defined in the game's C# code, where they couldn't be changed by content packs. Most of these were moved into <samp>Data/Events/*</samp> with translations in <samp>Strings/Events</samp>:
{| class="wikitable"
{| class="wikitable"
! event
! new asset name
! new event ID
|-
|-
| [[Giant Stump|forest raccoon]] finished event
! field
| <samp>Data/Events/Forest</samp>
! effect
| <samp>RaccoonFinish</code>
|-
|-
| [[Trash Bear|forest trash bear]] cleanup
| <samp>Condition</samp>
| <samp>Data/Events/Forest</samp>
| The [[Modding:Game state queries|game state query]] to check for this fallback option.
| <samp>777111</samp>
|-
|-
| [[Ginger Island#Gourmand Frog|island Gourmand crop inspection]]
| <samp>Schedule</samp>
| <samp>Data/Events/islandFarmCave</samp>
| The schedule to use if the condition passed for this fallback option.
| <samp>GourmandInspection</samp>
 
If this is "season", it will act check "spring", "summer", "fall", or "winter" based on the current game's season.
IF this is "no_schedule", then the NPC will have no schedule for that day.
|-
|-
| [[The Summit#Cutscene|summit perfection cutscene]]
| <samp>CustomFields</samp>
| <samp>Data/Events/Summit</samp>
| ''(Optional)'' Custom fields for mods to use.
| <samp>SummitPerfection</samp>
|}
|-
|-
| [[The_Summit#Illegitimate access|summit cheat event]]
| <samp>Commands</samp>
| <samp>Data/Events/Summit</samp>
| A list of commands for the schedule.
| <samp>SummitCheat</samp>
|}</li>
<li>Others were moved from non-event data into <samp>Data/Events/*</samp>:
{| class="wikitable"
{| class="wikitable"
! event
! old location
! new asset
! new event ID
|-
|-
| [[Birdie]] quest intro & completed
! field
| <samp>Strings/Locations:IslandSecret_Event_BirdieIntro</samp><br /><samp>Strings/Locations:IslandSecret_Event_BirdieFinished</samp><br /><samp><samp>Strings/Locations:alreadyGotNuts</samp>
! effect
| <samp>Data/Events/IslandWest</samp>
| <samp>-888999</samp> (intro)<br /><samp>-666777</samp> (completed)
|-
|-
| [[Ginger Island#Field Office|field office]] intro & completed
| <samp>Type</samp>
| <samp>Strings/Locations:IslandFieldOffice_Intro_Event</samp><br /><samp>Strings/Locations:FieldOfficeFinale</samp>
| ''(Optional)'' The type of this schedule command. Defaults to <samp>Depart</samp>
| <samp>Data/Events/IslandFieldOffice</samp>
{| class="wikitable"
| <samp>FieldOfficeIntro</samp><br /><samp>FieldOfficeDone</samp>
|-
|-
| [[Leo]] intro
! type
| <samp>Strings/Locations:IslandHut_Event_ParrotBoyIntro</samp>
! meaning
| <samp>Data/Events/IslandHut</samp>
| <samp>LeoIntro</samp>
|-
|-
| [[Meowmere]] event
| <samp>Depart</samp>
| <samp>Strings/1_6_Strings:ForestPylonEvent</samp>
| The NPC will depart at the specified time.
| <samp>Data/Events/WizardHouseBasement</samp>
| <samp>ForestPylon</samp>
|-
|-
| [[Mr. Qi#Secrets|Mr. Qi Skull Cavern level 100]]
| <samp>Arrive</samp>
| <samp>Data/ExtraDialogue:SkullCavern_100_event</samp><br /><samp>Data/ExtraDialogue:SkullCavern_100_event_honorable</samp>
| The NPC will try to arrive at the specified time.
| <samp>Data/Events/SkullCave</samp>
| <samp>SkullCavern100</samp>
|-
|-
| [[Professor Snail]] exits cave
| <samp>Bed</samp>
| <samp>Strings/Locations:IslandNorth_Event_SafariManAppear</samp>
| The NPC will try to return to their bed.
| <samp>Data/Events/IslandNorth</samp>
|}
| <samp>ProfSnailIntro</samp>
|}</li>
<li>Other event keys were changed or merged as part of the other event changes:
{| class="wikitable"
|-
|-
! asset
| <samp>Time</samp>
! entry key
| The time for this schedule command. This must be a time '''after''' the previous command's time.
! change in 1.6.16
 
Note: a time of <samp>0</samp> (for "0 schedules") is no longer supported. For the equivalent behavior, use <samp>StartLocationOverride</samp> and friends.
|-
|-
| <samp>Data/Events/AbandonedJojaMart</samp>
| <samp>DestinationLocation</samp>
| <code>missingBundleComplete</code>
| ''(Only applies for <samp>Type</samp> = <samp>Depart</samp> or <samp>Arrive</samp>)'' The location that this command takes the NPC to.
| Event key changed to <code>192393</code> to match the event ID.
|-
|-
| <samp>Data/Events/Farm</samp>
| <samp>Destination</samp>
| <code>992559/t 600 1130/n clothFound/o Emily/w sunny</code><br /><code>992559/t 600 1130/n clothFound/O Emily/w sunny</code>
| ''(Only applies for <samp>Type</samp> = <samp>Depart</samp> or <samp>Arrive</samp>)'' The tile in the location that this command takes the NPC to.
| Merged into a single <code>992559/Time 600 1130/LocalMail clothFound/Weather sunny</code> event.
|-
|-
| <samp>Data/Events/QiNutRoom</samp>
| <samp>DestinationFacingDirection</samp>
| <code>10040609</code>
| ''(Optional, only applies for <samp>Type</samp> = <samp>Depart</samp> or <samp>Arrive</samp>))'' The facing direction that should be used when arriving at this command's target.  
| Event key changed to <code>10040609/</code> per the [[#Precondition slash now required for numeric event IDs|precondition change]].
|-
|-
| <samp>Data/Events/SamHouse</samp>
| <samp>EndOfRouteAnimation</samp>
| <code>94/e 93/k 95/t 1800 1950/i 136/y 1</code><br /><code>94/e 93/k 95/t 1800 1950/i 136/y 2</code>
| ''(Optional)'' The animation from <samp>Data/animationDescriptions</samp> to play upon ending this NPC.
| Merged into a single <code>95/SawEvent 93/!SawEvent 94/Time 1800 1950/HasItem 136</code> event.
|-
|-
| <samp>Data/Events/Town</samp>
| <samp>EndOfRouteMessage</samp>
| <code>611173/Hn pamHouseUpgrade/o Penny</code>
| ''(Optional)'' The localized string key to say if a player talks to this NPC after ending this command, but before the next one.
| Merged into the existing <code>611173/Hn pamHouseUpgrade</code> event.
|}</li>
</ul>
 
For events that didn't previously have an event ID, their new IDs will be added to the player's seen-events list automatically if needed when the save is loaded.
 
====Other event changes====
* Moved all vanilla events' on-skip behavior into their event scripts (except the pet adoption logic).
 
===New [[Modding:Trigger actions|trigger actions]]===
{| class="wikitable"
|-
|-
! action
| <samp>CustomFields</samp>
! effect
| ''(Optional)'' Custom fields for mods to use.
|}
|-
|-
| <samp>CompleteQuest {{t|quest ID}}</samp>
| <samp>CustomFields</samp>
| Complete all active quests with this ID in the player's journal.
| ''(Optional)'' Custom fields for mods to use.
|}
|}


===Other changes===
The vanilla schedules were all converted using [https://gist.github.com/spacechase0/266daa4d6d916607bec235c55653fa6b this automated script], which is under the MIT license.
* Added validation for schedule <samp>offset</samp> command in end-of-route animations.
* Fixed <samp>FarmHouseFurniture</samp> [[Modding:Maps|map property]] only allowing numeric item IDs.
* Fixed crash when loading a save with missing building interiors.
* Fixed intermittent crash when an item delivery quest for a non-Wizard NPC requests a cooking-type item.
* Fixed <samp>RejectItem_*</samp> dialogue disabling the NPC's normal dialogue after it's shown.


==Changes for C# mod authors==
===[[Modding:Objects|<samp>Data/Objects</samp>]]===
===Instance statics no longer affect mod assemblies===
Added new fields:
In [[multiplayer]], split-screen mode works by swapping the values of static fields for each screen (called ''instanced statics''). In previous versions, Stardew Valley would scan all loaded assemblies for static fields marked with <code>[InstancedStatic]</code> attributes except a few ignored assemblies like MonoGame.
 
In Stardew Valley 1.6.16, the game now only does this for the main game assembly to improve performance. If a mod was using <code>[InstancedStatic]</code>, it should use SMAPI's built-in [[Modding:Modder Guide/APIs/Utilities#Per-screen data|per-screen data]] utility instead.
 
===AssetNameUtility===
The new <samp>AssetNameUtility</samp> class has methods for working with [[Modding:Common data field types#Asset name|asset names]]:


{| class="wikitable"
{| class="wikitable"
|-
|-
! method
! field
! usage
! effect
|-
|-
| <samp>Normalize</samp>
| <samp>Buffs</samp>
| A low-level method which normalizes path separators in an [[Modding:Common data field types#Asset name|asset name]]. For example:
| This field already existed, but has a field change:
<syntaxhighlight lang="c#">
string assetName = AssetNameUtility.Normalize("Characters/\\/Abigail"); // produces "Characters/Abigail"
</syntaxhighlight>
 
Consider using SMAPI's <samp>PathUtilities.NormalizeAssetName</samp> instead, which is more thorough.
|-
| <samp>TryParseTranslationKey</samp>
| Parses a [[Modding:Common data field types#Translation key|translation key]] into its component parts. For example:
<syntaxhighlight lang="c#">
if (AssetNameUtility.TryParseTranslationKey("Strings/UI:Confirm", out string assetName, out string fieldKey, out string error))
  ...;  // assetName: Strings/UI, fieldKey: Confirm, error: null
</syntaxhighlight>
 
This doesn't check whether the asset or key exists; see <samp>Game1.content.IsValidTranslationKey</samp> to do that.
|}
 
===EventValidator===
====Overview====
The new <samp>EventValidator</samp> class analyses [[Modding:Event data|event scripts]] to detect issues like...
* command names which don't match a registered command or alias;
* command arguments which don't match those expected by the command;
* and custom rule violations based on the <samp>EventValidator.CommandValidators</samp> field (e.g. a default validator checks that <samp>goto</samp> commands match a valid label).
 
This is mainly meant to implement unit tests for events. For example, to validate all events in a data asset:
<syntaxhighlight lang="c#">
string assetName = "Data/Events/Farm";
var events = Game1.content.Load<Dictionary<string, string>>(assetName);
 
var validator = new EventValidator();
foreach ((string key, string script) in events)
{
    foreach (var issue in validator.Validator(assetName, key, script))
        Assert.Fail($"Validation failed for event '{key}' > command '{issue.CommandText}': {issue.SuggestedError}.");
}
</syntaxhighlight>
 
====Command argument validation====
Argument validation is enabled if the command's handler method has an <samp>EventArguments</samp> attribute, which defines the argument pattern using a special syntax. Each command can list multiple patterns, and it'll be considered valid if any of them matches. If the pattern is an empty string, the validator will ensure no arguments are provided.
 
For example, the default <samp>showFrame</samp> command is defined like this:
<syntaxhighlight lang="c#">
[EventArguments("int", "actor int bool?")]
public static void ShowFrame(Event @event, string[] args, EventContext context)
</syntaxhighlight>
 
An argument pattern consists of space-delimited ''tokens'', where each token defines the format for an argument. For example, <code>actor int bool?</code> has three tokens representing three arguments: an actor name, a positive integer, and an optional boolean.
 
These are the tokens recognized by the validator:
{| class="wikitable"
{| class="wikitable"
|-
|-
! token
! field
! meaning
! effect
|-
|-
!colspan="2"| generic argument types
| <samp>CustomAttributes</samp>
| This field already existed, but has one new field:
{| class="wikitable"
|-
|-
| <samp>bool</samp>
! field
| A boolean value (<samp>true</samp> or <samp>false</samp>).
! effect
|-
|-
| <samp>float</samp>
| <samp>CustomFields</samp>
| A positive number with optional decimal point (like <samp>5</samp> or <samp>0.5</samp>).
| ''(Optional)'' The [[Modding:Common data field types#Custom fields|custom fields]] for this entry.
|}
|}
|-
|-
| <samp>-float</samp>
| <samp>UseCondition</samp>
| A number with optional decimal point and optional negative sign (like <samp>5</samp>, <samp>-5</samp>, or <samp>-0.5</samp>).
| A [[Modding:Game state queries|game state query]] for determining if the object is usable on right click. If not specified, equivalent to <samp>"TRUE"</samp>.
|-
|-
| <samp>int</samp>
| <samp>UseConditionFailedMessage</samp>
| A positive integer (like <samp>5</samp>).
| A [[Modding:Tokenizable strings|tokenizable string]] for what message to show when <samp>UseCondition</samp> is not met. If an empty string, no message will be shown. If not specified, equivalent to <samp>"[LocalizedText Strings/UI:CantUseHere]"</samp>.
|-
|-
| <samp>-int</samp>
| <samp>UseActions</samp>
| An integer with optional negative sign (like <samp>5</samp> or <samp>-5</samp>).
| A list of [[Modding:Trigger actions#Actions|actions]] to run upon using the item. These trigger actions will have an input argument called <samp>StackSize</samp>, which will be the size of the stack obtained if triggered via <samp>ConsumeOnObtain</samp>, or <samp>1</samp> otherwise. (For more information on trigger action input arguments, see the relevant section on this page.)
|-
|-
| <samp>string</samp>
| <samp>ConsumeOnUse</samp>
| A quoted sequence of arbitrary text like <samp>"some words here"</samp>. If the argument has no quotes, this is equivalent to the <samp>word</samp> token.
| <samp>true</samp> if the item should be consumed on use, <samp>false</samp> otherwise. Default <samp>true</samp>.
|-
|-
| <samp>word</samp>
| <samp>ObtainActions</samp>
| A simple sequence of letters, numbers, periods, and/or underscores (usually an ID or similar value). While the command will accept quotes, they're redundant and will be rejected by the validator.
| A list of [[Modding:Trigger actions#Actions|actions]] to run upon obtaining the item. These trigger actions will have an input argument called <samp>StackSize</samp>, which will be the size of the stack obtained. (For more information on trigger action input arguments, see the relevant section on this page.)
|-
|-
| <samp>remainder</samp>
| <samp>ConsumeOnObtain</samp>
| One or more arguments of any type.
| If the item should be automatically used *and* consumed when obtained. Items with this enabled:
<ul>
<li>Will not actually enter the inventory (since they are consumed immediately).</li>
<li>Can be collected even with a full inventory (since they are consumed immediately).</li>
<li>Will not have their <samp>UseCondition</samp> checked before their <samp>UseActions</samp> are run.</li>
<li>Will have their <samp>ObtainActions</samp> (if any) run before their <samp>UseActions</samp> are run.</li>
</ul>
|-
|-
!colspan="2"| specific string formats
| <samp>ShowNotificationOnObtain</samp>
| <samp>true</samp> if the item should show a notification in the bottom left corner of the screen upon receiving the item, <samp>false</samp> otherwise. Default <samp>true</samp>.
|-
|-
| <samp>actor</samp>
| <samp>ForgeRandomSlot</samp>
| An actor name in the event format (like <samp>Abigail</samp> or <samp>Kent?</samp>).
| The slot to randomize the enchantments for if this is used as an ingredient.
|-
|-
| <samp>assetName</samp>
| <samp>ForgeCost</samp>
| An [[Modding:Common data field types#Asset name|asset name]] like <samp>Data/Achievements</samp>.
| If greater than or equal to 0, the cinder shard cost for using this item in the forge.
|-
|-
| <samp>direction</samp>
| <samp>ForgeCostItem</samp>
| A [[Modding:Event data#Directions|direction]] which can be specified as either a number (like <samp>0</samp>) or name (like <samp>up</samp>).
| If set, changes the item required for forging from cinder shards to something else.
|}
 
===[[Modding:Weapons|<samp>Data/Weapons</samp>]]===
Added new fields:
 
{| class="wikitable"
|-
|-
| <samp>goToLabel</samp>
! field
| An event label (see the <samp>goto</samp> and <samp>label</samp> event commands). This is equivalent to <samp>word</samp>, but is used by <samp>EventValidator</samp> to validate label references.
! effect
|-
| <samp>itemId</samp>
| An [[Modding:Common data field types#Item ID|item ID]] which can be qualified or unqualified (like <samp>(O)MossySoup</samp> or <samp>MossySoup</samp>).
|-
| <samp>translationKey</samp>
| A [[Modding:Common data field types#Translation key|translation key]] like <samp>Strings/Locations:SomeKey</samp>.
|-
|-
!colspan="2"| custom formats
| <samp>DefaultEnchantments</samp>
|-
| Enchantments to apply by default on this weapon. This is a dictionary, with the key being the enchantment ID, and the value being the level of the enchantment.
| <samp>'...'</samp>
| The literal text or regex pattern to match, like <code>'continue'</code> or <code>'[\w-]+'</code>.
|}


In addition, you can extend tokens with these indicators:
Enchantments added through this are still subject to normal enchantment restrictions, and therefore must actually be applicable to this weapon.
* Suffix with <samp>+</samp> for repeating argument of that type. For example, <samp>int+</samp> would allow both <samp>5</samp> and <samp>5 6 7</samp>.
* Suffix with <samp>?</samp> for an optional argument which can be omitted. All tokens after this token must also be optional. (You can have optional repeating arguments like <samp>int+?</samp>.)
* Infix with <samp>|</samp> for a parameter which can be one of multiple types. For example <samp>int|bool</samp> will allow either integer or boolean values.


===Item changes===
For an example of this, check out the Holy Blade.
* Added <samp>IItemDataDefinition.GetContextTags(itemData)</samp> method, so custom item data definitions can add [[Modding:Context tags|context tags]] from their data if applicable.
|}
* Fixed <code>item.CopyFieldsFrom(other)</code> always setting the stack size for the copy to 1.


===Other breaking API changes===
==Changes for all mod authors==
''(This section is meant as a quick reference if you have build errors; there's no need to read through it otherwise.)''
===Switch blocks===
'Switch blocks' are a new <code>${…}$</code> syntax which can be used in nearly all game text (not just dialogue). This extends the former 'gender-switch blocks' [[Modding:Migrate to Stardew Valley 1.6#Gender changes|added in 1.6.0]].


These class members changed in 1.6.16:
These are applied before most other commands or parsing, so you can safely use them in cases where characters like <samp>^</samp> have a different meaning (e.g. mail text).


The supported switch blocks are:
{| class="wikitable"
{| class="wikitable"
|-
|-
! type
! type
! member
! syntax
! migration
! description
|-
|-
| <samp>Boots</samp>
| gender
| <samp>price</samp>
| <code>${male^female}</code><br /><code>${male^female^non-binary}</code>
| Removed. This was never used, since boots prices are calculated dynamically.
| Switch between text for male, female, and non-binary players. The non-binary value is only used if a mod overrides the player's gender, since the in-game UI only allows male or female.
 
You can also use <samp>¦</samp> instead of <samp>^</samp>, in which case any <samp>^</samp> characters are left as-is.
 
For example:
<syntaxhighlight lang="json">
"Mon": "Hey ${lad^lass^kiddo}$!"
</syntaxhighlight>
|-
|-
| <samp>FishingRod</samp>
| randomize
| <samp>lastCatchWasJunk</samp>
| <code>${variant A &#124;&#124;&#124; …}$</code>
| Renamed to <samp>lastCatchSkippedMinigame</samp> to more accurately convey what it does.
| Defines an arbitrary number of variants from which to choose each day. After randomization, any leading or trailing whitespace is trimmed. This randomization is deterministic per day (e.g. reloading the save won't change which one is shown).
|-
| <samp>Furniture</samp>
| <samp>placementRestrictions</samp>
| Removed. Replaced by <samp>CanPlaceIndoors</samp> and <samp>CanPlaceOutdoors</samp>.
|}


===Other changes===
For example, let's say you did this:
* Added <samp>event.floorSprites</samp> field for temporary animated sprites that should be drawn on the ground (e.g. under NPC shadows).
<syntaxhighlight lang="js">
* The game now uses forward slashes in all asset names (like <samp>Maps/Town</samp> instead of <samp>Maps\Town</samp>). This shouldn't affect most mods, since SMAPI already converted all asset names to forward slashes.
"Rainy_Night": "I ${love ||| like ||| adore ||| somewhat enjoy ||| enjoy}$ rain.$h"
* Fixed <code>Event.TryGetEventCommandHandler</code> not loading commands if it's called before any other methods.
</syntaxhighlight>
* Fixed machine auto-load leaving empty slots in chests when taking a secondary ingredient.


==Name translation changes for wiki maintainers==
That would create five variants which each have an equal probability of being selected.
Some in-game item and monster names were retranslated in some languages for clarity or correctness.
|}


This list is mostly provided to help wiki maintainers update pages, so it doesn't include names which only changed capitalization, changed <code>'</code> (straight apostrophe) to <code>’</code> (curly) in French, or aren't visible to vanilla players (like mine rocks).
Switch blocks can be arbitrary combined and nested. For example:
<syntaxhighlight lang="js">
"Rainy_Night": "${Hello there ||| Hey ${lad^lass^kiddo}$ }$!"
</syntaxhighlight>


===Objects===
===[[Modding:Context tags|Context tag]] changes===
; Hungarian
Added new context tags:
: {| class="wikitable"
{| class="wikitable"
|-
|-
! item
! context tag
! old name
! item types
! new name
! effect
|-
|-
| [[Bone Mill]]
| <samp>is_galaxy_weapon</samp>
| ''Csontőrlő''
| [[Modding:Weapons|weapons]]
| ''Csontdaráló''
| Marks the tool as a galaxy weapon like the [[Galaxy Hammer|galaxy hammer]] or [[Galaxy Sword|galaxy sword]]. This is set for vanilla scythes through <samp>Data/Weapons</samp>. This affects logic which checks for galaxy weapons (e.g. [[Galaxy Soul|galaxy soul]] enchantments).
|}
|}


; Russian
Additionally, there is now a data asset for context tags for supporting data (such as for using them in crafting recipes). Located in <samp>Data/ContextTags</samp>, this is a dictionary assets. The key is the context tag, and the value is a data model with the following fields:
: {| class="wikitable"
{| class="wikitable"
|-
|-
! item
! field
! old name
! effect
! new name
|-
|-
|rowspan="71" valign="top"| [[Aged Roe]] (flavored)
| <samp>DisplayName</samp>
| ''Вяленая икра (Альбакор)''<!--Albacore-->
| A [[Modding:Tokenizable strings|tokenizable string]] for the display name of this context tag. Required when using a context tag as a crafting recipe ingredient.
| ''Вяленая икра альбакора''
|-
|-
| ''Вяленая икра (Анчоус)''<!--Anchovy-->
| <samp>RepresentativeItem</samp>
| ''Вяленая икра анчоуса''
| The qualified item ID for the item representing this context tag. Required when using a context tag as a crafting recipe ingredient.
|-
|-
| ''Вяленая икра (Багрянник)''<!--Crimsonfish-->
| <samp>CustomFields</samp>
| ''Вяленая икра Багрянника''
| ''(Optional)'' The [[Modding:Common data field types#Custom fields|custom fields]] for this entry.
|}
 
===[[Modding:Dialogue|Dialogue]] changes===
<ul>
<li>Added a new [[Modding:Dialogue#Special tokens|special token]] in dialogue strings:
{| class="wikitable"
|-
|-
| ''Вяленая икра (Барабулька)''<!--Red Mullet-->
! token
| ''Вяленая икра барабульки''
! description
|-
|-
| ''Вяленая икра (Берикс)''<!--Red Snapper-->
| <code>&#124;&#124;&#124;</code>
| ''Вяленая икра берикса''
| This is a shortcut for the [[#Switch blocks|randomize switch block]].
 
Delimits an arbitrary number of dialogue variants from which to choose each day. After randomization, any leading or trailing whitespace is trimmed. This randomization is deterministic per day (e.g. reloading the save won't change which one is shown).
 
For example, let's say you did this:
<syntaxhighlight lang="js">
"Rainy_Night": "
    I love rain.$h|||
    I like rain.$h|||
    I adore rain.$h|||
    I hate rain.$s#$b#Just kidding. I love it!$h|||
    I enjoy rain.$h
"
</syntaxhighlight>
 
That would create five variants of the dialogue which each have an equal probability of being selected.
|}</li>
<li>Improved some [[Modding:Dialogue#Special tokens|special tokens]]:
{| class="wikitable"
|-
|-
| ''Вяленая икра (Большеротый окунь)''<!--Largemouth Bass-->
! token
| ''Вяленая икра большеротого окуня''
! changes
|-
|-
| ''Вяленая икра (Бычок)''<!--Goby-->
| <code>&#124;&#124;</code>
| ''Вяленая икра бычка''
| Whitespace around the token is now ignored, so you can split text into multiple lines:
<syntaxhighlight lang="js">
"Wed8": "
    Isn't it expensive, coming to the desert so often like you do?#$e#You must really like to see me, huh? Hmmm... $h||
    *sigh*... I do miss the beautiful flowers of Stardew Valley...$s
"
</syntaxhighlight>
|}</li>
<li>Some dialogues were merged or renamed using the new features. The previous dialogue keys are now ignored by the game.
 
{| class="wikitable"
|-
|-
| ''Вяленая икра (Голавль)''<!--Chub-->
! asset
| ''Вяленая икра голавля''
! former key
! changes
|-
|-
| ''Вяленая икра (Голубой дискус)''<!--Blue Discus-->
| <samp>Characters/Dialogue/{{t|NPC name}}</samp>
| ''Вяленая икра голубого дискуса''
| <samp><samp>Resort_{{t|number}}</samp><br /><samp>Resort_Bar_{{t|number}}</samp><br /><samp>Resort_Chair_{{t|number}}</samp><br /><samp>Resort_Dance_{{t|number}}</samp><br /><samp>Resort_Shore_{{t|number}}</samp><br /><samp>Resort_Towel_{{t|number}}</samp><br /><samp>Resort_Umbrella_{{t|number}}</samp><br /><samp>Resort_Wander_{{t|number}}</samp>
| Merged into their base key (e.g. <samp>Resort_{{t|random}}</samp> into <samp>Resort</samp>) using the new <code>&#124;&#124;&#124;</code> random-variant token.
|-
|-
| ''Вяленая икра (Гребешок)''<!--Clam-->
|rowspan="7"| <samp>Characters/Dialogue/MarriageDialogue</samp><br /><samp>Characters/Dialogue/MarriageDialogue{{t|NPC name}}</samp><br /><samp>Characters/Dialogue/MarriageDialogue{{t|NPC name}}Roommates</samp>
| ''Вяленая икра гребешка''
| <samp>funLeave_{{t|NPC name}}</samp><br /><samp>funReturn_{{t|NPC name}}</samp><br /><samp>jobLeave_{{t|NPC name}}</samp><br /><samp>jobReturn_{{t|NPC name}}</samp><br /><br /><samp>patio_{{t|NPC name}}</samp><br /><samp>spouseRoom_{{t|NPC name}}</samp><br /><br /><samp>spring_{{t|NPC name}}</samp><br /><samp>summer_{{t|NPC name}}</samp><br /><samp>fall_{{t|NPC name}}</samp><br /><samp>winter_{{t|NPC name}}</samp>
| Moved into <samp>MarriageDialogue{{t|NPC name}}</samp> and removed the NPC suffix (like <samp>spouseRoom_{{t|NPC name}}</samp> → <samp>spouseRoom</samp>).
|-
|-
| ''Вяленая икра (Дорада)''<!--Dorado-->
| <samp>Indoor_Day_0</samp><br /><samp>Indoor_Day_1</samp><br /><samp>Indoor_Day_2</samp><br /><samp>Indoor_Day_3</samp><br /><samp>Indoor_Day_4</samp>
| ''Вяленая икра дорады''
| Merged into <samp>Indoor_Day</samp>.
|-
|-
| ''Вяленая икра (Желтый судак)''<!--Walleye-->
| <samp>Indoor_Night_0</samp><br /><samp>Indoor_Night_1</samp><br /><samp>Indoor_Night_2</samp><br /><samp>Indoor_Night_3</samp><br /><samp>Indoor_Night_4</samp><br /><samp>Indoor_Night_{{t|NPC name}}</samp>
| ''Вяленая икра желтого судака''
| Merged into <samp>Indoor_Night</samp>.
|-
|-
| ''Вяленая икра (Жуть-рыба)''<!--Spook Fish-->
| <samp>NoBed_0</samp><br /><samp>NoBed_1</samp><br /><samp>NoBed_2</samp><br /><samp>NoBed_3</samp>
| ''Вяленая икра жуть-рыбы''
| Merged into <samp>NoBed</samp>.
|-
|-
| ''Вяленая икра (Змеезуб)''<!--Lingcod-->
| <samp>Outdoor_0</samp><br /><samp>Outdoor_1</samp><br /><samp>Outdoor_2</samp><br /><samp>Outdoor_3</samp><br /><samp>Outdoor_4</samp><br /><samp>Outdoor_{{t|NPC name}}</samp>
| ''Вяленая икра змеезуба''
| Merged into <samp>Outdoor</samp>.
|-
|-
| ''Вяленая икра (Кальмар)''<!--Squid-->
| <samp>Rainy_Day_0</samp><br /><samp>Rainy_Day_1</samp><br /><samp>Rainy_Day_2</samp><br /><samp>Rainy_Day_3</samp><br /><samp>Rainy_Day_4</samp>
| ''Вяленая икра кальмара''
| Merged into <samp>Rainy_Day</samp>.
|-
|-
| ''Вяленая икра (Камбала)''<!--Halibut-->
| <samp>Rainy_Night_0</samp><br /><samp>Rainy_Night_1</samp><br /><samp>Rainy_Night_2</samp><br /><samp>Rainy_Night_3</samp><br /><samp>Rainy_Night_4</samp><br /><samp>Rainy_Night_5</samp><br /><samp>Rainy_Night_{{t|NPC name}}</samp>
| ''Вяленая икра палтуса''
| Merged into <samp>Rainy_Night</samp>.
|}</li>
</ul>
 
===Display shops===
In addition to being able to add or change what is sold on Pierre's counter, you can also create your own.
 
Display shops are similar to normal shops, except they show their stocked items in-world. They have a fixed size which is filled from the item pool until it is full (or there is nothing left to add).
 
Display shops are stocked at the beginning of the day, and not restocked until the next day. They are stocked per-farmhand so that they can be different for everyone (such as with backpack upgrades), however a <samp>LimitedStockMode</samp> of <samp>Global</samp> will sync the stock between players, just like a normal shop.
 
If <samp>LimitedStockMode</samp> is <samp>Player</samp>, then it will be shown before other items, and will not count towards the <samp>ItemCountToSell</samp>. Once a <samp>LimitedStockMode</samp> <samp>Player</samp> item is purchased, it will move to the next not-displayed <samp>LimitedStockMode</samp> <samp>Player</samp> that was stocked, and once those are out of stock it will move on to the synced item stocks.
 
Display shop items are always purchased one at a time - a higher stack size means it can be bought multiple times.
 
The data asset, located at <samp>Data/DisplayShops</samp>, consists of a string -> model lookup, where...
* The key is the ID of the display shop.
* The value is a model with the fields listed below.
 
{| class="wikitable"
|-
|-
| ''Вяленая икра (Карп)''<!--Carp-->
! field
| ''Вяленая икра карпа''
! effect
|-
|-
| ''Вяленая икра (Карп-мутант)''<!--Mutant Carp-->
!colspan="2"| basic info
| ''Вяленая икра Карпа-мутанта''
|-
|-
| ''Вяленая икра (Краб)''<!--Crab-->
| <samp>OpenCondition</samp>
| ''Вяленая икра краба''
| ''(Optional)'' A Game State Query for determining if the display shop if is open (that is, if the items shown are purchasable or not). If not specified, it will always be open.
|-
|-
| ''Вяленая икра (Креветка)''<!--Shrimp-->
| <samp>ClosedMessage</samp>
| ''Вяленая икра креветок''
| ''(Optional)'' A Tokenizable String for what message to show if the shop is closed. Defaults to (after token parsing) <samp>"Closed."</samp>.
|-
|-
| ''Вяленая икра (Лавовый угорь)''<!--Lava Eel-->
| <samp>Currency</samp>
| ''Вяленая икра лавового угря''
| ''(Optional)'' The currency to use for the price, with the same options as in <samp>Data/Shops</samp>. Defaults to <samp>0</samp> (standard gold).
|-
|-
| ''Вяленая икра (Легенда II)''<!--Legend II-->
!colspan="2"| cosmetic
| ''Вяленая икра Легенды II''
|-
|-
| ''Вяленая икра (Легенда)''<!--Legend-->
| <samp>PurchaseSound</samp>
| ''Вяленая икра Легенды''
| ''(Optional)'' A sound to play upon making a successful purchase. Defaults to <samp>"purchaseClick"</samp>.
|-
|-
| ''Вяленая икра (Ледопип)''<!--Ice Pip-->
| <samp>ItemWorldOffset</samp>
| ''Вяленая икра ледопипа''
| ''(Optional)'' A Vector2 of how far to move the display item from the tile that has the purchase tile action. For example, Pierre's shop counter has a value of <samp>0 -72</samp> so that the items show on top of the counter. Defaults to <samp>0</samp>.
|-
|-
| ''Вяленая икра (Ледорыб)''<!--Glacierfish-->
!colspan="2"| stocked products
| ''Вяленая икра Ледорыба''
|-
|-
| ''Вяленая икра (Ледорыб-младший)''<!--Glacierfish Jr.-->
| <samp>ApplyProfitMargins</samp>
| ''Вяленая икра Ледорыба-младшего''
| ''(Optional)'' Whether or not to apply profit margins by default for items in this shop. Defaults to <samp>null</samp>.
|-
|-
| ''Вяленая икра (Лесоплюх)''<!--Woodskip-->
| <samp>PriceModifiers</samp>
| ''Вяленая икра лесоплюха''
| ''(Optional)'' Price modifiers to apply to items in this shop. Behaves the same way as <samp>Data/Shops</samp> <samp>PriceModifiers</samp>.
|-
|-
| ''Вяленая икра (Лещ)''<!--Bream-->
| <samp>PriceModifierMode</samp>
| ''Вяленая икра леща''
| ''(Optional)'' Price modifier mod for applying price modifiers to items in this shop. Behaves the same way as <samp>Data/Shops</samp> <samp>PriceModifierMode</samp>.
|-
|-
| ''Вяленая икра (Литорина)''<!--Periwinkle-->
| <samp>ItemCountToSell</samp>
| ''Вяленая икра литорин''
| ''(Optional)'' The amount of items that can be sold each day.
|-
|-
| ''Вяленая икра (Лосось пустоты)''<!--Void Salmon-->
|valign="top"| <samp>ItemPool</samp>
| ''Вяленая икра лосося пустоты''
| ''(Optional)'' The items to use when populating the shop. This list is sorted by <samp>Precedence</samp> before being used, with entries of the same precedence being shuffled together. This list consist of values with these fields:
{| class="wikitable"
|-
|-
| ''Вяленая икра (Лосось)''<!--Salmon-->
! field
| ''Вяленая икра лосося''
! effect
|-
|-
| ''Вяленая икра (Малек Багрянника)''<!--Son of Crimsonfish-->
| ''common fields''
| ''Вяленая икра Малька Багрянника''
| See [[Modding:Shops#Format|<samp>Items</samp> for Shops]] for the item fields supported by display shop items.
 
Notes:
* If set to an [[Modding:Item queries|item query]] which returns multiple items, all of them will be valid choices for the shop.
* Unlike other item spawn fields, <samp>ObjectDisplayName</samp> is supported for any entry (not just Object items).
|-
|-
| ''Вяленая икра (Малоротый окунь)''<!--Smallmouth Bass-->
| <samp>DisplayOffset</samp>
| ''Вяленая икра малоротого окуня''
| ''(Optional)'' The amount to offset drawing this item when shown in the display shop. This is useful for non-standard-sized items.
|-
|-
| ''Вяленая икра (Мелкая камбала)''<!--Flounder-->
| <samp>DisplayScale</samp>
| ''Вяленая икра камбалы''
| ''(Optional)'' How much to scale the item when it is shown. Defaults to <samp>4</samp> (just like most things in the game).
|-
|-
| ''Вяленая икра (Мидия)''<!--Mussel-->
| <samp>ItemBlurb</samp>
| ''Вяленая икра мидий''
| ''(Optional)'' Text to show in a dialogue box before the item prompt appears.
|-
|-
| ''Вяленая икра (Мисс Морской черт)''<!--Ms. Angler-->
| <samp>ItemBlurbSpeaker</samp>
| ''Вяленая икра Мисс Морской черт''
| ''(Optional)'' The NPC that will "speak" the <samp>ItemBlurb</samp>, if desired.
|-
|-
| ''Вяленая икра (Морской ёрш)''<!--Lionfish-->
| <samp>Precedence</samp>
| ''Вяленая икра крылатки''
| ''(Optional)'' The precedence for this item to be checked, with higher being sooner. Defaults to <samp>0</samp>.
|}
|}
 
To make the display shop show in world, you need to use a new tile action: <samp>DisplayShop <displayShopId> <itemIndex></samp>, with <samp>displayShopId</samp> being the ID of the entry in <samp>Data/DisplayShops</samp> and <samp>itemIndex</samp> being which index of the stocked items to make available (based on the corresponding <samp>ItemCountToSell</samp> value).
 
For example, here's how to add a new entry to Pierre's counter:
<syntaxhighlight lang="json">
{
    "Format": "2.9.0",
    "Changes": [
        {
            "Action": "EditData",
            "Target": "Data/DisplayShops",
            "TargetField": [ "SeedShopCounter", "ItemPool" ],
            "Entries": {
                "{{ModId}}_Weeds": {
                    "ItemId": "(O)0",
                    "Price": 123,
                    "AvailableStock": 3,
                    "ItemBlurb": "wow some weeds. perfect for honey",
                    "ItemBlurbSpeaker": "Penny",
                    "Precedence": -100,
                }
            }
        }
    ]
}
</syntaxhighlight>
 
 
===Enchantment data===
[[Forge#Enchantments|Enchantments]] have been '''partly''' de-hardcoded into a new <samp>Data/Enchantments</samp> data asset. Mods can now easily add new enchantments, including enchantments applied through the [[forge]] using a [[Prismatic Shard|prismatic shard]] or a custom item ID.
 
However, this logic is still hardcoded:
* Forging [[Forge#Innate enchantments|innate enchantments]]. The innate enchantments are in data, but the logic to choose which to apply is still hardcoded.
* Forging [[diamond]]s into a weapon to fill all its [[Forge#Weapon forging|weapon stat slots]].
* Several enchantments' effects when applied (though weapon buff effects are in data).
 
This consists of a string → model lookup, where...
* The key is the [[Modding:Common data field types#Unique string ID|unique string ID]] for the enchantment.
* The value is a model with the fields listed below.
 
{| class="wikitable"
|-
|-
| ''Вяленая икра (Морской еж)''<!--Sea Urchin-->
! field
| ''Вяленая икра морского ежа''
! effect
|-
|-
| ''Вяленая икра (Морской огурец)''<!--Sea Cucumber-->
| <samp>DisplayName</samp>
| ''Вяленая икра морского огурца''
| A [[Modding:Tokenizable strings|tokenizable string]] for the enchantment's display name, shown in tooltips. This can contain <samp>{0}</samp> for the enchantment level, if applicable.
|-
|-
| ''Вяленая икра (Морской черт)''<!--Angler-->
| <samp>ForgeWith</samp>
| ''Вяленая икра Морского черта''
| ''(Optional)'' If set, this enchantment is applied to tools by [[Forge|forging]] an item with this qualified ID into it. Default none, in which case it won't be applicable through the forge.
|-
|-
| ''Вяленая икра (Ночной кальмар)''<!--Midnight Squid-->
| <samp>AppliesTo</samp>
| ''Вяленая икра ночного кальмара''
| ''(Optional)'' The tools or weapons to which this enchantment can be applied. Defaults to all tools/weapons.
 
This is specified as an array of [[Modding:Context tags|context tag]] queries. The enchantment can be applied if at least one query matches.
<syntaxhighlight lang="js">
"AppliesTo": [
    "melee_weapon, !is_scythe", // any non-scythe melee weapon
    "hoe, upgrade_level_4"      // any hoe upgraded to iridium or higher
]
</syntaxhighlight>
|-
|-
| ''Вяленая икра (Окунь)''<!--Perch-->
| <samp>EnchantmentSlot</samp>
| ''Вяленая икра окуня''
| ''(Optional)'' The 'slot' this enchantment goes in. Only one enchantment per slot can normally be applied, except for the "Forge" slot. Default is "Primary".
Valid vanilla types are:
{| class="wikitable"
|-
|-
| ''Вяленая икра (Омар)''<!--Lobster-->
! type
| ''Вяленая икра омара''
! example
|-
| <samp>Primary</samp>
| A normal enchantment applied through a prismatic shard.
|-
|-
| ''Вяленая икра (Осьминог)''<!--Octopus-->
| <samp>Forge</samp>
| ''Вяленая икра осьминога''
| A [[Forge#Weapon forging|weapon stat enchantment]] applied through the [[forge]].
|-
|-
| ''Вяленая икра (Песковник)''<!--Sandfish-->
| <samp>Transforming</samp>
| ''Вяленая икра песковника''
| An item transformation enchantment applied through the [[forge]] with [[Galaxy Soul|galaxy souls]].
|-
|-
| ''Вяленая икра (Полуночный карп)''<!--Midnight Carp-->
| <samp>Innate1</samp> and <samp>Innate2</samp>
| ''Вяленая икра полуночного карпа''
| An [[Forge#Innate enchantments|innate enchantment]] applied through the [[forge]] using a [[Dragon Tooth|dragon tooth]].
|}
|-
|-
| ''Вяленая икра (Пятнистый криворот)''<!--Ghostfish-->
| <samp>IsSecondary</samp>
| ''Вяленая икра пятнистого криворота''
| ''(Optional)'' Whether this is an [[Forge#Innate enchantments|innate enchantment]] applied through the [[forge]] using a [[Dragon Tooth|dragon tooth]]. Default false.
|-
|-
| ''Вяленая икра (Радиоактивный карп)''<!--Radioactive Carp-->
| <samp>IsVisible</samp>
| ''Вяленая икра Радиоактивного карпа''
| ''(Optional)'' Whether the enchantment should be shown in the tool/weapon's tooltip. Default true.
|-
|-
| ''Вяленая икра (Радужная форель)''<!--Rainbow Trout-->
| <samp>MaximumLevel</samp>
| ''Вяленая икра радужной форели''
| ''(Optional)'' The number of times this enchantment can be applied to the same tool to upgrade the enchantment level (e.g. for [[Forge#Weapon forging|weapon stat enchantments]]). A value of 1 means there's only one enchantment level, so it can't be upgraded by applying the enchantment again. Default 1.
|-
|-
| ''Вяленая икра (Рак)''<!--Crayfish-->
| <samp>EquipmentEffects</samp>
| ''Вяленая икра рака''
| ''(Optional)'' The buffs applied to the weapon when this enchantment is applied.
 
This consists of a list of models with the fields below. You can specify any number of entries; the first one which matches the tool will be applied.
{| class="wikitable"
|-
|-
| ''Вяленая икра (Рыба-еж)''<!--Pufferfish-->
! field
| ''Вяленая икра иглобрюха''
! effect
|-
|-
| ''Вяленая икра (Рыба-камень)''<!--Stonefish-->
| <samp>Id</samp>
| ''Вяленая икра рыбы-камня''
| A [[Modding:Common data field types#Unique string ID|unique string ID]] for this entry.
|-
|-
| ''Вяленая икра (Рыба-пузырь)''<!--Blobfish-->
| <samp>MinLevel</samp>
| ''Вяленая икра рыбы-капли''
| ''(Optional)'' The minimum enchantment level for which these stats apply. Default 0 (i.e. any level).
|-
|-
| ''Вяленая икра (Сардина)''<!--Sardine-->
| ''other fields''
| ''Вяленая икра сардины''
| See the <samp>Effects</samp> field [[Modding:Buffs|in <samp>Data/Buffs</samp>]], which is equivalent to this model.
|}
|-
|-
| ''Вяленая икра (Сельдь)''<!--Herring-->
| <samp>Transformations</samp>
| ''Вяленая икра сельди''
| ''(Optional)'' If <samp>EnchantmentSlot</samp> is <samp>"Transforming"</samp>, this contains all valid transformations for it.
 
This is a dictionary of qualified item IDs, with the key being the original item, and the value being the transformed item.
 
Transformations to and from items besides weapons are allowed, with some caveats:
* If the source item cannot be enchanted, the maximum level for the enchantment must be 1, or it will not work.
* If the source item and transformed item are different C# types, then all extra item data (such as mod data, enchantments, and tool enchantments) will be lost, since an entirely new item had to be created.
|-
|-
| ''Вяленая икра (Сердцевидка)''<!--Cockle-->
!colspan="2"| advanced
| ''Вяленая икра сердцевидки''
|-
|-
| ''Вяленая икра (Скат)''<!--Stingray-->
| <samp>CustomFields</samp>
| ''Вяленая икра ската''
| ''(Optional)'' The [[Modding:Common data field types#Custom fields|custom fields]] for this entry.
|-
|-
| ''Вяленая икра (Скорпионовый карп)''<!--Scorpion Carp-->
| <samp>ClassName</samp>
| ''Вяленая икра скорпионового карпа''
| ''(Optional, specialized)'' The name of the C# class to construct within the <code>StardewValley.Enchantments</code> namespace. The class must be a subclass of <samp>StardewValley.Enchantments.Enchantment</samp>, and have a constructor with no arguments. For example, given a value of <samp>BottomlessEnchantment</samp>, the game will create <code>StardewValley.Enchantments.BottomlessEnchantment</code> instances.
 
This should usually be omitted, in which case the game will create a generic <samp>Enchantment</samp> instance which uses the data in <samp>Data/Enchantments</samp> for its ID.
|}
 
===[[Modding:Event data|Event]] changes===
Added new event commands:
{| class="wikitable"
|-
|-
| ''Вяленая икра (Слаймджек)''<!--Slimejack-->
! command
| ''Вяленая икра слаймджека''
! description
|-
|-
| ''Вяленая икра (Солнечник)''<!--Sunfish-->
| <samp>setDrawDepthModifier {{t|npc}} {{t|amountInTiles}}
| ''Вяленая икра солнечника''
| Modify the draw depth of {{t|npc}} for this event, by {{t|amountInTiles}}.
|-
|-
| ''Вяленая икра (Сом)''<!--Catfish-->
| <samp>setDrawDepthModifier {{t|npc}} reset
| ''Вяленая икра сома''
| Reset the draw depth modifier of {{t|npc}} for this event.
|-
|-
| ''Вяленая икра (Сомик)''<!--Bullhead-->
| <samp>ForceBreathing {{t|npc}} false
| ''Вяленая икра сомика''
| Prevent {{t|npc}} from showing a breathing animation for this event.
|-
|-
| ''Вяленая икра (Тигровая форель)''<!--Tiger Trout-->
| <samp>ForceBreathing {{t|npc}} true {{o|breathPosX}} {{o|breathPosY}} {{o|breathRectX}} {{o|breathRectY}} {{o|breathRectWidth}} {{o|breathRectHeight}}
| ''Вяленая икра тигровой форели''
| Force {{t|npc}} to show a breathing animation for this event. You can optionally override the data used for the breathing rect, with the values following the same behavior as they would if specified in the <samp>Data/Characters</samp> character data.
|-
|-
| ''Вяленая икра (Тиляпия)''<!--Tilapia-->
| <samp>ForceBreathing {{t|npc}} reset
| ''Вяленая икра тиляпии''
| Reset the forced breathing modifier of {{t|npc}} for this event.
|-
|-
| ''Вяленая икра (Тунец)''<!--Tuna-->
| <samp>SaveActorState {{t|stateStoreId}} {{t|actor}} {{t|state}}+
| ''Вяленая икра тунца''
| Stores the specified {{t|actor}}'s current {{t|state}}(s) into the {{t|stateStoreId}} actor state store, to be loaded later.
 
Any actor, both NPC and Farmer, can be specified. If <samp>all</samp> is specified, them all actors will have their state saved.
 
Multiple {{t|state}} values can be specified, separated by spaces. Valid {{t|state}} values include:
{| class="wikitable"
|-
|-
| ''Вяленая икра (Угорь)''<!--Eel-->
! state type
| ''Вяленая икра угря''
! description
|-
|-
| ''Вяленая икра (Улитка)''<!--Snail-->
| <samp>all</samp>
| ''Вяленая икра улиток''
| Saves all '''vanilla''' state types for the specified actor.
 
Modded state types are not included here to make it less likely that modded state types will break existing events. For using modded state types in bulk, see the bottom of this table.
|-
|-
| ''Вяленая икра (Устрица)''<!--Oyster-->
| Any state starting with <samp>!</samp>
| ''Вяленая икра устриц''
| This will ''remove'' the specified state from the current selection of ones to be saved.
 
For example, you could specify <samp>all !movement !animation</samp> to save all state ''except'' the movement state and animation state.
|-
|-
| ''Вяленая икра (Чудо-огурец)''<!--Super Cucumber-->
| <samp>position</samp>
| ''Вяленая икра чудо-огурца''
| The current position of the actor.
|-
|-
| ''Вяленая икра (Шэд)''<!--Shad-->
| <samp>movement</samp>
| ''Вяленая икра шэда''
| The movement state of the actor, including its current speed, <samp>advancedMove</samp> data, and <samp>ignoreCollisions</samp> flag.
|-
|-
| ''Вяленая икра (Щука)''<!--Pike-->
| <samp>animation</samp>
| ''Вяленая икра щуки''
| The animation state of the actor, including its facing direction, <samp>ignoreMovementAnimation</samp> flag, and (for NPCs only) its <samp>ForceBreathing</samp> values.
|-
|-
| [[Bait]]
| <samp>drawOffset</samp>
| ''Приманка''
| Values previously specified in <samp>drawOffset</samp> and <samp>setDrawDepthModifier</samp>.
| ''Наживка''
|-
|-
| [[Basic Retaining Soil]]
| <samp>name</samp>
| ''Обычная влагосохраняющая почва''
| The NPC's current display name.
| ''Обычный аквагрунт''
|-
|-
| [[Blobfish]]
| <samp>portrait</samp>
| ''Рыба-пузырь''
| The NPC's current portrait.
| ''Рыба-капля''
|-
|-
| [[Blue Slime Egg]]
| <samp>sprite</samp>
| ''Синее яйцо слайма''
| The NPC's current sprite.
| ''Яйцо синего слайма''
|-
|-
| [[Crispy Bass]]
| <samp>shadow</samp>
| ''Окунь с хруст. корочкой''
| The NPC's current <samp>hideShadow</samp> value.
| ''Окунь с хрустящей корочкой''
|-
|-
| [[Deluxe Retaining Soil]]
| <samp>swimming</samp>
| ''Влагосохраняющая почва Делюкс''
| The NPC's current swimming state.
| ''Аквагрунт Делюкс''
|-
|-
| [[Flounder]]
| Any state ending with <samp>/</samp>
| ''Мелкая камбала''
| Specifying a state ending with <samp>/</samp> will result in all state types starting with that string to be added.
| ''Камбала''
 
For example, specifying <samp>spacechase0.SpaceCore/</samp> would add ''all'' states that were added by SpaceCore (assuming they were properly namespaced).
 
This also works with "nested namespaces", ex. <samp>spacechase0.SpaceCore/MagicalStuff/</samp> would add all "magical stuff" states added by SpaceCore.
|}
|-
|-
| [[Green Slime Egg]]
| <samp>LoadActorStateStore {{t|stateStoreId}}
| ''Зеленое яйцо слайма''
| Loads all actor state stored in the {{t|stateStoreId}} actor state store.
| ''Яйцо зеленого слайма''
|-
|-
| [[Halibut]]
| <samp>ClearSavedActorStateStore {{t|stateStoreId}}
| ''Камбала''
| Clears the {{t|stateStoreId}} actor state store.
| ''Палтус''
|}
 
===[[Modding:Fish ponds|Fish pond]] changes===
<ul>
<li>Added new fish pond translation keys:
{| class="wikitable"
|-
|-
| [[Immunity Band]]
! asset
| ''Кольцо стойкости''
! key
| ''Перстень преодоления''
! usage
|-
|-
| [[Iridium Band]]
| <samp>Strings/UI</samp>
| ''Иридиевый обод''
| <samp>PondQuery_{{t|key}}_{{t|item ID}}</samp><br /><samp>PondQuery_{{t|key}}_{{t|attitude}}</samp>
| ''Иридиевый перстень''
| All <samp>PondQuery_*</samp> translation keys can now be suffixed with either the qualified item ID of the fish, or the fish's general attitude based on their <samp>fish_talk_*</samp> [[Modding:Context tags|context tag]].
 
For example, the 'fish are OK' message for an [[anchovy]] pond will be loaded from the first key which exists in this order: <samp>PondQuery_StatusOk_(O)129</samp>, <samp>PondQuery_StatusOk_Rude</samp>, or <samp>PondQuery_StatusOk</samp>.
|}</li>
<li>Merged some fish pond translation keys:
{| class="wikitable"
|-
|-
| [[Juice]] (flavored)
! asset
| ''Сок сквоша''<!--Summer Squash-->
! former key
| ''Кабачковый сок''
! changes
|-
|-
| [[Lionfish]]
| <samp>Strings/UI</samp>
| ''Морской ёрш''
| <samp>PondQuery_Status{{t|status}}{{t|number (0–6)}}</samp><br /><samp>PondQuery_StatusRequestComplete_{{t|fish disposition}}{{t|number (0–2)}}</samp><br /><samp>PondQuery_StatusRequestPending_{{t|fish disposition}}{{t|number (0–2)}}</samp><br />
| ''Крылатка''
| Removed the number key suffixes using [[#Switch blocks|switch blocks]] (e.g. merged <samp>PondQuery_StatusOk{{t|number}}</samp> into <samp>PondQuery_StatusOk</samp>).
|}
</li>
<li>[[Coral]] and [[Sea Urchin|Sea urchin]] now have the <samp>fish_talk_coral</samp> [[Modding:Context tags|context tag]] instead of a hardcoded <samp>_Coral</samp> translation key suffixes.</li>
</ul>
 
===[[Modding:Item queries|Item query]] changes===
Added one new item query:
{| class="wikitable"
|-
|-
| [[Magic Bait]]
! query
| ''Волшебная приманка''
! effect
| ''Волшебная наживка''
|-
|-
| [[Pufferfish]]
| <samp>SEASONAL_RACCOON_SEED</samp>
| ''Рыба-еж''
| Get a [[Giant Stump#Note|seasonal raccoon seed]] for the current season.
| ''Иглобрюх''
 
This sets the stack size to the recommended amount based on the player's luck. When used in item spawn fields, you can set <samp>MinStack</samp> and <samp>MaxStack</samp> to override the stack size.
|}
 
===[[Modding:Item queries#Item spawn fields|Item spawn field]] changes===
<ul>
<li>Added new item spawn fields:
{| class="wikitable"
|-
|-
| [[Purple Slime Egg]]
! field
| ''Фиолетовое яйцо слайма''
! effect
| ''Яйцо фиолетового слайма''
|-
|-
| [[Qi Bean]]
| <samp>Enchantments</samp>
| ''Семя Ки''
| ''(Optional)'' For tools and weapons, the [[Enchantments|enchantment]] IDs to apply (matching their IDs in <samp>Data/Enchantments</samp>). This field applies the normal enchantment rules. Default none.
| ''Боб Ки''
 
This is specified as an array, and you can repeat secondary enchantments to boost their level. For example, this applies Vampiric and Attack (level 2):
<syntaxhighlight lang="js">
"Enchantments": [ "Vampiric", "Attack", "Attack" ]
</syntaxhighlight>
|}
</li>
</ul>
 
===[[Modding:Game state queries|Game state query]] changes===
Added game state queries:
{| class="wikitable"
|-
|-
| [[Quality Fertilizer]]
! query
| ''Высококачественное удобрение''
! effect
| ''Улучшенное удобрение''
|-
|-
| [[Quality Retaining Soil]]
| <samp>PLAYER_INVENTORY_SIZE {{t|player}} {{t|minSize}} {{o|maxSize}}</samp>
| ''Высококачественная влагосохраняющая почва''
| Whether ''any one'' of the [[Modding:Game state queries#Target player|specified player(s)]] inventory has at least {{t|minSize}} slots unlocked, and (if specified) less than or equal to {{o|maxSize}} slots unlocked.
| ''Улучшенный аквагрунт''
|}
 
===<samp>Data/MapPatches</samp> - Dehardcoded map patches===
The base game now has a data-driven conditional map patch system. At the beginning of each day, maps are reloaded, and then these are checked and applied.
 
{| class="wikitable"
|-
|-
| [[Quality Sprinkler]]
! field
| ''Высококачественный спринклер''
! effect
| ''Улучшенный спринклер''
|-
|-
| [[Red Slime Egg]]
| <samp>OriginalMap</samp>
| ''Красное яйцо слайма''
| The full asset name of the original map(s) that this patch should apply too. Multiple maps can be specified, separate by commas.
| ''Яйцо красного слайма''
|-
|-
|rowspan="72" valign="top"| [[Roe]] (flavored)
| <samp>MapPatch</samp>
| ''Икра (Альбакор)''<!--Albacore-->
| The asset name of the map containing this patch.
| ''Икра альбакора''
|-
|-
| ''Икра (Анчоус)''<!--Anchovy-->
| <samp>SourceRect</samp>
| ''Икра анчоуса''
| ''(Optional)'' The source rectangle of <samp>MapPatch</samp> to apply. If not specified, the whole map will be used.
|-
|-
| ''Икра (Багрянник)''<!--Crimsonfish-->
| <samp>DestinationPosition</samp>
| ''Икра Багрянника''
| The position on <samp>OriginalMap</samp> to place the top left corner of the patch at.
|-
|-
| ''Икра (Барабулька)''<!--Red Mullet-->
| <samp>MapProperties</samp>
| ''Икра барабульки''
| ''(Optional)'' Map properties to apply. To remove a property, the value should be null. To append or prepend to a property, use <samp>@MergeInto</samp>.
|-
|-
| ''Икра (Берикс)''<!--Red Snapper-->
| <samp>Condition</samp>
| ''Икра берикса''
| ''(Optional)'' A game state query which indicates whether this entry applies. Default true.
|-
|-
| ''Икра (Большеротый окунь)''<!--Largemouth Bass-->
| <samp>Precedence</samp>
| ''Икра большеротого окуня''
| ''(Optional)'' The order in which this entry should be checked, where higher precedences will apply over lower precedences.
|-
|-
| ''Икра (Бычок)''<!--Goby-->
!colspan="2"| advanced
| ''Икра бычка''
|-
|-
| ''Икра (Голавль)''<!--Chub-->
| <samp>CustomFields</samp>
| ''Икра голавля''
| ''(Optional)'' The [[Modding:Common data field types#Custom fields|custom fields]] for this entry.
|}
 
Previously hard-coded map patches that have been moved over are:
{| class="wikitable"
|-
|-
| ''Икра (Голубой дискус)''<!--Blue Discus-->
! location
| ''Икра голубого дискуса''
! map change
! ID of entry in <samp>Data/MapPatches</samp>
! additional notes
|-
|-
| ''Икра (Гребешок)''<!--Clam-->
| [[The Beach]] (including the [[Night Market]])
| ''Икра гребешка''
| The bridge to the right side of the map
| <samp>Beach_Bridge</samp>
| Mostly dehardcoded, but has special logic to apply immediately for everyone rather than at the beginning of the next day.
|-
|-
| ''Икра (Дорада)''<!--Dorado-->
| [[The Beach]] (including the [[Night Market]])
| ''Икра дорады''
| [[Carpenter's Shop#Town Shortcuts | Town shortcut]] to the forest
| <samp>Beach_CommunityUpgradeShortcut_ForestEntrance</samp>
| Entirely dehardcoded.
 
Previously, the beach map had the warps for this defined through map properties, even if you haven't unlocked community shortcuts yet. Those warps are now applied through this patch's <samp>MapProperties</samp> and <samp>@MergeInto</samp>.
|-
|-
| ''Икра (Желтый судак)''<!--Walleye-->
| [[The Beach]] (including the [[Night Market]])
| ''Икра желтого судака''
| [[Carpenter's Shop#Town Shortcuts | Town shortcut]] to the east side of town
| <samp>Beach_CommunityUpgradeShortcut_TownEntrance</samp>
| Entirely dehardcoded.
 
Previously, the beach map had the warps for this defined through map properties, even if you haven't unlocked community shortcuts yet. Those warps are now applied through this patch's <samp>MapProperties</samp> and <samp>@MergeInto</samp>.
|-
|-
| ''Икра (Жуть-рыба)''<!--Spook Fish-->
| [[The Beach]] (including the [[Night Market]])
| ''Икра жуть-рыбы''
| The sign leading up to [[SquidFest]]
| <samp>Beach_SquidFest_Sign</samp>
| Entirely dehardcoded
|-
|-
| ''Икра (Змеезуб)''<!--Lingcod-->
| [[The Beach]] (including the [[Night Market]])
| ''Икра змеезуба''
| [[SquidFest]]
| <samp>Beach_SquidFest</samp>
| Entirely dehardcoded
|-
|-
| ''Икра (Кальмар)''<!--Squid-->
| [[The Beach]] (including the [[Night Market]])
| ''Икра кальмара''
| Day 2 of [[SquidFest]]'s price increase on the prize sign
| <samp>Beach_SquidFest_PriceSignIncrease</samp>
| Entirely dehardcoded
|-  
| colspan="5" | Most existing hard-coded patches have not been moved over to the new system yet, but more will be added over time.
|}
 
===[[Modding:Trigger actions|Trigger action]] changes===
Added new trigger actions:
{| class="wikitable"
|-
|-
| ''Икра (Камбала)''<!--Halibut-->
! action
| ''Икра палтуса''
! effect
|-
|-
| ''Икра (Карп)''<!--Carp-->
| <samp>AddHealth {{t|amount}}</samp>
| ''Икра карпа''
| Heals the local player by {{t|amount}} and plays the appropriate sound effect.
|-
|-
| ''Икра (Карп-мутант)''<!--Mutant Carp-->
| <samp>IncreaseBackpackSize {{t|amount}}</samp>
| ''Икра Карпа-мутанта''
| Increase the backpack size of the local player by {{t|amount}}.
|-
|-
| ''Икра (Краб)''<!--Crab-->
| <samp>HoldUpItem {{t|itemId}} {{o|message}}</samp>
| ''Икра краба''
| Start animation to hold up the specified item above the player's head. If {{o||message}} is specified, it will show that message as well.
|-
|-
| ''Икра (Креветка)''<!--Shrimp-->
| <samp>MultiplayerGlobalMessage {{t|translationKey}} {{o|arg1}} {{o|arg2}} {{o|arg3}}...</samp>
| ''Икра креветок''
| Show a global chat message in multiplayer. The translation key needs to exist in <samp>Strings/UI</samp> and must be prefixed with <samp>Chat_</samp> within that file (meaning you would use <samp>"SomeMessage"</samp> in <samp>MultiplayerGlobalMessage</samp> and <samp>"Chat_SomeMessage"</samp> in <samp>Strings/UI</samp>). Any additional arguments after the translation key (which are parsed as tokenizable strings) will be used as substitution values using the normal notation. (ex. <samp>MultiplayerGlobalMessage "SomeMessage" "meow" "kitty cat"</samp> and <samp>"Chat_SomeMessage": "{1} goes {0}"</samp> would result in the message <samp>"kitty cat goes meow"</samp>)
|-
|-
| ''Икра (Лавовый угорь)''<!--Lava Eel-->
| <samp>SetVariable {{t|variableStoreId}} {{t|name}} {{t|value}}</samp>
| ''Икра лавового угря''
| Sets the value of the variable {{t|name}} in the {{t|variableStoreId}} store to {{t|value}}, if that variable store is writable. (For more on variables, see the relevant section in tokenizable string changes on this page.)
|-
|-
| ''Икра (Легенда II)''<!--Legend II-->
| <samp>RemoveVariable {{t|variableStoreId}} {{t|name}}</samp>
| ''Икра Легенды II''
| Removes the variable {{t|name}} in the {{t|variableStoreId}} store, if that variable store is writable. (For more on variables, see the relevant section in tokenizable string changes on this page.)
|}
 
===[[Modding:Tokenizable strings|Tokenizable string]] changes===
====Usable in more places====
Tokenizable strings are now usable in more places.
<ul>
<li>Game state queries</li>
<li>Trigger actions (for <samp>If</samp>, token evaluation is delayed until which value to use is checked)</li>
<li>Event commands
<ul>
<li>Tokens in quotes (ex. a <samp>message "[LocalizedText Strings/Events:MeowKitty]"</samp> command) will be evaluated when that command is run</li>
<li>Any token not in quotes (ex. how wedding events have <samp>[ContextualWeddingCelebrations]</samp> to inject dynamically-constructed commands based on the attendees) will be evaluated when that the event is started.</li>
<li><samp>setSkipActions</samp> delays token evaluation until the actions are actually run, meaning any changes that occur during the event but before the player has actually pressed "skip" will be reflected in the variables used here)</li>
</ul></li>
</ul>
 
Tokens are evaluated immediately, unless otherwise specified.
 
====New tokens====
The following tokens have been added:
{| class="wikitable"
|-
|-
| ''Икра (Легенда)''<!--Legend-->
! token format
| ''Икра Легенды''
! output
|-
|-
| ''Икра (Ледопип)''<!--Ice Pip-->
| <samp>InputArgument {{t|argumentName}}</samp>
| ''Икра ледопипа''
| Tokenizable strings can now accept input arguments, depending on where they were called. If the input argument {{t|argumentName}} does not exist, then token evaluation fails.
|}
 
====Token expressions====
Additionally, a new type of tokens now exists (called "expressions"), which are only usable in certain contexts. If one of these tokens is used in a place where it is not allowed, it will fail and say the token was not found. The places where expressions tokens are usable are:
<ul>
<li>Game state queries</li>
<li>Trigger actions</li>
<li>A few specific event commands:
<ul>
<li><samp>action</samp></li>
<li><samp>goto</samp>, specifically for the label(s)</li>
<li><samp>setSkipActions</samp></li>
</ul></li>
</ul>
 
{| class="wikitable"
|-
|-
| ''Икра (Ледорыб)''<!--Glacierfish-->
! token format
| ''Икра Ледорыба''
! output
|-
|-
| ''Икра (Ледорыб-младший)''<!--Glacierfish Jr.-->
| <samp>Math Integer {{t|expression}}</samp> <br/>
| ''Икра Ледорыба-младшего''
<samp>Math Decimal {{t|expression}}</samp>
| Calculates the given expression as math, using either integers (when <samp>Integer</samp> is specified) or floating point numbers (when <samp>Decimal</samp> is specified).
<ul>
<li>For example, <samp>[Math Integer 3 / 2]</samp> will result in <samp>1</samp>, while <samp>[Math Decimal 3 / 2]</samp> will result in <samp>1.5</samp>. This is because with <samp>Integer</samp> specified, each operation will remove everything after the decimal point before proceeding.</li>
<li>Valid operators include, in order of precedence:
<ul>
<li>Parenthesis (meaning "<samp>(</samp>" and "<samp>)</samp>") can be used to group parts of the epxression to be processed first, similar to how one would expect in a real math expression.</li>
<li><samp>*</samp> (multiplication), <samp>/</samp> (division), and <samp>%</samp> (modulus)</li>
<li><samp>+</samp> (addition) and <samp>-</samp> (subtraction)</li>
</ul></li>
</ul>
|-
|-
| ''Икра (Лесоплюх)''<!--Woodskip-->
| <samp>Comparison {{t|expression}}</samp>
| ''Икра лесоплюха''
| Evaluates the given expression, resulting in <samp>TRUE</samp> if the expression is true, and <samp>FALSE</samp> otherwise.
<ul>
<li>The expression can compare numbers (whether integer or decimal), or strings.</li>
<li>Valid operators include, in order of precedence:
<ul>
<li>Parenthesis (meaning "<samp>(</samp>" and "<samp>)</samp>") can be used to group parts of the expression to be processed first, similar to how one would expect in a real math expression.</li>
<li><samp>!</samp> - negation, meaning <samp>[Comparison !TRUE]</samp> becomes <samp>FALSE</samp>, <samp>[Comparison !FALSE]</samp> becomes <samp>TRUE</samp>, and something like <samp>[Comparison !(3 >= 5)]</samp> becomes <samp>TRUE</samp></li>
<li><samp>&lt;</samp> (less than), <samp>&lt;=</samp> (less than or equal to), <samp>&lg;</samp> (greater than), <samp>&gt;=</samp> (greater than or equal to)</li>
<li><samp>==</samp> (equal to) and <samp>!=</samp> (not equal to)</li>
<li><samp>&&</samp> ("and"), meaning <samp>[Comparison 2 > 1 && 3 == 3]</samp> becomes <samp>FALSE</samp></li>
<li><samp>||</samp> ("or"), meaning <samp>[Comparison 2 > 1 || 3 == 3]</samp> becomes <samp>TRUE</samp></li>
<li>(For those who know what "logical comparison short circuiting" is, please be aware that that is currently not implemented.)</li>
</ul></li>
</ul>
|-
|-
| ''Икра (Лещ)''<!--Bream-->
| <samp>If {{t|condition}} {{t|trueValue}} {{o|falseValue}}</samp>
| ''Икра леща''
| If {{t|condition}} evalautes to <samp>TRUE</samp>, then {{t|trueValue}} is evaluated and returned. If {{t|condition}} evalutes to <samp>FALSE</samp>, then {{o|falseValue}} is evaluated and returned (if it was specified - otherwise, nothing is returned).
|-
|-
| ''Икра (Литорина)''<!--Periwinkle-->
| <samp>GameStateQuery {{t|gsq}}</samp>
| ''Икра литорин''
| Evaluates the given game state query, allowing GSQ usage inside <samp>[If]</samp>.
|-
|-
| ''Икра (Лосось пустоты)''<!--Void Salmon-->
| <samp>VariableExists {{t|variableStore}} {{t|variableName}}</samp>
| ''Икра лосося пустоты''
| Evaluates to <samp>TRUE</samp> if {{t|variableStore}} has a variable named {{t|variableName}}, and <samp>FALSE</samp> otherwise. (For more on variable stores, see later section.)
|-
|-
| ''Икра (Лосось)''<!--Salmon-->
| <samp>GetVariable {{t|variableStore}} {{t|variableName}}</samp>
| ''Икра лосося''
| Evaluates to the value of {{t|variableName}} in the variable store {{t|variableStore}}. If the variable does not exist, evaluation of the tokenizable string will fail. (For more on variable stores, see later section.)
|-
|-
| ''Икра (Малек Багрянника)''<!--Son of Crimsonfish-->
| <samp>GetVariableWithDefault {{t|variableStore}} {{t|variableName}} {{t|defaultValue}}</samp>
| ''Икра Малька Багрянника''
| Evaluates to the value of {{t|variableName}} in the variable store {{t|variableStore}}. If the variable does not exist, {{t|defaultValue}} will be returned instead. (For more on variable stores, see later section.)
|}
 
====Variable stores====
Variables stores are a set of named variables stored in a particular location. The current available locations used as variable stores are:
{| class="wikitable"
|-
|-
| ''Икра (Малоротый окунь)''<!--Smallmouth Bass-->
! variable store ID
| ''Икра малоротого окуня''
! description
|-
|-
| ''Икра (Мелкая камбала)''<!--Flounder-->
| <samp>Global</samp>
| ''Икра камбалы''
| A variable store attached to the save itself.
<ul>
<li>Any player can read and write from this.</li>
<li>This variable store will be saved into the save file at the end of the day.</li>
</ul>
|-
|-
| ''Икра (Мидия)''<!--Mussel-->
| <samp>Player/{{t|playerSpecifier}}</samp>
| ''Икра мидий''
| A variable store attached to a particular player.
<ul>
<li>{{t|playerSpecifier}} uses the same format as [[Modding:Game state queries#Target player|game state query target players]], except specifiers that work for check multiple players (such as <samp>Any</samp> or <samp>All</samp>) may not be used.</li>
<li>Any player can read from this, however only the owning player can write to their variable store.</li>
<li>If a player is disconnected, their variables are saved, and will be resynced when they reconnect.</li>
<li>This variable store will be saved into the save file at the end of the day.</li>
</ul>
|-
|-
| ''Икра (Мисс Морской черт)''<!--Ms. Angler-->
| <samp>Local</samp>
| ''Икра Мисс Морской черт''
| A variable store attached to a "calling context". Generally, this means it will always be reset between uses unless specifically kept, such as in the following contexts:
<ul>
<li>Events - A variable set in the <samp>Local</samp> variable store using the <samp>action</samp> event command will be usable later during that event.</li>
<li><samp>Data/TriggerActions</samp> - When a trigger action has multiple actions to run, all actions will be using the same <samp>Local</samp> variable store, meaning earlier trigger actions can save data for use by later trigger actions in the same sequence.</samp></li>
</ul>
|}
 
===Debug command changes===
This only details some debug command changes - mainly, ones that might be useful for mod authors.
 
{| class="wikitable"
|-
|-
| ''Икра (Морской ёрш)''<!--Lionfish-->
! command
| ''Икра крылатки''
! changes
|-
|-
| ''Икра (Морской еж)''<!--Sea Urchin-->
| <samp>/tokens</samp>
| ''Икра морского ежа''
| A new required parameter has been introduced as the first argument, {{t|type}}. If {{t|type}} is <samp>Text</samp> the string will be evaluated using non-expression tokens. If {{t|type}} is <samp>Expression</samp>, expression tokens will be allowed as well.
|-
|-
| ''Икра (Морской огурец)''<!--Sea Cucumber-->
| <samp>/runmacro</samp>
| ''Икра морского огурца''
| Commented lines are now allowed - if <samp>--</samp> is the beginning of a line, it will be ignored.
|-
|-
| ''Икра (Морской черт)''<!--Angler-->
| <samp>/debugaction</samp> (new)
| ''Икра Морского черта''
| A new command for trying out tokenizable string input arguments, tokenizable string local variables, and trigger actions using them. This command maintains its own set of input arguments and a local variable store, which can be manipulated using the subcommands.
{| class="wikitable"
|-
|-
| ''Икра (Ночной кальмар)''<!--Midnight Squid-->
! subcommand
| ''Икра ночного кальмара''
! effect
|-
|-
| ''Икра (Окунь)''<!--Perch-->
| <samp>/debugaction argument {{t|name}} {{t|value}}</samp>
| ''Икра окуня''
| Sets the input argument {{t|name}} to {{t|value}}, which can be later used in <samp>/debugaction run</samp> and <samp>/debugaction evaluate</samp>.
|-
|-
| ''Икра (Омар)''<!--Lobster-->
| <samp>/debugaction evaluate {{t|expression}}</samp>
| ''Икра омара''
| Evaluates {{t|expression}} as a tokenizable string, using input arguments and local variables previously set from this command.
|-
|-
| ''Икра (Осетр)''<!--Sturgeon-->
| <samp>/debugaction run {{t|action}}</samp>
| ''Икра осетра''
| Runs {{t|action}} as a trigger action, using input arguments and local variables previously set from this command.
|-
|-
| ''Икра (Осьминог)''<!--Octopus-->
| <samp>/debugaction clear</samp>
| ''Икра осьминога''
| Clears all previously set input arguments and local variables for <samp>/debugaction</samp>.
|-
|}
| ''Икра (Песковник)''<!--Sandfish-->
Some examples of using this command alongside <samp>/runmacro</samp>, at least at the time of writing, can be found here: https://gist.github.com/spacechase0/3ca7b2e195619a17ef9039c894cc60e4
| ''Икра песковника''
|-
| ''Икра (Полуночный карп)''<!--Midnight Carp-->
| ''Икра полуночного карпа''
|-
| ''Икра (Пятнистый криворот)''<!--Ghostfish-->
| ''Икра пятнистого криворота''
|-
| ''Икра (Радиоактивный карп)''<!--Radioactive Carp-->
| ''Икра Радиоактивного карпа''
|-
| ''Икра (Радужная форель)''<!--Rainbow Trout-->
| ''Икра радужной форели''
|-
| ''Икра (Рак)''<!--Crayfish-->
| ''Икра рака''
|-
| ''Икра (Рыба-еж)''<!--Pufferfish-->
| ''Икра иглобрюха''
|-
| ''Икра (Рыба-камень)''<!--Stonefish-->
| ''Икра рыбы-камня''
|-
| ''Икра (Рыба-пузырь)''<!--Blobfish-->
| ''Икра рыбы-капли''
|-
| ''Икра (Сардина)''<!--Sardine-->
| ''Икра сардины''
|-
| ''Икра (Сельдь)''<!--Herring-->
| ''Икра сельди''
|-
| ''Икра (Сердцевидка)''<!--Cockle-->
| ''Икра сердцевидки''
|-
| ''Икра (Скат)''<!--Stingray-->
| ''Икра ската''
|-
| ''Икра (Скорпионовый карп)''<!--Scorpion Carp-->
| ''Икра скорпионового карпа''
|-
| ''Икра (Слаймджек)''<!--Slimejack-->
| ''Икра слаймджека''
|-
| ''Икра (Солнечник)''<!--Sunfish-->
| ''Икра солнечника''
|-
| ''Икра (Сом)''<!--Catfish-->
| ''Икра сома''
|-
| ''Икра (Сомик)''<!--Bullhead-->
| ''Икра сомика''
|-
| ''Икра (Тигровая форель)''<!--Tiger Trout-->
| ''Икра тигровой форели''
|-
| ''Икра (Тиляпия)''<!--Tilapia-->
| ''Икра тиляпии''
|-
| ''Икра (Тунец)''<!--Tuna-->
| ''Икра тунца''
|-
| ''Икра (Угорь)''<!--Eel-->
| ''Икра угря''
|-
| ''Икра (Улитка)''<!--Snail-->
| ''Икра улиток''
|-
| ''Икра (Устрица)''<!--Oyster-->
| ''Икра устриц''
|-
| ''Икра (Чудо-огурец)''<!--Super Cucumber-->
| ''Икра чудо-огурца''
|-
| ''Икра (Шэд)''<!--Shad-->
| ''Икра шэда''
|-
| ''Икра (Щука)''<!--Pike-->
| ''Икра щуки''
|-
| Slime Crate
| ''Ящик слайма''
| ''Ящик для слайма''
|-
|rowspan="3" valign="top"| [[Smoked Fish]] (flavored)
| ''Копченая камбала''<!--Halibut-->
| ''Копченый палтус''
|-
| ''Копченая рыба-еж''<!--Pufferfish-->
| ''Копченый иглобрюх''
|-
| ''Копченый морской ёрш''<!--Lionfish-->
| ''Копченая крылатка''
|-
| [[Summer Squash Seeds]]
| ''Семена сквоша''
| ''Семена кабачка''
|-
| [[Summer Squash]]
| ''Сквош''
| ''Кабачок''
|-
|rowspan="71" valign="top"| [[Targeted Bait]]
| ''Наживка: Альбакор''<!--Albacore-->
| ''Наживка на альбакора''
|-
| ''Наживка: Анчоус''<!--Anchovy-->
| ''Наживка на анчоуса''
|-
| ''Наживка: Багрянник''<!--Crimsonfish-->
| ''Наживка на Багрянника''
|-
| ''Наживка: Барабулька''<!--Red Mullet-->
| ''Наживка на барабульку''
|-
| ''Наживка: Берикс''<!--Red Snapper-->
| ''Наживка на берикса''
|-
| ''Наживка: Большеротый окунь''<!--Largemouth Bass-->
| ''Наживка на большеротого окуня''
|-
| ''Наживка: Бычок''<!--Goby-->
| ''Наживка на бычка''
|-
| ''Наживка: Голавль''<!--Chub-->
| ''Наживка на голавля''
|-
| ''Наживка: Голубой дискус''<!--Blue Discus-->
| ''Наживка на голубого дискуса''
|-
| ''Наживка: Гребешок''<!--Clam-->
| ''Приманка для гребешков''
|-
| ''Наживка: Дорада''<!--Dorado-->
| ''Наживка на дораду''
|-
| ''Наживка: Желтый судак''<!--Walleye-->
| ''Наживка на желтого судака''
|-
| ''Наживка: Жуть-рыба''<!--Spook Fish-->
| ''Наживка на жуть-рыбу''
|-
| ''Наживка: Змеезуб''<!--Lingcod-->
| ''Наживка на змеезуба''
|-
| ''Наживка: Кальмар''<!--Squid-->
| ''Наживка на кальмара''
|-
| ''Наживка: Камбала''<!--Halibut-->
| ''Наживка на палтуса''
|-
| ''Наживка: Карп''<!--Carp-->
| ''Наживка на карпа''
|-
| ''Наживка: Карп-мутант''<!--Mutant Carp-->
| ''Наживка на Карпа-мутанта''
|-
| ''Наживка: Краб''<!--Crab-->
| ''Приманка для крабов''
|-
| ''Наживка: Креветка''<!--Shrimp-->
| ''Приманка для креветок''
|-
| ''Наживка: Лавовый угорь''<!--Lava Eel-->
| ''Наживка на лавового угря''
|-
| ''Наживка: Легенда''<!--Legend-->
| ''Наживка на Легенду''
|-
| ''Наживка: Легенда II''<!--Legend II-->
| ''Наживка на Легенду II''
|-
| ''Наживка: Ледопип''<!--Ice Pip-->
| ''Наживка на ледопипа''
|-
| ''Наживка: Ледорыб''<!--Glacierfish-->
| ''Наживка на Ледорыба''
|-
| ''Наживка: Ледорыб-младший''<!--Glacierfish Jr.-->
| ''Наживка на Ледорыба-младшего''
|-
| ''Наживка: Лесоплюх''<!--Woodskip-->
| ''Наживка на лесоплюха''
|-
| ''Наживка: Лещ''<!--Bream-->
| ''Наживка на леща''
|-
| ''Наживка: Литорина''<!--Periwinkle-->
| ''Приманка для литорин''
|-
| ''Наживка: Лосось''<!--Salmon-->
| ''Наживка на лосося''
|-
| ''Наживка: Лосось пустоты''<!--Void Salmon-->
| ''Наживка на лосося пустоты''
|-
| ''Наживка: Малек Багрянника''<!--Son of Crimsonfish-->
| ''Наживка на Малька Багрянника''
|-
| ''Наживка: Малоротый окунь''<!--Smallmouth Bass-->
| ''Наживка на малоротого окуня''
|-
| ''Наживка: Мелкая камбала''<!--Flounder-->
| ''Наживка на камбалу''
|-
| ''Наживка: Мидия''<!--Mussel-->
| ''Приманка для мидий''
|-
| ''Наживка: Мисс Морской черт''<!--Ms. Angler-->
| ''Наживка на Мисс Морской черт''
|-
| ''Наживка: Морской ёрш''<!--Lionfish-->
| ''Наживка на крылатку''
|-
| ''Наживка: Морской огурец''<!--Sea Cucumber-->
| ''Наживка на морского огурца''
|-
| ''Наживка: Морской черт''<!--Angler-->
| ''Наживка на Морского черта''
|-
| ''Наживка: Ночной кальмар''<!--Midnight Squid-->
| ''Наживка на ночного кальмара''
|-
| ''Наживка: Окунь''<!--Perch-->
| ''Наживка на окуня''
|-
| ''Наживка: Омар''<!--Lobster-->
| ''Приманка для омаров''
|-
| ''Наживка: Осетр''<!--Sturgeon-->
| ''Наживка на осетра''
|-
| ''Наживка: Осьминог''<!--Octopus-->
| ''Наживка на осьминога''
|-
| ''Наживка: Песковник''<!--Sandfish-->
| ''Наживка на песковника''
|-
| ''Наживка: Полуночный карп''<!--Midnight Carp-->
| ''Наживка на полуночного карпа''
|-
| ''Наживка: Пятнистый криворот''<!--Ghostfish-->
| ''Наживка на пятнистого криворота''
|-
| ''Наживка: Радиоактивный карп''<!--Radioactive Carp-->
| ''Наживка на Радиоактивного карпа''
|-
| ''Наживка: Радужная форель''<!--Rainbow Trout-->
| ''Наживка на радужную форель''
|-
| ''Наживка: Рак''<!--Crayfish-->
| ''Приманка для раков''
|-
| ''Наживка: Рыба-еж''<!--Pufferfish-->
| ''Наживка на иглобрюха''
|-
| ''Наживка: Рыба-камень''<!--Stonefish-->
| ''Наживка на рыбу-камень''
|-
| ''Наживка: Рыба-пузырь''<!--Blobfish-->
| ''Наживка на рыбу-каплю''
|-
| ''Наживка: Сардина''<!--Sardine-->
| ''Наживка на сардину''
|-
| ''Наживка: Сельдь''<!--Herring-->
| ''Наживка на сельдь''
|-
| ''Наживка: Сердцевидка''<!--Cockle-->
| ''Приманка для сердцевидок''
|-
| ''Наживка: Скат''<!--Stingray-->
| ''Наживка на ската''
|-
| ''Наживка: Скорпионовый карп''<!--Scorpion Carp-->
| ''Наживка на скорпионового карпа''
|-
| ''Наживка: Слаймджек''<!--Slimejack-->
| ''Наживка на слаймджека''
|-
| ''Наживка: Солнечник''<!--Sunfish-->
| ''Наживка на солнечника''
|-
|-
| ''Наживка: Сом''<!--Catfish-->
| <samp>/enchant {{t|enchantmentId}} {{o|level}}</samp> (new)
| ''Наживка на сома''
| Enchant the currently held item with the {{t|enchantmentId}} enchantment at level {{o|level}} (or 1 if not specified).
|-
| ''Наживка: Сомик''<!--Bullhead-->
| ''Наживка на сомика''
|-
| ''Наживка: Тигровая форель''<!--Tiger Trout-->
| ''Наживка на тигровую форель''
|-
| ''Наживка: Тиляпия''<!--Tilapia-->
| ''Наживка на тиляпию''
|-
| ''Наживка: Тунец''<!--Tuna-->
| ''Наживка на тунца''
|-
| ''Наживка: Угорь''<!--Eel-->
| ''Наживка на угря''
|-
| ''Наживка: Улитка''<!--Snail-->
| ''Приманка для улиток''
|-
| ''Наживка: Устрица''<!--Oyster-->
| ''Приманка для устриц''
|-
| ''Наживка: Чудо-огурец''<!--Super Cucumber-->
| ''Наживка на чудо-огурец''
|-
| ''Наживка: Шэд''<!--Shad-->
| ''Наживка на шэда''
|-
| ''Наживка: Щука''<!--Pike-->
| ''Наживка на щуку''
|}
|}


===Furniture===
==Changes for C# mod authors==
; Hungarian
===DialogueKeyValidator===
: {| class="wikitable"
The new <samp>DialogueKeyValidator</samp> class analyses [[Modding:Dialogue|dialogue entries]] to detect dialogue keys which don't match one of the predefined patterns.
 
This is mainly meant to implement unit tests. For example, to validate all dialogue keys in a data asset:
<syntaxhighlight lang="c#">
string assetName = "Characters/Dialogues/Abigail";
var dialogues = Game1.content.Load<Dictionary<string, string>>(assetName);
 
var validator = new DialogueKeyValidator();
foreach ((string key, string dialogue) in dialogues)
{
    if (!validator.IsKnownFormat(assetName, key))
        Assert.Fail($"Validation failed for dialogue '{key}': key doesn't match one of the expected patterns.");
}
</syntaxhighlight>
 
You can optionally extend the valid patterns by setting validator fields like <samp>MarriageDialogueKeyPatterns</samp>.
 
===Monster changes===
* The [[#Data/Monsters|monster data has been overhauled]].
* The new <samp>monster.Tags</samp> field contains a set of metadata tags about the monster which can be checked in [[#Data/Monsters|<samp>Data/Monsters</samp>]]. It's safe to add new tags to the list for existing monster types.
* The former <samp>monster.objectsToDrop</samp> field (a list of string object IDs) has been replaced by <samp>monster.drops</samp> (an [[Modding:Migrate to Stardew Valley 1.6#Inventory class|item inventory]]).
* Removed <samp>monster.getExtraDropItems()</samp>. Drops should be added in [[#Data/Monsters|<samp>Data/Monsters</samp>]] instead.
 
===Recipe changes===
As part of the change for recipes using data models, <samp>Farmer.recipesCooked</samp> and <samp>Farmer.cookedRecipe(itemId)</samp> now use qualified item IDs instead of unqualified object item IDs.
 
===<samp>SpecialItem</samp> deprecation===
<samp>SpecialItem</samp> is now deprecated, and is only kept for save compatibility. All existing uses of it have been migrated to use <samp>Object</samp> instead, with the following new objects being available:
<ul>
<li><samp>(O)BackpackUpgrade1</samp></li>
<li><samp>(O)BackpackUpgrade2</samp></li>
<li><samp>(O)ClubCard</samp></li>
<li><samp>(O)SpecialCharm</samp></li>
<li><samp>(O)SkullKey</samp></li>
<li><samp>(O)MagnifyingGlass</samp></li>
<li><samp>(O)DarkTalisman</samp></li>
<li><samp>(O)MagicInk</samp></li>
</ul>
 
===Tokenizable string changes===
Tokenizable string parsing and evaluation has been separated into two separate stages. As a result, several places that use them now cache the parsed version (which is called <samp>ParsedStringSegment</samp>).
 
Any custom trigger actions, tokenizable string tokens, or event commands that want to delay tokenizable string evaluation so they can handle it themself (such as for only evaluating portions that should be used based on a condition) can attach the <samp>[DelayArgumentTokenEvaluation]</samp> attribute to their handler method. This will prevent the arguments from being evaluated before they reach your handler. (However, the handlers themselves currently still use <samp>string[]</samp> as their arguments, so this could be slightly off depending on how quotes were used.)
 
<samp>TokenParser.ParseText(string text, Random random, TokenParserDelegate customParser, Farmer player)</samp> is now deprecated, and <samp>TokenParser.EvaluateText(string text, TokenParserContext context)</samp> should be used instead.
 
===Tool changes===
The following were added to <samp>Tool</samp>:
{| class="wikitable"
|-
|-
! item
! member
! old name
! effect
! new name
|-
| [[Artist Bookcase]]
| ''Művészi könyvespolc''
| ''Művészi könyvszekrény''
|-
| [[Birch Double Bed]]
| ''Birs dupla ágy''
| ''Nyírfa dupla ágy''
|-
| [[Dark Bookcase]]
| ''Sötét könyvespolc''
| ''Sötét könyvszekrény''
|-
| [[Gray Joja Bookcase]]
| ''Szürke Joja könyvespolc''
| ''Szürke Joja könyvszekrény''
|-
| [[Joja Bookcase]]
| ''Joja könyvespolc''
| ''Joja könyvszekrény''
|-
| [[Junimo Bookcase]]
| ''Junimo könyvespolc''
| ''Junimo könyvszekrény''
|-
| [[Large Wizard Bookcase]]
| ''Nagy varázsló könyvespolc''
| ''Nagy varázsló könyvszekrény''
|-
| [[Luxury Bookcase]]
| ''Luxus könyvespolc''
| ''Luxus könyvszekrény''
|-
|-
| [[Modern Bookcase]]
| <samp>virtual bool DrawEvenWhenNotUsing</samp>
| ''Modern könyvespolc''
| If <samp>true</samp>, <samp>Game1.drawTool</samp> (and therefore <samp>Tool.draw</samp>) will be called even if the <samp>Farmer.UsingTool</samp> is false. Default <samp>false</samp>.
| ''Modern könyvszekrény''
|-
|-
| [[Retro Bookcase]]
| <samp>virtual bool DrawNormalToolFrames</samp>
| ''Retro könyvespolc''
| If <samp>false</samp>, <samp>Game1.drawTool</samp> will not draw the normal "swinging" tool frames. Default <samp>true</samp>.
| ''Retro könyvszekrény''
|-
|-
| [[Short Bookcase]]
| <samp>virtual bool DoAction(GameLocation location, Farmer who)</samp>
| ''Kicsi könyvespolc''
| Called when the player does a right click rather than a left click. Return <samp>true</samp> if the tool is doing something, and <samp>false</samp> otherwise.
| ''Kicsi könyvszekrény''
|-
| [[Short Wizard Bookcase]]
| ''Alacsony varázsló könyvespolc''
| ''Alacsony varázsló könyvszekrény''
|-
| [[Small Wizard Bookcase]]
| ''Kicsi varázsló könyvespolc''
| ''Kicsi varázsló könyvszekrény''
|-
| [[Wizard Bookcase]]
| ''Varázsló könyvespolc''
| ''Varázsló könyvszekrény''
|}
|}


; Russian
===Netfield changes===
: {| class="wikitable"
The following changes must now all be registered with <samp>ProtocolSummary</samp> before usage:
<ul>
<li>Additional net fields</li>
<li>Additional net types</li>
<li>Subclasses of any synced type</li>
</ul>
If this is not done, an exception will be thrown when adding netfields, or setting values of unknown types.
 
Instead of manually registering with <samp>ProtocolSummary</samp> or manually adding net fields using a harmony patch, everything should be registered through a new SMAPI API (coming soon) which will handle these details for you. This will ensure that if mods load in a different order on one player's computer compared to other connected players, it will not break anything.
 
If a farmhand's <samp>ProtocolSummary</samp> does not match the host's, they will get a protocol mismatch error upon connecting (rather than "No cabins available", or other obscure and unclear issues).
 
===C# Event changes===
C# mods can add new actor state to work with the new <samp>SaveActorState</samp>/etc. commands (previously documented in [[#Event changes|event changes]] above).
 
On <samp>Event</samp> there exists a new static function, <samp>RegisterActorStateType</samp>, which accepts the name of the new actor state type (which you should namespace with your mod ID, ex. <samp>spacechase0.SpaceCore/SomeCustomActorState</samp>), a delegate for saving the state, and a delegate for loading the state. Each delegate receives the <samp>Event</samp> instance, the relevant actor (which could be an <samp>NPC</samp> or a <samp>Farmer</samp>), and a delegate for performing the save and load to the proper place.
 
===Enchantment changes===
Besides the data-driven changes mentioned previously, <samp>Enchantment</samp>s can now <i>theoretically</i> be put on non-<samp>Tool</samp>s more easily. Most of the enchantment code has been moved from <samp>Tool</samp> to <samp>Item</samp>, and relevant functions accepting instances of the former now accept the latter. <samp>Item</samp> itself does not <i>store</i> enchantments though, so a custom type that supports enchantments will need to implement a virtual property so that they are properly stored.
 
There are also new hooks for enchantments to run: before/after taking damage, entering/leaving a location, and an update each tick.
 
===Other breaking API changes===
''(This section is meant as a quick reference if you have build errors; there's no need to read through it otherwise.)''
 
====Removed or renamed types====
These classes renamed in 1.7:
{| class="wikitable"
|-
|-
! item
! type
! old name
! migration
! new name
|-
|-
| [[Pierre's Sign]]
| <samp>BaseEnchantment</samp>
| ''Знак Пьера''
| Renamed to <samp>Enchantment</samp>.
| ''Вывеска Пьера''
|-
| <samp>AxeEnchantment</samp><br /><samp>BaseWeaponEnchantment</samp><br /><samp>FishingRodEnchantment</samp><br /><samp>HoeEnchantment</samp><br /><samp>MilkPailEnchantment</samp><br /><samp>PanEnchantment</samp><br /><samp>PickaxeEnchantment</samp><br /><samp>ShearsEnchantment</samp><br /><samp>WateringCanEnchantment</samp>
| Obsolete. Enchantments now [[#Enchantment data|target tools via data]] instead.
|}
|}


===Hats===
====Other API changes====
; French
These class members changed in 1.7:
: {| class="wikitable"
|-
! item
! old name
! new name
|-
| [[Good Ol' Cap]]
| ''Veille casquette''
| ''Vieille casquette''
|}


; Russian
{| class="wikitable"
: {| class="wikitable"
|-
|-
! item
! type
! old name
! member
! new name
! migration
|-
|-
| [[Blobfish Mask]]
|rowspan="9"| <samp>BaseEnchantment</samp><br /><small>(and its subclasses)</small>
| ''Маска рыбы-пузыря''
| <samp>hideEnchantmentName</samp>
| ''Маска рыбы-капли''
| Replaced by <samp>EnchantmentManager.HideEnchantmentName</samp>.
|-
|-
| [[Bluebird Mask]]
| <samp>hideSecondaryEnchantName</samp>
| ''Маска сиалии''
| Replaced by <samp>EnchantmentManager.HideSecondaryEnchantName</samp>.
| ''Маска синей птицы''
|-
|-
| [[Cowgal Hat]]
| <samp>GetEnchantmentFromItem(…)</samp>
| ''Шляпа девушки-ковбоя''
| Replaced by <samp>EnchantmentManager.GetEnchantmentFromItem</samp>.
| ''Женская ковбойская шляпа''
|-
|-
| [[Deluxe Pirate Hat]]
| <samp>GetAvailableEnchantments()</samp>
| ''Элитная пиратская шляпа''
| Removed.
| ''Роскошная пиратская шляпа''
<ul>
<li>To check whether any enchantments can be applied to a tool through the [[forge]], use <samp>EnchantmentManager.CanForgeEnchant</samp>.</li>
<li>There's no directly equivalent method in 1.7, but you can mimic the former logic if needed.
<syntaxhighlight lang="c#">
static List<Enchantment> GetAvailableEnchantments()
{
    var dataAsset = DataLoader.Enchantments(Game1.content);
 
    List<Enchantment> enchantments = [];
    foreach ((string id, EnchantmentData data) in dataAsset)
    {
        if (data.ForgeWith == Object.prismaticShardQID)
            enchantments.Add(EnchantmentManager.CreateEnchantment(dataAsset, id));
    }
 
    return enchantments;
}
</syntaxhighlight></li>
</ul>
|-
|-
| [[Dinosaur Hat]]
| <samp>GetAvailableEnchantmentsForItem(…)</samp>
| ''Шляпа-динозавр''
| Removed.
| ''Шапка динозавра''
<ul>
<li>To check whether any enchantments can be applied to a tool through the [[forge]], use <samp>EnchantmentManager.CanForgeEnchant</samp>.</li>
<li>There's no directly equivalent method in 1.7, but you can mimic the former logic if needed.
<syntaxhighlight lang="c#">
static List<Enchantment> GetAvailableEnchantmentsForItem(Item? tool, Item? item)
{
    var dataAsset = DataLoader.Enchantments(Game1.content);
    var contextTags = tool?.GetContextTags();
 
    List<Enchantment> enchantments = [];
    foreach ((string id, EnchantmentData data) in dataAsset)
    {
        if (data.ForgeWith == Object.prismaticShardQID && (contextTags is null || EnchantmentManager.MatchesTags(contextTags, data.AppliesTo)))
            enchantments.Add(EnchantmentManager.CreateEnchantment(dataAsset, id));
    }
 
    return enchantments;
}
</syntaxhighlight></li>
</ul>
|-
|-
| [[Official Cap]]
| <samp>GetName()</samp>
| ''Кепка от униформы''
| Removed. This inconsistently returned an ID, a display name, or <samp>"Unknown Enchantment"</samp> depending on the enchantment type. Use the new <samp>Id</samp> property or the pre-existing <samp>GetDisplayName()</samp> method instead.
| ''Фуражка''
|-
|-
| [[Panda Hat]]
| <samp>GetLevel()</samp>
| ''Шляпка Панды''
| Removed. Use <samp>Level</samp> instead.
| ''Шапка панды''
|-
|-
| Party Hat
| <samp>GetType()</samp>
| ''Шляпа тусовщика''
| This was sometimes to identify enchantments (like <code>enchantment.GetType() == expectedEnchantment.GetType()</code>). That's no longer reliable, since 1.7 introduces data-based enchantments which may not have their own C# type. You should use the new <samp>enchantment.Id</samp> property instead.
| ''Праздничный колпак''
|-
|-
| [[Santa Hat]]
| <samp>ResetEnchantments()</samp>
| ''Шляпа Санты''
| Removed. This is no longer needed since it no longer has a cached list of enchantment instances.
| ''Шапка Санты''
|-
|-
| [[Star Helmet]]
|rowspan="2"| <samp>Furniture</samp>
| ''Звездный шлем''
| <samp>armchair</samp><br /><samp>bed</samp><br /><samp>bench</samp><br /><samp>bookcase</samp><br /><samp>chair</samp><br /><samp>couch</samp><br /><samp>decor</samp><br /><samp>dresser</samp><br /><samp>fireplace</samp><br /><samp>lamp</samp><br /><samp>longTable</samp><br /><samp>other</samp><br /><samp>painting</samp><br /><samp>rug</samp><br /><samp>sconce</samp><br /><samp>table</samp><br /><samp>torch</samp><br /><samp>window</samp>
| ''Шапка со звездами''
| Removed. Replaced by the <samp>FurnitureType</samp> enum (e.g. <code>Furniture.rug</code> is now <code>FurnitureType.Rug</code>).
|-
|-
| [[Sunglasses]]
| <samp>placementRestrictions</samp>
| ''Солнечные очки''
| Removed. Replaced by <samp>CanPlaceIndoors</samp> and <samp>CanPlaceOutdoors</samp>.
| ''Солнцезащитные очки''
|-
| [[Tiger Hat]]
| ''Тигриная шляпа''
| ''Тигриная шапка''
|}
 
===Pants===
; Russian
: {| class="wikitable"
|-
|-
! item
| <samp>GreenSlime</samp>
! old name
| <samp>prismatic</samp>
! new name
| Removed. Replaced by <samp>IsPrismatic</samp>, which is just a wrapper around the monster tags field.
|-
|-
| Dinosaur Pants
|rowspan="2"| <samp>Monster</samp>
| ''Динозавровы штаны''
| <samp>getExtraDropItems()</samp>
| ''Динозавровые штаны''
| Removed. Drops should be added to [[#Data/Monsters|<samp>Data/Monsters</samp>]] instead.
|}


===Weapons===
[[Modding:Modder Guide/APIs/Harmony|Harmony patches]] which can't be moved into data can target <samp>Monster.RollForDrops</samp> instead.
; Russian
: {| class="wikitable"
|-
|-
! item
| <samp>objectsToDrop</samp>
! old name
| Removed. Replaced by <samp>drops</samp>; see [[#Monster changes|''monster changes'']] and [[#Data/Monsters|''<samp>Data/Monsters</samp>'']].
! new name
|-
|-
| [[Dark Sword]]
| <samp>Tool</samp>
| ''Темный Меч''
| <samp>GetEnchantmentLevel&lt;T&gt;()</samp><br /><samp>GetEnchantmentOfType&lt;T&gt;()</samp><br /><samp>hasEnchantmentOfType&lt;T&gt;()</samp>
| ''Темный клинок''
| Removed. Replaced by <samp>GetEnchantmentLevel(id)</samp>, <samp>GetEnchantment(id)</samp>, and <samp>HasEnchantment(id)</samp> respectively. All vanilla enchantments have a constant for the ID like <samp>EnchantmentIds.GalaxySoul</samp>.
|-
|-
| [[Dragontooth Club]]
| <samp>Tool</samp>
| ''Драконозубья дубинка''
|
| ''Дубина из драконьего зуба''
<samp>ClearEnchantments()</samp><br />
<samp>GetMaxForges()</samp><br />
<samp>CanAddEnchantment(…)</samp><br />
<samp>CopyEnchantments(…)</samp><br />
<samp>GetTotalForgeLevels(…)</samp><br />
<samp>AddEnchantment(…)</samp><br />
<samp>RemoveEnchantment(…)</samp><br />
<samp>CanForge(…)</samp><br />
<samp>HasEnchantment(…)</samp><br />
<samp>GetEnchantment(…)</samp><br />
<samp>GetEnchantmentLevel(…)</samp><br />
<samp>Forge(…)</samp>
| Removed. Enchantment functions have been moved to <samp>Item</samp> to make it easier for non-<samp>Tool</samp>s to support enchantments.
 
NOTE: <samp>Tool</samp> is still the only type that can actually hold enchantments, since nothing else has the appropriate fields to hold them.
|-
|-
| [[Dragontooth Cutlass]]
| <samp>Tool</samp>
| ''Драконозубья сабля''
| <samp>drawTooltip&lt;T&gt;(…)</samp><br /><samp>getExtraSpaceNeededForTooltipSpecialIcons&lt;T&gt;(…)</samp><br /><samp>getDescriptionWidth&lt;T&gt;()</samp><br /><samp>AddEquipmentEffects&lt;T&gt;()</samp>
| ''Сабля из драконьего зуба''
| Removed. These were only overrides of <samp>Item</samp> functions that only handled enchantments, which is now handled in <samp>Item</samp> itself.
|-
|-
| [[Dragontooth Shiv]]
| <samp>AnimatedSprite</samp>
| ''Драконозубья заточка''
| <samp>Clone</samp>
| ''Заточка из драконьего зуба''
| No longer virtual. It now uses a similar model that `Item` does, with a virtual `CloneNew` for creating the instance and a virtual `CloneInto` for populating it.
|-
|-
| [[Dwarf Dagger]]
| <samp>FarmerSprite</samp>
| ''Кинжал Дварфов''
| <samp>Clone</samp>
| ''Дварфийский кинжал''
| Now returns a properly cloned <samp>FarmerSprite</samp>, rather than a semi-broken <samp>AnimatedSprite</samp> based on itself.
|-
|-
| [[Dwarf Hammer]]
| <samp>Farmer</samp>
| ''Молот Дварфов''
| <samp>takeDamage&lt;T&gt;(…)</samp>
| ''Дварфийский молот''
| The last argument has been changed from <samp>Monster</samp> to <samp>object</samp>, to support the ability to detect damage from non-<samp>Monster</samp> sources. An example of this is <samp>BasicProjectile</samp>, which previously passed in <samp>null</samp> for that parameter.
|-
|-
| [[Dwarf Sword]]
| <samp>Ring</samp>
| ''Меч Дварфов''
|
| ''Дварфийский меч''
<samp>onNewLocation(…)</samp> <br />
<samp>onLeaveLocation(…)</samp>
| These are now overrides of a function on <samp>Item</samp>. All equipped items will now have this function called.
|-
|-
| [[Insect Head]]
| <samp>Ring</samp>
| ''Жучья Голова''
|
| ''Жучиная голова''
<samp>update(…)</samp>
| This now a function called <samp>updateWhenEquipped</samp>, and is an override of the same virtual function in <samp>Item</samp>. All equipped items will have this function called.
|-
|-
| [[Leah's Whittler]]
| <samp>GameLocation</samp>
| ''Точилка Леи''
| <samp>getFish(…)</samp>
| ''Резец Леи''
| A new non-optional parameter has been added: <samp>out Action onCatch</samp>.
|-
 
| [[Seb's Lost Mace]]
Implementations of this method should no longer make changes to the world and instead be purely predictive. Any actual changes (ex. fish ponds changing how many fish it has, ginger island locations marking a golden walnut as collected, ...)  should be within <samp>onCatch</samp>, which will be called when the item is successfully reeled in.
| ''Потерянная палица Себа''
| ''Потерянная булава Себа''
|-
| [[Wind Spire]]
| ''Башня Ветров''
| ''Пика ветров''
|}
|}


===Monsters===
==Name translation changes for wiki maintainers==
; Hungarian
Some in-game item and monster names were retranslated in some languages for clarity or correctness.
: {| class="wikitable"
 
|-
This list is mostly provided to help wiki maintainers update pages, so it doesn't include names which only changed capitalization, changed <code>'</code> (straight apostrophe) to <code>’</code> (curly) in French, or aren't visible to vanilla players (like mine rocks).
! monster
 
! old name
''None yet.''
! new name
|-
| [[Truffle Crab]]
| ''Kőrák''
| ''Szarvasgombarák''
|}


==XNB impact==
==XNB impact==
<!--
<!--


Updated up to 1.6.16 pre-alpha 2025-06-14.
Updated up to 1.7 alpha 2025-09-13.


-->
-->
===Overview===
===Overview===
This section provides a summary of the XNB files which changed in Stardew Valley 1.6.16. This doesn't include new files (since they won't impact existing mods), text changes in non-English files, or the switch from <samp>\</samp> to <samp>/</samp> in asset names (since that's backwards compatible).
This section provides a summary of the XNB files which changed in Stardew Valley 1.7. This doesn't include new files (since they won't impact existing mods) or text changes in non-English files.


[[Modding:Using XNB mods|XNB mods]] are disproportionately affected, since...
[[Modding:Using XNB mods|XNB mods]] are disproportionately affected, since...
Line 1,982: Line 2,012:
Compatibility is broadly grouped into four categories:
Compatibility is broadly grouped into four categories:
* "'''✘ broken'''": mods will remove new content or significant changes, or the mod's intended changes will no longer work. Effects may range from display bugs to crashes, depending how the game uses that specific content.
* "'''✘ broken'''": mods will remove new content or significant changes, or the mod's intended changes will no longer work. Effects may range from display bugs to crashes, depending how the game uses that specific content.
* "✘ will remove changes": mods will remove minor changes in 1.6.16 (e.g. typo fixes).
* "✘ will remove changes": mods will remove minor changes in 1.7 (e.g. typo fixes).
* "✓ mostly unaffected": mods will only be affected if they replace the entire asset, or edit specific entries or fields.
* "✓ mostly unaffected": mods will only be affected if they edit specific entries or fields.
* Blank: no expected impact for the vast majority of mods.
* Blank: no expected impact for the vast majority of mods.


Line 1,989: Line 2,019:
|-
|-
!rowspan="2"| content asset
!rowspan="2"| content asset
!rowspan="2"| changes in 1.6.16
!rowspan="2"| changes in 1.7
!colspan="2"| compatibility for pre-1.6.16 mods
!colspan="2"| compatibility for pre-1.7 mods
|-
|-
! XNB mods
! XNB mods
! Content Patcher packs
! Content Patcher packs
|-
|-
| <samp>Characters/Dialogue/*</samp>
| <samp>Characters/Dialogue/Abigail</samp>
| Removed now-unneeded <samp>%fork</samp> tokens.
| &#32;
|
* [[#Dialogue changes|Merged resort dialogue keys]].
|
* Fixed invalid dialogue keys.
| '''✘ broken'''
| ✓ mostly unaffected
|-
|-
| <samp>Data/Boots</samp>
| <samp>Characters/Dialogue/Alex</samp><br /><samp>Characters/Dialogue/Clint</samp>
| [[#Data/Boots|Overhauled format]].
| [[#Dialogue changes|Merged resort dialogue keys]].
| '''✘ broken'''
| '''✘ broken'''
| '''✘ broken'''<br /><small>(until Content Patcher adds runtime migrations)</small>
| ✓ mostly unaffected
|-
|-
| <samp>Data/CookingRecipes</samp>
| <samp>Characters/Dialogue/Dwarf</samp>
| [[#Data/CookingRecipes|Changed several recipe keys]].
| Fixed invalid dialogue keys.
| '''✘ broken'''
| '''✘ broken'''
| ✓ mostly unaffected<br /><small>(until Content Patcher adds runtime migrations)</small>
| ✓ mostly unaffected
|-
|-
| <samp>Data/Events/*</samp><br /><samp>Data/Events/Festivals/*</samp>
| <samp>Characters/Dialogue/Elliott</samp>
| &#32;
| &#32;
* Migrated to [[#Multilingual events|multilingual events]] and [[#Forking deprecated|event labels]].
* [[#Dialogue changes|Merged resort dialogue keys]].
* [[#Changed event keys|Changed some event keys]].
* Fixed invalid dialogue key.
* Replaced most <samp>awardFestivalPrize</samp> commands with <samp>addItem</samp>.
* Significant changes to support above migrations (e.g. replacing dialogue commands with event commands).
| '''✘ broken'''
| '''✘ broken'''
| ✓ mostly unaffected
| ✓ mostly unaffected
|-
|-
| <samp>Data/ExtraDialogues</samp>
| <samp>Characters/Dialogue/Evelyn</samp>
| Fixed invalid dialogue key.
| '''✘ broken'''
| ✓ mostly unaffected
|-
| <samp>Characters/Dialogue/Haley</samp>
| [[#Dialogue changes|Merged resort dialogue keys]].
| '''✘ broken'''
| ✓ mostly unaffected
|-
| <samp>Characters/Dialogue/Harvey</samp>
| Fixed invalid dialogue key.
| '''✘ broken'''
| ✓ mostly unaffected
|-
| <samp>Characters/Dialogue/Jodi</samp>
| Fixed invalid dialogue key.
| '''✘ broken'''
| ✓ mostly unaffected
|-
| <samp>Characters/Dialogue/Leah</samp>
| [[#Dialogue changes|Merged resort dialogue keys]].
| '''✘ broken'''
| ✓ mostly unaffected
|-
| <samp>Characters/Dialogue/Lewis</samp>
| Fixed invalid dialogue key.
| '''✘ broken'''
| ✓ mostly unaffected
|-
| <samp>Characters/Dialogue/MarriageDialogue</samp><br /><samp>Characters/Dialogue/MarriageDialogue*</samp>
| &#32;
| &#32;
* [[#Event changes|Removed hardcoded events]].
* [[#Dialogue changes|Merged some dialogue keys]].
* Moved <samp>SummitEvent_*</samp> translations into <samp>Strings/Events</samp> (with a different name & format).
* [[#Dialogue changes|Merged some keys from the base asset into NPC-specific assets]].
| '''✘ broken'''
| ✓ mostly unaffected
|-
| <samp>Characters/Dialogue/Maru</samp><br /><samp>Characters/Dialogue/Penny</samp><br /><samp>Characters/Dialogue/Sam</samp>
| [[#Dialogue changes|Merged resort dialogue keys]].
| '''✘ broken'''
| ✓ mostly unaffected
| ✓ mostly unaffected
|-
| <samp>Characters/Dialogue/Sebastian</samp>
| &#32;
* [[#Dialogue changes|Merged resort dialogue keys]].
* Fixed invalid dialogue key.
| '''✘ broken'''
| ✓ mostly unaffected
| ✓ mostly unaffected
|-
| <samp>Data/Boots</samp>
| [[#Data/Boots|Overhauled format]].
| '''✘ broken'''
| '''✘ broken'''<br /><small>(until Content Patcher adds runtime migrations)</small>
|-
| <samp>Data/Buffs</samp>
| [[#Data/Buffs|Added new data field to data model]].
| '''✘ broken'''
|
|-
| <samp>Data/Buildings</samp><br /><samp>Data/Characters</samp>
| [[#Item spawn field changes|Added new item spawn field]].
| '''✘ broken'''
|
|-
| <samp>Data/FishPondData</samp><br /><samp>Data/FruitTrees</samp>
| [[#Item spawn field changes|Added new item spawn field]].
| '''✘ broken'''
|
|-
|-
| <samp>Data/Furniture</samp>
| <samp>Data/Furniture</samp>
Line 2,031: Line 2,123:
| '''✘ broken'''<br /><small>(until Content Patcher adds runtime migrations)</small>
| '''✘ broken'''<br /><small>(until Content Patcher adds runtime migrations)</small>
|-
|-
| <samp>Data/LostItemsShop</samp>
| <samp>Data/GarbageCans</samp><br /><samp>Data/GiantCrops</samp>
| [[#Data/LostItemsShop|Added new field]].
| [[#Item spawn field changes|Added new item spawn field]].
| '''✘ broken'''
|
|-
| <samp>Data/Hats</samp>
| [[#Data/Hats|Overhauled format]].
| '''✘ broken'''
| '''✘ broken'''<br /><small>(until Content Patcher adds runtime migrations)</small>
|-
| <samp>Data/Locations</samp>
| [[#Item spawn field changes|Added new item spawn field]].
| '''✘ broken'''
|
|-
| <samp>Data/Machines</samp>
| [[#Item spawn field changes|Added new item spawn field]].
| '''✘ broken'''
|
|-
| <samp>Data/Monsters</samp>
| [[#Data/Monsters|Overhauled format]].
| '''✘ broken'''
| '''✘ broken'''<br /><small>(until Content Patcher adds runtime migrations)</small>
|-
| <samp>Data/Movies</samp>
| [[#Item spawn field changes|Added new item spawn field]].
| '''✘ broken'''
| '''✘ broken'''
|
|
|-
|-
| <samp>Data/Objects</samp>
| <samp>Data/Objects</samp>
| Added [[#New context tags|new context tags]].
| &#32;
* [[#Data/Objects|Added new data field to data model]] and [[#Item spawn field changes|new item spawn fields]].
* Added <samp>fish_talk_coral</samp> [[#New context tags|context tag]] for [[coral]] and [[Sea Urchin|sea urchin]].
| '''✘ broken'''
| '''✘ broken'''
|
| ✓ mostly unaffected
|-
|-
| <samp>Data/SpecialOrders</samp>
| <samp>Data/Pets</samp><br /><samp>Data/Shops</samp>
| [[#Data/SpecialOrders|Added new fields]].
| [[#Item spawn field changes|Added new item spawn field]].
| '''✘ broken'''
| '''✘ broken'''
|
|
|-
|-
| <samp>Data/Weddings</samp>
| <samp>Data/Weapons</samp>
| Fixed Lewis skipping his matrimonial dialogue at the farmer's wedding.
| &#32;
| ✘ will remove fix
* [[#Item spawn field changes|Added new item spawn field]].
* Added <samp>is_galaxy_weapon</samp> [[#New context tags|context tag]] for galaxy weapons.
| '''✘ broken'''
| ✓ mostly unaffected
| ✓ mostly unaffected
|-
|-
| <samp>Strings/Events</samp>
| <samp>Data/WildTrees</samp>
| Added the translations for [[#Multilingual events|multilingual events]].
| [[#Item spawn field changes|Added new item spawn field]].
| '''✘ broken'''
| '''✘ broken'''
|
|
|-
|-
| <samp>Strings/1_6_Strings</samp>
| <samp>Strings/1_6_Strings</samp>
| Moved some translations into <samp>Strings/EnchanmentNames</samp> and <samp>Strings/Furniture</samp>.
|
|
|-
| <samp>Strings/EnchantmentNames</samp>
| &#32;
| &#32;
* [[#Event changes|Removed hardcoded events]].
* Added translations moved from <samp>Strings/1_6_Strings</samp>.
* Moved some translations into <samp>Strings/Events</samp> and <samp>Strings/Furniture</samp>.
* Renamed two keys (<samp>Auto-Hook</samp> → <samp.AutoHook</samp>, <samp>Bug Killer</samp> → <samp>BugKiller</samp>).
| ✓ mostly unaffected
| '''✘ broken'''
| ✓ mostly unaffected
| ✓ mostly unaffected
|-
|-
Line 2,067: Line 2,193:
| '''✘ broken'''
| '''✘ broken'''
|
|
|-
| <samp>Strings/Locations</samp>
| [[#Event changes|Removed hardcoded events]].
| ✓ mostly unaffected
| ✓ mostly unaffected
|-
|-
| <samp>Strings/Objects</samp>
| <samp>Strings/Objects</samp>
| Moved some translations into <samp>Strings/Furniture</samp>.
| Moved catalogue descriptions into <samp>Strings/Furniture</samp>.
| ✓ mostly unaffected
| ✓ mostly unaffected
| ✓ mostly unaffected
| ✓ mostly unaffected
|-
| <samp>Strings/StringsFromCSFiles</samp>
| Removed some unused translations.
|
|
|-
|-
| <samp>Strings/UI</samp>
| <samp>Strings/UI</samp>
| Merged male/female variants of <samp>PondQuery_StatusRequestPending_*</samp> entries.
| [[#Fish pond changes|Merged some fish pond translation keys]].
| '''✘ broken'''
| '''✘ broken'''
| ✓ mostly unaffected
| ✓ mostly unaffected
|}
|}
<!--


===Removed unused assets===
===Removed or moved translation keys===
Stardew Valley 1.6.16 deletes assets which weren't used by the game. Mods usually aren't affected by this.
These [[Modding:Common data field types#Translation key|translation keys]] were moved or removed in 1.6.16. (For changes to the content, see ''[[#Changed assets|changed assets]]'' above.)


TODO
{| class="wikitable"
-->
|-
! asset
! key
! changes
|-
| <samp>Strings/Locations</samp>
| <samp>SeedShop_BuyBackpack_ResponseNo</samp>
| Key renamed to <samp>GenericPurchase_Decline</samp>.
|}


[[Category:Modding]]
[[Category:Modding]]


[[zh:模组:迁移至游戏本体1.6.16]]
[[zh:模组:迁移至游戏本体1.7]]

Latest revision as of 12:17, 28 September 2026

←Index

This page is for mod authors. Players: see the mod compatibility list instead.

⚠ Stardew Valley 1.7 was announced, but has no planned release date.
There's no estimate for when the update will be released, so don't plan mod updates around the 1.7 release. Things will change before it's released!

This page helps mod authors prepare their mods for the upcoming Stardew Valley 1.7, and documents some of the changes and new functionality.

FAQs

SMAPI mod compatibility over time.

What's changing?

Stardew Valley 1.7 makes significant changes to many data assets to enable new game features and mod extensibility. See the sections below for more details.

Is this the modapocalypse?

Probably not. SMAPI and Content Patcher will automatically rewrite older mods for many of the changes, so they should still work as-is. Some mods may need an update.

How to update your mod

Here's a suggested 'quick start' guide to update a mod for Stardew Valley 1.7.

For C# mods:
  1. Update for Stardew Valley 1.6.16 if you haven't already.
  2. Rebuild the solution.
  3. Fix any build errors and review any build warnings. You can search this page and previous migration guides for relevant info as needed.
  4. Increment your mod version in manifest.json.
    (Some mods may be added to SMAPI's compatibility blacklist due to runtime errors. Incrementing the mod version will fix that if so.)
  5. Test to make sure the mod works.
  6. Skim through this page, and check any section that might be relevant to the mod.
For Content Patcher packs:
  1. Update for Stardew Valley 1.6.16 if you haven't already.
  2. Skim through this page, and check any section that might be relevant to the mod.
For content packs which use another framework:
See the documentation for the framework mod. Often you won't need to update the content pack if the framework mod itself was updated.

Data asset changes

Data/Boots

This has been overhauled into a data model asset, with translations moved into a new Strings/Boots asset. This also includes new fields like ContextTags and CustomFields which weren't available in the old format.

The data asset now consists of a string → model lookup, where...

field effect
basic info
Name The internal item name (not shown in-game).
DisplayName
Description
A tokenizable string for the item's in-game display name and description.
ContextTags (Optional) The custom context tags to add for this item (in addition to the tags added automatically based on the other item data), specified as an array.
equipment effects
AddDefense
AddImmunity
(Optional) A bonus applied to the player's defense or immunity stats when the boots are equipped. Default 0.
appearance
Texture The asset name for the texture containing the boots sprite. Defaults to Maps/springobjects if omitted, but should always be specified for custom boots.
SpriteIndex (Optional) The sprite's index within the Texture, where 0 is the top-left sprite. Default 0.
ColorTexture (Optional) The asset name for the texture containing the boots color sprite. Defaults to Characters/Farmer/shoeColors if omitted.
ColorSpriteIndex (Optional) The color sprite's index within the ColorTexture, where 0 is the top-left sprite. Default 0.
advanced
CustomFields (Optional) The custom fields for this entry.

For example, here's how to add new boots in 1.7:

{
    "Format": "2.8.0",
    "Changes": [
        // add data
        {
            "Action": "EditData",
            "Target": "Data/Boots",
            "Entries": {
                "{{ModId}}_FancyBoots": {
                    "Name": "{{ModId}}_FancyBoots",
                    "DisplayName": "{{i18n: fancy-boots.name}}",
                    "Description": "{{i18n: fancy-boots.description}}",
                    "Texture": "Mods/{{ModId}}/Boots",
                    "SpriteIndex": 0,
                    "ColorSpriteIndex": 1
                }
            }
        },

        // add texture
        {
            "Action": "Load",
            "Target": "Mods/{{ModId}}/Boots",
            "FromFile": "assets/boots.png"
        }
    ]
}

Data/Buffs

Added one new field to buff attributes, contained in the Effects field:

field effect
CustomFields (Optional) The custom fields for this entry.

Data/Characters

The following fields have been added:

field effect
FlowerDanceBehavior (Optional) A list of behaviors to consider for use during the Flower Festival. If no matching ones are found, the default behavior for that NPC's gender is used.

Each entry in this list has the following fields:

field effect
Id An ID for this entry within the dance behavior list. This only needs to be unique within the current list.
Condition A game state query which indicates whether this entry is a valid choice. Default true.
Sprite The sprite to use for the dance, as would be passed in to the changeSprite event command. Default null.
FirstDanceFrame The first frame of the relevant spritesheet to use for the dance animation.

The animation frames after this index must still follow the standard structure.

Precedence The order in which this behavior should be checked, where 0 is the default value used by most behaviors.

Data/CraftingRecipes and Data/CookingRecipes

Crafting recipes and cooking recipes are now a data model. The data model for both are identical. Crafting recipes still live in Data/CraftingRecipes, and cooking recipes still live in Data/CookingRecipes.

Both assets are dictionary assets. The key is the recipe ID, the same as in 1.6, and the value is a data model with the following fields:

field effect
DisplayName A tokenizable string for the display name of this recipe.
Description A tokenizable string for the description of this recipe.
Ingredients A list of ingredients for this recipe.
field effect
Id TThe unique string ID for this entry (not the item itself) within the current list.

This is semi-optional — if omitted, it'll be auto-generated from ItemId. However multiple entries with the same ID may cause unintended behavior, so it's often a good idea to set a globally unique ID instead.

ItemId The item for this ingredient. This can be either a qualified item ID, or a context tag.

If a context tag is specified, it needs to have a corresponding entry in Data/ContextTags.

Quantity The amount of this ingredient to require. Default 1.
Condition The game state query for this ingredient. If not specified, defaults to TRUE.
CustomFields (Optional) The custom fields for this entry.
Result The possible results for this recipe. This is a list of conditional item spawn fields.

If there are multiple resulting possibilities at once, the one chosen for display in menus uses the following precedence:

  1. First, it checks the recipe's DisplayItemId.
  2. If there was no DisplayItemId, then it will search all results for the first one that is not conditional (eg. Condition is either null or TRUE).
  3. If no unconditional results were found, then it chooses the first result, regardless of if the condition passes.
DisplayItemId A qualified item ID to override the displayed item in menus.
Unlock The unlock conditions for this recipe.
field effect
Trigger
name effect
DayStart Checks the Condition at the beginning of each day.
Mail Checks the Condition at the beginning of each day, and queues MailLetterName for the mailbox if the condition passed.
LevelUp Appears when reaching a level RequiredSkillLevel in the RequiredSkill skill. Condition is ignored.
Default Added as a default recipe. Condition is ignored.
Condition The game state query for this unlock. If not specified, defaults to TRUE.
RequiredSkill The skill for the required level for this unlock, if Trigger is equal to LevelUp.
RequiredSkillLevel The required level for this unlock, if Trigger is equal to LevelUp.
MailLetterName The name of letter sent for unlock, if Trigger is equal to Mail.
CustomFields (Optional) The custom fields for this entry.
ExcludeFromPerfection Whether or not to exclude this recipe from perfection checks. Default false.
CustomFields (Optional) The custom fields for this entry.

Data/GiftTastes

Gift tastes, previously in Data/NPCGiftTastes with a localized version for every language, are now in Data/GiftTastes (taste data only) and Strings/GiftTasteReactions (reaction strings, one per language).

Responses to gifts are pulled from Strings/GiftTasteReactions, with the entry chosen from the following format: {NPC}_{Taste}, with {NPC} being the NPC ID, and {Taste} being the corresponding taste (ex. Penny_Love for Penny's loved gift response).

For the gift taste data itself, it now works based on a precedence and game state query system. Additionally, a gift taste can apply to multiple NPCs at once.

Data/GiftTastes is a list of gift taste entries, with the following format:

field effect
Id The ID of this entry.
Condition (Optional) The game state query for if this gift taste should apply, if any.
Precedence (Optional, but recommended) The precedence for this entry, with higher values being checked first.

For the precedence decided for various base game's gift tastes, see the notes after this table.

ItemId The item that matches this gift taste. This can be a qualified item ID, a category, or a context tag query.
Taste The gift taste that applies for this entry. Possible values are Love, Like, Neutral, Dislike, and Hate.
AppliesTo (Optional) Who this gift taste applies to. This is a comma-separated list of NPC names.

If not specified, applies to all NPCs.

advanced
CustomFields (Optional) The custom fields for this entry.

Precedences for old gift taste data

When converting the base game's legacy gift taste data, the precedence values were determined in a way to match previous behavior.

First, a base precedence was chosen based on who it applied to and what type of match it was:

base precedence who what
0 Specific character Specific item
-1000 Specific character Items matching a context tag
-2000 Universal Specific item
-3000 Specific character Items of a specific category
-4000 Universal Items matching a context tag
-5000 Universal Items of a specific category

After the base precedence is selected, an additional value is added based on the resulting gift taste.

precedence modifier legacy gift taste
400 Love
300 Hate
200 Like
100 Dislike
0 Neutral

Additionally, the previously hard-coded behavior of everyone disliking artifacts (except Penny and the Dwarf, who like them) are now in the data, with a precedence of -1250 (universal dislike) and -1200 (Penny and Dwarf like).

Certain fallback behavior for cheap or negative ediblity otherwise-neutral-reaction items are still hardcoded, but still only apply if:

  • the chosen gift taste was neutral
  • the chosen gift taste applies to everyone (ie. was universal)
  • the chosen gift taste was for that specific item, and not an entire category or context tag

Data/Furniture

This has been overhauled into a data model asset. The overhaul also adds support for previously-hardcoded features like custom item descriptions (via Description), custom TVs (via the new Television furniture type and TelevisionScreen* fields), and custom fields.

The data asset now consists of a string → model lookup, where...

field effect
basic info
Name The internal item name (not shown in-game).
DisplayName A tokenizable string for the item's in-game display name.
Description (Optional) A tokenizable string for the item's in-game description. Defaults to a generic description based on the other fields like CanPlaceIndoors and CanPlaceOutdoors.
Type (Optional) The furniture type, which affects various furniture functionality and default values (e.g. default bounding box size). Defaults to Other.

See table of valid types.

Price (Optional) The price for this furniture when purchased from a shop. Default 0.
ContextTags (Optional) The custom context tags to add for this item (in addition to the tags added automatically based on the other item data), specified as an array.
behavior
CanPlaceIndoors
CanPlaceOutdoors
(Optional) Whether the player can place this furniture indoors and/or outdoors. Defaults to generic behavior based on the Type field (e.g. TVs can't be placed outdoors by default).
ExcludeFromRandomSale (Optional) Whether to prevent this furniture from being shown in randomly generated shop stock or furniture catalogues. Default false.
appearance
Texture The asset name for the texture containing the furniture sprite. Defaults to TileSheets/furniture if omitted, but should always be specified for custom furniture.
SpriteIndex (Optional) The sprite's index within the Texture, where 0 is the top-left sprite. Default 0.
Rotations (Optional) The number of rotations possible (1, 2, or 4). Default 1.
SpriteSize (Optional) The sprite's size in the Texture, measured in tiles. Defaults to a generic size depending on the Type field.
BoundingBoxSize (Optional) The collision box size when the furniture is placed in-game, measured in tiles. Defaults to a generic size depending on the Type field.

The bounding box is anchored to the bottom-left corner of the SpriteSize. Width will push the right side of the box to the right, height will push the top of the box upwards.

type-specific options
BedType (Optional) When the Type field is set to Bed, the bed type which affects who can sleep in it. Default Single.

Valid values:

bed type effect
Single A single-sized bed with room for one player or NPC.
Double A double-sized bed with room for two players or NPCs.
Child A single bed for a child NPC.
BedUpgradeItemId (Optional) When the Type field is set to Bed, the item ID of the double bed to replace with for house upgrades. Default null.

If omitted, when choosing a double bed for an upgraded Farmhouse or Cabin, a legacy integer ItemId will result in a value of ItemId + 4, otherwise the default value of 2052 will be used.

TelevisionScreenOffset (Optional) When the Type field is set to Television, the X and Y pixel offset relative to the TV's bounding box to apply when drawing the screen image onto the TV. Default none.
TelevisionScreenScale (Optional) When the Type field is set to Television, the zoom multiplier to apply to the screen image so it fits onto the TV's screen.
advanced
CustomFields (Optional) The custom fields for this entry.

Data/Hats

This has been overhauled into a data model asset, with translations moved into a new Strings/Hats asset. This also includes new fields like ContextTags and CustomFields which weren't available in the old format.

The data asset now consists of a string → model lookup, where...

field effect
basic info
Name The internal item name (not shown in-game).
DisplayName
Description
A tokenizable string for the item's in-game display name and description.
HairStyle (Optional) What to do about the player's hair when they wear this hat. Default DrawObscuredHair.

The possible values are:

  • DrawFullHair: the hair is drawn like usual (e.g. for hats that don't hide the hair like Abigail's bow).
  • DrawObscuredHair: the hair is partly obscured under the hat (e.g. for most hats like the cowboy hat).
  • HideHair: the hair is fully hidden (e.g. for hats which fully cover the head like the mummy mask).
SkipHairOffset (Optional) Whether to skip offsetting the hat to sit 'on top' of the player's current hairstyle (e.g. for masks). Default false.
Texture The asset name for the texture containing the hat sprite. Defaults to Characters/Farmer/hats if omitted, but should always be specified for custom hats.
SpriteIndex (Optional) The sprite's index within the Texture, where 0 is the top-left sprite. Default 0.
ContextTags (Optional) The custom context tags to add for this item (in addition to the tags added automatically based on the other item data), specified as an array.
CustomFields (Optional) The custom fields for this entry.

For example, here's how to add a new hat in 1.7:

{
    "Format": "2.8.0",
    "Changes": [
        // add data
        {
            "Action": "EditData",
            "Target": "Data/Hats",
            "Entries": {
                "{{ModId}}_FancyHat": {
                    "Name": "{{ModId}}_FancyHat",
                    "DisplayName": "{{i18n: fancy-hat.name}}",
                    "Description": "{{i18n: fancy-hat.description}}",
                    "HairStyle": "DrawObscuredHair",
                    "Texture": "Mods/{{ModId}}/Hats",
                    "SpriteIndex": 0
                }
            }
        },

        // add texture
        {
            "Action": "Load",
            "Target": "Mods/{{ModId}}/Hats",
            "FromFile": "assets/hats.png"
        }
    ]
}

Data/Monsters

Monster data has been completely rethought in Stardew Valley 1.7. In particular...

  • For monster data in general:
    • Data/Monsters has been been overhauled into a data model asset, with translations moved into a new Strings/Monsters asset. This includes significant new features which weren't supported with the old format.
    • A new 'monster variant' concept lets multiple specific monsters share common data (e.g. Green Slime and Tiger Slime are variants of the new base Slime monster). This is particularly used for common drops.
    • A new 'monster tag' system lets monster define custom tags like slime_is_prismatic, which can be used to filter monster drops.
  • For monster drops:
    • A rethought monster drop system supports the full range of vanilla features like conditions, item queries, qualified item IDs for non-object drops, and monster-specific concepts like repeating drop chance and mutually-exclusive drops.
    • All drops are now qualified item IDs. The former 'resource IDs' (formatted as negative numbers like -4) are no longer supported; items are converted into their equivalent resource debris automatically where needed.
    • Nearly all monster drops are now defined in Data/Monsters (with just a few hardcoded drops common to all monsters left).

The data asset now consists of a string → model lookup, where...

  • The key is the unique string ID.
  • The value is a model with the fields listed below.
field effect
basic info
DisplayName A tokenizable string for the monster's display name.
IsGlider (Optional) Whether the monster is flying (e.g. so they glide over obstacles). Default false.
IsMineMonster (Optional) Whether this monster spawns in the mines, and should be buffed after the player reaches the bottom. This sometimes applies to monsters that can appear elsewhere too (e.g. wilderness golems on the farm receive mine buffs too). Default false.
ExperiencePoints (Optional) The combat experience points received for defeating the monster. Default 1.
stats
Health (Optional) The initial hit points. Default 20.
Attack (Optional) The attack power (i.e. how much damage its hits inflict on players). Default 5.
Defense (Optional) The defense which reduces damage received by this monster. Default 0.
DodgeChance (Optional) The percentage chance that the monster dodges an attack, as a value between 0 (never) and 1 (always). Default 0.
Speed (Optional) The default movement speed. Default 1.
Jitteriness (Optional) How often the monster will move in random non-player directions to try to get around objects, as a value between 0 (never) and 1 (always). Default 0.1.
DetectionDistance (Optional) The distance at which the monster detects a player and begins moving towards them, or -1 for unlimited. Default 4.
drops
Drops (Optional) The items which can drop when the monster is defeated. Default none.

All matching entries are dropped. If the player has a burglar's ring equipped, each entry will make two attempts to drop (but fields like RepeatingChance and SkipIfDropped are independent between the two attempts).

This consists of a list of models with these fields:

field effect
common fields See item spawn fields for the generic item fields supported for monster drops.

Notes:

  • If a drop has an item query which returns multiple item stacks, one of them will be selected at random.
  • The Condition field can optionally contain the %RANDOM_KEY token, which is set to a unique identifier for this monster during the current tick.
ForTags (Optional) The monster tags for which this drop applies. This can be a context tag-like query string like !variant_frost_bat, !variant_lava_bat (not frost bat or lava bat). Default none, meaning it applies to all monsters with this data.
Chance (Optional) A probability that this item will be found, as a value between 0 (never) and 1 (always). Default 1.
RepeatingChance (Optional) A compounding probability of an extra drop, as a value between 0 (never) and .95 (nearly always). Default 0.

This applies after an item has been dropped based on the other fields. This chance is repeatedly checked to produce an extra drop until it fails. Each repeat drop will ignore the Chance and Condition fields, but reapply all other item spawn fields (e.g. re-selecting RandomItemId if applicable).

RepeatingChanceKey (Optional) When checking the RepeatingChance field, use this to seed a predictable RNG. This can be used to synchronize separate drops. Default none.

This can optionally contain the %RANDOM_KEY token, which is set to a unique identifier for this monster during the current tick.

ExplodeStack (Optional) Whether to split multi-item stacks into single-item stacks. Default false.

For example, let's say a monster would drop a stack of 15 wood. With this option enabled, it would instead drop 15 stacks of one wood each.

SkipIfDropped (Optional) Skip the current entry if one of these drop IDs have already been dropped. Default none.

This is specified as an array. For example:

"SkipIfDropped": [ "ExampleDropId", "AnotherDropId" ]
tags
ContextTags (Optional) The context tags to add for this monster, in addition to those added automatically based on the other fields. Default none.
variants
DefaultVariant (Optional) When the game creates a monster of this type without specifying a variant, use the given variant instead of creating it from only the base data. Default false.
Variants (Optional) The possible variations of this monster. Default none.

Each variant is simply a set of fields which override the base data when set. For example, this creates a variant which only differs from the base monster by name and health points:

"Variants": [
    {
        "DisplayName": "{{i18n: variant-name}}",
        "Health": 50
    }

This consists of a list of models with these fields:

field effect
monster fields All monster fields (except DefaultVariant and Variants) can be set on the variant. All fields are optional, and default to the value set in the monster's base data.
InheritDrops (Optional) Whether to inherit drops defined in the monster's base Drops field. Default true.

Specifically:

  • If true, the variant will combine the base Drops and variant Drops into one list.
  • If false, only drops in the variant Drops field are applied.
advanced
CustomFields (Optional) The custom fields for this entry.

For example, this Content Patcher code adds a new 'Pufferchick' monster which drops pufferfish when defeated. The monster's spritesheet is automatically loaded from Monsters/<ID>.

Note: this only adds the monster data. Currently this does nothing unless you have another mod which spawns instances of the monster in-game.

{
    "Format": "2.8.0",
    "Changes": [
        // add data
        {
            "Action": "EditData",
            "Target": "Data/Monsters",
            "Entries": {
                "{{ModId}}_Pufferchick": {
                    "DisplayName": "{{i18n: pufferchick.name}}",
                    "ExperiencePoints": 3,

                    "Health": 30,
                    "Attack": 2,
                    "Defense": 5,
                    "DodgeChance": 0.3,
                    "Speed": 2,
                    "DetectionDistance": 2,

                    "Drops": [
                        {
                            "Id": "Pufferfish",
                            "ItemId": "(O)128",
                            "Chance": 0.5,
                            "RepeatingChance": 0.1
                        }
                    ]
                }
            }
        },

        // add texture
        {
            "Action": "Load",
            "Target": "Monsters/{{ModId}}_Pufferchick",
            "FromFile": "assets/pufferchick.png"
        }
    ]
}

Schedule data

Schedules have been changed into data models. Previously under Characters/schedules, now under Characters/ScheduleData.

field effect
Precedence The precedence of this entry. A higher precedence will be checked first.

Note: the hardcoded schedules for visiting Ginger Island will override everything below precedence 100000.

Season (Optional) The season that this schedule applies to, if any. If not specified, applies to any season.
DayOfMonth (Optional) The day of month that this schedule applies to, if any. If not specified, applies to any day of the month.
WeekDay (Optional) The week day that this schedule applies to, if any. If not specified, applies to any day of the week.

This accepts the short name of the day of week, ex. Mon, Tue, Wed, ...

RequiredHearts (Optional) The minimum amount of friendship (in hearts) for this schedule to apply, if any. If not specified, applies regardless of friendship level.
Condition (Optional) A game state query for if this entry should apply, in addition to the other fields. If not specified, treated as TRUE.
StartLocationOverride (Optional) Override the location to start the day in when this schedule is chosen. StartTileOverride must also be specified for this to apply.

Requires StartTileOverride to be specified for this to work.

StartTileOverride (Optional) Override the tile to start the day on when this schedule is chosen. StartLocationOverride must also be specified for this to apply.

Requires StartLocationOverride to be specified for this to work.

StartFacingDirectionOverride (Optional) Override the facing direction to start the day with when this schedule is chosen. StartLocationOverride must also be specified for this to apply.

Requires StartLocationOverride to be specified for this to work.

StartEndOfRouteAnimation (Optional) Override the end of route animation to start the day with when this schedule is chosen. StartLocationOverride must also be specified for this to apply.

Requires StartLocationOverride to be specified for this to work.

StartEndOfRouteMessage (Optional) Override the end of route message to start the day with when this schedule is chosen. StartLocationOverride must also be specified for this to apply.

Requires StartLocationOverride to be specified for this to work.

FallbackSchedules (Optional) A list of additional schedules options that, if the corresponding GSQ passes, will revert to that schedule instead. Intended for "fail conditions" (ex. one of the locations in this schedule are not currently accessible).
field effect
Condition The game state query to check for this fallback option.
Schedule The schedule to use if the condition passed for this fallback option.

If this is "season", it will act check "spring", "summer", "fall", or "winter" based on the current game's season. IF this is "no_schedule", then the NPC will have no schedule for that day.

CustomFields (Optional) Custom fields for mods to use.
Commands A list of commands for the schedule.
field effect
Type (Optional) The type of this schedule command. Defaults to Depart
type meaning
Depart The NPC will depart at the specified time.
Arrive The NPC will try to arrive at the specified time.
Bed The NPC will try to return to their bed.
Time The time for this schedule command. This must be a time after the previous command's time.

Note: a time of 0 (for "0 schedules") is no longer supported. For the equivalent behavior, use StartLocationOverride and friends.

DestinationLocation (Only applies for Type = Depart or Arrive) The location that this command takes the NPC to.
Destination (Only applies for Type = Depart or Arrive) The tile in the location that this command takes the NPC to.
DestinationFacingDirection (Optional, only applies for Type = Depart or Arrive)) The facing direction that should be used when arriving at this command's target.
EndOfRouteAnimation (Optional) The animation from Data/animationDescriptions to play upon ending this NPC.
EndOfRouteMessage (Optional) The localized string key to say if a player talks to this NPC after ending this command, but before the next one.
CustomFields (Optional) Custom fields for mods to use.
CustomFields (Optional) Custom fields for mods to use.

The vanilla schedules were all converted using this automated script, which is under the MIT license.

Data/Objects

Added new fields:

field effect
Buffs This field already existed, but has a field change:
field effect
CustomAttributes This field already existed, but has one new field:
field effect
CustomFields (Optional) The custom fields for this entry.
UseCondition A game state query for determining if the object is usable on right click. If not specified, equivalent to "TRUE".
UseConditionFailedMessage A tokenizable string for what message to show when UseCondition is not met. If an empty string, no message will be shown. If not specified, equivalent to "[LocalizedText Strings/UI:CantUseHere]".
UseActions A list of actions to run upon using the item. These trigger actions will have an input argument called StackSize, which will be the size of the stack obtained if triggered via ConsumeOnObtain, or 1 otherwise. (For more information on trigger action input arguments, see the relevant section on this page.)
ConsumeOnUse true if the item should be consumed on use, false otherwise. Default true.
ObtainActions A list of actions to run upon obtaining the item. These trigger actions will have an input argument called StackSize, which will be the size of the stack obtained. (For more information on trigger action input arguments, see the relevant section on this page.)
ConsumeOnObtain If the item should be automatically used *and* consumed when obtained. Items with this enabled:
  • Will not actually enter the inventory (since they are consumed immediately).
  • Can be collected even with a full inventory (since they are consumed immediately).
  • Will not have their UseCondition checked before their UseActions are run.
  • Will have their ObtainActions (if any) run before their UseActions are run.
ShowNotificationOnObtain true if the item should show a notification in the bottom left corner of the screen upon receiving the item, false otherwise. Default true.
ForgeRandomSlot The slot to randomize the enchantments for if this is used as an ingredient.
ForgeCost If greater than or equal to 0, the cinder shard cost for using this item in the forge.
ForgeCostItem If set, changes the item required for forging from cinder shards to something else.

Data/Weapons

Added new fields:

field effect
DefaultEnchantments Enchantments to apply by default on this weapon. This is a dictionary, with the key being the enchantment ID, and the value being the level of the enchantment.

Enchantments added through this are still subject to normal enchantment restrictions, and therefore must actually be applicable to this weapon.

For an example of this, check out the Holy Blade.

Changes for all mod authors

Switch blocks

'Switch blocks' are a new ${…}$ syntax which can be used in nearly all game text (not just dialogue). This extends the former 'gender-switch blocks' added in 1.6.0.

These are applied before most other commands or parsing, so you can safely use them in cases where characters like ^ have a different meaning (e.g. mail text).

The supported switch blocks are:

type syntax description
gender ${male^female}
${male^female^non-binary}
Switch between text for male, female, and non-binary players. The non-binary value is only used if a mod overrides the player's gender, since the in-game UI only allows male or female.

You can also use ¦ instead of ^, in which case any ^ characters are left as-is.

For example:

"Mon": "Hey ${lad^lass^kiddo}$!"
randomize ${variant A ||| …}$ Defines an arbitrary number of variants from which to choose each day. After randomization, any leading or trailing whitespace is trimmed. This randomization is deterministic per day (e.g. reloading the save won't change which one is shown).

For example, let's say you did this:

"Rainy_Night": "I ${love ||| like ||| adore ||| somewhat enjoy ||| enjoy}$ rain.$h"

That would create five variants which each have an equal probability of being selected.

Switch blocks can be arbitrary combined and nested. For example:

"Rainy_Night": "${Hello there ||| Hey ${lad^lass^kiddo}$ }$!"

Context tag changes

Added new context tags:

context tag item types effect
is_galaxy_weapon weapons Marks the tool as a galaxy weapon like the galaxy hammer or galaxy sword. This is set for vanilla scythes through Data/Weapons. This affects logic which checks for galaxy weapons (e.g. galaxy soul enchantments).

Additionally, there is now a data asset for context tags for supporting data (such as for using them in crafting recipes). Located in Data/ContextTags, this is a dictionary assets. The key is the context tag, and the value is a data model with the following fields:

field effect
DisplayName A tokenizable string for the display name of this context tag. Required when using a context tag as a crafting recipe ingredient.
RepresentativeItem The qualified item ID for the item representing this context tag. Required when using a context tag as a crafting recipe ingredient.
CustomFields (Optional) The custom fields for this entry.

Dialogue changes

  • Added a new special token in dialogue strings:
    token description
    ||| This is a shortcut for the randomize switch block.

    Delimits an arbitrary number of dialogue variants from which to choose each day. After randomization, any leading or trailing whitespace is trimmed. This randomization is deterministic per day (e.g. reloading the save won't change which one is shown).

    For example, let's say you did this:

    "Rainy_Night": "
        I love rain.$h|||
        I like rain.$h|||
        I adore rain.$h|||
        I hate rain.$s#$b#Just kidding. I love it!$h|||
        I enjoy rain.$h
    "
    

    That would create five variants of the dialogue which each have an equal probability of being selected.

  • Improved some special tokens:
    token changes
    || Whitespace around the token is now ignored, so you can split text into multiple lines:
    "Wed8": "
        Isn't it expensive, coming to the desert so often like you do?#$e#You must really like to see me, huh? Hmmm... $h||
        *sigh*... I do miss the beautiful flowers of Stardew Valley...$s
    "
    
  • Some dialogues were merged or renamed using the new features. The previous dialogue keys are now ignored by the game.
    asset former key changes
    Characters/Dialogue/<NPC name> Resort_<number>
    Resort_Bar_<number>
    Resort_Chair_<number>
    Resort_Dance_<number>
    Resort_Shore_<number>
    Resort_Towel_<number>
    Resort_Umbrella_<number>
    Resort_Wander_<number>
    Merged into their base key (e.g. Resort_<random> into Resort) using the new ||| random-variant token.
    Characters/Dialogue/MarriageDialogue
    Characters/Dialogue/MarriageDialogue<NPC name>
    Characters/Dialogue/MarriageDialogue<NPC name>Roommates
    funLeave_<NPC name>
    funReturn_<NPC name>
    jobLeave_<NPC name>
    jobReturn_<NPC name>

    patio_<NPC name>
    spouseRoom_<NPC name>

    spring_<NPC name>
    summer_<NPC name>
    fall_<NPC name>
    winter_<NPC name>
    Moved into MarriageDialogue<NPC name> and removed the NPC suffix (like spouseRoom_<NPC name> → spouseRoom).
    Indoor_Day_0
    Indoor_Day_1
    Indoor_Day_2
    Indoor_Day_3
    Indoor_Day_4
    Merged into Indoor_Day.
    Indoor_Night_0
    Indoor_Night_1
    Indoor_Night_2
    Indoor_Night_3
    Indoor_Night_4
    Indoor_Night_<NPC name>
    Merged into Indoor_Night.
    NoBed_0
    NoBed_1
    NoBed_2
    NoBed_3
    Merged into NoBed.
    Outdoor_0
    Outdoor_1
    Outdoor_2
    Outdoor_3
    Outdoor_4
    Outdoor_<NPC name>
    Merged into Outdoor.
    Rainy_Day_0
    Rainy_Day_1
    Rainy_Day_2
    Rainy_Day_3
    Rainy_Day_4
    Merged into Rainy_Day.
    Rainy_Night_0
    Rainy_Night_1
    Rainy_Night_2
    Rainy_Night_3
    Rainy_Night_4
    Rainy_Night_5
    Rainy_Night_<NPC name>
    Merged into Rainy_Night.

Display shops

In addition to being able to add or change what is sold on Pierre's counter, you can also create your own.

Display shops are similar to normal shops, except they show their stocked items in-world. They have a fixed size which is filled from the item pool until it is full (or there is nothing left to add).

Display shops are stocked at the beginning of the day, and not restocked until the next day. They are stocked per-farmhand so that they can be different for everyone (such as with backpack upgrades), however a LimitedStockMode of Global will sync the stock between players, just like a normal shop.

If LimitedStockMode is Player, then it will be shown before other items, and will not count towards the ItemCountToSell. Once a LimitedStockMode Player item is purchased, it will move to the next not-displayed LimitedStockMode Player that was stocked, and once those are out of stock it will move on to the synced item stocks.

Display shop items are always purchased one at a time - a higher stack size means it can be bought multiple times.

The data asset, located at Data/DisplayShops, consists of a string -> model lookup, where...

  • The key is the ID of the display shop.
  • The value is a model with the fields listed below.
field effect
basic info
OpenCondition (Optional) A Game State Query for determining if the display shop if is open (that is, if the items shown are purchasable or not). If not specified, it will always be open.
ClosedMessage (Optional) A Tokenizable String for what message to show if the shop is closed. Defaults to (after token parsing) "Closed.".
Currency (Optional) The currency to use for the price, with the same options as in Data/Shops. Defaults to 0 (standard gold).
cosmetic
PurchaseSound (Optional) A sound to play upon making a successful purchase. Defaults to "purchaseClick".
ItemWorldOffset (Optional) A Vector2 of how far to move the display item from the tile that has the purchase tile action. For example, Pierre's shop counter has a value of 0 -72 so that the items show on top of the counter. Defaults to 0.
stocked products
ApplyProfitMargins (Optional) Whether or not to apply profit margins by default for items in this shop. Defaults to null.
PriceModifiers (Optional) Price modifiers to apply to items in this shop. Behaves the same way as Data/Shops PriceModifiers.
PriceModifierMode (Optional) Price modifier mod for applying price modifiers to items in this shop. Behaves the same way as Data/Shops PriceModifierMode.
ItemCountToSell (Optional) The amount of items that can be sold each day.
ItemPool (Optional) The items to use when populating the shop. This list is sorted by Precedence before being used, with entries of the same precedence being shuffled together. This list consist of values with these fields:
field effect
common fields See Items for Shops for the item fields supported by display shop items.

Notes:

  • If set to an item query which returns multiple items, all of them will be valid choices for the shop.
  • Unlike other item spawn fields, ObjectDisplayName is supported for any entry (not just Object items).
DisplayOffset (Optional) The amount to offset drawing this item when shown in the display shop. This is useful for non-standard-sized items.
DisplayScale (Optional) How much to scale the item when it is shown. Defaults to 4 (just like most things in the game).
ItemBlurb (Optional) Text to show in a dialogue box before the item prompt appears.
ItemBlurbSpeaker (Optional) The NPC that will "speak" the ItemBlurb, if desired.
Precedence (Optional) The precedence for this item to be checked, with higher being sooner. Defaults to 0.

To make the display shop show in world, you need to use a new tile action: DisplayShop <displayShopId> <itemIndex>, with displayShopId being the ID of the entry in Data/DisplayShops and itemIndex being which index of the stocked items to make available (based on the corresponding ItemCountToSell value).

For example, here's how to add a new entry to Pierre's counter:

{
    "Format": "2.9.0",
    "Changes": [
        {
            "Action": "EditData",
            "Target": "Data/DisplayShops",
            "TargetField": [ "SeedShopCounter", "ItemPool" ],
            "Entries": {
                "{{ModId}}_Weeds": {
                    "ItemId": "(O)0",
                    "Price": 123,
                    "AvailableStock": 3,
                    "ItemBlurb": "wow some weeds. perfect for honey",
                    "ItemBlurbSpeaker": "Penny",
                    "Precedence": -100,
                }
            }
        }
    ]
}


Enchantment data

Enchantments have been partly de-hardcoded into a new Data/Enchantments data asset. Mods can now easily add new enchantments, including enchantments applied through the forge using a prismatic shard or a custom item ID.

However, this logic is still hardcoded:

  • Forging innate enchantments. The innate enchantments are in data, but the logic to choose which to apply is still hardcoded.
  • Forging diamonds into a weapon to fill all its weapon stat slots.
  • Several enchantments' effects when applied (though weapon buff effects are in data).

This consists of a string → model lookup, where...

  • The key is the unique string ID for the enchantment.
  • The value is a model with the fields listed below.
field effect
DisplayName A tokenizable string for the enchantment's display name, shown in tooltips. This can contain {0} for the enchantment level, if applicable.
ForgeWith (Optional) If set, this enchantment is applied to tools by forging an item with this qualified ID into it. Default none, in which case it won't be applicable through the forge.
AppliesTo (Optional) The tools or weapons to which this enchantment can be applied. Defaults to all tools/weapons.

This is specified as an array of context tag queries. The enchantment can be applied if at least one query matches.

"AppliesTo": [
    "melee_weapon, !is_scythe", // any non-scythe melee weapon
    "hoe, upgrade_level_4"      // any hoe upgraded to iridium or higher
]
EnchantmentSlot (Optional) The 'slot' this enchantment goes in. Only one enchantment per slot can normally be applied, except for the "Forge" slot. Default is "Primary".

Valid vanilla types are:

type example
Primary A normal enchantment applied through a prismatic shard.
Forge A weapon stat enchantment applied through the forge.
Transforming An item transformation enchantment applied through the forge with galaxy souls.
Innate1 and Innate2 An innate enchantment applied through the forge using a dragon tooth.
IsSecondary (Optional) Whether this is an innate enchantment applied through the forge using a dragon tooth. Default false.
IsVisible (Optional) Whether the enchantment should be shown in the tool/weapon's tooltip. Default true.
MaximumLevel (Optional) The number of times this enchantment can be applied to the same tool to upgrade the enchantment level (e.g. for weapon stat enchantments). A value of 1 means there's only one enchantment level, so it can't be upgraded by applying the enchantment again. Default 1.
EquipmentEffects (Optional) The buffs applied to the weapon when this enchantment is applied.

This consists of a list of models with the fields below. You can specify any number of entries; the first one which matches the tool will be applied.

field effect
Id A unique string ID for this entry.
MinLevel (Optional) The minimum enchantment level for which these stats apply. Default 0 (i.e. any level).
other fields See the Effects field in Data/Buffs, which is equivalent to this model.
Transformations (Optional) If EnchantmentSlot is "Transforming", this contains all valid transformations for it.

This is a dictionary of qualified item IDs, with the key being the original item, and the value being the transformed item.

Transformations to and from items besides weapons are allowed, with some caveats:

  • If the source item cannot be enchanted, the maximum level for the enchantment must be 1, or it will not work.
  • If the source item and transformed item are different C# types, then all extra item data (such as mod data, enchantments, and tool enchantments) will be lost, since an entirely new item had to be created.
advanced
CustomFields (Optional) The custom fields for this entry.
ClassName (Optional, specialized) The name of the C# class to construct within the StardewValley.Enchantments namespace. The class must be a subclass of StardewValley.Enchantments.Enchantment, and have a constructor with no arguments. For example, given a value of BottomlessEnchantment, the game will create StardewValley.Enchantments.BottomlessEnchantment instances.

This should usually be omitted, in which case the game will create a generic Enchantment instance which uses the data in Data/Enchantments for its ID.

Event changes

Added new event commands:

command description
setDrawDepthModifier <npc> <amountInTiles> Modify the draw depth of <npc> for this event, by <amountInTiles>.
setDrawDepthModifier <npc> reset Reset the draw depth modifier of <npc> for this event.
ForceBreathing <npc> false Prevent <npc> from showing a breathing animation for this event.
ForceBreathing <npc> true [breathPosX] [breathPosY] [breathRectX] [breathRectY] [breathRectWidth] [breathRectHeight] Force <npc> to show a breathing animation for this event. You can optionally override the data used for the breathing rect, with the values following the same behavior as they would if specified in the Data/Characters character data.
ForceBreathing <npc> reset Reset the forced breathing modifier of <npc> for this event.
SaveActorState <stateStoreId> <actor> <state>+ Stores the specified <actor>'s current <state>(s) into the <stateStoreId> actor state store, to be loaded later.

Any actor, both NPC and Farmer, can be specified. If all is specified, them all actors will have their state saved.

Multiple <state> values can be specified, separated by spaces. Valid <state> values include:

state type description
all Saves all vanilla state types for the specified actor.

Modded state types are not included here to make it less likely that modded state types will break existing events. For using modded state types in bulk, see the bottom of this table.

Any state starting with ! This will remove the specified state from the current selection of ones to be saved.

For example, you could specify all !movement !animation to save all state except the movement state and animation state.

position The current position of the actor.
movement The movement state of the actor, including its current speed, advancedMove data, and ignoreCollisions flag.
animation The animation state of the actor, including its facing direction, ignoreMovementAnimation flag, and (for NPCs only) its ForceBreathing values.
drawOffset Values previously specified in drawOffset and setDrawDepthModifier.
name The NPC's current display name.
portrait The NPC's current portrait.
sprite The NPC's current sprite.
shadow The NPC's current hideShadow value.
swimming The NPC's current swimming state.
Any state ending with / Specifying a state ending with / will result in all state types starting with that string to be added.

For example, specifying spacechase0.SpaceCore/ would add all states that were added by SpaceCore (assuming they were properly namespaced).

This also works with "nested namespaces", ex. spacechase0.SpaceCore/MagicalStuff/ would add all "magical stuff" states added by SpaceCore.

LoadActorStateStore <stateStoreId> Loads all actor state stored in the <stateStoreId> actor state store.
ClearSavedActorStateStore <stateStoreId> Clears the <stateStoreId> actor state store.

Fish pond changes

  • Added new fish pond translation keys:
    asset key usage
    Strings/UI PondQuery_<key>_<item ID>
    PondQuery_<key>_<attitude>
    All PondQuery_* translation keys can now be suffixed with either the qualified item ID of the fish, or the fish's general attitude based on their fish_talk_* context tag.

    For example, the 'fish are OK' message for an anchovy pond will be loaded from the first key which exists in this order: PondQuery_StatusOk_(O)129, PondQuery_StatusOk_Rude, or PondQuery_StatusOk.

  • Merged some fish pond translation keys:
    asset former key changes
    Strings/UI PondQuery_Status<status><number (0–6)>
    PondQuery_StatusRequestComplete_<fish disposition><number (0–2)>
    PondQuery_StatusRequestPending_<fish disposition><number (0–2)>
    Removed the number key suffixes using switch blocks (e.g. merged PondQuery_StatusOk<number> into PondQuery_StatusOk).
  • Coral and Sea urchin now have the fish_talk_coral context tag instead of a hardcoded _Coral translation key suffixes.

Item query changes

Added one new item query:

query effect
SEASONAL_RACCOON_SEED Get a seasonal raccoon seed for the current season.

This sets the stack size to the recommended amount based on the player's luck. When used in item spawn fields, you can set MinStack and MaxStack to override the stack size.

Item spawn field changes

  • Added new item spawn fields:
    field effect
    Enchantments (Optional) For tools and weapons, the enchantment IDs to apply (matching their IDs in Data/Enchantments). This field applies the normal enchantment rules. Default none.

    This is specified as an array, and you can repeat secondary enchantments to boost their level. For example, this applies Vampiric and Attack (level 2):

    "Enchantments": [ "Vampiric", "Attack", "Attack" ]
    

Game state query changes

Added game state queries:

query effect
PLAYER_INVENTORY_SIZE <player> <minSize> [maxSize] Whether any one of the specified player(s) inventory has at least <minSize> slots unlocked, and (if specified) less than or equal to [maxSize] slots unlocked.

Data/MapPatches - Dehardcoded map patches

The base game now has a data-driven conditional map patch system. At the beginning of each day, maps are reloaded, and then these are checked and applied.

field effect
OriginalMap The full asset name of the original map(s) that this patch should apply too. Multiple maps can be specified, separate by commas.
MapPatch The asset name of the map containing this patch.
SourceRect (Optional) The source rectangle of MapPatch to apply. If not specified, the whole map will be used.
DestinationPosition The position on OriginalMap to place the top left corner of the patch at.
MapProperties (Optional) Map properties to apply. To remove a property, the value should be null. To append or prepend to a property, use @MergeInto.
Condition (Optional) A game state query which indicates whether this entry applies. Default true.
Precedence (Optional) The order in which this entry should be checked, where higher precedences will apply over lower precedences.
advanced
CustomFields (Optional) The custom fields for this entry.

Previously hard-coded map patches that have been moved over are:

location map change ID of entry in Data/MapPatches additional notes
The Beach (including the Night Market) The bridge to the right side of the map Beach_Bridge Mostly dehardcoded, but has special logic to apply immediately for everyone rather than at the beginning of the next day.
The Beach (including the Night Market) Town shortcut to the forest Beach_CommunityUpgradeShortcut_ForestEntrance Entirely dehardcoded.

Previously, the beach map had the warps for this defined through map properties, even if you haven't unlocked community shortcuts yet. Those warps are now applied through this patch's MapProperties and @MergeInto.

The Beach (including the Night Market) Town shortcut to the east side of town Beach_CommunityUpgradeShortcut_TownEntrance Entirely dehardcoded.

Previously, the beach map had the warps for this defined through map properties, even if you haven't unlocked community shortcuts yet. Those warps are now applied through this patch's MapProperties and @MergeInto.

The Beach (including the Night Market) The sign leading up to SquidFest Beach_SquidFest_Sign Entirely dehardcoded
The Beach (including the Night Market) SquidFest Beach_SquidFest Entirely dehardcoded
The Beach (including the Night Market) Day 2 of SquidFest's price increase on the prize sign Beach_SquidFest_PriceSignIncrease Entirely dehardcoded
Most existing hard-coded patches have not been moved over to the new system yet, but more will be added over time.

Trigger action changes

Added new trigger actions:

action effect
AddHealth <amount> Heals the local player by <amount> and plays the appropriate sound effect.
IncreaseBackpackSize <amount> Increase the backpack size of the local player by <amount>.
HoldUpItem <itemId> [message] Start animation to hold up the specified item above the player's head. If [|message] is specified, it will show that message as well.
MultiplayerGlobalMessage <translationKey> [arg1] [arg2] [arg3]... Show a global chat message in multiplayer. The translation key needs to exist in Strings/UI and must be prefixed with Chat_ within that file (meaning you would use "SomeMessage" in MultiplayerGlobalMessage and "Chat_SomeMessage" in Strings/UI). Any additional arguments after the translation key (which are parsed as tokenizable strings) will be used as substitution values using the normal notation. (ex. MultiplayerGlobalMessage "SomeMessage" "meow" "kitty cat" and "Chat_SomeMessage": "{1} goes {0}" would result in the message "kitty cat goes meow")
SetVariable <variableStoreId> <name> <value> Sets the value of the variable <name> in the <variableStoreId> store to <value>, if that variable store is writable. (For more on variables, see the relevant section in tokenizable string changes on this page.)
RemoveVariable <variableStoreId> <name> Removes the variable <name> in the <variableStoreId> store, if that variable store is writable. (For more on variables, see the relevant section in tokenizable string changes on this page.)

Tokenizable string changes

Usable in more places

Tokenizable strings are now usable in more places.

  • Game state queries
  • Trigger actions (for If, token evaluation is delayed until which value to use is checked)
  • Event commands
    • Tokens in quotes (ex. a message "[LocalizedText Strings/Events:MeowKitty]" command) will be evaluated when that command is run
    • Any token not in quotes (ex. how wedding events have [ContextualWeddingCelebrations] to inject dynamically-constructed commands based on the attendees) will be evaluated when that the event is started.
    • setSkipActions delays token evaluation until the actions are actually run, meaning any changes that occur during the event but before the player has actually pressed "skip" will be reflected in the variables used here)

Tokens are evaluated immediately, unless otherwise specified.

New tokens

The following tokens have been added:

token format output
InputArgument <argumentName> Tokenizable strings can now accept input arguments, depending on where they were called. If the input argument <argumentName> does not exist, then token evaluation fails.

Token expressions

Additionally, a new type of tokens now exists (called "expressions"), which are only usable in certain contexts. If one of these tokens is used in a place where it is not allowed, it will fail and say the token was not found. The places where expressions tokens are usable are:

  • Game state queries
  • Trigger actions
  • A few specific event commands:
    • action
    • goto, specifically for the label(s)
    • setSkipActions
token format output
Math Integer <expression>

Math Decimal <expression>

Calculates the given expression as math, using either integers (when Integer is specified) or floating point numbers (when Decimal is specified).
  • For example, [Math Integer 3 / 2] will result in 1, while [Math Decimal 3 / 2] will result in 1.5. This is because with Integer specified, each operation will remove everything after the decimal point before proceeding.
  • Valid operators include, in order of precedence:
    • Parenthesis (meaning "(" and ")") can be used to group parts of the epxression to be processed first, similar to how one would expect in a real math expression.
    • * (multiplication), / (division), and % (modulus)
    • + (addition) and - (subtraction)
Comparison <expression> Evaluates the given expression, resulting in TRUE if the expression is true, and FALSE otherwise.
  • The expression can compare numbers (whether integer or decimal), or strings.
  • Valid operators include, in order of precedence:
    • Parenthesis (meaning "(" and ")") can be used to group parts of the expression to be processed first, similar to how one would expect in a real math expression.
    • ! - negation, meaning [Comparison !TRUE] becomes FALSE, [Comparison !FALSE] becomes TRUE, and something like [Comparison !(3 >= 5)] becomes TRUE
    • < (less than), <= (less than or equal to), ≶ (greater than), >= (greater than or equal to)
    • == (equal to) and != (not equal to)
    • && ("and"), meaning [Comparison 2 > 1 && 3 == 3] becomes FALSE
    • || ("or"), meaning [Comparison 2 > 1 || 3 == 3] becomes TRUE
    • (For those who know what "logical comparison short circuiting" is, please be aware that that is currently not implemented.)
If <condition> <trueValue> [falseValue] If <condition> evalautes to TRUE, then <trueValue> is evaluated and returned. If <condition> evalutes to FALSE, then [falseValue] is evaluated and returned (if it was specified - otherwise, nothing is returned).
GameStateQuery <gsq> Evaluates the given game state query, allowing GSQ usage inside [If].
VariableExists <variableStore> <variableName> Evaluates to TRUE if <variableStore> has a variable named <variableName>, and FALSE otherwise. (For more on variable stores, see later section.)
GetVariable <variableStore> <variableName> Evaluates to the value of <variableName> in the variable store <variableStore>. If the variable does not exist, evaluation of the tokenizable string will fail. (For more on variable stores, see later section.)
GetVariableWithDefault <variableStore> <variableName> <defaultValue> Evaluates to the value of <variableName> in the variable store <variableStore>. If the variable does not exist, <defaultValue> will be returned instead. (For more on variable stores, see later section.)

Variable stores

Variables stores are a set of named variables stored in a particular location. The current available locations used as variable stores are:

variable store ID description
Global A variable store attached to the save itself.
  • Any player can read and write from this.
  • This variable store will be saved into the save file at the end of the day.
Player/<playerSpecifier> A variable store attached to a particular player.
  • <playerSpecifier> uses the same format as game state query target players, except specifiers that work for check multiple players (such as Any or All) may not be used.
  • Any player can read from this, however only the owning player can write to their variable store.
  • If a player is disconnected, their variables are saved, and will be resynced when they reconnect.
  • This variable store will be saved into the save file at the end of the day.
Local A variable store attached to a "calling context". Generally, this means it will always be reset between uses unless specifically kept, such as in the following contexts:
  • Events - A variable set in the Local variable store using the action event command will be usable later during that event.
  • Data/TriggerActions - When a trigger action has multiple actions to run, all actions will be using the same Local variable store, meaning earlier trigger actions can save data for use by later trigger actions in the same sequence.

Debug command changes

This only details some debug command changes - mainly, ones that might be useful for mod authors.

command changes
/tokens A new required parameter has been introduced as the first argument, <type>. If <type> is Text the string will be evaluated using non-expression tokens. If <type> is Expression, expression tokens will be allowed as well.
/runmacro Commented lines are now allowed - if -- is the beginning of a line, it will be ignored.
/debugaction (new) A new command for trying out tokenizable string input arguments, tokenizable string local variables, and trigger actions using them. This command maintains its own set of input arguments and a local variable store, which can be manipulated using the subcommands.
subcommand effect
/debugaction argument <name> <value> Sets the input argument <name> to <value>, which can be later used in /debugaction run and /debugaction evaluate.
/debugaction evaluate <expression> Evaluates <expression> as a tokenizable string, using input arguments and local variables previously set from this command.
/debugaction run <action> Runs <action> as a trigger action, using input arguments and local variables previously set from this command.
/debugaction clear Clears all previously set input arguments and local variables for /debugaction.

Some examples of using this command alongside /runmacro, at least at the time of writing, can be found here: https://gist.github.com/spacechase0/3ca7b2e195619a17ef9039c894cc60e4

/enchant <enchantmentId> [level] (new) Enchant the currently held item with the <enchantmentId> enchantment at level [level] (or 1 if not specified).

Changes for C# mod authors

DialogueKeyValidator

The new DialogueKeyValidator class analyses dialogue entries to detect dialogue keys which don't match one of the predefined patterns.

This is mainly meant to implement unit tests. For example, to validate all dialogue keys in a data asset:

string assetName = "Characters/Dialogues/Abigail";
var dialogues = Game1.content.Load<Dictionary<string, string>>(assetName);

var validator = new DialogueKeyValidator();
foreach ((string key, string dialogue) in dialogues)
{
    if (!validator.IsKnownFormat(assetName, key))
        Assert.Fail($"Validation failed for dialogue '{key}': key doesn't match one of the expected patterns.");
}

You can optionally extend the valid patterns by setting validator fields like MarriageDialogueKeyPatterns.

Monster changes

  • The monster data has been overhauled.
  • The new monster.Tags field contains a set of metadata tags about the monster which can be checked in Data/Monsters. It's safe to add new tags to the list for existing monster types.
  • The former monster.objectsToDrop field (a list of string object IDs) has been replaced by monster.drops (an item inventory).
  • Removed monster.getExtraDropItems(). Drops should be added in Data/Monsters instead.

Recipe changes

As part of the change for recipes using data models, Farmer.recipesCooked and Farmer.cookedRecipe(itemId) now use qualified item IDs instead of unqualified object item IDs.

SpecialItem deprecation

SpecialItem is now deprecated, and is only kept for save compatibility. All existing uses of it have been migrated to use Object instead, with the following new objects being available:

  • (O)BackpackUpgrade1
  • (O)BackpackUpgrade2
  • (O)ClubCard
  • (O)SpecialCharm
  • (O)SkullKey
  • (O)MagnifyingGlass
  • (O)DarkTalisman
  • (O)MagicInk

Tokenizable string changes

Tokenizable string parsing and evaluation has been separated into two separate stages. As a result, several places that use them now cache the parsed version (which is called ParsedStringSegment).

Any custom trigger actions, tokenizable string tokens, or event commands that want to delay tokenizable string evaluation so they can handle it themself (such as for only evaluating portions that should be used based on a condition) can attach the [DelayArgumentTokenEvaluation] attribute to their handler method. This will prevent the arguments from being evaluated before they reach your handler. (However, the handlers themselves currently still use string[] as their arguments, so this could be slightly off depending on how quotes were used.)

TokenParser.ParseText(string text, Random random, TokenParserDelegate customParser, Farmer player) is now deprecated, and TokenParser.EvaluateText(string text, TokenParserContext context) should be used instead.

Tool changes

The following were added to Tool:

member effect
virtual bool DrawEvenWhenNotUsing If true, Game1.drawTool (and therefore Tool.draw) will be called even if the Farmer.UsingTool is false. Default false.
virtual bool DrawNormalToolFrames If false, Game1.drawTool will not draw the normal "swinging" tool frames. Default true.
virtual bool DoAction(GameLocation location, Farmer who) Called when the player does a right click rather than a left click. Return true if the tool is doing something, and false otherwise.

Netfield changes

The following changes must now all be registered with ProtocolSummary before usage:

  • Additional net fields
  • Additional net types
  • Subclasses of any synced type

If this is not done, an exception will be thrown when adding netfields, or setting values of unknown types.

Instead of manually registering with ProtocolSummary or manually adding net fields using a harmony patch, everything should be registered through a new SMAPI API (coming soon) which will handle these details for you. This will ensure that if mods load in a different order on one player's computer compared to other connected players, it will not break anything.

If a farmhand's ProtocolSummary does not match the host's, they will get a protocol mismatch error upon connecting (rather than "No cabins available", or other obscure and unclear issues).

C# Event changes

C# mods can add new actor state to work with the new SaveActorState/etc. commands (previously documented in event changes above).

On Event there exists a new static function, RegisterActorStateType, which accepts the name of the new actor state type (which you should namespace with your mod ID, ex. spacechase0.SpaceCore/SomeCustomActorState), a delegate for saving the state, and a delegate for loading the state. Each delegate receives the Event instance, the relevant actor (which could be an NPC or a Farmer), and a delegate for performing the save and load to the proper place.

Enchantment changes

Besides the data-driven changes mentioned previously, Enchantments can now theoretically be put on non-Tools more easily. Most of the enchantment code has been moved from Tool to Item, and relevant functions accepting instances of the former now accept the latter. Item itself does not store enchantments though, so a custom type that supports enchantments will need to implement a virtual property so that they are properly stored.

There are also new hooks for enchantments to run: before/after taking damage, entering/leaving a location, and an update each tick.

Other breaking API changes

(This section is meant as a quick reference if you have build errors; there's no need to read through it otherwise.)

Removed or renamed types

These classes renamed in 1.7:

type migration
BaseEnchantment Renamed to Enchantment.
AxeEnchantment
BaseWeaponEnchantment
FishingRodEnchantment
HoeEnchantment
MilkPailEnchantment
PanEnchantment
PickaxeEnchantment
ShearsEnchantment
WateringCanEnchantment
Obsolete. Enchantments now target tools via data instead.

Other API changes

These class members changed in 1.7:

type member migration
BaseEnchantment
(and its subclasses)
hideEnchantmentName Replaced by EnchantmentManager.HideEnchantmentName.
hideSecondaryEnchantName Replaced by EnchantmentManager.HideSecondaryEnchantName.
GetEnchantmentFromItem(…) Replaced by EnchantmentManager.GetEnchantmentFromItem.
GetAvailableEnchantments() Removed.
  • To check whether any enchantments can be applied to a tool through the forge, use EnchantmentManager.CanForgeEnchant.
  • There's no directly equivalent method in 1.7, but you can mimic the former logic if needed.
    static List<Enchantment> GetAvailableEnchantments()
    {
        var dataAsset = DataLoader.Enchantments(Game1.content);
    
        List<Enchantment> enchantments = [];
        foreach ((string id, EnchantmentData data) in dataAsset)
        {
            if (data.ForgeWith == Object.prismaticShardQID)
                enchantments.Add(EnchantmentManager.CreateEnchantment(dataAsset, id));
        }
    
        return enchantments;
    }
    
GetAvailableEnchantmentsForItem(…) Removed.
  • To check whether any enchantments can be applied to a tool through the forge, use EnchantmentManager.CanForgeEnchant.
  • There's no directly equivalent method in 1.7, but you can mimic the former logic if needed.
    static List<Enchantment> GetAvailableEnchantmentsForItem(Item? tool, Item? item)
    {
        var dataAsset = DataLoader.Enchantments(Game1.content);
        var contextTags = tool?.GetContextTags();
    
        List<Enchantment> enchantments = [];
        foreach ((string id, EnchantmentData data) in dataAsset)
        {
            if (data.ForgeWith == Object.prismaticShardQID && (contextTags is null || EnchantmentManager.MatchesTags(contextTags, data.AppliesTo)))
                enchantments.Add(EnchantmentManager.CreateEnchantment(dataAsset, id));
        }
    
        return enchantments;
    }
    
GetName() Removed. This inconsistently returned an ID, a display name, or "Unknown Enchantment" depending on the enchantment type. Use the new Id property or the pre-existing GetDisplayName() method instead.
GetLevel() Removed. Use Level instead.
GetType() This was sometimes to identify enchantments (like enchantment.GetType() == expectedEnchantment.GetType()). That's no longer reliable, since 1.7 introduces data-based enchantments which may not have their own C# type. You should use the new enchantment.Id property instead.
ResetEnchantments() Removed. This is no longer needed since it no longer has a cached list of enchantment instances.
Furniture armchair
bed
bench
bookcase
chair
couch
decor
dresser
fireplace
lamp
longTable
other
painting
rug
sconce
table
torch
window
Removed. Replaced by the FurnitureType enum (e.g. Furniture.rug is now FurnitureType.Rug).
placementRestrictions Removed. Replaced by CanPlaceIndoors and CanPlaceOutdoors.
GreenSlime prismatic Removed. Replaced by IsPrismatic, which is just a wrapper around the monster tags field.
Monster getExtraDropItems() Removed. Drops should be added to Data/Monsters instead.

Harmony patches which can't be moved into data can target Monster.RollForDrops instead.

objectsToDrop Removed. Replaced by drops; see monster changes and Data/Monsters.
Tool GetEnchantmentLevel<T>()
GetEnchantmentOfType<T>()
hasEnchantmentOfType<T>()
Removed. Replaced by GetEnchantmentLevel(id), GetEnchantment(id), and HasEnchantment(id) respectively. All vanilla enchantments have a constant for the ID like EnchantmentIds.GalaxySoul.
Tool

ClearEnchantments()
GetMaxForges()
CanAddEnchantment(…)
CopyEnchantments(…)
GetTotalForgeLevels(…)
AddEnchantment(…)
RemoveEnchantment(…)
CanForge(…)
HasEnchantment(…)
GetEnchantment(…)
GetEnchantmentLevel(…)
Forge(…)

Removed. Enchantment functions have been moved to Item to make it easier for non-Tools to support enchantments.

NOTE: Tool is still the only type that can actually hold enchantments, since nothing else has the appropriate fields to hold them.

Tool drawTooltip<T>(…)
getExtraSpaceNeededForTooltipSpecialIcons<T>(…)
getDescriptionWidth<T>()
AddEquipmentEffects<T>()
Removed. These were only overrides of Item functions that only handled enchantments, which is now handled in Item itself.
AnimatedSprite Clone No longer virtual. It now uses a similar model that `Item` does, with a virtual `CloneNew` for creating the instance and a virtual `CloneInto` for populating it.
FarmerSprite Clone Now returns a properly cloned FarmerSprite, rather than a semi-broken AnimatedSprite based on itself.
Farmer takeDamage<T>(…) The last argument has been changed from Monster to object, to support the ability to detect damage from non-Monster sources. An example of this is BasicProjectile, which previously passed in null for that parameter.
Ring

onNewLocation(…)
onLeaveLocation(…)

These are now overrides of a function on Item. All equipped items will now have this function called.
Ring

update(…)

This now a function called updateWhenEquipped, and is an override of the same virtual function in Item. All equipped items will have this function called.
GameLocation getFish(…) A new non-optional parameter has been added: out Action onCatch.

Implementations of this method should no longer make changes to the world and instead be purely predictive. Any actual changes (ex. fish ponds changing how many fish it has, ginger island locations marking a golden walnut as collected, ...) should be within onCatch, which will be called when the item is successfully reeled in.

Name translation changes for wiki maintainers

Some in-game item and monster names were retranslated in some languages for clarity or correctness.

This list is mostly provided to help wiki maintainers update pages, so it doesn't include names which only changed capitalization, changed ' (straight apostrophe) to ’ (curly) in French, or aren't visible to vanilla players (like mine rocks).

None yet.

XNB impact

Overview

This section provides a summary of the XNB files which changed in Stardew Valley 1.7. This doesn't include new files (since they won't impact existing mods) or text changes in non-English files.

XNB mods are disproportionately affected, since...

  1. they replace the entire file;
  2. they're loaded through the MonoGame content pipeline which is less tolerant of format changes;
  3. they don't benefit from the compatibility rewrites Content Patcher provides for its content packs.

Content Patcher packs are typically unaffected (and Content Patcher will try to rewrite content packs automatically). However if a content pack replaces an entire asset instead of editing, it's more likely to be affected like an XNB mod.

Changed assets

Compatibility is broadly grouped into four categories:

  • "✘ broken": mods will remove new content or significant changes, or the mod's intended changes will no longer work. Effects may range from display bugs to crashes, depending how the game uses that specific content.
  • "✘ will remove changes": mods will remove minor changes in 1.7 (e.g. typo fixes).
  • "✓ mostly unaffected": mods will only be affected if they edit specific entries or fields.
  • Blank: no expected impact for the vast majority of mods.
content asset changes in 1.7 compatibility for pre-1.7 mods
XNB mods Content Patcher packs
Characters/Dialogue/Abigail ✘ broken ✓ mostly unaffected
Characters/Dialogue/Alex
Characters/Dialogue/Clint
Merged resort dialogue keys. ✘ broken ✓ mostly unaffected
Characters/Dialogue/Dwarf Fixed invalid dialogue keys. ✘ broken ✓ mostly unaffected
Characters/Dialogue/Elliott ✘ broken ✓ mostly unaffected
Characters/Dialogue/Evelyn Fixed invalid dialogue key. ✘ broken ✓ mostly unaffected
Characters/Dialogue/Haley Merged resort dialogue keys. ✘ broken ✓ mostly unaffected
Characters/Dialogue/Harvey Fixed invalid dialogue key. ✘ broken ✓ mostly unaffected
Characters/Dialogue/Jodi Fixed invalid dialogue key. ✘ broken ✓ mostly unaffected
Characters/Dialogue/Leah Merged resort dialogue keys. ✘ broken ✓ mostly unaffected
Characters/Dialogue/Lewis Fixed invalid dialogue key. ✘ broken ✓ mostly unaffected
Characters/Dialogue/MarriageDialogue
Characters/Dialogue/MarriageDialogue*
✘ broken ✓ mostly unaffected
Characters/Dialogue/Maru
Characters/Dialogue/Penny
Characters/Dialogue/Sam
Merged resort dialogue keys. ✘ broken ✓ mostly unaffected
Characters/Dialogue/Sebastian ✘ broken ✓ mostly unaffected
Data/Boots Overhauled format. ✘ broken ✘ broken
(until Content Patcher adds runtime migrations)
Data/Buffs Added new data field to data model. ✘ broken
Data/Buildings
Data/Characters
Added new item spawn field. ✘ broken
Data/FishPondData
Data/FruitTrees
Added new item spawn field. ✘ broken
Data/Furniture Overhauled format. ✘ broken ✘ broken
(until Content Patcher adds runtime migrations)
Data/GarbageCans
Data/GiantCrops
Added new item spawn field. ✘ broken
Data/Hats Overhauled format. ✘ broken ✘ broken
(until Content Patcher adds runtime migrations)
Data/Locations Added new item spawn field. ✘ broken
Data/Machines Added new item spawn field. ✘ broken
Data/Monsters Overhauled format. ✘ broken ✘ broken
(until Content Patcher adds runtime migrations)
Data/Movies Added new item spawn field. ✘ broken
Data/Objects ✘ broken ✓ mostly unaffected
Data/Pets
Data/Shops
Added new item spawn field. ✘ broken
Data/Weapons ✘ broken ✓ mostly unaffected
Data/WildTrees Added new item spawn field. ✘ broken
Strings/1_6_Strings Moved some translations into Strings/EnchanmentNames and Strings/Furniture.
Strings/EnchantmentNames
  • Added translations moved from Strings/1_6_Strings.
  • Renamed two keys (Auto-Hook → <samp.AutoHook, Bug Killer → BugKiller).
✘ broken ✓ mostly unaffected
Strings/Furniture Added translations for catalogue descriptions (moved from Strings/1_6_Strings). ✘ broken
Strings/Objects Moved catalogue descriptions into Strings/Furniture. ✓ mostly unaffected ✓ mostly unaffected
Strings/UI Merged some fish pond translation keys. ✘ broken ✓ mostly unaffected

Removed or moved translation keys

These translation keys were moved or removed in 1.6.16. (For changes to the content, see changed assets above.)

asset key changes
Strings/Locations SeedShop_BuyBackpack_ResponseNo Key renamed to GenericPurchase_Decline.