Difference between revisions of "User:Hatmouse"

From Stardew Valley Wiki
Jump to navigation Jump to search
(comment out page not updated since 2021)
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
<!--
 
← [[Modding:Index|Index]]
 
← [[Modding:Index|Index]]
  
Line 45: Line 46:
  
 
===Map formats===
 
===Map formats===
There are two map formats used in Stardew Valley modding: <tt>.tmx</tt> (from the Tiled map editor) and <tt>.tbin</tt> (from the now-deprecated tIDE map editor). The features supported by both formats are almost identical, but there are a few differences:
+
There are two map formats used in Stardew Valley modding: <samp>.tmx</samp> (from the Tiled map editor) and <samp>.tbin</samp> (from the now-deprecated tIDE map editor). The features supported by both formats are almost identical, but there are a few differences:
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
 
! feature
 
! feature
! <tt>.tmx</tt>
+
! <samp>.tmx</samp>
! <tt>.tbin</tt>
+
! <samp>.tbin</samp>
 
|-
 
|-
 
| format
 
| format
Line 77: Line 78:
 
|}
 
|}
  
<tt>.tmx</tt> is recommended per the above, but both formats are fine to use, and you can convert between them in Tiled by clicking ''File > Export As''.
+
<samp>.tmx</samp> is recommended per the above, but both formats are fine to use, and you can convert between them in Tiled by clicking ''File > Export As''.
  
 
==Getting started==
 
==Getting started==
Line 94: Line 95:
 
<ol>
 
<ol>
 
<li>Install the [http://www.mapeditor.org/ latest version of Tiled].</li>
 
<li>Install the [http://www.mapeditor.org/ latest version of Tiled].</li>
<li>Once installed, at the top left, go to Edit > Preferences > Plugins and enable the tbin plugin (<tt>tbin.dll</tt> on Windows, <tt>libtbin.so</tt> on Linux, or <tt>libtbin.dylib</tt> on Mac).
+
<li>Once installed, at the top left, go to Edit > Preferences > Plugins and enable the tbin plugin (<samp>tbin.dll</samp> on Windows, <samp>libtbin.so</samp> on Linux, or <samp>libtbin.dylib</samp> on Mac).
 
<li>Set the following settings:
 
<li>Set the following settings:
 
{| class="wikitable"
 
{| class="wikitable"
Line 114: Line 115:
 
</ol>
 
</ol>
  
(If you use xnbcli to [[Modding:Editing XNB files#Unpack game files|unpack the original game maps]], you'll need the <tt>.tbin</tt> plugin even if you plan to use <tt>.tmx</tt> since xnbcli still produces <tt>.tbin</tt> files.)
+
(If you use xnbcli to [[Modding:Editing XNB files#Unpack game files|unpack the original game maps]], you'll need the <samp>.tbin</samp> plugin even if you plan to use <samp>.tmx</samp> since xnbcli still produces <samp>.tbin</samp> files.)
  
 
===Tilesets vs Tilesheets===
 
===Tilesets vs Tilesheets===
  
<tt>Tilesheets</tt> are the <tt>.png</tt> files used as source images. Tilesheets have no animation, properties, terrains, or anything else but pixels associated with them -- they're just images. <tt>Tilesets</tt> are Tiled's XML files that contain all the information about how the map uses the source image. They are confusingly named and often used interchangeably.
+
<samp>Tilesheets</samp> are the <samp>.png</samp> files used as source images. Tilesheets have no animation, properties, terrains, or anything else but pixels associated with them -- they're just images. <samp>Tilesets</samp> are Tiled's XML files that contain all the information about how the map uses the source image. They are confusingly named and often used interchangeably.
  
 
==Map edits==
 
==Map edits==
Line 124: Line 125:
 
Important note: when making custom maps, always start with a vanilla map and edit it. Don't try to create a new map in Tiled; the game needs certain tiles, map properties, etc to be present.
 
Important note: when making custom maps, always start with a vanilla map and edit it. Don't try to create a new map in Tiled; the game needs certain tiles, map properties, etc to be present.
  
# [[Modding:Editing XNB files|Unpack]] the game's <tt>Content/Maps</tt> folder and create a copy to edit your maps in.  Use this copy of the folder to edit any maps in before moving them to your mod release folder.
+
# [[Modding:Editing XNB files|Unpack]] the game's <samp>Content/Maps</samp> folder and create a copy to edit your maps in.  Use this copy of the folder to edit any maps in before moving them to your mod release folder.
 
# Use the same method to unpack the map you want to edit if it is not a vanilla one, then place the map in your editing folder.
 
# Use the same method to unpack the map you want to edit if it is not a vanilla one, then place the map in your editing folder.
# Open the <tt>.tbin</tt> or <tt>.tmx</tt> file via Tiled. Note: make sure the file is in the same folder as the unpacked tilesheets!
+
# Open the <samp>.tbin</samp> or <samp>.tmx</samp> file via Tiled. Note: make sure the file is in the same folder as the unpacked tilesheets!
 
# Make your changes.
 
# Make your changes.
# Save the file. Don't use <tt>Save as</tt> to change folders, as your tilesheet paths will be wrong.
+
# Save the file. Don't use <samp>Save as</samp> to change folders, as your tilesheet paths will be wrong.
# Move the <tt>.tbin</tt> or <tt>.tmx</tt> file, and any custom tilesheets it needs, to your mod release folder. Place them in the <tt>assets</tt> folder.
+
# Move the <samp>.tbin</samp> or <samp>.tmx</samp> file, and any custom tilesheets it needs, to your mod release folder. Place them in the <samp>assets</samp> folder.
 
# Load your map via SMAPI or Content Patcher (or another framework mod).
 
# Load your map via SMAPI or Content Patcher (or another framework mod).
  
Line 135: Line 136:
 
You can add a new map and location to the game. The easiest option is to create the map using Tiled, then use [[Modding:Content Patcher|Content Patcher]] to [https://github.com/Pathoschild/StardewMods/blob/develop/ContentPatcher/docs/author-guide.md#custom-locations add the custom location to the game]. After loading your save, you can use this console command to jump to the map: <code>debug warp YourLocationName X Y</code>.
 
You can add a new map and location to the game. The easiest option is to create the map using Tiled, then use [[Modding:Content Patcher|Content Patcher]] to [https://github.com/Pathoschild/StardewMods/blob/develop/ContentPatcher/docs/author-guide.md#custom-locations add the custom location to the game]. After loading your save, you can use this console command to jump to the map: <code>debug warp YourLocationName X Y</code>.
  
Note that the map must be built in a certain pattern; look at the maps in the <tt>Content/Maps</tt> folder for examples. It's often easier to start from an existing map and modify it, instead of starting from scratch.
+
Note that the map must be built in a certain pattern; look at the maps in the <samp>Content/Maps</samp> folder for examples. It's often easier to start from an existing map and modify it, instead of starting from scratch.
  
{{note box|'''Using Content Patcher to add custom locations is strongly recommended.'''<br />You can add new locations in C# yourself, but be aware of factors like object persistence and NPC pathfinding that are easy to get wrong. If you ''really'' want to do it yourself, use the [[Modding:Modder Guide/APIs/Events#Specialised.LoadStageChanged|specialized <tt>LoadStageChanged</tt> event]] to add the location to <tt>Game1.locations</tt> during the <tt>CreatedInitialLocations</tt> or <tt>SaveAddedLocations</tt> stage.}}
+
{{note box|'''Using Content Patcher to add custom locations is strongly recommended.'''<br />You can add new locations in C# yourself, but be aware of factors like object persistence and NPC pathfinding that are easy to get wrong. If you ''really'' want to do it yourself, use the [[Modding:Modder Guide/APIs/Events#Specialised.LoadStageChanged|specialized <samp>LoadStageChanged</samp> event]] to add the location to <samp>Game1.locations</samp> during the <samp>CreatedInitialLocations</samp> or <samp>SaveAddedLocations</samp> stage.}}
  
 
===Adding tilesets===
 
===Adding tilesets===
Line 143: Line 144:
  
 
# Open the map that you created or are editing.
 
# Open the map that you created or are editing.
# Click <tt>Map</tt> then ''Add External Tileset...'' in the top menu, and open a <tt>.tsx</tt> file you have in the same folder.
+
# Click <samp>Map</samp> then ''Add External Tileset...'' in the top menu, and open a <samp>.tsx</samp> file you have in the same folder.
 
# You should have a new copy of the tileset in your map, with any saved animations, properties, or terrains still intact.
 
# You should have a new copy of the tileset in your map, with any saved animations, properties, or terrains still intact.
  
 
====Re-using vanilla tilesets====
 
====Re-using vanilla tilesets====
If you want to use a tilesheet like <tt>spring_outdoorsTileSheet.png</tt> in your map, adding a new tileset from a <tt>.png</tt> file means you need to re-animate any animated tiles, re-add properties like diggable and terrain types. You can avoid this by first exporting them from an existing map, then using external tilesets, instead.
+
If you want to use a tilesheet like <samp>spring_outdoorsTileSheet.png</samp> in your map, adding a new tileset from a <samp>.png</samp> file means you need to re-animate any animated tiles, re-add properties like diggable and terrain types. You can avoid this by first exporting them from an existing map, then using external tilesets, instead.
  
 
# Open an existing map that already has the properties and animations you want.
 
# Open an existing map that already has the properties and animations you want.
Line 160: Line 161:
 
# In the tileset pane on the right, click the tab for your existing version.
 
# In the tileset pane on the right, click the tab for your existing version.
 
# Under that, click the ''Replace Tileset'' button.
 
# Under that, click the ''Replace Tileset'' button.
# Choose the <tt>.tsx</tt> file you saved, and click Open.
+
# Choose the <samp>.tsx</samp> file you saved, and click Open.
  
 
====Adding a new custom tilesheet====
 
====Adding a new custom tilesheet====
 
If you made a your own tilesheet and are adding it to a map the first time, you can create a new tileset from image.
 
If you made a your own tilesheet and are adding it to a map the first time, you can create a new tileset from image.
  
# Create your spritesheet and place it in the same folder as your <tt>.tbin</tt> or <tt>.tmx</tt> map file. This should be a PNG image with images divided into 16x16 tiles (see [[Modding:Editing XNB files#Intro]] for examples).
+
# Create your spritesheet and place it in the same folder as your <samp>.tbin</samp> or <samp>.tmx</samp> map file. This should be a PNG image with images divided into 16x16 tiles (see [[Modding:Editing XNB files#Intro]] for examples).
 
# Open the map in Tiled.
 
# Open the map in Tiled.
 
# Add the custom spritesheet:
 
# Add the custom spritesheet:
Line 208: Line 209:
 
# Choose the [[File:Modding - creating an XNB mod - Tiled 'insert rectangle' button.png]] ''insert rectangle'' tool from the toolbar.
 
# Choose the [[File:Modding - creating an XNB mod - Tiled 'insert rectangle' button.png]] ''insert rectangle'' tool from the toolbar.
 
# Click and drag the rectangle over the tile you want to edit . Make sure it snaps to the tile grid (see [[#Using Tiled]]), and only one tile is selected.
 
# Click and drag the rectangle over the tile you want to edit . Make sure it snaps to the tile grid (see [[#Using Tiled]]), and only one tile is selected.
# Change its Name field to <tt>TileData</tt>.
+
# Change its Name field to <samp>TileData</samp>.
 
# See previous for how to edit its properties.
 
# See previous for how to edit its properties.
  
Line 237: Line 238:
 
:# Click the map to place the flipped/rotated tile.
 
:# Click the map to place the flipped/rotated tile.
  
{{note box|'''This only works with <tt>.tmx</tt> map files.'''<br /> Tile transforms aren't supported by the <tt>.tbin</tt> plugin. See [[#Map formats|''map formats'']] for more info.}}
+
{{note box|'''This only works with <samp>.tmx</samp> map files.'''<br /> Tile transforms aren't supported by the <samp>.tbin</samp> plugin. See [[#Map formats|''map formats'']] for more info.}}
  
 
==Known properties==
 
==Known properties==
Line 247: Line 248:
 
! explanation
 
! explanation
 
|-
 
|-
| <tt>AmbientLight {{t|byte r}} {{t|byte g}} {{t|byte b}}</tt><br />''(valid in indoor locations and locations that ignore outdoor lighting)''
+
| <samp>AmbientLight {{t|byte r}} {{t|byte g}} {{t|byte b}}</samp><br />''(valid in indoor locations and locations that ignore outdoor lighting)''
| Sets the [[wikipedia:RGB color model|RGB colour]] that is subtracted from white (255,255,255) in order to create the ambient light.<br />''Example: <tt>AmbientLight 95 95 95</tt> for a normal indoor daytime lighting.''
+
| Sets the [[wikipedia:RGB color model|RGB colour]] that is subtracted from white (255,255,255) in order to create the ambient light.<br />''Example: <samp>AmbientLight 95 95 95</samp> for a normal indoor daytime lighting.''
 
|-
 
|-
| <tt>BackwoodsEntry [{{t|int x}} {{t|int y}}]</tt><br />''(valid in farm)''
+
| <samp>BackwoodsEntry [{{t|int x}} {{t|int y}}]</samp><br />''(valid in farm)''
 
| The position the player is warped to when entering the farm from the Backwoods.
 
| The position the player is warped to when entering the farm from the Backwoods.
 
|-
 
|-
| <tt>BrookSounds [{{t|int x}} {{t|int y}} {{t|int type}}]</tt><br />''(valid in outdoor locations)''
+
| <samp>BrookSounds [{{t|int x}} {{t|int y}} {{t|int type}}]</samp><br />''(valid in outdoor locations)''
 
| Adds sound sources. The {{t|x}} {{t|y}} fields are the tile coordinates, and {{t|type}} is the ambient sound ID. The {{t|type}} of sound can be one of...
 
| Adds sound sources. The {{t|x}} {{t|y}} fields are the tile coordinates, and {{t|type}} is the ambient sound ID. The {{t|type}} of sound can be one of...
* <tt>0</tt> (babblingBrook);
+
* <samp>0</samp> (babblingBrook);
* <tt>1</tt> (cracklingFire);
+
* <samp>1</samp> (cracklingFire);
* <tt>2</tt> (engine);
+
* <samp>2</samp> (engine);
* <tt>3</tt> (cricket).
+
* <samp>3</samp> (cricket).
 
|-
 
|-
| <tt>BusStopEntry [{{t|int x}} {{t|int y}}]</tt><br />''(valid in farm)''
+
| <samp>BusStopEntry [{{t|int x}} {{t|int y}}]</samp><br />''(valid in farm)''
 
| The position the player is warped to when entering the farm from the Bus Stop.
 
| The position the player is warped to when entering the farm from the Bus Stop.
 
|-
 
|-
| <tt>CanCaskHere T</tt>²<br />''(valid in any location)''
+
| <samp>CanCaskHere T</samp>²<br />''(valid in any location)''
 
| Allows casks to work in that location.
 
| Allows casks to work in that location.
 
|-
 
|-
| <tt>DayTiles [{{t|string layerName}} {{t|int x}} {{t|int y}} {{t|int tilesheetIndex}}]+</tt><br />''(valid in any location)''
+
| <samp>DayTiles [{{t|string layerName}} {{t|int x}} {{t|int y}} {{t|int tilesheetIndex}}]+</samp><br />''(valid in any location)''
| Sets tiles to appear between 6AM to 7PM. Anytime before 7pm, this finds the tile at position ({{t|x}}, {{t|y}}) on the map layer matching {{t|layerName}}, changes its tilesheet index to the specified {{t|tilesheetIndex}}, and adds a glow to simulate daylight. The glow will only be added if the location is indoors and the {{t|tilesheetIndex}} is 256, 288, 405, 469, or 1224. The parameters can be repeated to affect multiple tiles.<br />''Example: <tt>DayTiles Front 3 1 256 Front 3 2 288</tt>.''
+
| Sets tiles to appear between 6AM to 7PM. Anytime before 7pm, this finds the tile at position ({{t|x}}, {{t|y}}) on the map layer matching {{t|layerName}}, changes its tilesheet index to the specified {{t|tilesheetIndex}}, and adds a glow to simulate daylight. The glow will only be added if the location is indoors and the {{t|tilesheetIndex}} is 256, 288, 405, 469, or 1224. The parameters can be repeated to affect multiple tiles.<br />''Example: <samp>DayTiles Front 3 1 256 Front 3 2 288</samp>.''
 
|-
 
|-
| <tt>Doors [{{t|int x}} {{t|int y}} {{t|string sheetID}} {{t|int tileID}}]+</tt><br />''(valid in indoor locations)''
+
| <samp>Doors [{{t|int x}} {{t|int y}} {{t|string sheetID}} {{t|int tileID}}]+</samp><br />''(valid in indoor locations)''
| Adds functionality to interior doors. Used with <tt>Action Door</tt> tile properties. The {{t|x}} {{t|y}} fields are the tile coordinates, {{t|sheetID}} is the name of the sheet containing the door sprite, and {{t|tileID}} is the tile index in the spritesheet.
+
| Adds functionality to interior doors. Used with <samp>Action Door</samp> tile properties. The {{t|x}} {{t|y}} fields are the tile coordinates, {{t|sheetID}} is the name of the sheet containing the door sprite, and {{t|tileID}} is the tile index in the spritesheet.
 
|-
 
|-
| <tt>Fall_Objects T</tt>²<br /><tt>Spring_Objects T</tt>²<br /><tt>Summer_Objects T</tt>²<br /><tt>Winter_Objects T</tt
+
| <samp>Fall_Objects T</samp>²<br /><samp>Spring_Objects T</samp>²<br /><samp>Summer_Objects T</samp>²<br /><samp>Winter_Objects T</samp
| Whether to spawn seasonal objects on spawnable tiles based on the data in <tt>Data\Locations.xnb</tt>.<br />''Example: <tt>Fall_Objects</tt>.''
+
| Whether to spawn seasonal objects on spawnable tiles based on the data in <samp>Data\Locations.xnb</samp>.<br />''Example: <samp>Fall_Objects</samp>.''
 
|-
 
|-
| <tt>FarmCaveEntry [{{t|int x}} {{t|int y}}]</tt><br />''(valid in farm)''
+
| <samp>FarmCaveEntry [{{t|int x}} {{t|int y}}]</samp><br />''(valid in farm)''
 
| The position the player is warped to when entering the farm from the farm cave.
 
| The position the player is warped to when entering the farm from the farm cave.
 
|-
 
|-
| <tt>FarmHouseEntry [{{t|int x}} {{t|int y}}]</tt><br />''(valid in farm)''
+
| <samp>FarmHouseEntry [{{t|int x}} {{t|int y}}]</samp><br />''(valid in farm)''
 
| Changes the position of the Farm House. Corresponds to the front door, or the position the player will be warped to when leaving the house.
 
| Changes the position of the Farm House. Corresponds to the front door, or the position the player will be warped to when leaving the house.
 
|-
 
|-
| <tt>Feed {{t|int x}} {{t|int y}}</tt><br />''(valid in coops and barns)''
+
| <samp>Feed {{t|int x}} {{t|int y}}</samp><br />''(valid in coops and barns)''
| Sets the spawn location of the [[Hay Hopper]] in a coop or barn.<br />''Example: <tt>Feed 3 2</tt>.''
+
| Sets the spawn location of the [[Hay Hopper]] in a coop or barn.<br />''Example: <samp>Feed 3 2</samp>.''
 
|-
 
|-
| <tt>forceLoadPathLayerLights T</tt>²<br />''(valid in outdoor non-festival locations)''
+
| <samp>forceLoadPathLayerLights T</samp>²<br />''(valid in outdoor non-festival locations)''
| Whether to load lights from the <tt>Paths</tt> layer on maps where they would not normally be.<br />''Example: <tt>forceLoadPathLayerLights true</tt>.''
+
| Whether to load lights from the <samp>Paths</samp> layer on maps where they would not normally be.<br />''Example: <samp>forceLoadPathLayerLights true</samp>.''
 
|-
 
|-
| <tt>ForceSpawnForageables T</tt>²<br />''(valid in indoor locations)''
+
| <samp>ForceSpawnForageables T</samp>²<br />''(valid in indoor locations)''
 
| Enables forage items spawning in that location.
 
| Enables forage items spawning in that location.
 
|-
 
|-
| <tt>ForestEntry [{{t|int x}} {{t|int y}}]</tt><br />''(valid in farm)''
+
| <samp>ForestEntry [{{t|int x}} {{t|int y}}]</samp><br />''(valid in farm)''
 
| The position the player is warped to when entering the farm from the Cindersap Forest.
 
| The position the player is warped to when entering the farm from the Cindersap Forest.
 
|-
 
|-
| <tt>GrandpaShrineLocation [{{t|int x}} {{t|int y}}]</tt><br />''(valid in farm)''
+
| <samp>GrandpaShrineLocation [{{t|int x}} {{t|int y}}]</samp><br />''(valid in farm)''
 
| The position of grandpa's shrine. Corresponds to the upper left corner.
 
| The position of grandpa's shrine. Corresponds to the upper left corner.
 
|-
 
|-
| <tt>GreenhouseLocation [{{t|int x}} {{t|int y}}]</tt><br />''(valid in farm)''
+
| <samp>GreenhouseLocation [{{t|int x}} {{t|int y}}]</samp><br />''(valid in farm)''
 
| The default position of the greenhouse. Corresponds to the upper left corner of the greenhouse's foundation.
 
| The default position of the greenhouse. Corresponds to the upper left corner of the greenhouse's foundation.
 
|-
 
|-
| <tt>IgnoreLightingTiles T</tt>²<br />''(valid in indoor locations)''
+
| <samp>IgnoreLightingTiles T</samp>²<br />''(valid in indoor locations)''
| Whether to ignore lights on the <tt>Front</tt> and <tt>Buildings</tt> layers.<br />''Example: <tt>IgnoreLightingTiles true</tt>.''
+
| Whether to ignore lights on the <samp>Front</samp> and <samp>Buildings</samp> layers.<br />''Example: <samp>IgnoreLightingTiles true</samp>.''
 
|-
 
|-
| <tt>indoorWater T</tt>²<br />''(valid in indoor locations)''
+
| <samp>indoorWater T</samp>²<br />''(valid in indoor locations)''
 
| Enables water logic (ie. fishing, etc.) in that location.
 
| Enables water logic (ie. fishing, etc.) in that location.
 
|-
 
|-
| <tt>KitchenStandingLocation [{{t|int x}} {{t|int y}}]</tt><br />''(valid in farmhouse)''
+
| <samp>KitchenStandingLocation [{{t|int x}} {{t|int y}}]</samp><br />''(valid in farmhouse)''
 
| The position the player's spouse will stand when using the kitchen.
 
| The position the player's spouse will stand when using the kitchen.
 
|-
 
|-
| <tt>Light [{{t|int x}} {{t|int y}} {{t|int type}}]+</tt><br />''(valid in any location)''
+
| <samp>Light [{{t|int x}} {{t|int y}} {{t|int type}}]+</samp><br />''(valid in any location)''
 
| Adds light sources. The {{t|type}} field is the kind of light source (e.g. 4 for twin candles), and {{t|x}} {{t|y}} are the tile coordinates.The {{t|type}} of light source can be one of...
 
| Adds light sources. The {{t|type}} field is the kind of light source (e.g. 4 for twin candles), and {{t|x}} {{t|y}} are the tile coordinates.The {{t|type}} of light source can be one of...
* <tt>1</tt> (lantern);
+
* <samp>1</samp> (lantern);
* <tt>2</tt> (window);
+
* <samp>2</samp> (window);
* <tt>4</tt> (sconce);
+
* <samp>4</samp> (sconce);
* <tt>5</tt> (cauldron);
+
* <samp>5</samp> (cauldron);
* <tt>6</tt> (indoor window);
+
* <samp>6</samp> (indoor window);
* <tt>7</tt> (projector).
+
* <samp>7</samp> (projector).
Any other value will crash the game.<br />''Example: <tt>Light 3 8 4 6 8 4 11 8 4 3 2 5 10 2 5 6 19 5 5 15 5 5 11 5 11 12 5</tt> (Adventurer's Guild).''
+
Any other value will crash the game.<br />''Example: <samp>Light 3 8 4 6 8 4 11 8 4 3 2 5 10 2 5 6 19 5 5 15 5 5 11 5 11 12 5</samp> (Adventurer's Guild).''
 
|-
 
|-
| <tt>LocationContext Default</tt><br />''(valid in any location)''
+
| <samp>LocationContext Default</samp><br />''(valid in any location)''
 
| Sets the map to be part of the mainland for game logic purposes, like weather.
 
| Sets the map to be part of the mainland for game logic purposes, like weather.
 
|-
 
|-
| <tt>LocationContext Island</tt><br />''(valid in any location)''
+
| <samp>LocationContext Island</samp><br />''(valid in any location)''
 
| Sets the map to be part of Ginger Island for game logic purposes, like weather.
 
| Sets the map to be part of Ginger Island for game logic purposes, like weather.
 
|-
 
|-
| <tt>MailboxLocation [{{t|int x}} {{t|int y}}]</tt><br />''(valid in farm)''
+
| <samp>MailboxLocation [{{t|int x}} {{t|int y}}]</samp><br />''(valid in farm)''
 
| The position of the player's mailbox. Corresponds to the upper left corner.
 
| The position of the player's mailbox. Corresponds to the upper left corner.
 
|-
 
|-
| <tt>Music {{t|string name}}</tt><br />''(valid in any location)''
+
| <samp>Music {{t|string name}}</samp><br />''(valid in any location)''
| Sets the music that plays when the player enters, where {{t|name}} is the cue name in the audio files.<br />''Example: <tt>Music MarlonsTheme</tt>.''
+
| Sets the music that plays when the player enters, where {{t|name}} is the cue name in the audio files.<br />''Example: <samp>Music MarlonsTheme</samp>.''
 
|-
 
|-
| <tt>Music {{t|int start}} {{t|int end}} {{t|string name}}</tt><br />''(valid in any location)''
+
| <samp>Music {{t|int start}} {{t|int end}} {{t|string name}}</samp><br />''(valid in any location)''
| Sets the music that plays when the player enters, where {{t|name}} is the cue name in the audio files, music will only play if the time is between {{t|int start}} (inclusive) and {{t|int end}} (exclusive).<br />''Example: <tt>Music 800 1200 MarlonsTheme</tt>.''
+
| Sets the music that plays when the player enters, where {{t|name}} is the cue name in the audio files, music will only play if the time is between {{t|int start}} (inclusive) and {{t|int end}} (exclusive).<br />''Example: <samp>Music 800 1200 MarlonsTheme</samp>.''
 
|-
 
|-
| <tt>NightTiles [{{t|string layerName}} {{t|int x}} {{t|int y}} {{t|int tilesheetIndex}}]+</tt><br />''(valid in any location)''
+
| <samp>NightTiles [{{t|string layerName}} {{t|int x}} {{t|int y}} {{t|int tilesheetIndex}}]+</samp><br />''(valid in any location)''
| Changes the tile after 7pm. Outside, it works along <tt>DayTiles</tt>: set a <tt>DayTiles</tt> tile for the map to load between 6am to 7pm, then a <tt>NightTiles</tt> to load between 7pm to the end of the day. It is mostly used for lamps in the game.
+
| Changes the tile after 7pm. Outside, it works along <samp>DayTiles</samp>: set a <samp>DayTiles</samp> tile for the map to load between 6am to 7pm, then a <samp>NightTiles</samp> to load between 7pm to the end of the day. It is mostly used for lamps in the game.
 
|-
 
|-
| <tt>NPCWarp [{{t|int fromX}} {{t|int fromY}} {{t|string toArea}} {{t|int toX}} {{t|int toY}}]+</tt><br />''(valid in any location)''
+
| <samp>NPCWarp [{{t|int fromX}} {{t|int fromY}} {{t|string toArea}} {{t|int toX}} {{t|int toY}}]+</samp><br />''(valid in any location)''
| Equivalent to <tt>Warp</tt>, but only usable by npcs.
+
| Equivalent to <samp>Warp</samp>, but only usable by npcs.
 
|-
 
|-
| <tt>Outdoors T</tt>²<br />''(valid in any location)''
+
| <samp>Outdoors T</samp>²<br />''(valid in any location)''
| Sets whether the location is outdoors.<br />''Example: <tt>Outdoors true</tt>.''
+
| Sets whether the location is outdoors.<br />''Example: <samp>Outdoors true</samp>.''
 
|-
 
|-
| <tt>ProduceArea {{t|int x}} {{t|int y}} {{t|int width}} {{t|int height}}</tt><br />''(valid in coops and barns)''
+
| <samp>ProduceArea {{t|int x}} {{t|int y}} {{t|int width}} {{t|int height}}</samp><br />''(valid in coops and barns)''
| Sets the area where animals can spawn within a coop or barn.<br />''Example: <tt>ProduceArea 6 4 8 7</tt>.''
+
| Sets the area where animals can spawn within a coop or barn.<br />''Example: <samp>ProduceArea 6 4 8 7</samp>.''
 
|-
 
|-
| <tt>ScreenshotRegion {{t|int left}} {{t|int top}} {{t|int right}} {{t|int bottom}}</tt><br />''(valid in any location)''
+
| <samp>ScreenshotRegion {{t|int left}} {{t|int top}} {{t|int right}} {{t|int bottom}}</samp><br />''(valid in any location)''
| Constrains the portion of the map rendered when screenshots are taken.<br />''Example: <tt>ScreenshotRegion 0 27 69 61</tt>.''
+
| Constrains the portion of the map rendered when screenshots are taken.<br />''Example: <samp>ScreenshotRegion 0 27 69 61</samp>.''
 
|-
 
|-
| <tt>SeasonOverride [{{t|string season}}]</tt><br />''(valid in any location)''
+
| <samp>SeasonOverride [{{t|string season}}]</samp><br />''(valid in any location)''
 
| Assumes a specific season for most game checks. (If a crop is in season, which tilesheet to use, etc.)
 
| Assumes a specific season for most game checks. (If a crop is in season, which tilesheet to use, etc.)
 
|-
 
|-
| <tt>ShippingBinLocation [{{t|int x}} {{t|int y}}]</tt><br />''(valid in farm)''
+
| <samp>ShippingBinLocation [{{t|int x}} {{t|int y}}]</samp><br />''(valid in farm)''
 
| The position of the default shipping bin. Corresponds to the upper left corner.
 
| The position of the default shipping bin. Corresponds to the upper left corner.
 
|-
 
|-
| <tt>skipWeedGrowth T</tt>²<br />''(valid in any location)''
+
| <samp>skipWeedGrowth T</samp>²<br />''(valid in any location)''
 
| Prevents weeds from spawning and spreading in this location.
 
| Prevents weeds from spawning and spreading in this location.
 
|-
 
|-
| <tt>SpouseAreaLocation [{{t|int x}} {{t|int y}}]</tt><br />''(valid in farm)''
+
| <samp>SpouseAreaLocation [{{t|int x}} {{t|int y}}]</samp><br />''(valid in farm)''
 
| The position of the the outdoor spouse area. Corresponds to the upper left corner.
 
| The position of the the outdoor spouse area. Corresponds to the upper left corner.
 
|-
 
|-
| <tt>Stumps [{{t|int x}} {{t|int y}} {{t|unused}}]+</tt><br />''(valid in [[Secret Woods]])''
+
| <samp>Stumps [{{t|int x}} {{t|int y}} {{t|unused}}]+</samp><br />''(valid in [[Secret Woods]])''
| Adds stumps to the Secret Woods map daily. The third field for each stump appears to be unused.<br />''Example: <tt>Stumps 24 6 3 29 7 3 26 10 3 46 6 3 34 26 3 41 26 3</tt>.''
+
| Adds stumps to the Secret Woods map daily. The third field for each stump appears to be unused.<br />''Example: <samp>Stumps 24 6 3 29 7 3 26 10 3 46 6 3 34 26 3 41 26 3</samp>.''
 
|-
 
|-
| <tt>TreatAsOutdoors T</tt>²<br />''(valid in indoor locations)''
+
| <samp>TreatAsOutdoors T</samp>²<br />''(valid in indoor locations)''
| The location is treated as outdoors for the purposes of spawning anything other than lights from the <tt>Paths</tt> layer and yielding [[Coal]] from breaking rocks.<br />''Example: <tt>TreatAsOutdoors true</tt>.''
+
| The location is treated as outdoors for the purposes of spawning anything other than lights from the <samp>Paths</samp> layer and yielding [[Coal]] from breaking rocks.<br />''Example: <samp>TreatAsOutdoors true</samp>.''
 
|-
 
|-
| <tt>Trees [{{t|int x}} {{t|int y}} {{t|int type}}]+</tt><br />''(valid in any location)''
+
| <samp>Trees [{{t|int x}} {{t|int y}} {{t|int type}}]+</samp><br />''(valid in any location)''
| Adds trees to the map. The {{t|x}} {{t|y}} fields are the tile coordinates, and {{t|type}} is the tree type (1: oak, 2: maple, 3: pine, 6: palm, 7: mushroom tree).<br />''Example: <tt>Trees 17 18 2 20 31 2</tt>.''
+
| Adds trees to the map. The {{t|x}} {{t|y}} fields are the tile coordinates, and {{t|type}} is the tree type (1: oak, 2: maple, 3: pine, 6: palm, 7: mushroom tree).<br />''Example: <samp>Trees 17 18 2 20 31 2</samp>.''
 
|-
 
|-
| <tt>UniquePortrait [{{t|str name}}]+</tt><br />''(valid in any location)''
+
| <samp>UniquePortrait [{{t|str name}}]+</samp><br />''(valid in any location)''
| Switches the portraits for the named NPCs to the unique variants for the location. An NPC <tt>Jane</tt> in location <tt>Room</tt> will switch to portrait <tt>Portraits/Jane_Room</tt>.<br/>''Example: <tt>UniquePortrait Maru</tt>.''
+
| Switches the portraits for the named NPCs to the unique variants for the location. An NPC <samp>Jane</samp> in location <samp>Room</samp> will switch to portrait <samp>Portraits/Jane_Room</samp>.<br />''Example: <samp>UniquePortrait Maru</samp>.''
 
|-
 
|-
| <tt>UniqueSprite [{{t|str name}}]+</tt><br />''(valid in any location)''
+
| <samp>UniqueSprite [{{t|str name}}]+</samp><br />''(valid in any location)''
| Switches the spritesheets for the named NPCs to the unique variants for the location. An NPC <tt>Jane</tt> in location <tt>Room</tt> will switch to spritesheet <tt>Characters/Jane_Room</tt>.<br/>''Example: <tt>UniqueSprite Maru</tt>.''
+
| Switches the spritesheets for the named NPCs to the unique variants for the location. An NPC <samp>Jane</samp> in location <samp>Room</samp> will switch to spritesheet <samp>Characters/Jane_Room</samp>.<br />''Example: <samp>UniqueSprite Maru</samp>.''
 
|-
 
|-
| <tt>ViewportFollowPlayer T</tt>²<br />''(valid in any location)''
+
| <samp>ViewportFollowPlayer T</samp>²<br />''(valid in any location)''
| Forces the viewport to stay centered on the player.<br />''Example: <tt>ViewportFollowPlayer</tt>.''
+
| Forces the viewport to stay centered on the player.<br />''Example: <samp>ViewportFollowPlayer</samp>.''
 
|-
 
|-
| <tt>Warp [{{t|int fromX}} {{t|int fromY}} {{t|string toArea}} {{t|int toX}} {{t|int toY}}]+</tt><br />''(valid in any location)''
+
| <samp>Warp [{{t|int fromX}} {{t|int fromY}} {{t|string toArea}} {{t|int toX}} {{t|int toY}}]+</samp><br />''(valid in any location)''
 
| Sets the tiles which warp the player to another map (e.g. doors). The {{t|fromX}} {{t|fromY}} fields are the tile coordinates that initiate the warp, and {{t|toArea}} {{t|toX}} {{t|toY}} are the name of the in-game location to warp to and the tile coordinates within it.<br />''Example: 6 20 Mountain 76 9.''
 
| Sets the tiles which warp the player to another map (e.g. doors). The {{t|fromX}} {{t|fromY}} fields are the tile coordinates that initiate the warp, and {{t|toArea}} {{t|toX}} {{t|toY}} are the name of the in-game location to warp to and the tile coordinates within it.<br />''Example: 6 20 Mountain 76 9.''
 
|-
 
|-
| <tt>WarpTotemEntry[{{t|int x}} {{t|int y}}]</tt><br />''(valid in farm)''
+
| <samp>WarpTotemEntry[{{t|int x}} {{t|int y}}]</samp><br />''(valid in farm)''
 
| The position the player is warped to when teleporting to the farm via Warp Totem or Return Scepter.
 
| The position the player is warped to when teleporting to the farm via Warp Totem or Return Scepter.
 
|-
 
|-
| <tt>WindowLight [{{t|int x}} {{t|int y}} {{t|int type}}]+</tt><br />''(valid in any location)''
+
| <samp>WindowLight [{{t|int x}} {{t|int y}} {{t|int type}}]+</samp><br />''(valid in any location)''
| Adds light sources that are only lit during the day when it is not raining (like the light coming through a window). See <tt>Light</tt> for details.
+
| Adds light sources that are only lit during the day when it is not raining (like the light coming through a window). See <samp>Light</samp> for details.
 
|}
 
|}
  
The following properties are used but apparently have no effect: <tt>Arch</tt>, <tt>Debris</tt>, <tt>Spouse</tt>, and <tt>Fish</tt>.
+
The following properties are used but apparently have no effect: <samp>Arch</samp>, <samp>Debris</samp>, <samp>Spouse</samp>, and <samp>Fish</samp>.
  
<small>¹ Map properties are primary handled in various methods of the <tt>GameLocation</tt> class, particularly <tt>resetLocalState</tt>.</small><br />
+
<small>¹ Map properties are primary handled in various methods of the <samp>GameLocation</samp> class, particularly <samp>resetLocalState</samp>.</small><br />
<small>² The <tt>T</tt> value (short for ''true'') is conventional, but any non-empty value will work too.</small>
+
<small>² The <samp>T</samp> value (short for ''true'') is conventional, but any non-empty value will work too.</small>
  
 
===Tile properties===
 
===Tile properties===
Known tile properties (excluding specialised properties like <tt>TouchAction WomensLocker</tt>):¹
+
Known tile properties (excluding specialised properties like <samp>TouchAction WomensLocker</samp>):¹
  
 
{| class="wikitable"
 
{| class="wikitable"
Line 402: Line 403:
 
! explanation
 
! explanation
 
|-
 
|-
| <tt>Back</tt>
+
| <samp>Back</samp>
| <tt>Bed T</tt
+
| <samp>Bed T</samp
 
| If the player stands on this tile, they're considered in bed for the purposes of stamina regen (in multiplayer) and pass-out logic.
 
| If the player stands on this tile, they're considered in bed for the purposes of stamina regen (in multiplayer) and pass-out logic.
 
|-
 
|-
| <tt>Back</tt>
+
| <samp>Back</samp>
| <tt>Buildable T</tt
+
| <samp>Buildable T</samp
 
| Allows farm buildings to be placed on this tile if there are no other obstructions.
 
| Allows farm buildings to be placed on this tile if there are no other obstructions.
 
|-
 
|-
| <tt>Back</tt>
+
| <samp>Back</samp>
| <tt>DefaultBedPosition T</tt
+
| <samp>DefaultBedPosition T</samp
 
| Used in the farmhouse for the initial placement of the starting bed.
 
| Used in the farmhouse for the initial placement of the starting bed.
 
|-
 
|-
| <tt>Back</tt>
+
| <samp>Back</samp>
| <tt>DefaultChildBedPosition T</tt
+
| <samp>DefaultChildBedPosition T</samp
 
| Used in the upgraded farmhouse for the initial placement of the child beds.
 
| Used in the upgraded farmhouse for the initial placement of the child beds.
 
|-
 
|-
| <tt>Back</tt>
+
| <samp>Back</samp>
| <tt>Diggable T</tt
+
| <samp>Diggable T</samp
 
| Marks the tile as diggable with the hoe and enables planting crops. Also allows [[grass]] to spread to this tile.
 
| Marks the tile as diggable with the hoe and enables planting crops. Also allows [[grass]] to spread to this tile.
 
|-
 
|-
| <tt>Back</tt>
+
| <samp>Back</samp>
| <tt>NoFishing T</tt
+
| <samp>NoFishing T</samp
 
| Prevents the player from casting the line onto this tile when fishing.
 
| Prevents the player from casting the line onto this tile when fishing.
 
|-
 
|-
| <tt>Back</tt>
+
| <samp>Back</samp>
| <tt>NoFurniture T</tt
+
| <samp>NoFurniture T</samp
 
| Prevents the player from placing furniture on this tile.
 
| Prevents the player from placing furniture on this tile.
 
|-
 
|-
| <tt>Back</tt>
+
| <samp>Back</samp>
| <tt>NoPath</tt>
+
| <samp>NoPath</samp>
 
| Excludes this tile from NPC pathing, making them go around it if necesssary.
 
| Excludes this tile from NPC pathing, making them go around it if necesssary.
 
|-
 
|-
| <tt>Back</tt>
+
| <samp>Back</samp>
| <tt>NoSpawn All</tt><br /><tt>NoSpawn True</tt>
+
| <samp>NoSpawn All</samp><br /><samp>NoSpawn True</samp>
| Combines <tt>NoSpawn Grass</tt> and <tt>NoSpawn Tree</tt>.
+
| Combines <samp>NoSpawn Grass</samp> and <samp>NoSpawn Tree</samp>.
 
|-
 
|-
| <tt>Back</tt>
+
| <samp>Back</samp>
| <tt>NoSpawn Grass</tt>
+
| <samp>NoSpawn Grass</samp>
 
| Prevents debris (e.g. weeds or stones) from spawning on this tile.
 
| Prevents debris (e.g. weeds or stones) from spawning on this tile.
 
|-
 
|-
| <tt>Back</tt>
+
| <samp>Back</samp>
| <tt>NoSpawn Tree</tt>
+
| <samp>NoSpawn Tree</samp>
 
| Prevents trees from spawning on this tile. Prevents the player from planting trees on this tile, except on the farm. If a tree is already on this tile, prevents it from growing.
 
| Prevents trees from spawning on this tile. Prevents the player from planting trees on this tile, except on the farm. If a tree is already on this tile, prevents it from growing.
 
|-
 
|-
| <tt>Back</tt>
+
| <samp>Back</samp>
| <tt>NoSprinklers T</tt
+
| <samp>NoSprinklers T</samp
 
| Prevents sprinklers from being placed on this tile.
 
| Prevents sprinklers from being placed on this tile.
 
|-
 
|-
| <tt>Back</tt>
+
| <samp>Back</samp>
| <tt>NPCBarrier T</tt
+
| <samp>NPCBarrier T</samp
 
| Prevents NPCs from crossing this tile when used on the Farm (including coops, barns, and slime hutches), UndergroundMine, or the island. Also prevents some spawns on this tile, in those locations.
 
| Prevents NPCs from crossing this tile when used on the Farm (including coops, barns, and slime hutches), UndergroundMine, or the island. Also prevents some spawns on this tile, in those locations.
 
|-
 
|-
| <tt>Back</tt>
+
| <samp>Back</samp>
| <tt>Passable T</tt
+
| <samp>Passable T</samp
| Prevents players from walking or placing objects on this tile, even if they'd normally be able to do. (Direct opposite of <tt>Buildings Passable T</tt> below.) Commonly used on certain water tiles for bordering the sides of bridges, to prevent players from walking off into open water. Can be added as a single TileData object for a specific tile, or (more commonly) to every instance of a tile by editing the tileset and adding it to the tile index.
+
| Prevents players from walking or placing objects on this tile, even if they'd normally be able to do. (Direct opposite of <samp>Buildings Passable T</samp> below.) Commonly used on certain water tiles for bordering the sides of bridges, to prevent players from walking off into open water. Can be added as a single TileData object for a specific tile, or (more commonly) to every instance of a tile by editing the tileset and adding it to the tile index.
 
|-
 
|-
| <tt>Back</tt>
+
| <samp>Back</samp>
| <tt>Placeable T</tt
+
| <samp>Placeable T</samp
 
| '''Prevents''' players from placing objects on this tile.
 
| '''Prevents''' players from placing objects on this tile.
 
|-
 
|-
| <tt>Back</tt>
+
| <samp>Back</samp>
| <tt>TemporaryBarrier T</tt
+
| <samp>TemporaryBarrier T</samp
 
| Used only briefly when doors open. Marks this tile impassable to a player, while NPCs will treat it as an obstacle to pause before rushing through.
 
| Used only briefly when doors open. Marks this tile impassable to a player, while NPCs will treat it as an obstacle to pause before rushing through.
 
|-
 
|-
| <tt>Back</tt>
+
| <samp>Back</samp>
| <tt>Type {{t|str type}}</tt>
+
| <samp>Type {{t|str type}}</samp>
 
| Sets the tile type for various game logic (e.g. step sounds or planting crops), where {{t|type}} is one of ''Dirt'', ''Stone'', ''Grass'', or ''Wood''.
 
| Sets the tile type for various game logic (e.g. step sounds or planting crops), where {{t|type}} is one of ''Dirt'', ''Stone'', ''Grass'', or ''Wood''.
 
|-
 
|-
| <tt>Back</tt>
+
| <samp>Back</samp>
| <tt>Water T</tt
+
| <samp>Water T</samp
 
| Marks the tile as a water tile for various game logic (i.e. items splash into it, can refill watering can from it, can possibly fish in it, can possibly place crab pots in it, will water nearby paddy crops, will block most open-tile checks, will regenerate health in it if indoors, and will draw animated overlay over it if outdoors; if in the Mines, Sewer, or Submarine; or otherwise not in the Desert).
 
| Marks the tile as a water tile for various game logic (i.e. items splash into it, can refill watering can from it, can possibly fish in it, can possibly place crab pots in it, will water nearby paddy crops, will block most open-tile checks, will regenerate health in it if indoors, and will draw animated overlay over it if outdoors; if in the Mines, Sewer, or Submarine; or otherwise not in the Desert).
 
|-
 
|-
| <tt>Back</tt>
+
| <samp>Back</samp>
| <tt>WaterSource T</tt
+
| <samp>WaterSource T</samp
 
| Lets the player refill the watering can from this tile.
 
| Lets the player refill the watering can from this tile.
 
|-
 
|-
| <tt>Buildings</tt>
+
| <samp>Buildings</samp>
| <tt>NPCPassable T</tt
+
| <samp>NPCPassable T</samp
| NPC-only version of <tt>Passable</tt> below. Allows NPCs to pass through this tile.
+
| NPC-only version of <samp>Passable</samp> below. Allows NPCs to pass through this tile.
 
|-
 
|-
| <tt>Buildings</tt>
+
| <samp>Buildings</samp>
| <tt>Passable T</tt
+
| <samp>Passable T</samp
| Allows passing through a tile, even though Buildings tiles can't normally be walked through. Often used for small footbridges that need to be on Buildings, over water. Direct opposite of <tt>Back Passable T</tt> above. Can be added as a single TileData object for a specific tile, or (more commonly) to every instance of a tile by editing the tileset and adding it to the tile index.
+
| Allows passing through a tile, even though Buildings tiles can't normally be walked through. Often used for small footbridges that need to be on Buildings, over water. Direct opposite of <samp>Back Passable T</samp> above. Can be added as a single TileData object for a specific tile, or (more commonly) to every instance of a tile by editing the tileset and adding it to the tile index.
 
|-
 
|-
| <tt>Buildings</tt>
+
| <samp>Buildings</samp>
| <tt>Shadow T</tt
+
| <samp>Shadow T</samp
| Player-only version of <tt>Passable</tt> above. Allows the player to pass through this tile, but not NPCs.
+
| Player-only version of <samp>Passable</samp> above. Allows the player to pass through this tile, but not NPCs.
 
|-
 
|-
| <tt>Paths</tt>
+
| <samp>Paths</samp>
| <tt>Order {{T|I}}</tt>
+
| <samp>Order {{T|I}}</samp>
 
| To place on index 29 and 30 of the Paths tilsheet. Set the order the cabins will spawn at the creation of a Multiplayer save.
 
| To place on index 29 and 30 of the Paths tilsheet. Set the order the cabins will spawn at the creation of a Multiplayer save.
 
|}
 
|}
  
The <tt>TouchAction</tt> property makes something happen when the player steps on the tile:
+
The <samp>TouchAction</samp> property makes something happen when the player steps on the tile:
  
 
{| class="wikitable"
 
{| class="wikitable"
Line 503: Line 504:
 
! explanation
 
! explanation
 
|-
 
|-
| <tt>Back</tt>
+
| <samp>Back</samp>
| <tt>TouchAction Bus</tt>
+
| <samp>TouchAction Bus</samp>
 
| Starts the Bus Ride to the Desert mini-cutscene, works in conjunction with Action BusTicket.
 
| Starts the Bus Ride to the Desert mini-cutscene, works in conjunction with Action BusTicket.
 
|-
 
|-
| <tt>Back</tt>
+
| <samp>Back</samp>
| <tt>TouchAction ChangeIntoSwimsuit</tt>
+
| <samp>TouchAction ChangeIntoSwimsuit</samp>
 
| Changes the player into their swimsuit and disables running.
 
| Changes the player into their swimsuit and disables running.
 
|-
 
|-
| <tt>Back</tt>
+
| <samp>Back</samp>
| <tt>TouchAction ChangeOutOfSwimsuit</tt>
+
| <samp>TouchAction ChangeOutOfSwimsuit</samp>
 
| Changes the player into their regular clothes and enables running.
 
| Changes the player into their regular clothes and enables running.
 
|-
 
|-
| <tt>Back</tt>
+
| <samp>Back</samp>
| <tt>TouchAction DesertBus</tt>
+
| <samp>TouchAction DesertBus</samp>
 
| Lets you ride the bus back to the Bus Stop..
 
| Lets you ride the bus back to the Bus Stop..
 
|-
 
|-
| <tt>Back</tt>
+
| <samp>Back</samp>
| <tt>TouchAction Emote {{t|string npc}} {{t|int emoteID}}</tt>
+
| <samp>TouchAction Emote {{t|string npc}} {{t|int emoteID}}</samp>
 
| Finds the NPC whose name matches the {{t|npc}} field, and causes them to show the given {{t|emoteID}} above their head (4: empty can, 8: question mark, 12: angry, 16: exclamation, 20: heart, 24: sleep, 28: sad, 32: happy, 36: x, 40: pause, 52: videogame, 56: music note, 60: blush).
 
| Finds the NPC whose name matches the {{t|npc}} field, and causes them to show the given {{t|emoteID}} above their head (4: empty can, 8: question mark, 12: angry, 16: exclamation, 20: heart, 24: sleep, 28: sad, 32: happy, 36: x, 40: pause, 52: videogame, 56: music note, 60: blush).
 
|-
 
|-
| <tt>Back</tt>
+
| <samp>Back</samp>
| <tt>TouchAction FacingDirection {{t|string npc}} {{t|int direction}}</tt>
+
| <samp>TouchAction FacingDirection {{t|string npc}} {{t|int direction}}</samp>
 
| Finds the NPC whose name matches the {{t|npc}} field, and make them face the given direction (0: up, 1: right, 2: down, 3: left).
 
| Finds the NPC whose name matches the {{t|npc}} field, and make them face the given direction (0: up, 1: right, 2: down, 3: left).
 
|-
 
|-
| <tt>Back</tt>
+
| <samp>Back</samp>
| <tt>TouchAction legendarySword</tt>
+
| <samp>TouchAction legendarySword</samp>
 
| Gives them the [[Galaxy Sword]] when holding a [[Prismatic Shard]].
 
| Gives them the [[Galaxy Sword]] when holding a [[Prismatic Shard]].
 
|-
 
|-
| <tt>Back</tt>
+
| <samp>Back</samp>
| <tt>TouchAction MagicWarp {{t|string area}} {{t|int x}} {{t|int y}} {{o|string prerequisite}}</tt>
+
| <samp>TouchAction MagicWarp {{t|string area}} {{t|int x}} {{t|int y}} {{o|string prerequisite}}</samp>
| Warps the player to the {{t|x}} {{t|y}} tile coordinates in the given {{t|area}} with a magic sound and effects. If the {{o|prerequisite}} field is specified, only occurs if that flag is set via <tt>Game1.player.mailReceived</tt>.
+
| Warps the player to the {{t|x}} {{t|y}} tile coordinates in the given {{t|area}} with a magic sound and effects. If the {{o|prerequisite}} field is specified, only occurs if that flag is set via <samp>Game1.player.mailReceived</samp>.
 
|-
 
|-
| <tt>Back</tt>
+
| <samp>Back</samp>
| <tt>TouchAction PoolEntrance</tt>
+
| <samp>TouchAction PoolEntrance</samp>
 
| Switches the player between swimming and walking mode.
 
| Switches the player between swimming and walking mode.
 
|-
 
|-
| <tt>Back</tt>
+
| <samp>Back</samp>
| <tt>TouchAction Sleep</tt>
+
| <samp>TouchAction Sleep</samp>
 
| Ends the day if the player confirms.
 
| Ends the day if the player confirms.
 
|}
 
|}
  
The <tt>Action</tt> property makes something happen when the player interacts (e.g. clicks) with the tile:
+
The <samp>Action</samp> property makes something happen when the player interacts (e.g. clicks) with the tile:
  
 
{| class="wikitable"
 
{| class="wikitable"
Line 552: Line 553:
 
! explanation
 
! explanation
 
|-
 
|-
| <tt>Buildings</tt>
+
| <samp>Buildings</samp>
| <tt>Action AdventureShop</tt>
+
| <samp>Action AdventureShop</samp>
 
| Shows the Adventurer's Guild shop screen.
 
| Shows the Adventurer's Guild shop screen.
 
|-
 
|-
| <tt>Buildings</tt>
+
| <samp>Buildings</samp>
| <tt>Action Arcade_Prairie</tt>
+
| <samp>Action Arcade_Prairie</samp>
 
| Shows the ''Journey of the Prairie King'' arcade game.
 
| Shows the ''Journey of the Prairie King'' arcade game.
 
|-
 
|-
| <tt>Buildings</tt>
+
| <samp>Buildings</samp>
| <tt>Action Arcade_Minecart</tt>
+
| <samp>Action Arcade_Minecart</samp>
 
| Shows the ''Junimo Kart'' arcade game.
 
| Shows the ''Junimo Kart'' arcade game.
 
|-
 
|-
| <tt>Buildings</tt>
+
| <samp>Buildings</samp>
| <tt>Action BuyBackpack</tt>
+
| <samp>Action BuyBackpack</samp>
 
| Shows a menu which lets the player upgrade their backpack if an upgrade is available.
 
| Shows a menu which lets the player upgrade their backpack if an upgrade is available.
 
|-
 
|-
| <tt>Buildings</tt>
+
| <samp>Buildings</samp>
| <tt>Action Billboard</tt>
+
| <samp>Action Billboard</samp>
 
| Shows the calendar menu.
 
| Shows the calendar menu.
 
|-
 
|-
| <tt>Buildings</tt>
+
| <samp>Buildings</samp>
| <tt>Action Blacksmith</tt>
+
| <samp>Action Blacksmith</samp>
 
| Opens Clint's shop menu, if Clint is nearby.
 
| Opens Clint's shop menu, if Clint is nearby.
 
|-
 
|-
| <tt>Buildings</tt>
+
| <samp>Buildings</samp>
| <tt>Action BrokenBeachBridge</tt>
+
| <samp>Action BrokenBeachBridge</samp>
 
| Prompts you to use wood to repair the bridge.
 
| Prompts you to use wood to repair the bridge.
 
|-
 
|-
| <tt>Buildings</tt>
+
| <samp>Buildings</samp>
| <tt>Action BusTicket</tt>
+
| <samp>Action BusTicket</samp>
 
| Offers to let you go to the Calico Desert if the Bus has been repaired. Works in conjunction with TouchAction Bus.
 
| Offers to let you go to the Calico Desert if the Bus has been repaired. Works in conjunction with TouchAction Bus.
 
|-
 
|-
| <tt>Buildings</tt>
+
| <samp>Buildings</samp>
| <tt>Action BuyQiCoins</tt>
+
| <samp>Action BuyQiCoins</samp>
 
| Shows a dialogue which lets the player buy 100 Casino club coins.
 
| Shows a dialogue which lets the player buy 100 Casino club coins.
 
|-
 
|-
| <tt>Buildings</tt>
+
| <samp>Buildings</samp>
| <tt>Action Concessions</tt>
+
| <samp>Action Concessions</samp>
 
| Opens the snack shop in the theater. (Only from inside the theater.)
 
| Opens the snack shop in the theater. (Only from inside the theater.)
 
|-
 
|-
| <tt>Buildings</tt>
+
| <samp>Buildings</samp>
| <tt>Action Carpenter</tt>
+
| <samp>Action Carpenter</samp>
 
| Opens the carpenter menu, if Robin is nearby.
 
| Opens the carpenter menu, if Robin is nearby.
 
|-
 
|-
| <tt>Buildings</tt>
+
| <samp>Buildings</samp>
| <tt>Action ColaMachine</tt>
+
| <samp>Action ColaMachine</samp>
 
| Offers to let the player buy a Joja cola.
 
| Offers to let the player buy a Joja cola.
 
|-
 
|-
| <tt>Buildings</tt>
+
| <samp>Buildings</samp>
| <tt>Action ClubCards</tt><br /><tt>Action Blackjack</tt>
+
| <samp>Action ClubCards</samp><br /><samp>Action Blackjack</samp>
 
| Shows the casino blackjack minigame.
 
| Shows the casino blackjack minigame.
 
|-
 
|-
| <tt>Buildings</tt>
+
| <samp>Buildings</samp>
| <tt>Action ClubComputer</tt><br /><tt>Action FarmerFile</tt>
+
| <samp>Action ClubComputer</samp><br /><samp>Action FarmerFile</samp>
 
| Shows a dialogue with play stats (steps taken, gifts given, dirt hoed, etc).
 
| Shows a dialogue with play stats (steps taken, gifts given, dirt hoed, etc).
 
|-
 
|-
| <tt>Buildings</tt>
+
| <samp>Buildings</samp>
| <tt>Action ClubSeller</tt>
+
| <samp>Action ClubSeller</samp>
| Shows a dialogue which lets the player buy a [[Statue of Endless Fortune]] for one million gold.
+
| Shows a dialogue which lets the player buy a [[Statue Of Endless Fortune]] for one million gold.
 
|-
 
|-
| <tt>Buildings</tt>
+
| <samp>Buildings</samp>
| <tt>Action ClubShop</tt>
+
| <samp>Action ClubShop</samp>
 
| Shows the casino shop menu.
 
| Shows the casino shop menu.
 
|-
 
|-
| <tt>Buildings</tt>
+
| <samp>Buildings</samp>
| <tt>Action ClubSlots</tt>
+
| <samp>Action ClubSlots</samp>
 
| Shows the casino slots minigame.
 
| Shows the casino slots minigame.
 
|-
 
|-
| <tt>Buildings</tt>
+
| <samp>Buildings</samp>
| <tt>Action Dialogue {{t|text}}</tt>
+
| <samp>Action Dialogue {{t|text}}</samp>
 
| Shows a generic dialogue box with the given text. See [[Modding:Dialogue|dialogue format]].<br />''Example: Action Dialogue Hi there @!''
 
| Shows a generic dialogue box with the given text. See [[Modding:Dialogue|dialogue format]].<br />''Example: Action Dialogue Hi there @!''
 
|-
 
|-
| <tt>Buildings</tt>
+
| <samp>Buildings</samp>
| <tt>Action DivorceBook</tt>
+
| <samp>Action DivorceBook</samp>
 
| Shows divorce options for the player's current marriage status (as if they clicked the [[Marriage#Divorce|divorce book]]).
 
| Shows divorce options for the player's current marriage status (as if they clicked the [[Marriage#Divorce|divorce book]]).
 
|-
 
|-
| <tt>Buildings</tt>
+
| <samp>Buildings</samp>
| <tt>Action Door {{t|npcName}} {{o|npcName}}</tt>
+
| <samp>Action Door {{t|npcName}} {{o|npcName}}</samp>
 
| Sets up an interior door that cannot be opened unless the player has two or more hearts of friendship with any of the named NPC(s). Placed on the lower of the two door tiles. See [[Modding:Dialogue|dialogue format]].<br />''Example: Action Door Abigail''
 
| Sets up an interior door that cannot be opened unless the player has two or more hearts of friendship with any of the named NPC(s). Placed on the lower of the two door tiles. See [[Modding:Dialogue|dialogue format]].<br />''Example: Action Door Abigail''
 
|-
 
|-
| <tt>Buildings</tt>
+
| <samp>Buildings</samp>
| <tt>Action ElliotBook</tt>
+
| <samp>Action ElliotBook</samp>
 
| TODO: Explain what this does.
 
| TODO: Explain what this does.
 
|-
 
|-
| <tt>Buildings</tt>
+
| <samp>Buildings</samp>
| <tt>Action ElliotPiano</tt>
+
| <samp>Action ElliotPiano</samp>
 
| TODO: Explain what this does.
 
| TODO: Explain what this does.
 
|-
 
|-
| <tt>Buildings</tt>
+
| <samp>Buildings</samp>
| <tt>Action EnterSewer</tt>
+
| <samp>Action EnterSewer</samp>
 
| Warps you to the sewer if you have obtained the key.
 
| Warps you to the sewer if you have obtained the key.
 
|-
 
|-
| <tt>Buildings</tt>
+
| <samp>Buildings</samp>
| <tt>Action EvilShrineLeft</tt>
+
| <samp>Action EvilShrineLeft</samp>
 
| Turns your kids into doves for a prismatic shard.
 
| Turns your kids into doves for a prismatic shard.
 
|-
 
|-
| <tt>Buildings</tt>
+
| <samp>Buildings</samp>
| <tt>Action EvilShrineCenter</tt>
+
| <samp>Action EvilShrineCenter</samp>
 
| Erases your ex-spouses memory of you.
 
| Erases your ex-spouses memory of you.
 
|-
 
|-
| <tt>Buildings</tt>
+
| <samp>Buildings</samp>
| <tt>Action EvilShrineRight</tt>
+
| <samp>Action EvilShrineRight</samp>
 
| Toggles monster spawning for your farm.
 
| Toggles monster spawning for your farm.
 
|-
 
|-
| <tt>Buildings</tt>
+
| <samp>Buildings</samp>
| <tt>Action Garbage {{t|ID}}</tt>
+
| <samp>Action Garbage {{t|ID}}</samp>
 
| Has a chance to give a specific item to the player based on the {{t|ID}}. Can only be clicked once per day. TODO: Explain what each {{t|ID}} means.
 
| Has a chance to give a specific item to the player based on the {{t|ID}}. Can only be clicked once per day. TODO: Explain what each {{t|ID}} means.
 
|-
 
|-
| <tt>Buildings</tt>
+
| <samp>Buildings</samp>
| <tt>Action Gunther</tt>
+
| <samp>Action Gunther</samp>
 
| Opens the museum menu where you can donate artifacts or claim rewards.
 
| Opens the museum menu where you can donate artifacts or claim rewards.
 
|-
 
|-
| <tt>Buildings</tt>
+
| <samp>Buildings</samp>
| <tt>Action HMGTF</tt>
+
| <samp>Action HMGTF</samp>
 
| Gives you "[[??HMTGF??]]" when you have a [[Super Cucumber]] in your hand.
 
| Gives you "[[??HMTGF??]]" when you have a [[Super Cucumber]] in your hand.
 
|-
 
|-
| <tt>Buildings</tt>
+
| <samp>Buildings</samp>
| <tt>Action IceCreamStand</tt>
+
| <samp>Action IceCreamStand</samp>
 
| If Summer, shows the Ice Cream Stand shopping screen. Otherwise, the player will be told to come back in the summer. (Needs an NPC behind the stand.)
 
| If Summer, shows the Ice Cream Stand shopping screen. Otherwise, the player will be told to come back in the summer. (Needs an NPC behind the stand.)
 
|-
 
|-
| <tt>Buildings</tt>
+
| <samp>Buildings</samp>
| <tt>Action JojaShop</tt>
+
| <samp>Action JojaShop</samp>
 
| Shows the Joja shopping screen.
 
| Shows the Joja shopping screen.
 
|-
 
|-
| <tt>Buildings</tt>
+
| <samp>Buildings</samp>
| <tt>Action Jukebox</tt>
+
| <samp>Action Jukebox</samp>
 
| Shows the jukebox menu to choose the ambient music.
 
| Shows the jukebox menu to choose the ambient music.
 
|-
 
|-
| <tt>Buildings</tt>
+
| <samp>Buildings</samp>
| <tt>Action kitchen</tt>
+
| <samp>Action kitchen</samp>
 
| Shows the cooking menu, if you're in the Farmhouse.
 
| Shows the cooking menu, if you're in the Farmhouse.
 
|-
 
|-
| <tt>Buildings</tt>
+
| <samp>Buildings</samp>
| <tt>Action Letter {{t|string messageKey}}</tt>
+
| <samp>Action Letter {{t|string messageKey}}</samp>
 
| Loads a message with the given key from the ''Content\Strings\StringsFromMaps.xnb'' file and displays it on-screen as a letter. Uses the same syntax as ''Data\mail.xnb''.
 
| Loads a message with the given key from the ''Content\Strings\StringsFromMaps.xnb'' file and displays it on-screen as a letter. Uses the same syntax as ''Data\mail.xnb''.
 
|-
 
|-
| <tt>Buildings</tt>
+
| <samp>Buildings</samp>
| <tt>Action LockedDoorWarp [{{t|int toX}} {{t|int toY}} {{t|string toArea}} {{t|int openTime}} {{t|int closeTime}}]</tt>
+
| <samp>Action LockedDoorWarp [{{t|int toX}} {{t|int toY}} {{t|string toArea}} {{t|int openTime}} {{t|int closeTime}}]</samp>
 
| Creates an activation warp normally used on doors with a time window for when it can be used. Note that you must use 24-hour times, i.e. 2000 for 8pm. <br />''Example: 6 29 SeedShop 900 2100''
 
| Creates an activation warp normally used on doors with a time window for when it can be used. Note that you must use 24-hour times, i.e. 2000 for 8pm. <br />''Example: 6 29 SeedShop 900 2100''
 
|-
 
|-
| <tt>Buildings</tt>
+
| <samp>Buildings</samp>
| <tt>Action LuauSoup</tt>
+
| <samp>Action LuauSoup</samp>
 
| Used for the Luau Festival, this is where you insert a food item for the soup.
 
| Used for the Luau Festival, this is where you insert a food item for the soup.
 
|-
 
|-
| <tt>Buildings</tt>
+
| <samp>Buildings</samp>
| <tt>Action MagicInk</tt>
+
| <samp>Action MagicInk</samp>
 
| Adds the Magic Ink to your wallet.
 
| Adds the Magic Ink to your wallet.
 
|-
 
|-
| <tt>Buildings</tt>
+
| <samp>Buildings</samp>
| <tt>Action Mailbox</tt>
+
| <samp>Action Mailbox</samp>
 
| Shows the next letter from the player's mailbox (if any).
 
| Shows the next letter from the player's mailbox (if any).
 
|-
 
|-
| <tt>Buildings</tt>
+
| <samp>Buildings</samp>
| <tt>Action Material</tt>
+
| <samp>Action Material</samp>
 
| Shows a summary of the player's stockpiled wood and stone.
 
| Shows a summary of the player's stockpiled wood and stone.
 
|-
 
|-
| <tt>Buildings</tt>
+
| <samp>Buildings</samp>
| <tt>Action Message {{t|string messageKey}}</tt>
+
| <samp>Action Message {{t|string messageKey}}</samp>
 
| Loads a message with the given key from the ''Content\Strings\StringsFromMaps.xnb'' file and displays it in a dialogue box.
 
| Loads a message with the given key from the ''Content\Strings\StringsFromMaps.xnb'' file and displays it in a dialogue box.
 
|-
 
|-
| <tt>Buildings</tt>
+
| <samp>Buildings</samp>
| <tt>Action MessageOnce {{t|int eventID}} {{t|string message}}</tt>
+
| <samp>Action MessageOnce {{t|int eventID}} {{t|string message}}</samp>
 
| If the player hasn't seen the event with ID {{t|eventID}}, marks that event seen and displays the given message text in a dialogue box. This does ''not'' parse [[Modding:Dialogue|dialogue format]].
 
| If the player hasn't seen the event with ID {{t|eventID}}, marks that event seen and displays the given message text in a dialogue box. This does ''not'' parse [[Modding:Dialogue|dialogue format]].
 
|-
 
|-
| <tt>Buildings</tt>
+
| <samp>Buildings</samp>
| <tt>Action MessageSpeech {{t|string messageKey}}</tt>
+
| <samp>Action MessageSpeech {{t|string messageKey}}</samp>
| Identical to <tt>Action Message</tt>, but replaces the usual inspection cursor with a speech cursor.
+
| Identical to <samp>Action Message</samp>, but replaces the usual inspection cursor with a speech cursor.
 
|-
 
|-
| <tt>Buildings</tt>
+
| <samp>Buildings</samp>
| <tt>Action MineSign {{t|string message}}</tt>
+
| <samp>Action MineSign {{t|string message}}</samp>
 
| Shows a mini-dialogue box with the given raw message text. This does ''not'' parse [[Modding:Dialogue|dialogue format]].
 
| Shows a mini-dialogue box with the given raw message text. This does ''not'' parse [[Modding:Dialogue|dialogue format]].
 
|-
 
|-
| <tt>Buildings</tt>
+
| <samp>Buildings</samp>
| <tt>Action MinecartTransport</tt>
+
| <samp>Action MinecartTransport</samp>
 
| Shows the minecart destination menu (or a message if not unlocked).
 
| Shows the minecart destination menu (or a message if not unlocked).
 
|-
 
|-
| <tt>Buildings</tt>
+
| <samp>Buildings</samp>
| <tt>Action MineElevator</tt>
+
| <samp>Action MineElevator</samp>
 
| Shows the mine elevator menu (to warp to a mine level) if the player has reached mine level 5+, else a mine elevator not working message.
 
| Shows the mine elevator menu (to warp to a mine level) if the player has reached mine level 5+, else a mine elevator not working message.
 
|-
 
|-
| <tt>Buildings</tt>
+
| <samp>Buildings</samp>
| <tt>Action NextMineLevel</tt>
+
| <samp>Action NextMineLevel</samp>
 
| Warps the player to the next mine level (or level 1 if they're not in the mine).
 
| Warps the player to the next mine level (or level 1 if they're not in the mine).
 
|-
 
|-
| <tt>Buildings</tt>
+
| <samp>Buildings</samp>
| <tt>Action Notes {{t|int noteID}}</tt>
+
| <samp>Action Notes {{t|int noteID}}</samp>
 
| If the player has found the specified lost book, displays its museum note text and marks it read.<br />''Example: Action Notes 17''
 
| If the player has found the specified lost book, displays its museum note text and marks it read.<br />''Example: Action Notes 17''
 
|-
 
|-
| <tt>Buildings</tt>
+
| <samp>Buildings</samp>
| <tt>Action NPCMessage {{t|str name}} "{{t|str dialogueKey}}"</tt>
+
| <samp>Action NPCMessage {{t|str name}} "{{t|str dialogueKey}}"</samp>
 
| If the named NPC is within 14 tiles of the player, reads dialogue with the given key from the string files and displays a dialogue box. See [[Modding:Dialogue|dialogue format]].<br />''Example: Action NPCMessage Abigail "Strings\\StringsFromCSFiles:Event.cs.1022"''
 
| If the named NPC is within 14 tiles of the player, reads dialogue with the given key from the string files and displays a dialogue box. See [[Modding:Dialogue|dialogue format]].<br />''Example: Action NPCMessage Abigail "Strings\\StringsFromCSFiles:Event.cs.1022"''
 
|-
 
|-
| <tt>Buildings</tt>
+
| <samp>Buildings</samp>
| <tt>Action playSound {{t|str cueName}}</tt>
+
| <samp>Action playSound {{t|str cueName}}</samp>
 
| Play the sound or music with the given name.
 
| Play the sound or music with the given name.
 
|-
 
|-
| <tt>Buildings</tt>
+
| <samp>Buildings</samp>
| <tt>Action QiCoins</tt>
+
| <samp>Action QiCoins</samp>
 
| Shows a dialogue which lets the player buy 10 Casino club coins if they have none, else shows how many they have.
 
| Shows a dialogue which lets the player buy 10 Casino club coins if they have none, else shows how many they have.
 
|-
 
|-
| <tt>Buildings</tt>
+
| <samp>Buildings</samp>
| <tt>Action Saloon</tt>
+
| <samp>Action Saloon</samp>
 
| Opens the Saloon menu, if Gus is nearby.
 
| Opens the Saloon menu, if Gus is nearby.
 
|-
 
|-
| <tt>Buildings</tt>
+
| <samp>Buildings</samp>
| <tt>Action SandDragon</tt>
+
| <samp>Action SandDragon</samp>
 
| Used for Part 3 of the Mysterious Mr. Qi Quest.
 
| Used for Part 3 of the Mysterious Mr. Qi Quest.
 
|-
 
|-
| <tt>Buildings</tt>
+
| <samp>Buildings</samp>
| <tt>Action Shop</tt>
+
| <samp>Action Shop</samp>
 
| On festival maps, opens the festival shop. No effect on non-festival maps.
 
| On festival maps, opens the festival shop. No effect on non-festival maps.
 
|-
 
|-
| <tt>Buildings</tt>
+
| <samp>Buildings</samp>
| <tt>Action Theater_BoxOffice</tt>
+
| <samp>Action Theater_BoxOffice</samp>
 
| Opens the ticket menu for the theater, if you have it unlocked.
 
| Opens the ticket menu for the theater, if you have it unlocked.
 
|-
 
|-
| <tt>Buildings</tt>
+
| <samp>Buildings</samp>
| <tt>Action TownMailbox {{t|ID}}</tt>
+
| <samp>Action TownMailbox {{t|ID}}</samp>
 
| TODO: Explain what this does.
 
| TODO: Explain what this does.
 
|-
 
|-
| <tt>Buildings</tt>
+
| <samp>Buildings</samp>
| <tt>Action Warp {{t|int x}} {{t|int y}} {{t|str area}}</tt>
+
| <samp>Action Warp {{t|int x}} {{t|int y}} {{t|str area}}</samp>
 
| Warps the player to the {{t|x}} {{t|y}} tile coordinate in the {{t|area}} game location.<br />''Example: Action Warp 76 9 Mountain''
 
| Warps the player to the {{t|x}} {{t|y}} tile coordinate in the {{t|area}} game location.<br />''Example: Action Warp 76 9 Mountain''
 
|-
 
|-
| <tt>Buildings</tt>
+
| <samp>Buildings</samp>
| <tt>Action WarpCommunityCenter</tt>
+
| <samp>Action WarpCommunityCenter</samp>
 
| Warps the player to the inside of the Community Center if they have access (else show an "it's locked" message).
 
| Warps the player to the inside of the Community Center if they have access (else show an "it's locked" message).
 
|-
 
|-
| <tt>Buildings</tt>
+
| <samp>Buildings</samp>
| <tt>Action WarpGreenhouse</tt>
+
| <samp>Action WarpGreenhouse</samp>
 
| Warps the player to the inside of their greenhouse if they've unlocked it, else shows a message about the greenhouse ruins.
 
| Warps the player to the inside of their greenhouse if they've unlocked it, else shows a message about the greenhouse ruins.
 
|-
 
|-
| <tt>Buildings</tt>
+
| <samp>Buildings</samp>
| <tt>Action WizardBook</tt>
+
| <samp>Action WizardBook</samp>
 
| If unlocked, you buy buildings from the wizard here.
 
| If unlocked, you buy buildings from the wizard here.
 
|-
 
|-
| <tt>Buildings</tt>
+
| <samp>Buildings</samp>
| <tt>Action WizardHatch</tt>
+
| <samp>Action WizardHatch</samp>
 
| If you're good enough friends with the wizard you warp to his basement, if not you get told you can't go in.
 
| If you're good enough friends with the wizard you warp to his basement, if not you get told you can't go in.
 
|-
 
|-
| <tt>Buildings</tt>
+
| <samp>Buildings</samp>
| <tt>Action WizardShrine</tt>
+
| <samp>Action WizardShrine</samp>
 
| Shows the character customisation menu normally available from the Wizard's tower.
 
| Shows the character customisation menu normally available from the Wizard's tower.
 
|}
 
|}
  
<small>¹ Tile properties are handled throughout the codebase using <tt>GameLocation::doesTileHaveProperty</tt>. Actions and touch actions are handled by <tt>GameLocation::performAction</tt> and <tt>GameLocation::performTouchAction</tt> respectively. Emote IDs are listed as <tt>Character</tt> constants.</small><br />
+
<small>¹ Tile properties are handled throughout the codebase using <samp>GameLocation::doesTileHaveProperty</samp>. Actions and touch actions are handled by <samp>GameLocation::performAction</samp> and <samp>GameLocation::performTouchAction</samp> respectively. Emote IDs are listed as <samp>Character</samp> constants.</small><br />
<small>² The <tt>T</tt> value (short for ''true'') is conventional, but any non-empty value will work too.</small>
+
<small>² The <samp>T</samp> value (short for ''true'') is conventional, but any non-empty value will work too.</small>
  
 
==Paths layer==
 
==Paths layer==
The <tt>Paths</tt> layer has icon tiles from the <tt>paths</tt> tilesheet which affect game behavior on the map:
+
The <samp>Paths</samp> layer has icon tiles from the <samp>paths</samp> tilesheet which affect game behavior on the map:
  
 
[[File:PathsExplanation.png|thumb|The tile indexes shown in the table.]]
 
[[File:PathsExplanation.png|thumb|The tile indexes shown in the table.]]
Line 816: Line 817:
 
|-
 
|-
 
| 8
 
| 8
| Add this tile to the [[#Map properties 2|<tt>Light</tt> map property]] with light type 4 (sconce).
+
| Add this tile to the [[#Map properties 2|<samp>Light</samp> map property]] with light type 4 (sconce).
 
| Indoors and festivals only.²
 
| Indoors and festivals only.²
 
|-
 
|-
Line 852: Line 853:
 
|-
 
|-
 
| 27
 
| 27
| When the location is created, add this tile to the [[#Map properties 2|<tt>BrookSounds</tt> map property]] with the <tt>babblingBrook</tt> sound.
+
| When the location is created, add this tile to the [[#Map properties 2|<samp>BrookSounds</samp> map property]] with the <samp>babblingBrook</samp> sound.
 
| Outdoors only.
 
| Outdoors only.
 
|-
 
|-
Line 860: Line 861:
 
|-
 
|-
 
| 29–30
 
| 29–30
| Place prebuilt [[cabin]]s in [[multiplayer]] based on the layout (29=nearby or 30=separate) and [[#Tile properties 2|<tt>Order</tt> tile property]], with the top-left corner on this tile.
+
| Place prebuilt [[cabin]]s in [[multiplayer]] based on the layout (29=nearby or 30=separate) and [[#Tile properties 2|<samp>Order</samp> tile property]], with the top-left corner on this tile.
 
| Farm only.
 
| Farm only.
 
|-
 
|-
Line 874: Line 875:
 
Notes:
 
Notes:
 
# In the [[Mutant Bug Lair]], debris spawn rate is reduced to 33% chance per day.
 
# In the [[Mutant Bug Lair]], debris spawn rate is reduced to 33% chance per day.
# Restriction can be overridden with <tt>forceLoadPathLayerLights</tt> map property.
+
# Restriction can be overridden with <samp>forceLoadPathLayerLights</samp> map property.
  
 
==Potential issues==
 
==Potential issues==
Line 887: Line 888:
 
: [[File:Tiled tileset order B.png|thumb|none|'''Wrong''' way to add a new tilesheet (changes the original order).]]
 
: [[File:Tiled tileset order B.png|thumb|none|'''Wrong''' way to add a new tilesheet (changes the original order).]]
  
: If the game tries to access a tile from the first tilesheet, it will get it from <tt>customSheet</tt> instead of the expected <tt>Paths</tt> tilesheet. That can cause anything from visual glitches (e.g. showing the wrong tile images) to outright crashes (especially if the new tilesheet is smaller than the one it expected).
+
: If the game tries to access a tile from the first tilesheet, it will get it from <samp>customSheet</samp> instead of the expected <samp>Paths</samp> tilesheet. That can cause anything from visual glitches (e.g. showing the wrong tile images) to outright crashes (especially if the new tilesheet is smaller than the one it expected).
  
 
: To avoid that, always keep the original tilesheets in the same order and prefix new tilesheets with <code>z_</code> so they're added at the end:
 
: To avoid that, always keep the original tilesheets in the same order and prefix new tilesheets with <code>z_</code> so they're added at the end:
Line 896: Line 897:
  
 
===Local copy of a vanilla tilesheet===
 
===Local copy of a vanilla tilesheet===
When editing a map in Tiled, you may need to copy vanilla tilesheets like <tt>path.png</tt> or <tt>spring_town.png</tt> into the map folder for Tiled to find. If the tilesheet is still there when you load the game, SMAPI will use it for your map instead of the game's vanilla tilesheet, which may have unintended effects (e.g. edits from recolor mods won't work in your map).
+
When editing a map in Tiled, you may need to copy vanilla tilesheets like <samp>path.png</samp> or <samp>spring_town.png</samp> into the map folder for Tiled to find. If the tilesheet is still there when you load the game, SMAPI will use it for your map instead of the game's vanilla tilesheet, which may have unintended effects (e.g. edits from recolor mods won't work in your map).
  
 
To avoid issues, you can either...
 
To avoid issues, you can either...
 
* Delete vanilla tilesheets from the folder before testing or releasing the mod.
 
* Delete vanilla tilesheets from the folder before testing or releasing the mod.
* Rename the tilesheet file to start with a dot (like <tt>.spring_town.png</tt>) and reference that. When SMAPI loads the map in-game, it'll automatically ignore the dot and look for <tt>spring_town.png</tt> in the local files or <tt>Content/Maps</tt> folder.
+
* Rename the tilesheet file to start with a dot (like <samp>.spring_town.png</samp>) and reference that. When SMAPI loads the map in-game, it'll automatically ignore the dot and look for <samp>spring_town.png</samp> in the local files or <samp>Content/Maps</samp> folder.
  
 
===Map-specific issues===
 
===Map-specific issues===
Line 909: Line 910:
 
! issue
 
! issue
 
|-
 
|-
| <tt>Maps/Farm</tt><br /><tt>Maps/Farm_Combat</tt><br /><tt>Maps/Farm_Fishing</tt><br /><tt>Maps/Farm_Foraging</tt><br /><tt>Maps/Farm_Mining</tt>
+
| <samp>Maps/Farm</samp><br /><samp>Maps/Farm_Combat</samp><br /><samp>Maps/Farm_Fishing</samp><br /><samp>Maps/Farm_Foraging</samp><br /><samp>Maps/Farm_Mining</samp>
 
| &#32;
 
| &#32;
* The farm's <tt>Paths</tt> layer must have at least one tile with index 22 (grass spawn). This is used to initialise the grass code when the save is loaded, even if no grass is spawned.<ref>The grass sound is set in <tt>Grass::loadSprite</tt>, which is called from <tt>GameLocation::loadObjects</tt> if the <tt>Paths</tt> layer has tile index 22. (The game spawns a grass for each such tile, and later removes them.)</ref>
+
* The farm's <samp>Paths</samp> layer must have at least one tile with index 22 (grass spawn). This is used to initialise the grass code when the save is loaded, even if no grass is spawned.<ref>The grass sound is set in <samp>Grass::loadSprite</samp>, which is called from <samp>GameLocation::loadObjects</samp> if the <samp>Paths</samp> layer has tile index 22. (The game spawns a grass for each such tile, and later removes them.)</ref>
 
|-
 
|-
| <tt>Maps/FarmHouse*</tt>
+
| <samp>Maps/FarmHouse*</samp>
 
| &#32;
 
| &#32;
* The two bed tiles where the player can walk must have two properties: <tt>Bed T</tt> (used to decide if the player is in bed) and <tt>TouchAction Sleep</tt>.
+
* The two bed tiles where the player can walk must have two properties: <samp>Bed T</samp> (used to decide if the player is in bed) and <samp>TouchAction Sleep</samp>.
 
* Deleting or changing the wallpapers and floors will cause a game crash.
 
* Deleting or changing the wallpapers and floors will cause a game crash.
* The <tt>DayTiles</tt> and <tt>NightTiles</tt> map properties are cleared when loading the spouse room, so custom values for those properties won't work for married players.
+
* The <samp>DayTiles</samp> and <samp>NightTiles</samp> map properties are cleared when loading the spouse room, so custom values for those properties won't work for married players.
 
|-
 
|-
| <tt>Maps/SpouseRooms</tt>
+
| <samp>Maps/SpouseRooms</samp>
 
| &#32;
 
| &#32;
* If you add or resize any tilesheet, you must also edit <tt>Maps/FarmHouse1_marriage</tt> and <tt>Maps/FarmHouse2_marriage</tt> to have the same changes (even if you don't make any other changes to the farmhouse). This is needed because the tilesheet references and sizes are stored as part of the map file.
+
* If you add or resize any tilesheet, you must also edit <samp>Maps/FarmHouse1_marriage</samp> and <samp>Maps/FarmHouse2_marriage</samp> to have the same changes (even if you don't make any other changes to the farmhouse). This is needed because the tilesheet references and sizes are stored as part of the map file.
 
|}
 
|}
 
<small><references /></small>
 
<small><references /></small>
Line 954: Line 955:
 
; How do I fix it?
 
; How do I fix it?
 
:# Copy the tilesheets you're using into the same folder as the map.
 
:# Copy the tilesheets you're using into the same folder as the map.
:# For unchanged vanilla tilesheets, rename them to start with a dot (like <tt>.townInterior.png</tt>). This tells SMAPI to ignore the file when loading the map in-game, and load the one in the <tt>Content</tt> folder instead.
+
:# For unchanged vanilla tilesheets, rename them to start with a dot (like <samp>.townInterior.png</samp>). This tells SMAPI to ignore the file when loading the map in-game, and load the one in the <samp>Content</samp> folder instead.
 
:# In Tiled, click the edit icon under the tilesheet.
 
:# In Tiled, click the edit icon under the tilesheet.
 
:# In the tab that opens, click ''Tileset > Tileset Properties''.
 
:# In the tab that opens, click ''Tileset > Tileset Properties''.
Line 1,001: Line 1,002:
  
 
===Using an asset editor===
 
===Using an asset editor===
Most map edits should be applied using an [[Modding:Modder Guide/APIs/Content|asset editor]], so your changes aren't lost if another mod reloads the map. This works with the <tt>Map</tt> asset directly before it's used by the [[Modding:Modder Guide/Game Fundamentals#GameLocation et al|in-game location]], so you can't use location methods at this point.
+
Most map edits should be applied using an [[Modding:Modder Guide/APIs/Content|asset editor]], so your changes aren't lost if another mod reloads the map. This works with the <samp>Map</samp> asset directly before it's used by the [[Modding:Modder Guide/Game Fundamentals#GameLocation et al|in-game location]], so you can't use location methods at this point.
  
First you'll need to set up an asset editor, which mainly involves implementing <tt>IAssetEditor</tt> on your mod class. For example, this mod code edits the town map:
+
First you'll need to set up an asset editor, which mainly involves implementing <samp>IAssetEditor</samp> on your mod class. For example, this mod code edits the town map:
  
 
<syntaxhighlight lang="C#">
 
<syntaxhighlight lang="C#">
Line 1,164: Line 1,165:
 
==See also==
 
==See also==
 
* Discord user foggywizard#7430 [https://imgur.com/a/l1Ql16D annotated some screenshot guides for using Tiled]. These include an annotated overview, how to find where the coordinates are, and how to rename a tilesheet.
 
* Discord user foggywizard#7430 [https://imgur.com/a/l1Ql16D annotated some screenshot guides for using Tiled]. These include an annotated overview, how to find where the coordinates are, and how to rename a tilesheet.
 
+
-->
[[Category:Modding]]
 
 
 
[[ru:Модификации:Карты]]
 

Latest revision as of 00:08, 26 February 2023