So, you are looking for a mechanical way of judging the outcomes of moral agência? Good for you: you are joining a quest that humanity has been engaged in for at least 4,000 years covering fields as diverse as philosophy, religion, sociology, politics and law - there is no end point in sight.
What is evil anyway?
If you actually read the description of D&D 5e's alignment on p. 122 of the PHB it says:
Alignment is a combination of two factors: one identifies morality (good, evil, or neutral), and the other describes attitudes toward society and order (lawful, chaotic, or neutral).
So herein lies a problem: after several thousand years of thinking about this stuff, there is no consensus of what "good" is: is it altruism, utilitarianism, liberalism, egalitarianism, something else? Similarly with "law", do we need: democracy, communism, feudalism, socialism, something else?
If you read the actual descriptions of each alignment combination the commonalities are that "good" appears to be synonymous with "altruistic" while "evil" means "selfish". Similarly, "lawful" creatures put society ahead of the individual while "chaotic" ones do the reverse.
Dê uma olhada em Como você decide o alinhamento das ações de um PC? for some thoughts on this.
If you adopt this as your definition of good/evil, law/chaos; notwithstanding that it models actual moral agency the way a light globe models the sun, it at least gives you a metric that can be applied to alignment.
Is evil in thought, deed or outcome?
So now that you can qualitatively assess alignment you need to decide if you will judge based on:
- thought processes i.e. if the players contemplate an Evil (or Good/Chaotic/Lawful) course of action does that move them on the alignment scale even if it is rejected?
- intentions i.e. if the characters do a evil thing for good reasons is that evil or good?
- the outcome i.e. if the characters' actions cause evil to occur in spite of their intentions are they morally culpable? Does this change if they were negligent? Or reckless?
- A combination of all three.
The currency of alignment
So, are you going to quantify alignment? If you are considering this think about:
- How many orphans do I have to feed to equal 1 drowned puppy?
- Is it more good to donate 10,000gp to build a temple to Torm or to feed 10,000 people in Torm's name?
- Is spending 50gp when your net worth is 100gp in a good cause worth more or less than spending 100gp when your net worth is 200gp? Or 300 gp? Or 150gp?
- If I break the law by stealing 10gp, is my account equaled by catching another thief who also stole 10gp? If not, what if they stole 1,000gp?
- If I save the world from horrors beyond the edge of sanity, can I go around kicking beggars for the rest of my life?
Putting a metric on this stuff is hard.
Tensão
What is a Lawful Evil character to do when following the law will damage him personally? Or a Chaotic Good when it is clear that by bowing to the will of others many people will benefit (essentially the central issue of Huxley's Admirável Mundo Novo).
Complicações
There are lots. It will suffice for you to consider your and your player's reaction to the Trolly Problem
Who decides?
Are you going to agree with your players what is and is not a good/evil/lawful/chaotic action or are you going to impose your beliefs on them?
Will they know in advance or as each action comes up?
Status quo
If you do nothing at all, does your alignment stay where it is or does it drift towards True Neutral?
That is, to stay Lawful Good must you meet a quota of Lawful and Good acts? If so, how many?
Sigilo
Secrecy about a player's character is almost universally ruim.
The character is the apenas thing the player has control of and they know all about them: hit points, Intelligence, Armor Class, Traits, Flaws etc. Keeping nada about their character secret from the player is não fair. As a DM you have the whole world to keep secret: let the player's know the consequences of their actions.
That means they should know what alignment they are and what alignment they are heading towards.
Who are the heroes?
Quoting from my answer to Como faço para que meus PCs não sejam um bando de cretinos assassinos?
As for Role-Playing; what is the role that the players fulfill in the world? If they are seeking classic heroic fantasy (whatever the genre) then it is incumbent upon them to behave heroically and it should be clear what heroic behavior is before play commences.
If heroic means Sir Galahad then
- This is a high bar to set, and
- It is not fair of a GM to put in place ethical dilemmas that cannot be unambiguously resolved
- It is also not fair to put the players in a position where ethical behavior is obviously suicidal.
If heroic means Wyatt Earp then
- This person has been delegated a state's "monopoly on violence"
- There must be unambiguous bad guys
- These bad guys must be brought to justice
- If they can't be brought to justice its OK to kill them
- Everyone else must be protected
If heroic means James Bond then
- This person has also been delegated a state's "monopoly on violence"
- There must be unambiguous bad guys
- It is clearly OK to kill people simply because they work for the bad guy.
- Everyone else must be protected
If heroic means Batman then
- The heroes are self-appointed vigilantes
- Ambiguous bad guys are OK (e.g. law enforcement that don't understand what's really going on)
- The bad guy must die or be captured
- Anyone who gets in your way is fair game
- Collateral damage should be minimized but that is a secondary consideration.
If heroic means Torquemada then
- You have a divine mission
- People are damning themselves for all eternity
- It is merciful of you to give them pain now in order top save them from eternal agony.
If heroic means Tamerlane
- Everything and everyone in the world belongs to you
- If they resist they should be butchered and have their skulls made into a pyramid.
A Solução
So, having decided how hard it is, here's a simple way to do it.
- The normal rough and tumble of what passes for adventuring in your campaign has no effect on alignment.
- There should be example acts defined and known to the players for "Good", "Evil", "Lawful" and "Chaotic". Committing acts like these move you to that alignment - do not stop at Neutral, do not collect $200.
- There should be edge case examples and known to the players where this is há pouco "Good", "Evil", "Lawful" or "Chaotic". A sustained pattern of behavior like this will move you one alignment in that direction.
- At the end of each session the player's should be told of their "drift".
- Good acts don't cancel Evil nor do Lawful cancel good.
- Old acts fade away - say after 10 sessions.
- 7 sessions of the last 10 with a given "drift" moves you in that direction and resets the Good/Evil or Law/Chaos "clock".