Jump to content

Modding:Pants: Difference between revisions

From Stardew Valley Wiki
imported>Pathoschild
split from Modding:Items; attribution: Pathoschild (main author), BarleyZP (copy info from 1.6 migration guide with main content by Pathoschild and formatting fixes by Atravita, followup fixes)
 
imported>Pathoschild
adjust page post-split, add some high-level info
Line 1: Line 1:
← [[Modding:Items|Items]]
← [[Modding:Items|Items]]


==Pants==
This page explains how the game stores and parses pants-type item data. For items in general, see [[Modding:Items]].


===Data format===
==Overview==
Pants are items that can be equipped in the player's [[pants]] slot. These change the player sprite.


You can create/edit [[Tailoring#Pants|pants]] by editing the <samp>Data/Pants</samp> asset. This consists of a string → model lookup, where...
They have their data in <samp>Data/Pants</samp>, their icon sprites in <samp>Characters/Farmer/pants</samp> by default, and their code in <samp>StardewValley.Objects.Clothing</samp>.
* The key is the unqualified [[Modding:Common_data_field_types#Item_ID|item ID]].
 
==Data format==
The pants data in <samp>Data/Pants</samp> consists of a string → model lookup, where...
* The key is the [[Modding:Common data field types#Item ID|unqualified item ID]].
* The value is a model with the fields listed below.
* The value is a model with the fields listed below.


====Basic pants data====
===Basic data===
{| class="wikitable"
{| class="wikitable"
|-
|-
Line 25: Line 29:
|}
|}


====Appearance====
===Appearance===
{| class="wikitable"
{| class="wikitable"
|-
|-
Line 47: Line 51:
|}
|}


====Other====
===Other===
{| class="wikitable"
{| class="wikitable"
|-
|-
Line 59: Line 63:
| The [[Modding:Common_data_field_types#Custom_fields|custom fields]] for this entry.
| The [[Modding:Common_data_field_types#Custom_fields|custom fields]] for this entry.
|}
|}
==See also==
* [[Modding:Items]] for item data in general


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

Revision as of 00:30, 16 December 2024

← Items

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

Overview

Pants are items that can be equipped in the player's pants slot. These change the player sprite.

They have their data in Data/Pants, their icon sprites in Characters/Farmer/pants by default, and their code in StardewValley.Objects.Clothing.

Data format

The pants data in Data/Pants consists of a string → model lookup, where...

Basic data

field purpose
Name (Optional) The internal name for the item. Default Pants.
DisplayName
Description
(Optional) A tokenizable string for the item's in-game display name and description. Defaults to the generic pants text (Pants and A wearable pair of pants).
Price (Optional) The default price when the item is sold to the player in a shop. Default 50.

Appearance

field purpose
Texture The asset name for the texture containing the pants' sprite. Defaults to Characters/Farmer/pants.
SpriteIndex The pants' sprite index within the Texture, where 0 is the top-left set.
DefaultColor (Optional) The dye color to apply to the sprite when the player hasn't dyed it yet, if any. See color format. Default 255 235 203 (which matches the color of the cloth item).
CanBeDyed (Optional) Whether the player can dye these pants. Default false.
IsPrismatic (Optional) Whether the pants continuously shift colors. This overrides DefaultColor and CanBeDyed if set. Default false.

Other

field purpose
CanChooseDuringCharacterCustomization (Optional) Whether these pants can be selected on the character customization screen (e.g. when creating a character). Default false.
CustomFields The custom fields for this entry.

See also