Changes

1,559 bytes added ,  Monday at 02:54
Line 4: Line 4:     
==Data Format==
 
==Data Format==
You can now create and customize [[Animals#Cat or Dog|pets]] & pet breeds by editing the new <samp>Data/Pets</samp> asset.
+
You can create and customize [[Animals#Cat or Dog|pets]] & pet breeds by editing the <samp>Data/Pets</samp> asset.
    
This consists of a string → model lookup, where...
 
This consists of a string → model lookup, where...
Line 27: Line 27:  
|-
 
|-
 
| <samp>BarkSound</samp>
 
| <samp>BarkSound</samp>
| The [[#Custom audio|cue ID]] for the pet's occasional 'bark' sound.
+
| The [[Modding:Audio|cue ID]] for the pet's occasional 'bark' sound.
 
|-
 
|-
 
| <samp>ContentSound</samp>
 
| <samp>ContentSound</samp>
| The [[#Custom audio|cue ID]] for the sound which the pet makes when you pet it.
+
| The [[Modding:Audio|cue ID]] for the sound which the pet makes when you pet it.
 
|-
 
|-
 
| <samp>RepeatContentSoundAfter</samp>
 
| <samp>RepeatContentSoundAfter</samp>
Line 188: Line 188:  
|-
 
|-
 
| <samp>SoundOnStart</samp>
 
| <samp>SoundOnStart</samp>
| ''(Optional)'' The [[#Custom audio|audio cue ID]] for the sound to play when the state starts. If set to <samp>BARK</samp>, the pet's <samp>BarkSound</samp> (or breed's <samp>BarkOverride</samp>) field is used. Defaults to none.
+
| ''(Optional)'' The [[Modding:Audio|audio cue ID]] for the sound to play when the state starts. If set to <samp>BARK</samp>, the pet's <samp>BarkSound</samp> (or breed's <samp>BarkOverride</samp>) field is used. Defaults to none.
 
|-
 
|-
 
| <samp>SoundRange</samp><br /><samp>SoundRangeFromBorder</samp>
 
| <samp>SoundRange</samp><br /><samp>SoundRangeFromBorder</samp>
Line 261: Line 261:  
|-
 
|-
 
| <samp>Sound</samp>
 
| <samp>Sound</samp>
| ''(Optional)'' The [[#Custom audio|audio cue ID]] for the sound to play when the animation starts or loops. If set to <samp>BARK</samp>, the pet's <samp>BarkSound</samp> (or breed's <samp>BarkOverride</samp>) field is used. Defaults to none.
+
| ''(Optional)'' The [[Modding:Audio|audio cue ID]] for the sound to play when the animation starts or loops. If set to <samp>BARK</samp>, the pet's <samp>BarkSound</samp> (or breed's <samp>BarkOverride</samp>) field is used. Defaults to none.
 
|-
 
|-
 
| <samp>SoundRange</samp><br /><samp>SoundRangeFromBorder</samp><br /><samp>SoundIsVoice</samp>
 
| <samp>SoundRange</samp><br /><samp>SoundRangeFromBorder</samp><br /><samp>SoundIsVoice</samp>
Line 320: Line 320:  
|-
 
|-
 
| <samp>CustomFields</samp>
 
| <samp>CustomFields</samp>
| The [[#Custom data fields|custom fields]] for this entry.
+
| The [[Modding:Common_data_field_types#Custom_fields|custom fields]] for this entry.
 
|}
 
|}
    +
==Spritesheet layout==
 +
===Explanation===
 +
Each farm animal's spritesheet must have exactly 4 columns. The sprite size is expected to be 32x32.
 +
 +
The expected rows are:
 +
# move down;
 +
# move right;
 +
# move up;
 +
# move left
 +
# unique animations 1;
 +
# unique animations 2;
 +
# unique animations 3;
 +
# sleep and unique animations 4;
 +
# unique animations 5
 +
 +
For example, the default layout 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 1)
 +
| 9 (move up 2)
 +
| 10 (move up 3)
 +
| 11 (move up 4)
 +
|-
 +
| 12 (move left 1)
 +
| 13 (move left 2)
 +
| 14 (move left 3)
 +
| 15 (move left 4)
 +
|-
 +
| 16 (unique)
 +
| 17 (unique)
 +
| 18 (unique)
 +
| 19 (unique)
 +
|-
 +
| 20 (unique)
 +
| 21 (unique)
 +
| 22 (unique)
 +
| 23 (unique)
 +
|-
 +
| 24 (unique)
 +
| 25 (unique)
 +
| 26 (unique)
 +
| 27 (unique)
 +
|-
 +
| 28 (sleep 1)
 +
| 29 (sleep 2)
 +
| 30 (unique)
 +
| 31 (unique)
 +
|-
 +
| 32 (unique)
 +
| 33 (unique)
 +
| 34 (unique)
 +
| 35 (unique)
 +
|}
 +
 +
The rows for moving down, right, up, and left will be used when copy/pasting the Walk behavior from the cat, dog, or turtle. If you don't use that behavior, you can actually put things that aren't moving up, down, or left there. However, in the absence of any defined Behavior, the pet will still use frames 28 and 29 for sleeping, and when being pushed it will use frames 0, 4, 8, or 12 depending on which direction the player is pushing from (e.g. if pushing from the left in order to move right, the pet will face right, using frame 4).
    
[[Category:Modding]]
 
[[Category:Modding]]
2

edits