Changes

Jump to navigation Jump to search
→‎Custom mail formatting: fix captioning on image
Line 1: Line 1:  
←[[Modding:Index|Index]]
 
←[[Modding:Index|Index]]
   −
{{SMAPI upcoming|3.13.0}}
   
{{Modder compatibility header}}
 
{{Modder compatibility header}}
   Line 22: Line 21:  
     <Version>1.0.0</Version>
 
     <Version>1.0.0</Version>
 
     <TargetFramework>net5.0</TargetFramework>
 
     <TargetFramework>net5.0</TargetFramework>
 +
    <LangVersion>Latest</LangVersion>
 
   </PropertyGroup>
 
   </PropertyGroup>
    
   <ItemGroup>
 
   <ItemGroup>
     <PackageReference Include="Pathoschild.Stardew.ModBuildConfig" Version="3.3.0" />
+
     <PackageReference Include="Pathoschild.Stardew.ModBuildConfig" Version="4.1.1" />
 
   </ItemGroup>
 
   </ItemGroup>
 
</Project>
 
</Project>
Line 33: Line 33:  
<li>Update the <samp>AssemblyName</samp>, <samp>RootNamespace</samp>, and <samp>Version</samp> tags. (You can delete the <samp>AssemblyName</samp> and <samp>RootNamespace</samp> tags if they just match the project name.)</li>
 
<li>Update the <samp>AssemblyName</samp>, <samp>RootNamespace</samp>, and <samp>Version</samp> tags. (You can delete the <samp>AssemblyName</samp> and <samp>RootNamespace</samp> tags if they just match the project name.)</li>
 
<li>Add any other NuGet packages you used, if any.</li>
 
<li>Add any other NuGet packages you used, if any.</li>
<li>Delete the <samp>Properties/AssemblyInfo.cs</samp> file, <samp>packages</samp> folder, and <samp>packages.config</samp> file (if present).</li>
+
</ol>
 +
 
 +
If you're using the simplified format already, you just need to update version numbers in the .csproj file:
 +
<ol>
 +
<li>Replace <code><nowiki><TargetFramework>net452</TargetFramework></nowiki></code> with <code><nowiki><TargetFramework>net5.0</TargetFramework></nowiki></code>.</li>
 +
<li>Replace <code><nowiki><PackageReference Include="Pathoschild.Stardew.ModBuildConfig" Version="3.3.0" /></nowiki></code> with <code><nowiki><PackageReference Include="Pathoschild.Stardew.ModBuildConfig" Version="4.1.1" /></nowiki></code></li>
 
</ol>
 
</ol>
 
</li>
 
</li>
<li>Update the mod build package to the prerelease 4.0.0 version.</li>
+
<li>Delete the <samp>Properties/AssemblyInfo.cs</samp> file, <samp>packages</samp> folder, and <samp>packages.config</samp> file (if present).</li>
 
<li>Exit Visual Studio.</li>
 
<li>Exit Visual Studio.</li>
 
<li>Delete your solution's hidden <samp>.vs</samp> folder, and every project's <samp>bin</samp> and <samp>obj</samp> folders.</li>
 
<li>Delete your solution's hidden <samp>.vs</samp> folder, and every project's <samp>bin</samp> and <samp>obj</samp> folders.</li>
Line 72: Line 77:     
===Game compatibility branch===
 
===Game compatibility branch===
Stardew Valley 1.5.5 is available in two branches on each OS (with identical content for players): the ''main branch'' which is installed by default, and an optional ''compatibility branch'' for [https://www.stardewvalley.net/compatibility older systems]. These have identical content for players, but use different frameworks:
+
{{main article|Modding:Player Guide/Troubleshooting#SMAPI doesn't work with compatibility branch}}
 +
 
 +
Stardew Valley 1.5.5 is available in two branches on each OS: the ''main branch'' which is installed by default, and an optional [https://www.stardewvalley.net/compatibility''compatibility branch'' for older systems]. These have identical content for players, but use different frameworks:
    
{| class="wikitable"
 
{| class="wikitable"
Line 100: Line 107:  
|}
 
|}
   −
Unfortunately '''SMAPI only supports the main branch of the game.''' There are formidable difficulties across all mods in supporting all three variations, 32-bit imposes significant restrictions on what mods can do, and the [https://store.steampowered.com/hwsurvey Steam hardware stats] show that ≈99.69% of players have 64-bit.
+
Unfortunately '''SMAPI only supports the main branch of the game currently.''' There are formidable difficulties across all mods in supporting all three variations, 32-bit imposes significant restrictions on what mods can do, and the [https://store.steampowered.com/hwsurvey Steam hardware stats] show that ≈99.69% of players have 64-bit.
 +
 
 +
Having two versions of SMAPI (like we do for Linux/macOS vs Windows compatibility) wouldn't be enough in this case. Every C# mod author would need to manually port two versions of every update of every mod forever, which is prohibitively unfeasible. It's possible that in the future we'll either figure out how SMAPI can automatically rewrite mods for the compatibility branch, or some modders may port SMAPI and individual mods to the compatibility branch.
    
===Game assembly name===
 
===Game assembly name===
Line 236: Line 245:  
             "Target": "Data/AdditionalFarms",
 
             "Target": "Data/AdditionalFarms",
 
             "Entries": {
 
             "Entries": {
                 "Pathoschild.PineappleFarm/PineappleFarm": { // for technical reasons, you need to specify the ID here *and* in the "ID" field
+
                 "ExampleAuthor.PineappleFarm/PineappleFarm": { // for technical reasons, you need to specify the ID here *and* in the "ID" field
                     "ID": "Pathoschild.PineappleFarm/PineappleFarm",
+
                     "ID": "ExampleAuthor.PineappleFarm/PineappleFarm",
                     "TooltipStringPath": "Strings/UI:Pathoschild_PineappleFarm",
+
                     "TooltipStringPath": "Strings/UI:ExampleAuthor_PineappleFarm",
                     "MapName": "Pathoschild_PineappleFarm",
+
                     "MapName": "ExampleAuthor_PineappleFarm",
                     "IconTexture": "Mods/Pathoschild.PineappleFarm/Icon",
+
                     "IconTexture": "Mods/ExampleAuthor.PineappleFarm/Icon",
                     "WorldMapTexture": "Mods/Pathoschild.PineappleFarm/WorldMap"
+
                     "WorldMapTexture": "Mods/ExampleAuthor.PineappleFarm/WorldMap"
 
                 }
 
                 }
 
             }
 
             }
Line 251: Line 260:  
             "Target": "Strings/UI",
 
             "Target": "Strings/UI",
 
             "Entries": {
 
             "Entries": {
                 "Pathoschild_PineappleFarm": "Pineapple Farm_A farm shaped like a pineapple!" // tip: use <nowiki>{{i18n}}</nowiki> to translate it
+
                 "ExampleAuthor_PineappleFarm": "Pineapple Farm_A farm shaped like a pineapple!" // tip: use <nowiki>{{i18n}}</nowiki> to translate it
 
             }
 
             }
 
         },
 
         },
Line 258: Line 267:  
         {
 
         {
 
             "Action": "Load",
 
             "Action": "Load",
             "Target": "Maps/Pathoschild_PineappleFarm",
+
             "Target": "Maps/ExampleAuthor_PineappleFarm",
 
             "FromFile": "assets/map.tmx"
 
             "FromFile": "assets/map.tmx"
 
         },
 
         },
Line 265: Line 274:  
         {
 
         {
 
             "Action": "Load",
 
             "Action": "Load",
             "Target": "Mods/Pathoschild.PineappleFarm/Icon, Mods/Pathoschild.PineappleFarm/WorldMap",
+
             "Target": "Mods/ExampleAuthor.PineappleFarm/Icon, Mods/ExampleAuthor.PineappleFarm/WorldMap",
 
             "FromFile": "assets/<nowiki>{{TargetWithoutPath}}</nowiki>.png"
 
             "FromFile": "assets/<nowiki>{{TargetWithoutPath}}</nowiki>.png"
 
         }
 
         }
Line 345: Line 354:  
             "Target": "Data/AdditionalLanguages",
 
             "Target": "Data/AdditionalLanguages",
 
             "Entries": {
 
             "Entries": {
                 "Pathoschild.Esperanto": { // for technical reasons, you need to specify the ID here *and* in the "ID" field
+
                 "ExampleAuthor.Esperanto": { // for technical reasons, you need to specify the ID here *and* in the "ID" field
                     "ID": "Pathoschild.Esperanto",
+
                     "ID": "ExampleAuthor.Esperanto",
 
                     "LanguageCode": "eo",
 
                     "LanguageCode": "eo",
                     "ButtonTexture": "Mods/Pathoschild.Esperanto/Button",
+
                     "ButtonTexture": "Mods/ExampleAuthor.Esperanto/Button",
 
                     "UseLatinFont": true,
 
                     "UseLatinFont": true,
 
                     "TimeFormat": "[HOURS_24_00]:[MINUTES]",
 
                     "TimeFormat": "[HOURS_24_00]:[MINUTES]",
Line 360: Line 369:  
         {
 
         {
 
             "Action": "Load",
 
             "Action": "Load",
             "Target": "Mods/Pathoschild.Esperanto/Button",
+
             "Target": "Mods/ExampleAuthor.Esperanto/Button",
 
             "FromFile": "assets/button.png"
 
             "FromFile": "assets/button.png"
 
         }
 
         }
Line 419: Line 428:  
             "Target": "Data/SpouseRooms",
 
             "Target": "Data/SpouseRooms",
 
             "Entries": {
 
             "Entries": {
                 "Akila": "Pathoschild_ExampleAkilaMod_SpouseRoom/0"
+
                 "Akila": "ExampleAuthor_ExampleAkilaMod_SpouseRoom/0"
 
             }
 
             }
 
         },
 
         },
Line 426: Line 435:  
         {
 
         {
 
             "Action": "Load",
 
             "Action": "Load",
             "Target": "Maps/Pathoschild_ExampleAkilaMod_SpouseRoom",
+
             "Target": "Maps/ExampleAuthor_ExampleAkilaMod_SpouseRoom",
 
             "FromFile": "assets/spouse-room.tmx"
 
             "FromFile": "assets/spouse-room.tmx"
 
         }
 
         }
Line 464: Line 473:  
             "Target": "Data/SpousePatios",
 
             "Target": "Data/SpousePatios",
 
             "Entries": {
 
             "Entries": {
                 "Akila": "Pathoschild_ExampleAkilaMod_OutsideArea/0/16 16 16 17 17 17 18 18 18 19 19 19/1 5"
+
                 "Akila": "ExampleAuthor_ExampleAkilaMod_OutsideArea/0/16 16 16 17 17 17 18 18 18 19 19 19/1 5"
 
             }
 
             }
 
         },
 
         },
Line 471: Line 480:  
         {
 
         {
 
             "Action": "Load",
 
             "Action": "Load",
             "Target": "Maps/Pathoschild_ExampleAkilaMod_OutsideArea",
+
             "Target": "Maps/ExampleAuthor_ExampleAkilaMod_OutsideArea",
 
             "FromFile": "assets/outside-area.tmx"
 
             "FromFile": "assets/outside-area.tmx"
 
         }
 
         }
Line 511: Line 520:  
|}
 
|}
   −
For example, this Content Patcher pack would add a renovation to the fully-upgraded farmhouse based on a custom <samp>Pathoschild_PineapplesEverywhere_HasRenovation</samp> flag. Note that <samp>TextOperations</samp> is used to avoid overwriting any renovations added by another mod, and <samp>Pathoschild_PineapplesEverywhere_</samp> is a unique prefix for the hypothetical mod to avoid conflicts with other mods.
+
For example, this Content Patcher pack would add a renovation to the fully-upgraded farmhouse based on a custom <samp>ExampleAuthor_PineapplesEverywhere_HasRenovation</samp> flag. Note that <samp>TextOperations</samp> is used to avoid overwriting any renovations added by another mod, and <samp>ExampleAuthor_PineapplesEverywhere_</samp> is a unique prefix for the hypothetical mod to avoid conflicts with other mods.
 
{{#tag:syntaxhighlight|
 
{{#tag:syntaxhighlight|
 
{
 
{
Line 524: Line 533:  
                     "Operation": "Append",
 
                     "Operation": "Append",
 
                     "Target": [ "MapProperties", "AdditionalRenovations" ],
 
                     "Target": [ "MapProperties", "AdditionalRenovations" ],
                     "Value": "Pathoschild_PineapplesEverywhere_KitchenUpgrade Pathoschild_PineapplesEverywhere_HasRenovation Pathoschild_PineapplesEverywhere_Kitchen Pathoschild_PineapplesEverywhere_Empty 0 19 3 3",
+
                     "Value": "ExampleAuthor_PineapplesEverywhere_KitchenUpgrade ExampleAuthor_PineapplesEverywhere_HasRenovation ExampleAuthor_PineapplesEverywhere_Kitchen ExampleAuthor_PineapplesEverywhere_Empty 0 19 3 3",
 
                     "Delimiter": "," // if there are already renovations, add a comma before this one
 
                     "Delimiter": "," // if there are already renovations, add a comma before this one
 
                 }
 
                 }
Line 533: Line 542:  
         {
 
         {
 
             "Action": "Load",
 
             "Action": "Load",
             "Target": "Maps/Pathoschild_PineapplesEverywhere_Kitchen",
+
             "Target": "Maps/ExampleAuthor_PineapplesEverywhere_Kitchen",
 
             "FromFile": "assets/kitchen-upgrade.tmx"
 
             "FromFile": "assets/kitchen-upgrade.tmx"
 
         },
 
         },
Line 540: Line 549:  
         {
 
         {
 
             "Action": "Load",
 
             "Action": "Load",
             "Target": "Maps/Pathoschild_PineapplesEverywhere_Empty",
+
             "Target": "Maps/ExampleAuthor_PineapplesEverywhere_Empty",
 
             "FromFile": "assets/kitchen-upgrade-empty.tmx"
 
             "FromFile": "assets/kitchen-upgrade-empty.tmx"
 
         }
 
         }
Line 618: Line 627:  
             "Target": "Data/AdditionalWallpaperFlooring",
 
             "Target": "Data/AdditionalWallpaperFlooring",
 
             "Entries": {
 
             "Entries": {
                 "Pathoschild.CustomWallpapers": { // for technical reasons, you need to specify the ID here *and* in the "ID" field
+
                 "ExampleAuthor.CustomWallpapers": { // for technical reasons, you need to specify the ID here *and* in the "ID" field
                     "ID": "Pathoschild.CustomWallpapers",
+
                     "ID": "ExampleAuthor.CustomWallpapers",
                     "Texture": "Mods/Pathoschild.CustomWallpapers/Wallpapers",
+
                     "Texture": "Mods/ExampleAuthor.CustomWallpapers/Wallpapers",
 
                     "IsFlooring": false,
 
                     "IsFlooring": false,
 
                     "Count": 3
 
                     "Count": 3
Line 630: Line 639:  
         {
 
         {
 
             "Action": "Load",
 
             "Action": "Load",
             "Target": "Mods/Pathoschild.CustomWallpapers/Wallpapers",
+
             "Target": "Mods/ExampleAuthor.CustomWallpapers/Wallpapers",
 
             "FromFile": "assets/wallpapers.png"
 
             "FromFile": "assets/wallpapers.png"
 
         }
 
         }
Line 637: Line 646:     
===Map property changes===
 
===Map property changes===
 +
{{main article|Modding:Maps#Known_properties}}
 
Stardew Valley 1.5.5 adds several map properties (in addition to those listed in their own sections):
 
Stardew Valley 1.5.5 adds several map properties (in addition to those listed in their own sections):
   Line 756: Line 766:  
Specifically:
 
Specifically:
 
<ul>
 
<ul>
<li>Items with the "<samp>propose_roommate_{{t|NPC name}}</samp>" [[Modding:Context tags|context tag]] will trigger a roommate proposal when given to the named NPC. The NPC name must be lowercase with underscores instead of spaces (''e.g.,'' <samp>propose_roommate_dwarf</samp>).</li>
+
<li>Items with the "<samp>propose_roommate_{{t|NPC name}}</samp>" [[Modding:Items#Context tags|context tag]] will trigger a roommate proposal when given to the named NPC. The NPC name must be lowercase with underscores instead of spaces (''e.g.,'' <samp>propose_roommate_dwarf</samp>).</li>
 
<li>These [[Modding:Dialogue|dialogue keys]] apply before they move in:
 
<li>These [[Modding:Dialogue|dialogue keys]] apply before they move in:
 
{| class="wikitable"
 
{| class="wikitable"
Line 824: Line 834:  
| <samp>[letterbg {{t|asset name}} {{t|index}}]</samp>
 
| <samp>[letterbg {{t|asset name}} {{t|index}}]</samp>
 
| Changes the default letter background to the given texture. The asset name should match a texture containing two rows: one with 320x180 pixel letter background images, and one with 24x24 pixel button backgrounds shown behind attached items. The index is the sprite to use from those rows, starting at 0 for the first one.
 
| Changes the default letter background to the given texture. The asset name should match a texture containing two rows: one with 320x180 pixel letter background images, and one with 24x24 pixel button backgrounds shown behind attached items. The index is the sprite to use from those rows, starting at 0 for the first one.
 +
Only the first 4 letter background images of a row will be properly displayed.
 +
Only one row of button may exist.
 +
See image below
 
|-
 
|-
 
| <samp>[textcolor {{t|color}}]</samp>
 
| <samp>[textcolor {{t|color}}]</samp>
 
| Changes the letter text color. The valid colors are <samp>black</samp>, <samp>blue</samp>, <samp>cyan</samp>, <samp>gray</samp>, <samp>green</samp>, <samp>orange</samp>, <samp>purple</samp>, <samp>red</samp>, and <samp>white</samp>.
 
| Changes the letter text color. The valid colors are <samp>black</samp>, <samp>blue</samp>, <samp>cyan</samp>, <samp>gray</samp>, <samp>green</samp>, <samp>orange</samp>, <samp>purple</samp>, <samp>red</samp>, and <samp>white</samp>.
 
|}
 
|}
 +
 +
 +
[[File:Lettersbglayers.png|center|thumb|Example : the letters  background images can go on the pale pink, pink and purple spaces, while the buttons can only go on the orange line.]]
    
===Custom scarecrows===
 
===Custom scarecrows===
You can now mark any placeable item as a [[scarecrow]] with two new [[Modding:Context tags|context tags]]:
+
You can now mark any placeable item as a [[scarecrow]] with two new [[Modding:Items#Context tags|context tags]]:
    
{| class="wikitable"
 
{| class="wikitable"
Line 845: Line 861:     
===Improved map seats===
 
===Improved map seats===
 +
{{main article|Modding:Maps#Sitting on non-furniture chairs}}
 +
 
When defining map seats via <samp>Data\ChairTiles</samp> (see [[Modding:Migrate to Stardew Valley 1.5#Sitting on non-furniture chairs|docs in the 1.5 migration guide]]), you can now set the type field to <samp>custom {{t|offset_x}} {{t|offset_y}} {{t|extra_height}}</samp> to override the hardcoded offset and height values in code. The three values are measured in tiles (''e.g.,'' an X offset value of 0.5 would shift the sitting location by half a tile).
 
When defining map seats via <samp>Data\ChairTiles</samp> (see [[Modding:Migrate to Stardew Valley 1.5#Sitting on non-furniture chairs|docs in the 1.5 migration guide]]), you can now set the type field to <samp>custom {{t|offset_x}} {{t|offset_y}} {{t|extra_height}}</samp> to override the hardcoded offset and height values in code. The three values are measured in tiles (''e.g.,'' an X offset value of 0.5 would shift the sitting location by half a tile).
   Line 852: Line 870:  
[[Category:Modding]]
 
[[Category:Modding]]
    +
[[es:Modding:Migrar a Stardew Valley 1.5.5]]
 
[[zh:模组:迁移至游戏本体1.5.5]]
 
[[zh:模组:迁移至游戏本体1.5.5]]

Navigation menu