Let’s say you’re running a city campaign, and you decide (for whatever reason) that you don’t want your players to treat your city like a dungeon with no roof, kicking in every door and murdering indiscriminately. On the other hand, everyone likes a fight, and you want to pack in at least one combat per game session! This can send mixed signals to a player. How will they know when it’s “this guy is dangerous, but we can’t just murder him” time and when it’s “kill the threat to the city and get a medal” time?
Bring law onto the battle grid. Historically (or at least historical-fictionally), dangerous cities had codes of acceptable violence. Dueling laws separated honorable heroes from murderers.
The laws don’t have to be complete, and they don’t even have to make much sense. There’s just one quality they need: they must be SHORT. Players don’t have space in their brain for a whole new legal system. The entire law code should be no longer than, say, a feat description.
Here’s one potential law system, or at least the part that’s relevant to players:
The Blood for Blood Law
If you kill someone who has not physically injured you or an ally, you are guilty of murder.
Make this a strict rule in your city. Anyone who breaks it (with witnesses) will face serious consequences. Let the players know that this is the rubric for when they are not allowed to kill people within city limits. (There are other laws, of course. An assassin who is injured by his mark doesn’t get off scot free. At the very least, he’s breaking and entering.)
The lawmakers’ intent behind the Blood for Blood Law was to prevent murders masquerading as duels. If an adventurer forces a shopkeeper into a duel, and kills him, is it a fair fight? If the shopkeeper got in a hit, maybe it is. If the adventurer beats the shopkeeper without taking a scratch, that suggests that the adventurer was far more skilled than the shopkeeper, and it’s MURDER.
Say the PCs are attacked by their enemies: enemies who could be… awkward if left alive. Are the PCs allowed to kill them? Not until the enemies get some hits in. Once they smack a PC for a few points of damage, they become fair game. Also: that guy in the back, shooting arrows at the PCs and missing every time? He’ll have to be dealt with nonlethally. Or you can make a Bluff check to blame a self-inflicted wound on him.
Does it make sense? Not really. But it’s the law of the land. And it works better with D&D than more sensible rules: it doesn’t forbid combat, it just saddles it with arbitrary restrictions.