Line 443: |
Line 443: |
| | | |
| ===Data format=== | | ===Data format=== |
− | The object data in <samp>Data/Objects</samp> consists of an integer→string dictionary with entries like this: | + | The object data in <samp>Data/Objects</samp> consists of a string→ObjectData dictionary (where ObjectData is defined in the game code in <samp>StardewValley.GameData.Objects.ObjectData</samp>). It has entries like this: |
| <syntaxhighlight lang="json"> | | <syntaxhighlight lang="json"> |
− | "18": "Daffodil/30/0/Basic -81/Daffodil/A traditional spring flower that makes a nice gift." | + | "18": { |
| + | "Name": "Daffodil", |
| + | "DisplayName": "[LocalizedText Strings\\Objects:Daffodil_Name]", |
| + | "Description": "[LocalizedText Strings\\Objects:Daffodil_Description]", |
| + | "Type": "Basic", |
| + | "Category": -81, |
| + | "Price": 30, |
| + | "Texture": null, |
| + | "SpriteIndex": 18, |
| + | "Edibility": 0, |
| + | "IsDrink": false, |
| + | "Buffs": null, |
| + | "GeodeDropsDefaultItems": false, |
| + | "GeodeDrops": null, |
| + | "ArtifactSpotChances": null, |
| + | "ExcludeFromFishingCollection": false, |
| + | "ExcludeFromShippingCollection": false, |
| + | "ExcludeFromRandomSale": false, |
| + | "ContextTags": [ |
| + | "color_yellow", |
| + | "forage_item", |
| + | "season_spring" |
| + | ], |
| + | "CustomFields": null |
| + | } |
| </syntaxhighlight> | | </syntaxhighlight> |
| | | |
| For each entry in the data asset: | | For each entry in the data asset: |
| * The key (before the colon) is the item ID and its sprite index within the [[Modding:Items/Object sprites|object spritesheet]] (saved as <samp>ParentSheetIndex</samp> in-code). | | * The key (before the colon) is the item ID and its sprite index within the [[Modding:Items/Object sprites|object spritesheet]] (saved as <samp>ParentSheetIndex</samp> in-code). |
− | * The value (after the colon) is a slash-delimited string with the fields listed below. Fields 0–5 are used by most object; fields 6–11 are only used for a select few items. The objects with keys 516–534 (<samp>Ring.ringLowerIndexRange</samp> through <samp>Ring.ringUpperIndexRange</samp>) and 801 (wedding ring) are hardcoded as rings. | + | * The value (after the colon) is the data pertaining to that object, with the fields listed below. The objects with keys 516–534 (<samp>Ring.ringLowerIndexRange</samp> through <samp>Ring.ringUpperIndexRange</samp>) and 801 (wedding ring) are hardcoded as rings. |
| + | |
| | | |
| {| class="wikitable" | | {| class="wikitable" |