So... Magic. A hot topic in the forums, to say the least, but
I did a spin-off thread on the subject, and managed to get some generally positive results from most anyone who read the topic.
On the surface, plants use sunlight to power their ecosystems through the use of photosynthesis. Underground, plants would have to take advantage of a different energy source to power their biologies. The cavern ecosystem simply doesn't run on just the scraps of the surface, and it's not really based on chemosynthesis, either. We have floating guts, hungry heads, and amethyst men living in an environment with underground trees whose wood is permanently at the freezing point of water, even years after they have been cut down. We have a clearly magical ecosystem, and that means that these xenomorphic plant and animal systems need a xenosynthetic energy source.
This means, as an ecosystem, magic is the "sunlight" that powers the plants underground. This means bringing the sphere system into the game as a source of magic power. As the game currently has "good" and "evil" and "savage" biomes, it should be possible to have something like a half-dozen to a dozen or more types of different magic "flavors" that can power the ecosystems of underground, as well as the way that evil biomes already exist aboveground. This means that in the cavern systems, there would be some magical fields that might apply to only one or two levels of the caverns per embark tile. The surface might have evil alignment in the northern mountains, and savage alignment in the southern jungle, while the first cavern might have a "dreams" sphere alignment in the north and a lack of any magical influence in the south, the second cavern might have "dreams" up north again, while the south has "duty" as a sphere. In the third caverns, "darkness" and "blight" might have hold. (And the HFS has a sphere all its own, potentially with some HFS "plantlife" made of living glass tendrils that slice at passerby.) Each of these spheres has their own associated life forms that live in their niches, making the strange yet colorful underground worlds actually vary from place to place like the surface biomes do already.
Mushrooms still exist, but they are a separate type of "crop" that needs biomass and water. They need a constant supply of "dead stuff" to feed them, and they should also possibly be capable of breaking down the "underground crop" distinction. Mundane mushrooms can grow above or underground. Magical mushrooms (which may have more in common with plants and just look like mushrooms) would simply need to grow near the magic fields that power them, and could grow above or underground. In a chunk of the underground with absolutely no magic, only mushrooms will be capable of growing. If what you want is just mushrooms, that's certainly a good thing - you have nothing to fear from crowding weeds or magical pests in a magic-dead area with no sunlight, so your fungi can grow in utter peace. It does, however, mean that you will need to constantly supply the mushrooms with new biomass to feed upon.
Writing this now, in the wake of 31.19, however, there is a big opportunity for changing the way that plants and animals in general work. Metals have already been made rare, but plants are always available in the same varieties (excepting only the sphere-aligned ones, and even then, you can trade for those sometimes,) and as such, you can pretty much always have full access to infinite supplies of prepared food to sell and the textiles industry, plus a pretty good chance of either glass or ceramics. Stone materials are, of course, always available in functionally infinite quantities anywhere.
Metals and other ores and minerals could be potentially tied to different magical effects. Plenty of iron and flux is a great boon, so maybe the magical fields in areas that are so beneficial are much less beneficial in other areas. You can harvest much more food in magical fields that only occur when you don't have iron and flux in massive quantities. In many fairy tails, cold iron (wrought iron) is a weakness of magical creatures and magic in general. Maybe pig tails or other textile industry products depend on magic fields that are averse to some sort of magical field disruption caused by iron. That way, the abundance of one material creates the absence of another.
This obviously applies over to other underground xenosynthetic plants that require different magic fields as their energy sources. A magma sphere might be great for alchemical ingredient plants like "fire grass" that can be used to make flammable liquids or explosives or heat sources, but are unsuitable for farming many other types of underground crops. Underground trees and underground textiles might require different or even opposing magic types, making players have to either choose between the two, or manage conflicting magic zones. The more different kinds of economically viable magic plants there are (and alchemy may be the best way to simulate this), then the more conflict you can create between player desires for one resource over another.
Having access to the magic fields for these plants is like having access to sunlight for mundane surface plants. You can't just import a sunberry and start planting them wherever, they need their magic to grow.
There is a limited amount of this magic in the area for them to absorb. Like photosynthetic plants, xenosynthetic plants might have "leaves" of one form or another that tries to grow to the best spots to absorb as much magic as possible, and in the face of competition, may grow weed-like tendencies to try to "shade out" their competition by growing their leaves in the way of the rival xenosynthetic plants by absorbing all the magical flows for themselves, starving the rivals. This means that the same crowding rules for sunlight might be applied to crowding for magic, as well. (Of course, magic plants might just literally up and do battle with one another, suddenly growing flaming vines to smite their planty foes.)
Another idea for creating a "magical climate" might be to make some magic fields fluctuate by season, rather than being a permanent static feature of the caverns area. Currently, sweet pods are a seasonal crop underground, in spite of the caves having no real season. Something to make the caverns more dynamic and changing could be a waxing and waning of magic power, causing certain creatures from competing magical spheres to wax and wane in dominance of the area with the coming and going of seasons.
Similar to some of the other changes that one can make gradually to biomes on the surface in general, however, I've recently started taking to the idea that players can manipulate the sphere magic biomes, such as what creates the zombies in the evil biomes, through some player actions. The start of this idea being
here, and being developed in
this later thread before I really tried to put forward the
Xenosynthesis thread. This would mean that, while dwarves have little actual access to magic (barring something like capturing zombies or unicorns and dumping them on invaders) they can have some means of controlling the magical climate of their area the way that they have some control over the type of biome they are farming in through soil cultivation or soil erosion.
Rather than having a simple magic field that is unchanging like the way that the evil of a region is unchanging now, or even the way that rainfall is unchanging in a region is unchanging, dwarves could perform some actions that could raise or lower the different magical sphere factors in their environments.
This means the presence of unburied/unmemorialized dead can raise the "death" sphere of the place, causing more haunting, and also changing the environment to have death-sphere-related flora and fauna, as well. Zombies could be powered by a strong death sphere influence, as could corpse berries or the like.
While it is possible for artifacts to cause a general change in the magic of the area around them, it is somewhat problematic to have actual physical objects create magical effects, since you could just move them some place when you want a magical field to be applied, and then try to find some way to just move that artifact (or turn off its effect) in order to have very direct control over magic.
Of course, having a "source of magic" like a crystal glass statue that you can't move, but can shatter if you so choose could be a fairly viable strategy. In the caverns, a strange ruin built around a crystal glass statue could be discovered, and around it, magical plants of great value and rarity are grown, but so too are dangers to your fort. You can try to exploit this ruin's wealth, or shatter that statue and kill the magic, just to be safe. Who knows if the powers of the statue will change if you drink too deep of the powers of this unknown magical artifact, and why did the previous culture fall into ruins, anyway? Well, obviously, it's risky, but just taking a LITTLE won't hurt, right? Wow, that worked out fine! How about a little more, then...
Other sources of magic might be an open portal to another world or dimension. This may not necessarily be a crossable portal (from this side), but it would mean that players would have little they could do about the portal, except maybe try to close it, if that were possible, by going through it and closing it from the other side. The HFS could be a portal, itself, if it is not literally meant to be directly below the magma sea.
Some features like underground rivers or lakes might be a type of portal, where the water comes from another watery dimension, and so do the snakemen and giant toads and such. If the watery magic rises in power, the cavern lakes can start flooding and more creatures can spawn out of those lakes, although some of the benefits of cavern water (like all the plants that grow there and resources you can gain from them) go up as the risks of cavern floods go up.
The flora and fauna of the region absorb the magic, but it is also possible to have some of the flora and fauna also generate some of the magical energy in the area. Something like a corpse bloom might grow when there is plenty of death in the area, and if left alone, may gradually add some death magic into the area, which might be consumed (dropping the area magic power) by other creatures, like zombies. Zombies would then need to have access to that death magic, and not be able to leave the area of their death magic without gradually growing "hungry" for that death magic, and the zombie will fall apart if they do not have death magic to sustain them. Hence, they can only make some temporary forays into the areas not covered by the death magic. Of course, if they can find and murder a living creature, and desecrate its corpse in a way that adds death magic to the area, they can sustain themselves on the death magic they have released, and maybe spread their death sphere so that more corpse blooms grow in the area.
Conversely, some sort of Memento Morii Morninglory might be planted that could still the dead, and drop the area death magic, so that if you were being attacked by zombies, then, like with pests, you could plant something that actively drained the death magic from the area, depriving the zombies from the death magic they need to "survive" upon. That might even work to repel zombies and such entirely, since they may have an instinctive aversion to even trying to go into areas that have those flowers that weaken their ability to sustain themselves (although they will pursue a living being they see run into that area, they won't go exploring that area on their own).
A pest might even have magical properties. A ghast fly swarm might be attracted to corpses just lying around a battlefield unburied or otherwise removed from the open air. The ghast flies would then generate death magic that could raise some of those dead goblin soldiers on your doorstep to become goblin zombies. Only by ensuring that you have the means to repel some ghast flies can you ensure that death doesn't visit your doorstep with return visitors. Releasing spiders to catch and kill the flies would stop them from being able to raise the death magic levels enough to raise zombies, as would simply burying the goblin invaders in a shallow mass grave.
The other route that this magic can go down is marrying spheres to divine magic.
Potentially, if sphere magic is crossed over with divine magic, so that each sphere represents a god or force, such as the elves' forest deity, there could be two factors of each magic sphere - the amount of power and influence that deity or sphere's force has in the area, and also how much they favor your fortress generally. Hence, a forest spirit could be very weak and it wouldn't matter how happy or angry it was with your fortress, since it couldn't do anything to you, anyway. A powerful forest spirit, however, may demand much of your fortress lest you lose its favor, and the powerful force of nature or deity will find ways to seek its vengeance upon your fort.
Making such a magical force an irrational, emotional being completely immune to logic and sympathy could help make magic an even more dangerous toy to play with. The goddess of love doesn't care a thing about how well the relationships work out, she just wants as many people falling in love with one another as possible. Love at first sight is all that matters. How dare you talk back about a goblin and a dwarf never being meant to be?! HOW COULD YOU BETRAY ME LIKE THAT?! WELL, MAYBE THIS GIANT SWARM OF KILLER FLUFFY TEDDYBEARS AND LIVING RED ROSE STRANGLERS AREN'T MEANT TO BE TEARING OUT YOUR EYEBALLS, EITHER!
Hence, the dwarven god of Justice demands someone be hammered for committing the crime of not fulfilling a mandate, no matter the fact that it's not really anyone's fault that there wasn't any way for the fortress to make or trade for rose gold. You have to see justice impassively carried out no matter how irrational it might be.
This would also mean that religious services and festivals and the like could be used as sources of (or ways to drain) magical power for the area. A religious festival praying for a better harvest may actually generate the magical power needed to make one possible.
In the light of Xenosynthesis and magical underground flowers, creatures similar to bees underground make perfect sense, as many flowers in underground fields would have no means of pollenating other flowers, especially since the wind is much less dynamic in a cave. Attracting a pollenating insect like a bee with nectar so that they could help the plant breed would make perfect evolutionary sense as a logical extrapolation starting from the position of an arbitrarily magical underground flower.
In fact, such plants might just need a bee-like creature to pollenate them. This "beneficial pest" might be required to be available in the soil or artificially hived and set in the area of the crops, lest the harvest be stunted for lack of pollenation. (Possibly involving a multiplier of crops harvested based upon the number of pollenating insects, up to a logical maximum, so that you could normally get only a small number of crops from a harvest, but get up to 5 times as much depending on having a sufficient number of nearby pollenating insects.)