Changes

Jump to navigation Jump to search
Fix links that were targeting as if this page was still on the migration page
Line 20: Line 20:  
|-
 
|-
 
| <samp>House</samp>
 
| <samp>House</samp>
| The [[#Custom buildings|building ID]] for the main building type that houses this animal. The animal will also be placeable in buildings whose <samp>ValidOccupantTypes</samp> field contains this value.
+
| The [[Modding:Migrate to Stardew Valley 1.6#Custom buildings|building ID]] for the main building type that houses this animal. The animal will also be placeable in buildings whose <samp>ValidOccupantTypes</samp> field contains this value.
 
|-
 
|-
 
| <samp>Gender</samp>
 
| <samp>Gender</samp>
Line 98: Line 98:  
|-
 
|-
 
| <samp>EggItemIds</samp>
 
| <samp>EggItemIds</samp>
| ''(Optional)'' A list of the [[#Custom items|object IDs]] that can be placed in the [[incubator]] or [[Ostrich Incubator|ostrich incubator]] to hatch this animal. If the animal's <samp>House</samp> field doesn't match the current building, the entry will be ignored. Default none.
+
| ''(Optional)'' A list of the [[Modding:Items|object IDs]] that can be placed in the [[incubator]] or [[Ostrich Incubator|ostrich incubator]] to hatch this animal. If the animal's <samp>House</samp> field doesn't match the current building, the entry will be ignored. Default none.
 
|-
 
|-
 
| <samp>IncubationTime</samp>
 
| <samp>IncubationTime</samp>
Line 159: Line 159:  
|-
 
|-
 
| <samp>ItemId</samp>
 
| <samp>ItemId</samp>
| The [[#Custom items|''unqualified'' object ID]] of the item to produce.
+
| The [[Modding:Items|''unqualified'' object ID]] of the item to produce.
 
|-
 
|-
 
| <samp>Condition</samp>
 
| <samp>Condition</samp>
Line 183: Line 183:  
|-
 
|-
 
| <samp>DeluxeProduceCareDivisor</samp><br /><samp>DeluxeProduceLuckMultiplier</samp>
 
| <samp>DeluxeProduceCareDivisor</samp><br /><samp>DeluxeProduceLuckMultiplier</samp>
| ''(Optional)'' [[#Quantity modifiers|Quantity modifiers]] which change the probability of producing the <samp>DeluxeProduceItemId</samp>, based on this formula:
+
| ''(Optional)'' [[Modding:Common data field types#Quantity modifiers|Quantity modifiers]] which change the probability of producing the <samp>DeluxeProduceItemId</samp>, based on this formula:
 
<pre>
 
<pre>
 
if happiness > 200:
 
if happiness > 200:
Line 201: Line 201:  
For example, given a friendship of 102 and happiness of 150, the probability with the default field values will be <code>((102 + 0) / 1200) + (daily_luck * 0) = (102 / 1200) = 0.085</code> or 8.5%.
 
For example, given a friendship of 102 and happiness of 150, the probability with the default field values will be <code>((102 + 0) / 1200) + (daily_luck * 0) = (102 / 1200) = 0.085</code> or 8.5%.
   −
See [[Animals#Produce]] for more info on the calculation.
+
See [[Animals#Produce|Animal Produce]] for more info on the calculation.
 
|-
 
|-
 
| <samp>HarvestType</samp>
 
| <samp>HarvestType</samp>
Line 223: Line 223:  
|-
 
|-
 
| <samp>HarvestTool</samp>
 
| <samp>HarvestTool</samp>
| ''(Optional)'' The [[#Custom items|tool ID]] with which produced items can be collected from the animal, if the <samp>HarvestType</samp> is set to <samp>HarvestWithTool</samp>. The values recognized by the vanilla tools are <samp>Milk Pail</samp> and <samp>Shears</samp>. Default none.
+
| ''(Optional)'' The [[Modding:Items|tool ID]] with which produced items can be collected from the animal, if the <samp>HarvestType</samp> is set to <samp>HarvestWithTool</samp>. The values recognized by the vanilla tools are <samp>Milk Pail</samp> and <samp>Shears</samp>. Default none.
 
|-
 
|-
 
| <samp>CanEatGoldenCrackers</samp>
 
| <samp>CanEatGoldenCrackers</samp>
Line 229: Line 229:  
|}
 
|}
   −
===Audio & sprite===
+
===Audio & Sprite===
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
Line 236: Line 236:  
|-
 
|-
 
| <samp>Sound</samp>
 
| <samp>Sound</samp>
| ''(Optional)'' The [[#Custom audio|audio cue ID]] for the sound produced by the animal (e.g. when pet). Default none.
+
| ''(Optional)'' The [[Modding:Audio|audio cue ID]] for the sound produced by the animal (e.g. when pet). Default none.
 
|-
 
|-
 
| <samp>BabySound</samp>
 
| <samp>BabySound</samp>
Line 352: Line 352:  
|-
 
|-
 
| <samp>CustomFields</samp>
 
| <samp>CustomFields</samp>
| The [[#Custom data fields|custom fields]] for this entry.
+
| The [[Modding:Migrate to Stardew Valley 1.6#Custom data fields|custom fields]] for this entry.
 
|}
 
|}
   Line 389: Line 389:     
==Spritesheet layout==
 
==Spritesheet layout==
Each farm animal's spritesheet must have exactly 4 columns, and at least 5–7 rows (depending on the data fields). The sprite size depends on the [[#Audio & sprite|<samp>SpriteWidth</samp> and <samp>SpriteHeight</samp>]] fields; for example, the default sprite width of 16 pixels means the spritesheet must be exactly 4 × 16 = 64 pixels wide.
+
===Explanation===
 +
Each farm animal's spritesheet must have exactly 4 columns, and at least 5–7 rows (depending on the data fields). The sprite size depends on the [[#Audio .26 Sprite|<samp>SpriteWidth</samp> and <samp>SpriteHeight</samp>]] fields; for example, the default sprite width of 16 pixels means the spritesheet must be exactly 4 × 16 = 64 pixels wide.
    
The expected rows are:
 
The expected rows are:
Line 468: Line 469:  
|}
 
|}
    +
===Pre-1.6 vanilla layouts===
 +
Before Stardew Valley 1.6, there were two main spritesheet layouts depending on whether the animal lived in a [[barn]] or [[coop]]. If you want to match the previous spritesheet layouts (e.g. to update a pre-1.6 custom animal), the options to set are:
 +
<syntaxhighlight lang="js">
 +
// for barn animals
 +
"UseFlippedRightForLeft": true,
 +
"UseDoubleUniqueAnimationFrames": false
    +
// for coop animals
 +
"UseFlippedRightForLeft": false,
 +
"UseDoubleUniqueAnimationFrames": true
 +
</syntaxhighlight>
 
[[Category:Modding]]
 
[[Category:Modding]]
    
[[ru:Модификации:Животные]]
 
[[ru:Модификации:Животные]]
11

edits

Navigation menu