Changes

2,210 bytes added ,  15:53, 11 December 2021
→‎Map edits: + advanced edits > Sitting on non-furniture chairs from Modding:Migrate to Stardew Valley 1.5#Sitting on non-furniture chairs
Line 238: Line 238:     
{{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.}}
 
{{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.}}
 +
 +
==Advanced edits==
 +
===Sitting on non-furniture chairs===
 +
Players can sit on chairs that are part of the map. This works by checking the tile on the <samp>Buildings</samp> layer, and comparing its tilesheet and tilesheet index to the data in <samp>Data\ChairTiles</samp>.
 +
 +
Each entry has a key in the form <code>sheet filename/tile X/tile Y</code>:
 +
{| class="wikitable"
 +
|-
 +
! field
 +
! description
 +
|-
 +
| sheet filename
 +
| The ''file name'' of the tilesheet, without the file extension. For example, for a tilesheet loaded from <code>assets/some-tilesheet.png</code>, this should be <code>some-tilesheet</code>.
 +
|-
 +
| tile X<br />tile Y
 +
| The tile's X and Y position in the map tilesheet, starting at zero.
 +
|}
 +
 +
And a value in the form <code>width in tiles/height in tiles/direction/type/draw tile X/draw tile Y/is seasonal/alternate tilesheet</code>:
 +
{| class="wikitable"
 +
|-
 +
! field
 +
! description
 +
|-
 +
| width in tiles<br />height in tiles
 +
| The size of the seat in tiles. For example, a width of 2 lets the player sit on the next tile to the right of it too.
 +
|-
 +
| direction
 +
| The direction the player should face when sitting. The possible values are <samp>down</samp>, <samp>left</samp>, <samp>right</samp>, <samp>up</samp>, or <samp>opposite</samp>. Any other value defaults to <samp>up</samp>.
 +
|-
 +
| type
 +
| An arbitrary seat code (like <samp>playground</samp> or <samp>ccdesk</samp>), which affects hardcoded game logic for specific seats in the game. You can specify an invalid value like <samp>default</samp> to ignore this.
 +
|-
 +
| draw tile X<br />draw tile Y
 +
| The X and Y position in <samp>TileSheets\ChairTiles</samp> (or the custom tilesheet) to draw when the player is sitting, starting at 0. If the width and/or height are more than 1, this is the position of the top-left tile.
 +
|-
 +
| is seasonal
 +
| Whether to draw seasonal variants when sitting. If enabled, the {{t|draw tile X}} and {{t|draw tile Y}} are offset by one width for each season. In other words, the spring/summer/fall/winter sprites should appear in the draw tilesheet directly adjacent, moving rightward in that order.
 +
|-
 +
| alternate tilesheet
 +
| The tilesheet from which to get the draw tiles, instead of <samp>TileSheets\ChairTiles</samp>.
 +
|}
    
==Known properties==
 
==Known properties==
translators
8,404

edits