Template:Gross Population Nutrition/doc
Jump to navigation
Jump to search
Calculates the gross nutrition production of a population of animals, adding together the daily production of meat, milk, and unfertilized eggs.
Syntax[edit]
{{Gross Population Nutrition|Name|M|F|S|Decompose}}
- Name = Animal name
- M = Male population count
- F = Female population count
- S = one of "baby" or "adult". Defaults to "baby". Sets at which age the animals are slaughtered.
- Decompose = Optional. If present, returns "{meat} + {milk} + {unfert.}" as a string, rather than a summed number.
Dependencies[edit]
- Assumption: Butchery efficiency, difficulty etc. modifiers are all the baseline 100%.
- Property:Milking Interval Days
- Property:Milk Amount
- Property:Milk Name
- Property:Egg Laying Interval
- Property:Eggs Per Clutch Average
- Property:Unfertilized Egg Name
- Property:Body Size
- Property:Baby Scale
- Template:Meat Leather Curve
- Template:Population Reproduction Rate
- Assumption: All the animals have a synchronized sleep cycle.
- Assumption: They're all sleeping on the floor.
- Assumption: They're all within the 30 tile distance needed to see each other.
- Property:Mate Mtb Hours
- Property:Gestation Period Days or Property:Egg Laying Interval
- Property:Average Offspring Per Birth or Property:Eggs Per Clutch Average
- Property:Can Lay Unfertilized Eggs
Used by[edit]
Pseudocode[edit]
p = Population_Reproduction_Rate(M, F)
if Slaughter == 'baby':
meat = 0.05*p*Meat_Leather_Curve(140*Body_Size*Baby_Scale)
else:
meat = 0.05*p*Meat_Leather_Curve(140*Body_Size)
try:
milk = Milk_Name.Nutrition*F*Milk_Amount/Milking_Interval_Days
except:
milk = 0
try:
unfert = max(0, Unfertilized_Egg_Name.Nutrition*(F/Egg_Laying_Interval - p))
except:
egg = 0
return meat + milk + unfert
Examples[edit]
Chicken
{{Gross Population Nutrition|Chicken|9|21|baby}}=> 10.668871012355 + 0 + 0.8046370781855 = 11.473508090541{{Gross Population Nutrition|Chicken|10|20|baby}}=> 11.854301124839 + 0 + 0.0607078646505 = 11.915008989489{{Gross Population Nutrition|Chicken|11|19|baby}}=> 11.4 + 0 + 0 = 11.4{{Gross Population Nutrition|Chicken|9|21|adult}}=> 37.341048543242 + 0 + 0.8046370781855 = 38.145685621428{{Gross Population Nutrition|Chicken|10|20|adult}}=> 41.490053936936 + 0 + 0.0607078646505 = 41.550761801587{{Gross Population Nutrition|Chicken|11|19|adult}}=> 39.9 + 0 + 0 = 39.9
Cow
{{Gross Population Nutrition|Cow|4|26|baby}}=> 8.9979052546708 + 18.2 + 0 = 27.197905254671{{Gross Population Nutrition|Cow|5|25|baby}}=> 11.256209968313 + 17.5 + 0 = 28.756209968313{{Gross Population Nutrition|Cow|6|24|baby}}=> 11.846985833376 + 16.8 + 0 = 28.646985833376{{Gross Population Nutrition|Cow|7|23|baby}}=> 11.383683007165 + 16.1 + 0 = 27.483683007165{{Gross Population Nutrition|Cow|4|26|adult}}=> 45.123823366707 + 18.2 + 0 = 63.323823366707{{Gross Population Nutrition|Cow|5|25|adult}}=> 56.449052975421 + 17.5 + 0 = 73.949052975421{{Gross Population Nutrition|Cow|6|24|adult}}=> 59.411749850959 + 16.8 + 0 = 76.211749850959{{Gross Population Nutrition|Cow|7|23|adult}}=> 57.088320752351 + 16.1 + 0 = 73.188320752351