Preference Modding and Aggression


This past week I started work on tribal aggression.  The first step I took was to add a new cultural preference to use as an aggression level reference parameter. Though, instead of just hardcoding this new attribute, I decided to add preference modding, which means that mods will be able to add any kind of new cultural preferences beyond the basic ones currently defined. Here's a snapshot of the current mod file for cultural preferences: 

{
  "preferences": [
    {
      "id": "authority",
      "name": "authority"
    },
    {
      "id": "cohesion",
      "name": "cohesion"
    },
    {
      "id": "isolation",
      "name": "isolation"
    },
    {
      "id": "aggression",
      "name": "aggression"
    }
  ]
}

This is obviously very simplistic. Beyond having an id and a name, preferences lack any other kind of attribute. My plan is to add more moddable attributes to each preference in future versions. But for now this should be enough since modded decisions and events will be capable of using the values of custom preferences within expressions just like that. The only drawback is that, at least for tribal aggression to work, the aggression attribute must be present within at least one loaded mod. So modders won't be able to replace that particular attribute just yet.

Beside this, I started the implementation of the algorithms that will use the aggression preference. First of all, I modified the optimal population algorithm to take into account aggression when calculating how much population a cell can hold. Highly aggressive cultures will have a lower optimal population than passive cultures due to inner violence taking out a percentage of the population. I simply called this effect encroachment. An effect that doesn't imply that people just kill each other, but instead that they will aggressively prevent the growth of other populations within their own cell. The effect of encroachment is not finalized. But I will set it to reduce optimal population by just 10%, at least until I get better information on the effects of localized violence within a single population cell.

The bigger effect of encroachment will appear between different cultures sharing a single cell. Small tribes and unorganized bands will be driven out of cells by strong, aggressive cultures. This is what I hope will drive tribal migration and expansion further than it currently does. But for now I will have to hold on that for a bit since, after I added aggression, I noticed a weird effect of cell groups under the influence of tribes:


The bright cyan colored areas are where the aggression preference is high. And the darker tones of cyan represent areas where aggression preference is very low. It turns out that the areas with very low aggression are under the influence of tribes, which sounds like a plausible effect of cultures becoming more "civilized". But I have a strong suspicion this is actually a bug, and the algorithm that modifies preference values on cells under the influence of polities is broken. So I need to spend some time investigating what is causing that strong downward trend.

Next weekend I'll focus on figuring out why tribes lower preference values within their cells, and then I will continue working on the effects of aggressive tribes on other populations sharing the same cell.

Get Worlds - History Simulator

Comments

Log in with itch.io to leave a comment.

Wow, that sounds extremely inspiring and truly wonderful! Hopefully, crops can be assigned a technology dependency, as well as vice versa. And besides, it would be wonderful to influence parameters such as growth in the cells of arable land: with the growth in culture, say, nomadic attributes, agriculture could be reduced to nothing. Oh, I look forward to the moment that it will be possible with the help of cultures to form, transform and, most importantly, how dynamic everything will now become!