The procedurally generated story line is the most complex system of the new update, around which everything else will be built in all updates to come. Here you can see how the system works:

What I want to achieve with this system in combination with the world generation is a unique play-through every time you start a new game. It will have different locations, different NPCs, different story lines and different opportunities.

NOTE: Now that I am looking at this - this is more accurately called an ecosystem, since generating a story here is no where near the linear story line like in Half-Life, Undertale and etc. The procedural story will still be here but it won’t be something on the level of Half-Life and other games.

General ecosystem

The player can affect the environment and world around them, where their actions have set consequences. The world is not set of vaguely tied areas, rather a web of systems. Here are examples of action → consequence:

Action Consequence
The player steals a cart full of supplies from a trade route The outpost to which this cart was delivering the goods may crumble and get abandoned due to poor conditions
The player kills a noble member of society Many people will start looking for the player for payback for what they did
The player clears out an area full of the Lost An outpost can spawn there, where the player is praised for their actions
The player sabotages a rival faction's resource gathering operation This act could lead to strained relations between factions, causing trade routes to be disrupted or, in extreme cases, even war

Human NPC behavior

Overview

The player meets NPCs in many various ways to compliment the playthrough. The player can meet NPCs in outposts/camps, while simply wandering around or being saved by NPCs from death (Eg: Killing the enemy who was about to kill you or catching your hand right before you fall down a deep hole or something).

Player - NPC interactions

These NPCs will have a specific value assigned to them - the Main Character Value (MCV for short) [0-2]. It starts from 0, meaning the NPC is just a regular NPC.

The more the player interacts with a set NPC positively, the more this value grows. This value determines how important a set character is for your playthrough e.g. are they a main character.

This value controls the probability of a set NPC to appear in the playthrough and interact with you. Note that this value is different from the Antagonist value explained below. High MCV but low AV creates an antagonist in the story line.

Another important value is the Antagonist Value (AV for short) [-1 - 1], which determines what kind of relationship an NPC has towards the player. This value is chosen at random for each NPC and its influence grows with the MCV. If this value is above 0 (positive) this means the character is likely to be an ally to the player and support their ideas and gameplay style. A value below 0 (negative) will create an antagonistic character that will often go against the player. Usually they will become the villain of the player’s story and they have unique properties such as a higher chance to become a more powerful being (eg a faction leader, outpost leader and etc). Neutral values that are near zero select a character that can be on both sides. And during key conflicts they can choose a side they are more leaning towards (possible for betrayal situations), since a pure zero is highly unlikely, and if that happens the algorithm will automatically choose a random value near zero to remove the pure neutral.

The story is built with scenes/events. There are two tyypes of events: Story events and Special events.

With this system the story is technically linear, but every player-side event (special) is a branch in the story, hence making the story have infinitely many variations

NPC - Player

The second moving factor for the story are NPCs interacting with the player. Their interactions are described via events, mostly story events that are exclusively NPC - player.