Simulating moral code in NPCs

NPC groups will start out with certain (randomly generated) moral rules, which you can shift in a direction of your choosing by talking to people.

Value of life:

A. Every life is equally valuable.

B. The value of one’s life is based on their faction.
– For example, a master is worth more than a slave.
– Or one of us is worth more than one of them.

C. The value of one’s life is based on their actions.
– For example, heroes are worth more than cowards.
– Or those who heal are worth more than those who torture.

Attitude towards weakness:

A. Weakness is not tolerated.

B. The weak must be protected.

Team vs individualism:

A. Loyalty to the group comes first.

B. Self-preservation comes first.

Loyalty to the leader:

A. The leader is worth more than the fighters due to their knowledge and abilities.

B. The leader is just one of the guys.

Freedom vs health:

A. It’s better to be wounded and free.

B. It’s better to be a slave than dead.


In most cases, the majority of the group will follow a shared moral code. Peer pressure will ensure that very few will step out of line.

Wild cards – In any combat, there can be 0-5 wild cards that act opposite to the moral code in one way or another. They can be pacifists or cowards or ruthless killers.

Wild faction – When the fighting force is non-homogeneous, it’s possible that the moral codes of factions clash and cause a conflict between members on the same side. That’s why if a group is going to war with another one, the leader should hold speeches and rallies to unify the group so that the chance of a faction conflict breaking out in the middle of combat is decreased.

Combat and buildings

Ideally, it should be possible to move in and out of buildings automatically during a combat situation. Characters would hide in familiar buildings and gain an advantage to attacks on intruders. It should be possible to set buildings on fire, but fire shouldn’t spread insanely fast and shouldn’t be a guaranteed win against hiding people.

If the main group refrains from extreme violence, certain wild cards can engage in cruelties inside buildings when nobody is watching. Victims may be found after the fight is over and no one might know who was the culprit.

If the main group is very ruthless, wild cards may engage in protecting certain enemies, for example claiming that a building is empty when in fact someone is hiding there.

Maintaining and altering moral codes

Extreme moral codes are more likely to cause a backslash reaction. Maintaining an atmosphere of self-sacrifice or a preference to ruthless torture requires hosting events that reinforce the moral code. If your people are not exposed to frequent violence, they can’t become desensitized to it. That’s why if you want to maintain a culture of violence, you need to have things like public executions, floggings or bloody duels. Likewise if you want to maintain a society where the group matters more than the individual, you need to host events that boost a sense of unity and for example have everybody dress the same way or carry insignia that marks them as a member of the group.

If you are trying to change the status quo, you need to start small by talking to individuals, collect a sub-group of like-minded individuals and gradually increase your sphere of influence. If the moral code you are imposing is completely opposite to the reigning one, it will eventually cause a conflict and the group may split as a result. It’s better to start with a more subtle change and advance towards more radical views once you have a lot of followers. You can single out a sub-group based on a trait, such as gender or hair color, and convince the others that they are better than them while the others aren’t really even human. This makes the main group more prone to accept oppression on the targeted subfaction. If there is a reigning class, you can gather a subgroup of lower class people and rally them against the masters.

Even though I have previously said that all combat should be resolved instantly, actually it would make more sense to have a delay that depends on the size of the groups involved. An event like a single stabbing can happen instantly, but when there’s a whole battle taking place, it should last up to half a day game time. Status updates would be generated every 15 minutes and if the leader of one faction is online, they could call a retreat or surrender if necessary.


Ilona Ward


Leave a Reply