Jump to content

Modding:Pants: Difference between revisions

From Stardew Valley Wiki
imported>Pathoschild
adjust page post-split, add some high-level info
imported>Sunbeam135
No edit summary
 
(3 intermediate revisions by 2 users not shown)
Line 4: Line 4:


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


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>.
They have [[Modding:Items#Item types|item type]] <code>(P)</code> (or <code>ItemRegistry.type_pants</code> in C# code), 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>.


==Data format==
==Data format==
Line 68: Line 68:


[[Category:Modding]]
[[Category:Modding]]
[[ru:Модификации:Штаны]]
[[zh:模组:裤子]]

Latest revision as of 21:53, 12 January 2026

← 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 item type (P) (or ItemRegistry.type_pants in C# code), 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