One way that may-be fun is to have "law-giver" (aristocrats and nobles, for example) to have varying "preferences" for punishment (or lack thereof) for different crime.
For example, you can have a dwarf that got elected to a mayor position. The dwarf have a fondness of dogs. So shortly after election, she would "amend" the law to provide harsher penalty for crime that involved harming a dog (not a mandate like prohibition on exporting dog related products, although more then likely she would issue one).
Conversely, the dwarf might have a more "destructive" personality, and would lower the penalty for breaking stuffs.
On a mechanics side, effectively a dwarf in the law-making position would either add or remove new laws to an existing default laws.
For example
Default (catch all if more specific laws are not given):
Export ban violation on Any - 10 ~ 20 hammering
Ignored a production mandate Any Noble/Item - 10 ~ 20 hammering
Vandalism of Any Object - 5 ~ 10 months of jail
Attack of a dwarf/tame animal - 5 ~ 10 beating
Killing of a dwarf/tame animal - 5 ~ 10 hammering
Additional can be subscribed by combining the following.
{Violation} of {Target 1} - {Punishment}
NOTE: Target 2 only apply for production mandates.
{Violation} are in the following categories:
1. Export ban violation
2. Ignore production mandate
3. Vandalism
4. Attacking
5. Killing
Target:
Target depend on the violation listed but can fall into broad categories.
For example, you can have...
Vandalism of Furniture
Vandalism of Chairs
Killing of any pets.
Killing of pet cats.
Punishment:
Again, like existing system.
1. Hammering
2. Beating
3. Imprisonment
A law generated from a dwarf's preference might be as followed.
1. Pick a target (something she likes/hates)
2. Pick a violation (should make some sense, although technically all would work with some override. Like vandalism of cat would be overrode to killing/attacking cat).
3. Pick a punishment (if law-giver likes {Target}, proscribes harsher penalty then default. If law-giver hates {Target}, proscribes weaker penalty then default).
So, for example, a cat loving dwarf will look at existing law ("Killing of a dwarf/tame animal - 5 ~ 10 hammering") and decide to make a more specific law ("Killing of a tamed cat - 50 hammering").
Law resolution:
I imagine a pattern matching structure, where the "laws" are picked by how well their {Target} matches. And only laws whose full list of raw-tag matches will have apply. And if more then 1 law applies, use the latest law (in short, laws are resolved in stack order, the newest law overrides oldest laws).
Let's say you have the following laws (amendment number is the order in which they're introduced).
Default: Killing of a dwarf/tame animal - 10 hammering (just dwarf/tame animals, no additional tag)
Amend 1: Killing of an owned pet - 20 hammering (must have an owner.)
Amend 2: Killing of a cat - 20 hammering (must have [CREATURE: CAT] tag)
Amend 3: Killing of a an owned pet cat - 100 hammering (must have [CREATURE: CAT] tag AND must have an owner)
Amend 4: Killing of a vermin hunter - No penalty. (must have [HUNTS_VERMIN] tag).
And now, someone killed a cat that have no owner. Amend 1 won't apply, since it doesn't have an owner. Amend 3 won't apply, since the "have an owner" criteria won't match.
Amend 2 would apply, since it's a cat, which have [CREATURE: CAT] tag. Amend 4 would also apply, since a cat has [HUNTS_VERMIN] tag. In this case, Amend 4 would be used (even if cat is more specific, amend 4 is the newest law, made by say some dwarf who really hate vermin hunters).
In summary of law resolution:
1. Default laws are always resolved last.
2. Laws are checked from the newest first.
3. The first law that has all it's required tag fulfilled in the target of the dwarf's crime, that's the law that's used (even if the later law is more general then previous ones).
Removal of law by dwarf:
Dwarf can remove/update laws they don't like (exclude default laws, which they can only modify). Dwarf will compare amended laws to the default punishment and determine whether they're "appropriate" given their preference. A cat-loving dwarf might strike out laws that proscribe weaker punishment then default on crimes against cat. Or might make the default punishment weaker as to make the "weaker" punishment harsher in comparison.