Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Diet Types  (Read 2111 times)

Demonic Gophers

  • Bay Watcher
    • View Profile
    • The Tunnels
Diet Types
« on: February 28, 2011, 03:24:47 pm »

The new GRAZER token is a big step towards giving the raws total control over what, and how much, various creatures eat.  While trying to get to sleep last night, I found myself thinking about ways it could be expanded and improved, and decided to actually post some of my musing on the subject for a change.  There are four general improvements that come to mind.

First, size needs to modify hunger, if it doesn't now.  A big dwarf/dog/cow/etc. should have to eat more than a small one.  This might or might not take care of most of the differences in food requirement between different creatures, but it shouldn't replace the hunger increment number in the GRAZER tag.  We still need to be able to indicate creatures with fast and slow metabolisms.  Also, different food sources may be available only in different quantities.  Grass seems to be eaten in bites, while most foods are only present in larger units.

Second, we obviously could use more types of diet.  I've thought of a number of possibilities:
GRAZER already allows animals to eat grass.
BROWSER would let creatures eat shrubs and saplings, and tree branches, once those are implemented.
SCAVENGER would let animals eat corpses, corpse bits, and perhaps inedible butchery byproducts.  It might require giving scavengers some sort of butchery mechanic, which would be a bit odd, but what battlefield is complete without ravens and vultures picking over the fallen?
EATS_SEEDS would allow creatures to demolish your seed stockpiles.  A lot of vermin should probably have this tag.  It might need to be divided into EATS_RAW_SEEDS and EATS_COOKED_SEEDS, to allow dwarves to eat seeds that have been made into meals.
BONECARN or EATS_BONES would allow creatures to use bones for food.  It probably shouldn't have any other implications - a creature that was only a BONECARN wouldn't eat meat, and a creature could be able to eat bones, meat, and plants.
VERMINHUNTER, EATS_VERMIN, or EATS_REMAINS would allow animals to eat either captured live vermin, or the remains of killed vermin.  Two tokens might be needed to differentiate between creatures that will eat vermin from cages, if it is available, and creatures that will hunt for vermin themselves when hungry.
EATS_MEAT would let creatures eat edible butchery products, and meals cooked entirely from them.  It could include or exclude fish.
EATS_FISH should be a separate token, as there might be modded creature that would like prepared fish, but not other meat.
EATS_RAW_FISH would be for wildlife like otters, bears, and pelicans, which would catch their own fish or raid stockpiles of fish that haven't been cleaned yet.
EATS_FOOD_PLANTS would allow creatures to eat harvested plants that are edible raw, leaving seeds, and cooked meals made entirely from plant products.
EATS_ALL_PLANTS would add plants that aren't edible raw, still leaving seeds.
EATS_MIXED_MEALS would let creatures eat cooked meals that include both plant and animal products.
EATS_DAIRY_PRODUCTS would cover cheese, and meals made with cheese and milk.  It might also include drinking milk as a beverage.  It seems like honey and such ought to be separate, but I'm not sure how easily animal extracts could be divided into categories.
DRINKS_BLOOD would be good for nightwings, vampire bats, and the like.

Third, there should be some sort of priority system.  Some creatures might prefer to graze, but willing to browse if no grass is available.  Some might prefer to browse, but be able to survive on grass if that's all they can get.  Dwarves might be happy to eat plants or meat, but like mixed meals when they can get them.  Cats ought to sustain themselves on vermin when possible, and only dig into your meat stockpile when they can't catch anything.

Fourth, it'd be nice to have some control over meal size.  Many snakes eat huge meals, then go for many days without additional food.  Creatures like dragons and sea serpents might follow a similar pattern.  Humans, at least in the Adventure Mode time scale, should prefer small meals several times per day.  Something like a shrew or a hummingbird might want many tiny meals.

How do these basic ideas sound?  Anyone else have thoughts on the subject?
Logged
*Digs tunnel under thread.*
I also answer to Gophers and DG.
Quote from: Shades of Gray
*Says something inspiring and quote worthy.*
Opinions are great, they're like onions with pi.

Knight Otu

  • Bay Watcher
  • ☺4[
    • View Profile
Re: Diet Types
« Reply #1 on: February 28, 2011, 03:48:54 pm »

I think several of those tags could be folded together into two tags - FOOD_TYPE and FOOD_ITEMS, the first one specifying the materials that a creature can eat, the second which items it looks for to eat. So a bone-eater would look for bone material and corpse type items, a seed eater would look for any seed item that's made of plant material, an egg eater would look for eggs, and so on. A COMMON_FOOD_ITEM subtag could help to define DRINK, MEAL, and all those other common food items, and perhaps a COMMON_FOOD_TYPE that defines what a human/dwarf/elf can eat. This wouldn't work to replace grazer, browser, and blood drinker tags, but would create some nice flexibility for modders. Preference and nutrition could be added similar to your ideas, though
Logged
Direforged Original
Random Raw Scripts - Randomly generated Beasts , Vermin, Hags, Vampires, and Civilizations
Castle Otu

Granite26

  • Bay Watcher
    • View Profile
Re: Diet Types
« Reply #2 on: February 28, 2011, 03:54:29 pm »

I think several of those tags could be folded together into two tags - FOOD_TYPE and FOOD_ITEMS, the first one specifying the materials that a creature can eat, the second which items it looks for to eat. So a bone-eater would look for bone material and corpse type items, a seed eater would look for any seed item that's made of plant material, an egg eater would look for eggs, and so on. A COMMON_FOOD_ITEM subtag could help to define DRINK, MEAL, and all those other common food items, and perhaps a COMMON_FOOD_TYPE that defines what a human/dwarf/elf can eat. This wouldn't work to replace grazer, browser, and blood drinker tags, but would create some nice flexibility for modders. Preference and nutrition could be added similar to your ideas, though

And it would support rust monsters....

General policy would he to define (common food items) as a supergroup containing many tags, right?

Babylon

  • Bay Watcher
    • View Profile
Re: Diet Types
« Reply #3 on: February 28, 2011, 03:59:20 pm »

I think several of those tags could be folded together into two tags - FOOD_TYPE and FOOD_ITEMS, the first one specifying the materials that a creature can eat, the second which items it looks for to eat. So a bone-eater would look for bone material and corpse type items, a seed eater would look for any seed item that's made of plant material, an egg eater would look for eggs, and so on. A COMMON_FOOD_ITEM subtag could help to define DRINK, MEAL, and all those other common food items, and perhaps a COMMON_FOOD_TYPE that defines what a human/dwarf/elf can eat. This wouldn't work to replace grazer, browser, and blood drinker tags, but would create some nice flexibility for modders. Preference and nutrition could be added similar to your ideas, though

Blood drinkers should also be able to drink out of those barrels of blood that the merchants seem to bring in such profusion.
Logged

Knight Otu

  • Bay Watcher
  • ☺4[
    • View Profile
Re: Diet Types
« Reply #4 on: February 28, 2011, 04:03:08 pm »

General policy would he to define (common food items) as a supergroup containing many tags, right?
If I understand you correctly, yes. You mean like ALL_ACTIVE implies diurnal, nocturnal, and so forth?

Blood drinkers should also be able to drink out of those barrels of blood that the merchants seem to bring in such profusion.
Possibly, but at a lower preference than fresh blood.
Logged
Direforged Original
Random Raw Scripts - Randomly generated Beasts , Vermin, Hags, Vampires, and Civilizations
Castle Otu

NW_Kohaku

  • Bay Watcher
  • [ETHIC:SCIENCE_FOR_FUN: REQUIRED]
    • View Profile
Re: Diet Types
« Reply #5 on: February 28, 2011, 04:10:18 pm »

Hmm... Sorry if this is a little off-track, but I'm going to sort of dump a jumbled collection of thoughts I have on the subject onto the thread.  I'm actually actively thinking about this very subject right now, so I have several different things to say about it.

I actually remember getting a comment from Toady, when I was making a mod that involved having playable minotaurs, (back about 9 months ago) and I wanted to make them herbivores, only to find no tag for that.  He basically responded that he hadn't really made up his mind what sorts of herbivores and whatever he wanted in his game.  Obviously, grazers are something that went in, but we still don't have something that replicates "forced vegans" from a dietary inability to process meat sort of thing we can shove on a race that is capable of farming.

This would probably go well as part of a broader effort to work on rewriting nutrition as a whole, however.

To just quote myself on something I am talking about in regards to a different thread...

Quote
Thing is, the amount of food the animals eat is directly proportionate to their species' average size alone.  Toady obviously just sat down dividing the number 60,000,000 by the animal's average size.

Meanwhile, the animal's milk production is oddly the same no matter the creature size, making goats the best milk-producers, since they are fairly small and eat little.  Cows are only useful for the meat they produce.

Now, making the amount of food a creature eats derived from its size is not a bad idea by itself, but we can make the game calculate out that part on its own, so that larger or smaller versions of the same animals eat more or less food.  What should go into the raws is something about metabolism so that you can throttle up or down how much food that animal needs to eat per mass of the creature. 

Likewise, the size of the cow or goat should have a direct impact on how much milk it can produce, with a variable that makes cows much better milk producers for their size than a horse is.

This means setting some standard model, and multiplying it by the size of the animal, then possibly adjusting by certain traits of the animal.

Already being strong makes animals more beefy and more massive, so there is an evolutionary advantage for being smaller and hence, eating less, if there is a strain on the food supply, while being stronger is an evolutionary advantage when you are fighting against predators that hunt you in great numbers because there is a plentiful food supply.  That's the sort of evolutionary equillibrium we need.

Other traits on the animals, such as speed should also affect metabolism - slower creatures should consume less energy and hence, eat less, basically, and this should be a multiplier on the food consumption rate, as well.  Cold-blooded creatures should get a massive bonus to their ability to go on little food, at the expense of vulnerability to cold and a penalty to their speed when they are exposed to cold, should that ever be implemented.

This is all talking about animals, however, and not dwarves.  Dwarves need to have food requirements based upon their own mass and their own stats, as well.  Even things like being more intelligent should probably have some calorie-based penalty.  Basically, larger dwarves with better stats eat more.  This means starting from a point of either multiplying what the average dwarf eats by about 4 or 5 times, and modifying it from there based upon stats and mass.  We can also just multiply the whole amount of meat that is provided by animals that are butchered and the amount of food that is produced by fields to match what is needed for the chosen nutrition model. (The amount of "4 to 5 times" was derived from the statement that a cow's meat should be able to feed a human for about a year, and a whole lot of reverse engineering of the numbers in the Volume and Mass thread.)

A problem is we don't want dwarves taking more food breaks, we want dwarves to be capable of grabbing all they need to eat all at once.  This means at least some fundamental ability for dwarves to carry more than one kind of object if the food stack doesn't already have 5 or so food items left in it.  This is, basically, more stacking and hauling requirements.

I'm basically trying to work some bits on nutrition into the Improved Farming Rebooted thread, and there's also a Prepared Food megathread, for the "delivery" end of the spectrum.

Obviously not to say that there isn't room for a nutritional model topic all its own (and I think there have been a few), but that there are some very big and complicated overlaps going on.  I pretty much agree with everything you have said, although I wonder if we really need to talk about a need for distinguishing fish-eaters from meat-eaters in general.

I'm actually re-writing the section on nutrition right now for the Improved Farming Rebooted thread, in case you're interested in that, although it is meant to accomidate some of the more advanced reaches of the farming thread's needs.  (The quote comes from what I'm rewriting for that...)  The point of which is to talk about making players be more conscious in their balance of fruits, vegetables, fungi, and meats, plus also having some tie-in with a waste system, so that we can model the full cycle of soil nutrient to crop to meal to dwarf to dwarven waste to soil nutrient again.

Oh, and as part of the ecological simulation, one of the things I wanted to throw in is a food web system where vermin will target (and potentially devastate) certain plants and crops, supporting populations of predatory vermin (like spiders or other insects) that eat those vermin, leading up to large creatures (non-vermin creatures) in a food web that can actually make certain animals hunt specific types of prey based upon some general characteristics.

Speaking of which, you might want to add "EATS_EGGS", since there are some snakes and other creatures that specifically target eggs.

Of course, when you're talking about things like honey, I think that almost any creature can eat honey, it's pretty much pure sugar, but few creatures actually try.  It may be better to work on trying to seperate out some sort of dietary tolerances for what sorts of things animals are capable of eating versus their specific tactics and evolutionary survival strategies that make certain types of food more viable.  Almost any carnivore or omnivore will scavenge if forced to do so, after all, but vultures do almost nothing but scavenging.  That may be something more complex than a ranked priority system will be able to handle.



Sorry, I started writing this when there were no responses, so I haven't read those yet...
« Last Edit: February 28, 2011, 10:45:56 pm by NW_Kohaku »
Logged
Personally, I like [DF] because after climbing the damned learning cliff, I'm too elitist to consider not liking it.
"And no Frankenstein-esque body part stitching?"
"Not yet"

Improved Farming
Class Warfare