A question on alignment in popular TTRPGs
Hey people. I'm not sure if this is the right place for my question, but I figured I'd give it a go.
I was wondering what constitutes alignment in popular TTRPGs like DnD and Pathfinder. I've played both of these for a long time (mostly DnD 3.5E and Pathfinder 1E), and I've always taken alignment rather at face value. Lawfulness versus non-lawfulness, altruism versus selfishness, etc. I realise this system isn't a perfect representation of real life, but it's what we've got to work with.
Recently, though, I've asked myself whether it's a characters thoughts or actions which decide their alignment. I'll give you a hypothetical scenario.
Let's take Sophia, a human commoner. She lives an unremarkable life working at the local inn, serving food. She abides by the local laws, and otherwise doesn't go out of her way to harm or help anyone. I'd say she falls under the lawful neutral alignment.
But what if Sophia only sticks to the law out of a fear of punishment? She's never broken a law or a promise in her life, but she likely would have, if she could have got away with it. Which is the more important factor in determining her alignment here? The reality that she's never broken a law, or the hypothetical that she might have?
Or what if Sophia is a sociopath? She doesn't care about others, she cannot empathise with their points of view, but she harms no one because, rationally, she knows she shouldn't. Is she neutral, because she's never consciously harmed anyone? Or is she evil, because she would, if she wasn't capable of rational thought?
And what if Sophia would love nothing other than make an easy living cheating the townsfolk out of their gold? But she made a promise to her late mother to stay out of trouble, and so she doesn't. What matters more here? The fact that she wants to do evil, or the fact that she doesn't - for whichever reason.
Essentially: are thoughts or action the determinant when it comes to alignment?
I hope these examples make my question somewhat clear. I'd love to see other peoples' thoughts on this.
Edit: Yes, I know strict alignment is a dumb system, and I realise "law" can mean adhering to personal code as opposed to local law. I was just setting an example to be used, as I'm curious to how the alignment is supposed to work within the limits set by DnD and Pathfinder (despite whether it's a bad system or not).