Add methods necessary for custom Farm animals
Basically, two places need to be hooked.
StardewValley.Utility.getPurchaseAnimalStock()
returns a hard-coded List<Object>
with farm animals available for purchase.
The constructor for StardewValley.FarmAnimal
loads the actual animal data from Data\FarmAnimals.xnb
(using the standard XNA content loader) as a Dictionary<string, string>
, where the keys are the names. The value is a string, with individual values split with /
. This is the format:
Cow example: 1/5/184/186/cow/36/64/64/64/36/64/64/64/1/false/Barn/32/32/32/32/15/5/Milk Pail/639/1500
1 Days between harvests/produce from animals
5 Days until mature
184 Default produce
186 Produce when happy ("deluxe")
cow Sound name, or "none"
36 Front/Back bounding box - X
64 - Y
64 - Width
64 - Height
36 Sideways bounding box - X
64 - Y
64 - Width
64 - Height
1 Harvest type, 0 = Automatic (like chickens), 1 = Triggered by tool, 2 = Sets name to It? (seen only on Hog)
false Change texture when ready to harvest
Barn Building type
32 Front/Back source rect - Width (also sprite width)
32 - Height (also sprite height)
32 Sideways source rect - Width
32 - Height
15 Daily fullness drain
5 Daily happiness drain
Milk Pail Tool for harvesting, if type = 1, but must always be present
639 Meat index (not used)
1500 Purchase price