Surely, for example, the substance being transported by shuttle in the opening of "The Most Toys" cannot be safely replicated. Judging by the size of the explosion from the little amount Data was transporting, even trying to replicate a small amount could lead to deadly consequences.
Sure, the stuff is volatile. But what specific manufacturing methods this rules out, we can't tell. For all we know, replication is the gentlest method possible, as it involves nothing but magicking the substance into existence; any attempt at creating the stuff by mixing chemicals might be much, much riskier.
What is clear is that the resources of a
Galaxy class starship do not suffice for replicating the material in the desired amounts. That's true of many things, some chemical in nature, others biological, yet others technological. But several chemicals, biological materials and wonders of technology are well within those capabilities.
And Voyager seems to make us think that torpedoes can't be replicated.
But
USS Voyager was specifically
lacking in replicator capability. Even the food replicators were performing poorly, necessitating rationing.
After the second season, the ship left Kazon territory behind and began encountering civilizations that knew a thing or two about replication. At that point, torpedo supply utterly ceased to be a problem: the original 38 torps and many more could now be expended, as the ship supposedly was manufacturing those herself, thanks to the civilized cultures helping repair her replicators.
some ambitious scientist might find a way to perfect the process and make full duplicates of people
We have seen many scientists or adventurers tackle the challenge, often relying on alien technologies. It seems those alien cultures considered the task worthwhile. But apparently, the Federation at large is not interested in any form of xeroxing, be it cloning or replicating or transporter trickery. Similarly, it is not interested in sentient androids: Dr. Soong's experiments remain the only ones in that field, despite the UFP embracing his positronics and using them for e.g. brain prosthetics.
It is because of this general lack of interest that we can't really tell what is possible and what is not merely by observing what is being done. Many individuals in the UFP wrestle with the impossible, making it possible for its own sake. But they are also reclusive and secretive, meaning we don't learn of their achievements until they become a story point. For all we know, replication would make possible all sorts of wonders - but there's no demand for those.
it was because they couldn't risk using up their antimatter reserves
Yet antimatter is their principal fuel. Its expenditure doesn't come in neat, torpedo-sized parcels: every decision about a warp factor affects it much more than the firing of a torpedo. Especially since even the torpedoes have variable yield and do not consume a set amount of antimatter per shot.
It is because of this that I think Janeway is counting casings, not antimatter. That, and DS9 "Tribunal" where it is indicated that
empty torpedo warheads are a crucial resource the Maquis, with their known replicator resources, should consider worth stealing. IMHO, Janeway is worried that her replicators cannot produce the intricate forcefield devices that contain the antimatter within the warheads, not without major repairs to her ship at a civilized port. After she gets that, the torpedo issue evaporates.
In one episode, Data tells another person that the replicator would make 'anything he wanted'.
And in the same episode later, he said the drink he ordered tested better than anything he ever tasted.
Why would that be a contradiction? If Data knew what to ask from the replicator, he would get that superior drink. But the point is that he doesn't know - he is capable of being surprised.
A good chef can give you a meal you find superior to anything you have ever eaten before. He or she doesn't need an oven that would be inaccessible to you, or meats or vegetables you couldn't buy from the local grocer's. It's a matter of abstractions like skill and imagination, not of technological limitations.
Artificial scarcity created in order to make a plot for the story?
The exact issue in "Code of Honor" is that the vaccine is something Crusher hasn't encountered before. She doesn't know what goes wrong with replication, so she insists on a conventional source for the vaccine, driving the plot forward. Yet for all we know, the Ligonians are using replicators to create the vaccine in the first place (they're quite proud of their mastery of transporter technologies); it's just a "secret ingredient" thing, with the Ligonians keeping the secret until they have made profit on the deal. So yes, artificial scarcity - but quite possibly in-universe!
Timo Saloniemi