Modding:Migrate to Stardew Valley 1.4
This page describes the upcoming Stardew Valley 1.4, and may change before release.
Some text is redacted because it spoils content that hasn't been publicly announced yet.
This page is for modders. Players: see Modding:Mod compatibility instead.
This page explains how to update your mods for compatibility with Stardew Valley 1.4, which will release in May/June 2019. See also Modding:Migrate to SMAPI 3.0.
SMAPI
Possible breaking changes
Notable changes which may break SMAPI mods:
- Various method signatures have changed, notably Item.canStackWith. In most cases just recompiling with fix those. (Don't forget to update the manifest.json version!)
- Some notable field/method changes:
class field/method changes Farm shippingBin This field no longer exists. Use farm.getShippingBin(Game1.player) instead, which will return the global or personal shipping bin depending on the host settings. Farm shipItem(Item item) Removed; add directly to farm.getShippingBin(Game1.player) instead. Farmer money Replaced by Money, which handles shared/individual wallets for you. Game1 itemsToShip Removed; see farm.getShippingBin(Game1.player) or Game1.player.displayedShippedItems instead. Game1 getCharacterFromName(string name, bool mustBeVillager) The default for mustBeVillager changed from false to true, and added an overload to get a specific NPC type like Game1.getCharacterFromName<Pet>("petName", mustBeVillager: false). Game1 dailyLuck Use Game1.player.DailyLuck or Game1.player.team.sharedDailyLuck as appropriate instead. Item getStack No longer exists; use Item.Stack instead. Item addToStack Now takes an Item reference instead of stack count, but otherwise equivalent (i.e. it returns the remaining stack count but doesn't change the item passed in). Pet wasPetToday Replaced by lastPetDay, which is the Game1.Date.TotalDays value when it was last pet by each player. To check if any player pet them today: private bool WasPetToday(Pet pet) { NetLongDictionary<int, NetInt> lastPettedDays = ModEntry.ReflectionHelper.GetField<NetLongDictionary<int, NetInt>>(pet, "lastPetDay").GetValue(); return lastPettedDays.Values.Any(day => day == Game1.Date.TotalDays); }
To check if the current player pet them today:
private bool WasPetTodayByCurrentPlayer(Pet pet) { NetLongDictionary<int, NetInt> lastPettedDays = ModEntry.ReflectionHelper.GetField<NetLongDictionary<int, NetInt>>(pet, "lastPetDay").GetValue(); return lastPettedDays.TryGetValue(Game1.player.UniqueMultiplayerID, out int lastDay) && lastDay == Game1.Date.TotalDays; }
Other notable changes
These are changes which might be of interest to modders, but shouldn't break any mods.
- See Modding wishlist#Done in Stardew Valley 1.4.
- Added ██████████.
- Added ██████████.
- Added a GameLocation method to patch the location's map from another map file, and a method to force reload the map.
- Added audio context to methods like Game1.changeMusicTrack. If the context changes, any audio playing for the current context will end automatically.
- Added light context (similar to previous).
- Added two new stats to Game1.stats: exMemoriesWiped and childrednTurnedToDoves.
- Added debug commands: addQuartz, addhour, addminute, allMailRead, animationPreviewTool/apt, broadcastMail, buff + clearBuffs, changeWallet + mergeWallets + separateWallets, clear, ██████████, collectquest, ██████████, createDebris, ██████████, ██████████, ██████████ / ██████████, festival, frameByFrame / fbf, growWildTrees, inputSim / inputsim / is, ██████████ / ██████████, ██████████, ██████████, junimogoodbye, ██████████, ██████████, <t>pauseTime, ██████████ / ██████████, sleep / newDay / nd, ██████████, ██████████ / ██████████, testWordWrap, trashCan, and warpToCharacter / wtc. Removed emote and fillWithPlacedObject.
- Added option for invisible NPCs gone from the game temporarily (NPC.IsInvisible and NPC.daysUntilNotInvisible).
- Added option for temporarily invisible/passable placed items (Object.isTemporarilyInvisible).
- Added farmer.isUnclaimedFarmhand to distinguish a farmhand that hasn't been customised by a player yet.
- Added kent option for the $d dialogue command.
- Added %endearment and %endearmentlower dialogue tokens which returns a random choice from Pookie, Love, Hot Stuff, Cuddlebug, Hunky (male) or Peach (female), Cutie, Ducky, Handsome (male) or Darling (female), Sweetie, Dear, Honey, Hun, Sweetheart, or the player name.
- Projectiles can now have a max travel distance.
Content Patcher
Possible breaking changes
Notable changes which may break Content Patcher packs (and XNB mods):
- The DivorceBook and MayorFridge tile actions now only work in Lewis' house.
Other notable changes
These are changes which might be of interest to modders, but shouldn't break any mods.
- The display name field is now used in English for the Data/BigCraftablesInformation and Data/ObjectInformation assets.
- Added various tilesheets for new content.
- Added ██████████.
- Added an animation preview tool. This lets you preview player animations for your current character, optionally changing the hair/shirt/pants/gender. You can access it by entering debug animationPreviewTool or debug apt in the SMAPI console.
- Added ██████████.
- Added schedule commands: MAIL, no_schedule.
- Event command changes:
- Added commands: bgColor, ██████████, makeInvisible, ██████████, ██████████, money, ██████████ ██████████, ██████████. Added new event reward ██████████.
- itemAboveHead now also accepts ██████████ and ██████████ arguments argument.
- ██████████.
Update impact
Here's a summary of the XNB files which changed in Stardew Valley 1.4.
Notes:
- This ignores text changes in non-English files for simplicity.
- New content files aren't listed, since they won't impact existing mods.
- XNB mods are disproportionately affected, since they replace the entire file. Content Patcher packs are typically unaffected unless they replace the entire file (in which case see the XNB mod column).
- I don't know what changed in affected map files (if anything), only that the files are different.
Shorthand:
- 'broken' means removing new content or potentially important changes, or potentially causing significant display bugs. This is a broad category — the game may work fine without it or crash, depending how it uses that specific content.
- 'mostly unaffected' means mods will only be affected if they edit specific entries or fields.
- Blank means zero expected impact.
content file | changes | XNB | Content Patcher |
---|---|---|---|
Buildings/Log Cabin | ██████████ | ✘ broken | ✘ likely broken |
Buildings/Plank Cabin | ██████████ | ✘ broken | ✘ likely broken |
Buildings/Stone Cabin | ██████████ | ✘ broken | ✘ likely broken |
Characters/Abigail | ██████████ | ✘ broken | ✓ mostly unaffected |
Characters/Caroline | ██████████ | ✘ broken | ✓ mostly unaffected |
Characters/Dwarf | ██████████ | ✘ broken | ✓ mostly unaffected |
Characters/Elliott | ██████████ | ✘ broken | ✓ mostly unaffected |
Characters/Evelyn | ██████████ | ✘ broken | |
Characters/George | ██████████ | ✘ broken | ✓ mostly unaffected |
Characters/Gus | ██████████ | ✘ broken | ✓ mostly unaffected |
Characters/Harvey | ██████████ | ✘ broken | ✓ mostly unaffected |
Characters/Kent | ██████████ | ✘ broken | ✓ mostly unaffected |
Characters/Krobus | ██████████ | ✘ broken | ✓ mostly unaffected |
Characters/Leah | ██████████ | ✘ broken | |
Characters/Lewis | ██████████ | ✘ broken | |
Characters/Marnie | ██████████ | ✘ broken | |
Characters/Maru | ██████████ | ✘ broken | ✓ mostly unaffected |
Characters/Pam | ██████████ | ✘ broken | ✓ mostly unaffected |
Characters/Sam | ██████████ | ✘ broken | ✓ mostly unaffected |
Characters/Sandy | ██████████ | ✘ broken | |
Characters/Sebastian | ██████████ | ✘ broken | ✓ mostly unaffected |
Characters/Shane | ██████████ | ✘ will remove changes | ✓ mostly unaffected |
Characters/Wizard | ██████████ | ✘ will remove changes | ✓ mostly unaffected |
Characters/Dialogue/Abigail | ██████████ | ✘ will remove changes | ✓ mostly unaffected |
Characters/Dialogue/Elliott | ██████████ | ✘ broken | ✓ mostly unaffected |
Characters/Dialogue/Jodi | ██████████ | ✘ broken | ✓ mostly unaffected |
Characters/Dialogue/Krobus | ██████████ | ✘ broken | |
Characters/Dialogue/Krobus | ██████████ | ✘ broken | |
Characters/Dialogue/Linus | ██████████ | ✘ will remove changes | ✓ mostly unaffected |
Characters/Dialogue/MarriageDialogue | ██████████ | ✘ broken | ✓ mostly unaffected |
Characters/Dialogue/MarriageDialogueAlex | ██████████ | ✘ will remove changes | ✓ mostly unaffected |
Characters/Dialogue/MarriageDialogueSam | ██████████ | ✘ will remove changes | ✓ mostly unaffected |
Characters/Dialogue/Pierre | ██████████ | ✘ will remove changes | ✓ mostly unaffected |
Characters/Dialogue/Sam | ██████████ | ✘ will remove changes | ✓ mostly unaffected |
Characters/Dialogue/Sebastian | ██████████ | ✘ will remove changes | ✓ mostly unaffected |
Characters/Dialogue/Sebastian | ██████████ | ✘ will remove changes | ✓ mostly unaffected |
Characters/Farmer/farmer_base | ██████████ | ✘ broken | ✘ broken |
Characters/Farmer/farmer_girl_base | ██████████ | ✘ broken | ✘ broken |
Characters/Farmer/hairstyles | ██████████ | ✘ broken | |
Characters/Farmer/hats | ██████████ | ✘ broken | ✓ mostly unaffected |
Characters/Farmer/shirts | ██████████ | ✘ broken | ✓ mostly unaffected |
Characters/Farmer/shoeColors | ██████████ | ✘ broken | |
Characters/schedules/Alex | ██████████ | ✘ broken | |
Characters/schedules/Alex | ██████████ | ✘ broken | ✓ mostly unaffected |
Characters/schedules/Gus | ██████████ | ✘ broken | |
Characters/schedules/Kent | ██████████ | ✘ broken | ✓ mostly unaffected |
Characters/schedules/Shane | ██████████ | ✘ broken | ✘ likely broken |
Characters/schedules/beforePathfinding/* Characters/schedules/newSchedules/* Characters/schedules/spring/* |
deleted | ||
Data/BigCraftablesInformation | ██████████ | ✘ broken | ✘ broken |
Data/Blueprints | ██████████ | ✘ broken | ✓ mostly unaffected |
Data/Boots | ██████████ | ✘ broken | |
Data/Bundles | ██████████ | ✘ broken | |
Data/CookingRecipes | ██████████ | ✘ will remove changes | ✓ mostly unaffected |
Data/CraftingRecipes | ██████████ | ✘ broken | ✓ mostly unaffected |
Data/EngagementDialogue | ██████████ | ✘ broken | |
Data/eventConditions | deleted | ||
Data/ExtraDialogue | ██████████ | ✘ broken | |
Data/Furniture | ██████████ | ✘ broken | ✓ mostly unaffected |
Data/fruitTrees | deleted | ||
Data/hats | ██████████ | ✘ broken | |
Data/Locations | ██████████ | ✘ will remove changes | ✓ mostly unaffected |
Data/mail | ██████████ | ✘ broken | ✘ broken |
Data/MineRooms | deleted | ||
Data/monsters | ██████████ | ✘ broken | |
Data/NPCDispositions | ██████████ | ✘ broken | ✓ mostly unaffected |
Data/ObjectInformation | ██████████ | ✘ broken | ✓ mostly unaffected |
Data/Quests | ██████████ | ✘ broken | |
Data/SecretNotes | ██████████ | ✘ broken | |
Data/weapons | ██████████ | ✘ will remove changes | ✓ mostly unaffected |
Data/Events/BusStop | ██████████ | ✘ will remove changes | ✓ mostly unaffected |
Data/Events/Farm | ██████████ | ✘ broken | |
Data/Events/FarmHouse | ██████████ | ✘ broken | ✓ mostly unaffected |
Data/Events/Forest | ██████████ | ✘ broken | |
Data/Events/Mountain | ██████████ | ✘ broken | ✓ mostly unaffected |
Data/Events/Railroad | ██████████ | ✘ will remove changes | ✓ mostly unaffected |
Data/Events/Saloon | ██████████ | ✘ broken | ✓ mostly unaffected |
Data/Events/SamHouse | ██████████ | ✘ will remove changes | ✓ mostly unaffected |
Data/Events/SebastianRoom | ██████████ | ✘ will remove changes | ✓ mostly unaffected |
Data/Events/Town | ██████████ | ✘ broken | ✓ mostly unaffected |
Data/Festivals/spring24 | ██████████ | ✘ broken | ✓ mostly unaffected |
Data/TV/CookingChannel | ██████████ | ✘ will remove changes | ✓ mostly unaffected |
Data/TV/TipChannel | ██████████ | ✘ will remove changes | ✓ mostly unaffected |
LooseSprites/birds | ██████████ | ✘ broken | ✘ possibly broken |
LooseSprites/Cursors | ██████████ | ✘ broken | ✘ possibly broken |
LooseSprites/daybg | ██████████ | ✘ will remove changes | ✘ will remove changes |
LooseSprites/JunimoNote | ██████████ | ✘ broken | ✓ mostly unaffected |
LooseSprites/map | ██████████ | ✘ broken | ✓ mostly unaffected |
LooseSprites/nightbg | ██████████ | ✘ will remove changes | ✘ will remove changes |
LooseSprites/temporary_sprites_1 | ██████████ | ✘ broken | ✓ mostly unaffected |
Maps/{season}_town {season}_town |
██████████ | ✘ broken | |
Maps/ArchaeologyHouse | unknown changes | ? | ? |
Maps/Cabin Maps/Cabin1_marriage Maps/Cabin2_marriage |
unknown changes | ? | ? |
Maps/Club | unknown changes | ? | ? |
Maps/CommunityCenter_Joja | unknown changes | ? | ? |
Maps/CommunityCenter_Refurbished | unknown changes | ? | ? |
Maps/CommunityCenter_Ruins | unknown changes | ? | ? |
Maps/ElliottHouseTiles ElliottHouseTiles |
██████████ | ✘ broken | ✘ may remove cosmetic changes |
Maps/Farm | unknown changes | ? | ? |
Maps/Farm_Combat | unknown changes | ? | ? |
Maps/Farm_Fishing | unknown changes | ? | ? |
Maps/Farm_Foraging | unknown changes | ? | ? |
Maps/Farm_Mining | unknown changes | ? | ? |
Maps/FarmHouse Maps/FarmHouse1_marriage Maps/FarmHouse2_marriage |
unknown changes | ? | ? |
Maps/farmhouse_tiles farmhouse_tiles |
██████████ | ✘ broken | ✓ mostly unaffected |
Maps/Forest-FlowerFestival | unknown changes | ? | ? |
Maps/Forest-IceFestival | unknown changes | ? | ? |
Maps/HaleyHouse | unknown changes | ? | ? |
Maps/ManorHouse | unknown changes | ? | ? |
Maps/MenuTiles | ██████████ | ✘ broken | ✓ mostly unaffected |
Maps/MenuTilesUncolored | ██████████ | ✘ will remove changes | ✓ mostly unaffected |
Maps/Mountain | unknown changes | ? | ? |
Maps/nightSceneMaru | ██████████ | ✘ will remove changes | ✓ mostly unaffected |
Maps/Railroad | unknown changes | ? | ? |
Maps/Saloon | unknown changes | ? | ? |
Maps/SeedShop | ██████████ | ✘ broken | ? |
Maps/SewerTiles SewerTiles |
██████████ | ✘ broken | ✓ mostly unaffected |
Maps/Shed | unknown changes | ? | ? |
Maps/spouseRooms | ██████████ | ? | ? |
Maps/springobjects | ██████████ | ✘ broken | ✓ mostly unaffected |
Maps/spring_outdoorsTileSheet spring_outdoorsTileSheet fall_outdoorsTileSheet |
██████████ | ✘ will remove changes | ✓ mostly unaffected |
Maps/Town | unknown changes | ? | ? |
Maps/Town-Fair | ██████████ | ? | ? |
Maps/townInterior townInterior |
██████████ | ✘ broken | ✓ mostly unaffected |
Maps/Mines/19 | unknown changes | ? | ? |
Maps/Mines/26 | unknown changes | ? | ? |
Maps/Mines/28 | unknown changes | ? | ? |
Minigames/MineCart | ██████████ | ✘ broken | ✘ broken |
Portraits/Elliott | ██████████ | ✘ will remove changes | ✓ mostly unaffected |
Portraits/Haley | ██████████ | ✘ will remove changes | ✘ may remove changes |
Portraits/Krobus | ██████████ | ✘ broken | ✓ mostly unaffected |
Portraits/Maru | ██████████ | ✘ will remove changes | ✓ mostly unaffected |
Portraits/Penny | ██████████ | ✘ broken | ✓ mostly unaffected |
Portraits/Sam | ██████████ | ✘ broken | ✘ will remove changes |
Strings/Buildings | ██████████ | ✘ broken | |
Strings/Characters | ██████████ | ✘ broken | |
Strings/Events | ██████████ | ✘ broken | |
Strings/Locations | ██████████ | ✘ broken | |
Strings/Notes | ██████████ | ✘ will remove changes | ✓ mostly unaffected |
Strings/StringsFromCSFiles | ██████████ | ✘ broken | ✓ mostly unaffected |
Strings/StringsFromMaps | ██████████ | ✘ broken | ✓ mostly unaffected |
Strings/UI | ██████████ | ✘ broken | |
Strings/schedules/Alex | ██████████ | ✘ broken | |
Strings/schedules/George | ██████████ | ✘ broken | |
Strings/schedules/Gus | ██████████ | ✘ broken | |
Strings/schedules/Alex | ██████████ | ✘ broken | |
Strings/schedules/Shane | ██████████ | ✘ broken | |
Strings/schedules/spring/Penny | deleted | ||
TerrainFeatures/Flooring | ██████████ | ✓ mostly unaffected | ✓ mostly unaffected |
TerrainFeatures/mushroom_tree | ██████████ | ✘ will remove changes | ✘ may remove changes |
TerrainFeatures/Quartz | ██████████ | ✘ broken | ✘ broken |
TileSheets/bushes | ██████████ | ✘ broken | ✓ mostly unaffected |
TileSheets/Craftables | ██████████ | ✘ broken | ✓ mostly unaffected |
TileSheets/projectiles | ██████████ | ✘ will remove changes | ✓ mostly unaffected |
TileSheets/furniture | ██████████ | ✘ broken | ✘ may remove changes |
TileSheets/tools | ██████████ | ✘ broken | ✓ mostly unaffected |
TileSheets/weapons | ██████████ | ✘ broken? | ✓ mostly unaffected |