Holy cow, I had forgotten all about Martian Dreams. Very cool, very steampunk even before steampunk was popular.
But I believe you're thinking of Savage Empire's crafting system. That's the main thing I loved about that game because the magic sucked big time. Can't remember how many spells they had, but it wasn't many. Although the ingredients for the spells were unique to the Ultima Universe like cocoa and some others. IIRC you had to use skulls to cast spells. Don't really remember that part too clearly, but I do remember making gunpowder which was used for the rifle you made or for grenades.
Would love for Exult to redo those games. A larger resolution would do wonders for those games.