In my current game I need a way to simulate how different individuals and groups feel about each other. I have some thoughts but I don't know if I'm doing too much or too little.
One way is to score a series of modifier objects:
Wrong government -x
Wrong religion -x
Attacked our country/province -x
Attempted to assassinate ruler we hate +x
Then total these up when we need to see the opinion.
Another way is to just modify the opinion whenever any action is performed. This might be easier and faster, but then we can't easily check why we have that opinion.
I'm leaning towards the first though I wonder if there are possibilities I had not considered.
Populations exist as an integer and some descriptors, like 50000 people of race x with religion x and nation x and class x and job x:
50000 dwarf peasant farmers of GenericChurch of Placeland.
Populations will generally have an opinion of relevant provinces/nations/populations/major characters with various modifiers.
If you have the above population living in the same province as 40000 elven noble merchants of SpecificGod of NationOverThere, there might be tension, possibly violent, based on those attributes plus opinion modifiers.
Meanwhile if you are an elf king of Specific god and you have dwarf peasants of GenericChurch, they might side with an invading dwarf king of GenericChurch. So from 50k peasants you might get 2-4k of poorly equipped soldiers joining forces with the invaders plus some supply bonus as they are peasant farmers. Dwarven merchants of generic church might fork over some cash. Unless say you are a benevolent and tolerant ruler not favoring elves or worshippers of SpecificGod over them and the invading dwarf king is a tyrant with high taxes who lets his noble officers abduct the daughters and wives of peasants. Also if you ruled over the province this population lives in for a longer or shorter time, your populace might be more or less likely to assist invaders, or revolt, or what have you.