The Background
I'm a pretty new DM, and I'm running a casual game of D&D 3.5 (with some rulings from Pathfinder added to the mix, for practical reasons) and I like doing special things for my players, who are very close friends.
One of my PCs seeks justice, to clear his name from a heinous crime he didn't commit. So, I'm trying to set up an investigation and trial arc, with some rewards on his head to spice things up.
But, I'm thinking about setting up something mechanically special for this arc. By the climax, after investigations and ready to prove innocent, I want a trial to take place, but as a game itself, similar to what the Ace Attorney videogame series, loved both by me and the player in question, does. And seeing how the series implemented itself on a medieval setting already (Professor Layton Vs. Phoenix Wright), I thought I could do something similar.
This way, I can get more of a "game" out of this situation, and reward logical thinking in a more structured manner. Witnesses, cross examinations and evidence analysis would be added as mechanics by me, so they aren't the problem. Neither will be the setting, not being based on the "Kings do Divine Justice".
Also, I'll be creating or finding some class to serve as the "Truth People" or something like that, to carry on with this idea, so I don't have to twist the whole setting to fit this thing in.
But…
…then I got slapped in the face by the fact that magic, even though not so strong in our setting, still exists and will probably destroy everything I can think for this system, from illusion and transformation spells to Zone Of Truth, for starters.
They would make everything so obvious, or so fabricated it wouldn't need a trial. Shove people on Zone Of Truth and there you go. Modify an item with magic, perfect piece of evidence.
I don't want to cherry-pick spells to rule them out just for this scenario. So, is there a way to set this up without being so "Ok magic here works different because I want to"? Am I overestimating the use of magic in D&D? Should I give up this silly idea before it ruins the game?
Best Answer
There are two parts to this: using magic for the law, or for getting around it. Let's consider these in order.
Using magic in your legal system
I've seen some settings with magical truthsayers (or whatever you call them) making trials much simpler. But, you still have to track people down, bring them to trial, consider motive and sentencing, etc. Consider also that telling the truth isn't necessarily foolproof; some lawyers can ask questions that make you feel flustered and say things that come out the wrong way. That could be tough to roleplay, though.
So, I'd suggest not treating magic as foolproof. Fortunately, it's not! Looks like Zone of Truth is a 2nd-level spell, so probably in any good-sized city some 3rd-level cleric could be found to cast it, but what if they couldn't get anyone much higher level than that? That would leave plenty of room for successful Will saves. Just the possibility should be enough to make people take the trial seriously.
Another option is to make it illegal to use magic on anyone against their will, but it would be an unusual society that would set that rule broadly in the first place and wouldn't make an exception for suspects in trials. It could be considered a civil rights issue, though, like we have the 5th Amendment.
Using magic to circumvent the legal system
I'm not sure this is as much of a problem as you're worried it might be:
Overall, magic can certainly complicate trials more than it simplifies them, but it doesn't have to invalidate them. You've set yourself a challenge for sure, but it's probably not insurmountable. (I would, however, try to avoid spending more than a session or so on this, unless you're sure all the players at the table are into it and have some way to stay engaged.)