Line 1,205: |
Line 1,205: |
| | | |
| ==Boots== | | ==Boots== |
− | Boots are items that can be equipped in the player's [[footwear]] slot.
| |
− |
| |
− | They have their data in <samp>Data/Boots</samp>, their in-game sprites in <samp>Maps/springobjects</samp> (item sprite) and <samp>Characters/Farmer/shoeColors</samp> (shoe color), and their code in <samp>StardewValley.Objects.Boots</samp>.
| |
− |
| |
| ===Data format=== | | ===Data format=== |
− | The boots data in <samp>Data/Boots</samp> consists of an integer→string dictionary with entries like this:
| + | You can create/edit [[Footwear|boots]] by editing the <samp>Data/Boots</samp> asset. This consists of a string → string dictionary, where... |
− | | + | * The key is the unqualified [[Modding:Common_data_field_types#Item_ID|item ID]]. |
− | <syntaxhighlight lang="json">
| + | * The value is a slash-delimited string with the fields listed below. |
− | "511": "Dark Boots/Made from thick black leather./250/4/2/7"
| |
− | </syntaxhighlight>
| |
− | | |
− | 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 1,225: |
Line 1,217: |
| |- | | |- |
| | 0 | | | 0 |
− | | name | + | | Name |
| | The internal item name (and display name in English). | | | The internal item name (and display name in English). |
| |- | | |- |
| | 1 | | | 1 |
− | | description | + | | Description |
| | The translated item description shown in-game. | | | The translated item description shown in-game. |
| |- | | |- |
| | 2 | | | 2 |
− | | price | + | | Price |
| | '''Unused.''' The actual price is calculated as <samp>(''added defence'' × 100) + (''added immunity'' × 100)</samp>. | | | '''Unused.''' The actual price is calculated as <samp>(''added defence'' × 100) + (''added immunity'' × 100)</samp>. |
| |- | | |- |
| | 3 | | | 3 |
− | | added defense | + | | Added Defense |
| | A [[defense]] bonus applied to the player while equipped. | | | A [[defense]] bonus applied to the player while equipped. |
| |- | | |- |
| | 4 | | | 4 |
− | | added immunity | + | | Added Immunity |
| | An [[immunity]] bonus applied to the player while equipped. | | | An [[immunity]] bonus applied to the player while equipped. |
| |- | | |- |
| | 5 | | | 5 |
− | | color index | + | | Color Index |
− | | The index of the boot color in the <samp>Characters/Farmer/shoeColors</samp> spritesheet. | + | | The boots color index within the Color Texture, where 0 is the top-left set, if present, otherwise the <samp>Characters/Farmer/shoeColors</samp> spritesheet. |
| |- | | |- |
| | 6 | | | 6 |
− | | display name | + | | Display Name |
| | The translated item name shown in-game (for non-English assets only). | | | The translated item name shown in-game (for non-English assets only). |
| + | |- |
| + | | 7 |
| + | | Color Texture |
| + | | The asset name for the texture containing the boots color sprite. |
| + | |- |
| + | | 8 |
| + | | Sprite Index |
| + | | The boots sprite index within the Texture, where 0 is the top-left set. |
| + | |- |
| + | | 9 |
| + | | Texture |
| + | | The asset name for the texture containing the boots sprite. |
| |} | | |} |
| + | |
| + | The boots data in <samp>Data/Boots</samp> consists of a string → string dictionary with entries like this: |
| + | |
| + | <syntaxhighlight lang="json"> |
| + | "511": "Dark Boots/Made from thick black leather./250/4/2/7" |
| + | </syntaxhighlight> |
| + | |
| + | A custom entry might look something like this: |
| + | |
| + | <syntaxhighlight lang="json"> |
| + | { |
| + | "Format": "2.2.0", |
| + | "Changes": [ |
| + | { |
| + | "LogName": "Load boots texture", |
| + | "Action": "Load", |
| + | "Target": "{{ModId}}/Boots, {{ModId}}/BootsColor", |
| + | "FromFile": "assets/{{TargetWithoutPath}}.png" |
| + | }, |
| + | { |
| + | "LogName": "Add boots to boots data", |
| + | "Action": "EditData", |
| + | "Target": "Data/Boots", |
| + | "Entries": { |
| + | "{{ModId}}_OPBoots": "Overpowered Boots/These boots are totally broken!/1000000/100/100/8/Overpowered Boots/{{ModId}}\\BootsColor/0/{{ModId}}\\Boots" |
| + | } |
| + | } |
| + | ] |
| + | } |
| + | </syntaxhighlight> |
| | | |
| ==Pants== | | ==Pants== |