Changes

Jump to navigation Jump to search
+ spritesheet layout section
Line 242: Line 242:  
|-
 
|-
 
| <samp>Texture</samp>
 
| <samp>Texture</samp>
| ''(Optional)'' The asset name for the animal's spritesheet. Defaults to <samp>Animals/{{t|ID}}</samp> (like <samp>Animals/Goat</samp> for a [[goat]]). This asset must exist even if you use <samp>Skins</samp> below, since the default appearance is automatically an available skin.
+
| ''(Optional)'' The asset name for the animal's spritesheet. Defaults to <samp>Animals/{{t|ID}}</samp> (like <samp>Animals/Goat</samp> for a [[goat]]). This asset must exist even if you use <samp>Skins</samp> below, since the default appearance is automatically an available skin. See [[#Spritesheet layout|spritesheet layout]].
 
|-
 
|-
 
| <samp>HarvestedTexture</samp>
 
| <samp>HarvestedTexture</samp>
Line 251: Line 251:  
|-
 
|-
 
| <samp>UseFlippedRightForLeft</samp>
 
| <samp>UseFlippedRightForLeft</samp>
| ''(Optional)'' When the animal is facing left, whether to use a flipped version of their right-facing sprite. Default false.
+
| ''(Optional)'' When the animal is facing left, whether to use a flipped version of their right-facing sprite. See [[#Spritesheet layout|spritesheet layout]] for more info. Default false.
 
|-
 
|-
 
| <samp>SpriteWidth</samp><br /><samp>SpriteHeight</samp>
 
| <samp>SpriteWidth</samp><br /><samp>SpriteHeight</samp>
Line 285: Line 285:  
|-
 
|-
 
| <samp>UseDoubleUniqueAnimationFrames</samp>
 
| <samp>UseDoubleUniqueAnimationFrames</samp>
| ''(Optional)'' Whether the texture has two frames for the randomized 'unique' animation instead of one. Default false.
+
| ''(Optional)'' Whether the texture has two frames for the randomized 'unique' animation instead of one. See [[#Spritesheet layout|spritesheet layout]] for more info. Default false.
    
The unique animation sprite indexes are:
 
The unique animation sprite indexes are:
Line 387: Line 387:  
| ''(Optional)'' Overrides <samp>UpDownPetHitboxTileSize</samp> and <samp>LeftRightPetHitboxTileSize</samp> respectively before the animal is an adult. Both default to 1×1 tile.
 
| ''(Optional)'' Overrides <samp>UpDownPetHitboxTileSize</samp> and <samp>LeftRightPetHitboxTileSize</samp> respectively before the animal is an adult. Both default to 1×1 tile.
 
|}
 
|}
 +
 +
==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.
 +
 +
The expected rows are:
 +
# move down;
 +
# move right;
 +
# move up;
 +
# move left ('''only''' if <samp>UseFlippedRightForLeft</samp> is false);
 +
# unique animations 1;
 +
# unique animations 2 ('''only''' if <samp>UseDoubleUniqueAnimationFrames</samp> is true);
 +
# eat.
 +
 +
For example, the default layout (with <samp>UseFlippedRightForLeft</samp> and <samp>UseDoubleUniqueAnimationFrames</samp> both false) is:
 +
{| class="wikitable"
 +
|-
 +
| 0 (move down 1)
 +
| 1 (move down 2)
 +
| 2 (move down 3)
 +
| 3 (move down 4)
 +
|-
 +
| 4 (move right 1)
 +
| 5 (move right 2)
 +
| 6 (move right 3)
 +
| 7 (move right 4)
 +
|-
 +
| 8 (move up)
 +
| 9 (move up)
 +
| 10 (move up)
 +
| 11 (move up)
 +
|-
 +
| 8 (''unused'')
 +
| 9 (unique down)
 +
| 10 (unique right)
 +
| 11 (unique up)
 +
|-
 +
| 12 (eat 1)
 +
| 13 (eat 1)
 +
| 14 (eat 1)
 +
| 15 (eat 1)
 +
|}
 +
 +
When both are true, that becomes:
 +
{| class="wikitable"
 +
|-
 +
| 0 (move down 1)
 +
| 1 (move down 2)
 +
| 2 (move down 3)
 +
| 3 (move down 4)
 +
|-
 +
| 4 (move right 1)
 +
| 5 (move right 2)
 +
| 6 (move right 3)
 +
| 7 (move right 4)
 +
|-
 +
| 8 (move up)
 +
| 9 (move up)
 +
| 10 (move up)
 +
| 11 (move up)
 +
|-
 +
| 12 (move left)
 +
| 13 (move left)
 +
| 14 (move left)
 +
| 15 (move left)
 +
|-
 +
| 16 (unique down 1)
 +
| 17 (unique down 2)
 +
| 18 (unique right 1)
 +
| 19 (unique right 2)
 +
|-
 +
| 20 (unique up 1)
 +
| 21 (unique up 2)
 +
| 22 (unique left 1)
 +
| 23 (unique left 2)
 +
|-
 +
| 12 (eat 1)
 +
| 13 (eat 1)
 +
| 14 (eat 1)
 +
| 15 (eat 1)
 +
|}
 +
    
[[Category:Modding]]
 
[[Category:Modding]]
    
[[ru:Модификации:Животные]]
 
[[ru:Модификации:Животные]]
translators
8,404

edits

Navigation menu