Actually, the kind of rock formed when magma cools is determined by several factors:
1. Type of magma-Felsic or Basaltic You get felsic magmas in volcanos that form under landmasses (think mount saint helens or pinatubo for good examples of what these can be like when they go off!). These are what form the massive composite volcanos, which are what most of us think of when we think of volcanos. They are what produce granite, and virtually every other ingenous intrusive/extrusive layer you find on continents. The high silica content of these magmas makes them highly viscous and more able to trap gases-and by extension, much more likely to have extremely violent, extremely explosive eruptions. They can, however, also have quiet eruptions-but they are the only kind to produce the aforementioned violent ones. Obsidian, by the way, is formed from felsic magmas.
Basaltic magmas form basaltic rocks, and in comparison to grantic magmas are not as viscous and "run" a great deal more, which typically results in shield volcanos-which means virtually every volcanic island in existence. The rocks formed by basaltic magmas also tend to be darker in color, and have a lower silica content than do felsic magmas.
2. Time taken to cool-rapid or slow?In general, what kind of rock you get is determined by the time it takes for lava/magma to cool. Long cooling time allows for the various minerals present in magma to form larger crystals, while the converse is also true. Dwarf fortress is accurate in this respect-obsidian is formed by the very rapid cooling of highly viscous lava. Rhyolite is related, but actually has had time to form crystals; Obsidian, on the other hand, cools too fast for crystals to grow at all, which makes it a glass in structure-so it's only natural that we get obsidian when we cool lava with water. Which in turns leads directly to
3. Where is it formed-intrusive or extrusiveThe distinction between intrusive and extrusive igneous rocks derives directly from the factor noted above. Generally speaking, intrusive rocks have much longer times to cool, and consequently to crystalize, than do extrusive rocks. That, in fact, is *why* the intrusive rock layers in the game are so mineral/gem rich: it's actually a byproduct of their formation. As a result, the individual crystals in each rock can often be seen with the naked eye. However, surface cooling makes this nearly impossible-the lava, no longer insulated or close to its original heat source, cools rapidly and produces tiny crystals, though they still get a chance to form. This is what you get when you are digging out rhyolite.
Then there's the volcanic ash layers, which is basically what you have with obsidian, but not as a steady flow, and instead as a rain of ash. Basaltic eruptions don't produce too much of this-the formation of volcanic ash requires the lava to be sprayed into the air. Felsic magmas, on the other hand, produce this quite readily-assuming they have enough trapped gas for a sufficiently explosive eruption. If they *Do* have enough trapped gas to produce a sizeable ammount of volcanic ash, however, this creates its own dangers-namely, pyroclastic flows and mudflows. These are, incidentally, the greatest danger of having a volcano go off-more so than the lava, pyroclastic flows in particular are very fast flowing and extremely destructive. As a side note, ash itself is a health hazard because it can form the previously noted cement upon contact with body moisture-including in the lungs.
Edit: Just *how* many dwarves even live for 1/4 that long (last time I checked, the dwarf lifespan was well over 100, maybe 140 as the life expectancy)?
Most kick the bucket way earlier than that, though I find the idea of walking down a long hall filled with the statues of former kings of the moutainhomes somewhat awe-inspiring. Though, to take off some of the glamor, it would probably be graphite statues unless *really* heavy magic was involved. Then again, their use of coffins as standard indicates to me that this should only happen if certain conditions were met:
1. The dwarf was almost a mythical/legendary figure due to his actions in life
Say a dwarf rises to become a figure of almost mythical stature for leading the armies to victory after victory against the goblins, elves, and orcs. He would be a candidate for this treatment.
2. Had a real effect on the world-"moved the roots o' th' moutains himself" as it were-maybe his actions led to the foundation of the age of the dwarf, or a new dwarven empire, or even the extermination of the megabeasts and semimegabeasts.