Games often have only one number per NPC representing “how much so and so likes the player”.
Aside: I don’t know for certain the internals of closed-source games, but I believe I can guess, the broad strokes at least.
In games like Eve Online or World of Warcraft, the player might have one number per faction instead of per NPC. Role playing games such as Mass Effect, Dragon Age, Skyrim, Fallout, might have a number and a boolean; the number is how much so-and-so likes the player, and the boolean is whether the relationship is romantic/sexual. I believe The Sims is broadly similar, but (because there is no specific player-character) it keeps track of this “number plus boolean” relationship for all pairs of characters, instead of only tracking the star-graph of relationships-with-player.
This is really incredibly impoverished, and leads to various negative consequences. These games essentially teach the player to “Put kindness into the NPC until sex falls out”, where “kindness” grounds out into flattery dialog options, gifts, approaching or following the NPC in order to trigger some kind of positive interaction scene, and asking the NPC for a date or sexual encounter.
In the book “No One Understands You and What to Do About It” by Halvorson, the author talks about (if I understand correctly) three lenses for understanding relationships, one of which is the “ego lens”. The ego lens is something like “consider how this interaction impacts each participant’s self-assessed status”.
I think the ego lens can be used as part of a “social physics engine” for games. (Note that I’m not claiming its the whole of a social physics engine.)
According the ego lens, people are worried about comparisons to other people. A person who is successful at the thing that you want to be successful at, and also close, would be a high threat. A person who is successful at the thing you want to be successful at, but is distant, would be more comfortable. A person who is successful at something irrelevant to you, and close, on the other hand, would allow you to “bask in reflected glory” or “BIRG”.
So there are two strategies for dealing with a threat: redefine yourself to actually focus on something else, or to move away. So let’s imagine that there’s a system of magic which classifies spells and spellcasters (borrowing from David Hair’s Moontide quartet).
“There are Four Classes of the Gnosis. First is Thaumaturgy, which is concerned with the tangible and inanimate: the elements. The Four Studies of Thaumaturgy are Fire, Water, Earth, and Air. Then there is Hermetic magic […]”
If you are playing a spellcaster, and your companion is also a spellcaster, and you demonstrate that you are better than they are at fire magic, then they may react by self-defining themselves as a water mage. If you demonstrate that you are better at water as well, then they may react by self-defining away from thaumaturgy as a whole. That is, if you “pursue” in the space of capabilities, they may “retreat” in the space of capabilities (or they may leave you or hate you).
There’s more social-physics-engine mechanics to be mined out of “No One Understands You and What to Do About It”, but I think this simple mechanic is worth a blog post.
Each person has a self-definition, which is a location in some space of capabilities, and one of the ways a pair of people can interact is to compare their self-definitions, which will push their self-definitions apart if they are too close (and be a bit unfriendly), or if their self-definitions are far enough apart, they will “BIRG” (and be a bit friendly).
If the space of self-definitions is a simple one-dimensional line-segment, then this looks a bit like a pecking order. If you bring together a bunch of chickens (or NPCs) that have not interacted before, then they will engage in a series of confrontations, which will bump the dominance of the initially-most-dominant one up to one extreme end of the line-segment, and similarly bump the dominance of the initially-least-dominant down to the other extreme end of the line-segment.
If the space of self-definitions is three one-dimensional line-segments, labeled “clergy”, “aristocracy”, and “merchant”, in a star shape, then the player assassinating all the clergy in a town could cause a power vacuum, which could be filled if someone, probably a low-ranking aristocrat (e.g. rank of ‘younger son’) or merchant (e.g. rank of ‘farmer’), was bumped into a low-ranking clergy position instead (e.g. rank of ‘deacon’). It would be a bit reasonable and a bit cool, if the player comes back to this town, to find that someone who wasn’t clergy has become clergy, after the massacre.
Similarly, if the player installs several foreign dignitaries at a court, seeing or hearing about a sequence of pairwise fights as the dominance hierarchy works itself out would be a bit reasonable and a bit cool.
I don’t know exactly what the connection is between the geometry of the space of capabilities, and the kind of stories that can be told with this simple bumping mechanic, but I’d like to find out.