Jump to content

Modding:Furniture: Difference between revisions

From Stardew Valley Wiki
imported>Pathoschild
update link
imported>Pathoschild
adjust page post-split, add some high-level info, update outdated info
Line 1: Line 1:
← [[Modding:Items|Items]]
← [[Modding:Items|Items]]


==Furniture==
This page explains how the game stores and parses furniture-type item data. For items in general, see [[Modding:Items]].
Furniture are decorative items which can be placed in the world, including chairs which the player can sit on.


They have their data in <samp>Data/Furniture</samp>, their in-game sprites in <samp>TileSheets/furniture</samp>, translations in <samp>Strings/Furniture</samp>, and their code in <samp>StardewValley.Objects.Furniture</samp>.
==Overview==
Furniture are decorative items which can be placed in the world. In some cases, players can sit on them or place items on them.


===Data format===
They have their data in <samp>Data/Furniture</samp>, their sprites in <samp>TileSheets/furniture</samp> by default, their vanilla translations in <samp>Strings/Furniture</samp>, and their code in <samp>StardewValley.Objects.Furniture</samp>.
The furniture data in <samp>Data/Furniture</samp> consists of an integer→string dictionary with entries like this:


<syntaxhighlight lang="json">
==Data format==
  "18": "Country Chair/chair/-1/-1/4/750"
The furniture data in <samp>Data/Furniture</samp> consists of an string → string lookup, where...
</syntaxhighlight>
* The key is the [[Modding:Common data field types#Item ID|unqualified item ID]].
 
* The value is a slash-delimited strings with the fields listed below.
For each entry in the data asset, the key is the item's <samp>ParentSheetIndex</samp> and the value is a slash-delimited string with these fields:


{| class="wikitable"
{| class="wikitable"
Line 23: Line 21:
| 0
| 0
| name
| name
| The internal item name (and display name in English).
| The internal item name.
|-
|-
| 1
| 1
| type
| type
| The furniture type. Possible values:
| The furniture type. Possible values:
{| class="wikitable sortable"
* <samp>chair</samp>
|-
* <samp>armchair</samp>
! value
* <samp>bed</samp>
|-
* <samp>bed child</samp>
| chair
* <samp>bed double</samp>
|-
* <samp>bench</samp>
| bench
* <samp>bookcase</samp>
|-
* <samp>couch</samp>
| couch
* <samp>decor</samp>
|-
* <samp>dresser</samp>
| armchair
* <samp>fireplace</samp>
|-
* <samp>fishtank</samp>
| dresser
* <samp>lamp</samp>
|-
* <samp>long table</samp>
| long table
* <samp>other</samp>
|-
* <samp>painting</samp>
| painting
* <samp>randomized_plant</samp>
|-
* <samp>rug</samp>
| lamp
* <samp>sconce</samp>
|-
* <samp>table</samp>
| decor
* <samp>torch</samp>
|-
* <samp>window</samp>
| other
|-
| bookcase
|-
| table
|-
| rug
|-
| window
|-
| fireplace
|-
| bed
|-
| bed double
|-
| bed child
|-
| torch
|-
| sconce
|-
| randomized_plant
|-
| fishtank
|}
|-
|-
| 2
| 2
Line 95: Line 67:
| 6
| 6
| placement restriction
| placement restriction
| Where the furniture can be placed.  
| Where the furniture can be placed.
 
Possible values:
{| class="wikitable sortable"
{| class="wikitable sortable"
|-
|-
! value
! value
! meaning
! effect
|-
|-
| -1  
| -1  
Line 134: Line 108:
| ''(Optional)'' A space-delimited list of [[Modding:Context tags|context tags]] which apply to this furniture. Default none.
| ''(Optional)'' A space-delimited list of [[Modding:Context tags|context tags]] which apply to this furniture. Default none.
|}
|}
==See also==
* [[Modding:Items]] for item data in general


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

Revision as of 00:23, 16 December 2024

← Items

This page explains how the game stores and parses furniture-type item data. For items in general, see Modding:Items.

Overview

Furniture are decorative items which can be placed in the world. In some cases, players can sit on them or place items on them.

They have their data in Data/Furniture, their sprites in TileSheets/furniture by default, their vanilla translations in Strings/Furniture, and their code in StardewValley.Objects.Furniture.

Data format

The furniture data in Data/Furniture consists of an string → string lookup, where...

  • The key is the unqualified item ID.
  • The value is a slash-delimited strings with the fields listed below.
index field effect
0 name The internal item name.
1 type The furniture type. Possible values:
  • chair
  • armchair
  • bed
  • bed child
  • bed double
  • bench
  • bookcase
  • couch
  • decor
  • dresser
  • fireplace
  • fishtank
  • lamp
  • long table
  • other
  • painting
  • randomized_plant
  • rug
  • sconce
  • table
  • torch
  • window
2 tilesheet size The furniture sprite size on the tilesheet, measured in tiles. This can be <width> <height> (e.g. 1 2), or -1 to use the default size for the type.
3 bounding box size The size of the hitbox when the furniture is placed in-game, measured in tiles. The bounding box will be anchored to the bottom-left corner and extend upwards and rightwards. This can be <width> <height> (e.g. 1 2), or -1 to use the default size for the type.
4 rotations The number of rotations possible (1, 2, or 4).
5 price The price when purchased from a shop.
6 placement restriction Where the furniture can be placed.

Possible values:

value effect
-1 default (uses furniture type)
0 indoors-only
1 outdoors-only
2 indoors or outdoors
7 display name The translated furniture name, which allows tokenizable strings.
8 sprite index The sprite index within the spritesheet texture to draw.
9 texture (Optional) The asset name of the texture to draw. Defaults to TileSheets/furniture.
10 off limits for random sale (Optional) Whether to prevent this furniture from appearing in randomly generated shop stocks and the furniture catalogue. Default false.
11 context tags (Optional) A space-delimited list of context tags which apply to this furniture. Default none.

See also