As far as I can tell, the manner in which each dwarf's preferences for food and booze are chosen is completely random. I've seen a number of dwarfs who prefer to consume various ocean fish, even though dwarfs aren't known for their coastal cities, and there's frequently dwarfs who like to drink booze made from surface crops.
To make things somewhat less random, I was thinking that at embark time each possible food/booze be procedurally given an "exoticness" rating based on the civilization entity (dwarf/human/etc) you're embarking with. For example, embarking with a dwarven civ, the combination of DEFAULT_SITE_TYPE:CAVE_DETAILED and LIKES_SITE:CAVE_DETAILED would make underground crops and booze from underground crops extremely
non-exotic. After that the START_BIOME:MOUNTAIN and BIOME_SUPPORT:MOUNTAIN:3 would make mountain creatures like mountain goats and hoary marmots only a tiny bit exotic for a meat source. Next up in exoticness would come creatures and crops from forest, grassland, savanna, shrub land and river biomes, since those have a BIOME_SUPPORT level of 1. And at the top of exoticness would be creatures and crops from deserts, oceans, tundras and so on. The exoticness ratings could further be refined on a per-civilization basis, so that if The Torches of Meeting is close to the ocean then ocean fish become less exotic for them, and if the The lance of Sacrifices is close to the tropics then elephant meat becomes less exotic.
Other things that would effect exoticness:
- COMMON_DOMESTIC animals would be have low exoticness, non-domestic but PET animals would be more exotic, PET_EXOTIC animals would be yet more exotic, and completely untamable yet more.
- Carnivores would have a higher exoticness rating than omnivores or herbivores.
- Larger population numbers would be less exotic, and small population numbers more exotic.
- Creatures only found in evil or savage biomes would be more exotic.
- Subterranean creatures and plants found at deeper cavern depths would be more exotic.
- Plants with no seeds would be more exotic, since they can't be farmed.
Okay, then, onto the dwarfs. Each dwarf would be given a composite/pseudo "likes exotic food/booze" personality trait based on other personality traits, so (for example) a dwarf with a liberalism of 0 ("Is an ardent believer in convention and traditional society") would have a very low "likes exotic" trait. This would be used to weight the random selection of preferences, so a dwarf with a "likes exotic" of 0 would be more likely to prefer quarry bush leaves and dwarven wine, while one with "likes exotic" of 100 would be more likely to prefer sunshine and ice wolf meat.
Since the result of this, on average, would be more dwarfs whose food/booze preferences are easier to fulfill, the game would need to tone done how much of a boost to happiness dwarfs would get from eating/drinking their preferred food/booze. One idea would be to keep a per-dwarf counter of the amount of time since the dwarf last consumed something s/he preferred, so if s/he had recently consumed preferred food/booze it would only give a slight happiness boost.