Changes

Jump to navigation Jump to search
2,258 bytes added ,  18:27, 28 March 2022
Adding an example explanation for the daffodil item example.
Line 334: Line 334:  
| How long the buffs provided by the previous field last, measured in real seconds (assuming [[Day Cycle#Time speed|the default time speed]]). The buff duration number shown in-game will always be one second less than the calculated value.
 
| How long the buffs provided by the previous field last, measured in real seconds (assuming [[Day Cycle#Time speed|the default time speed]]). The buff duration number shown in-game will always be one second less than the calculated value.
 
|}
 
|}
 +
 +
For example, let's look at the <samp>"18": "Daffodil/30/0/Basic -81/Daffodil/A traditional spring flower that makes a nice gift."</samp> object data example for the [[Daffodil|daffodil item]]. The <samp>"18"</samp> string refers to the daffodil sprite at <samp>ParentSheetIndex</samp> of <samp>18</samp> for the [[Modding:Items/Object_sprites|objects category sprite sheet]]. The value string for the <samp>"18"</samp> key contains the rest of the item data.
 +
 +
The <samp>Daffodil</samp> (at index 0) refers to the English name of the item and the string value used internally in Stardew Valley's source code for this item. The <samp>/</samp> slash following <samp>Daffodil</samp>separates the item name from the next piece of data, the price. The <samp>30</samp> price (at index 1) means this item goes for 30g when sold by the player. This is not the price of the item when sold by shops. The <samp>0</samp> (at index 2) is the edibility of daffodils, meaning it can be eaten but gives 0 health (0 x 2.5) and 0 energy (0 x 1.125).
 +
 +
The <samp>Basic -81</samp> is the daffodil's type and category. Like all category values, the <samp>-81</samp> is a negative integer. The <samp>-81</samp> value can be found in the [[Modding:Items#Categories|Categories section]] of this documentation. The types listed in ''ObjectInformation.json'' file are <samp>Ring</samp>, <samp>Fish</samp>, <samp>Arch</samp>, <samp>asdf</samp>, <samp>Seeds</samp>, <samp>Crafting</samp>, <samp>Quest</samp>, <samp>Basic</samp>, <samp>Cooking</samp>, and <samp>Minerals</samp>. Currently, the different types are not documented and you have to see how they are used in the decompiled Stardew Valley source code.
 +
 +
The next <samp>Daffodil</samp> is the translated display name shown to the player in-game. The data we're looking at is for the English version of Stardew Valley, so it is <samp>Daffodil</samp>. However, in the ''ObjectInformation.es-ES.json'' file for the Spanish translation, it is <samp>Narciso</samp>.
 +
 +
Finally, <samp>A traditional spring flower that makes a nice gift.</samp> is the translated description of the object. In the ''ObjectInformation.es-ES.json'' file for the Spanish translation, it is <samp>Una flor tradicional de primavera popular como regalo.</samp>
    
===Notes===
 
===Notes===
32

edits

Navigation menu