Age of Wonders 4 Developer Diary #6 – Narrative Events

Launching on May 2, 2023, Triumph Studios’ Age of Wonders 4 will feature a new Narrative Event system that aims to combine the series’ earlier narrative-driven campaigns with Planetfall’s procedurally-generated nature.

As a result, the upcoming game will feature these so-called Narrative Events positioned as mini-stories and quests dynamically appearing as a result of our actions and choices and the current situation on the map, and offering plenty of role-playing opportunities, alignment-shifting moments, and unique rewards.

Here’s how this system is going to work:


In a wider sense Narrative Events have been a part of the Age of Wonders series ever since the original Age of Wonders. Back in AoW 1-3 they came as a dialogue based message system, which would feature some plot-defining choices and was generally restricted to the campaign mode of the game. Then, in Planetfall, Anomalous Sites made an appearance bringing dungeon crawling options with branching story and outcome to randomly generated maps. Now, for Age of Wonders 4, we have developed a system that unifies our interactive narrative content in one framework to bring Narrative Events to Story Realms and regular Realms (sandbox sessions) alike.

  • On a content level, a single Narrative Event is a mini-story presented to the player, followed by different options to react to the situation at hand, where each option will (typically) result in a different outcome in terms of gameplay consequences.
  • On a system level however, the flow of Narrative Events is uniquely tailored towards the player and their faction, analyzing the player situation, factoring in player actions and choices, with each Narrative Event becoming part of the player’s personal narrative.
  • Lastly, on a gameplay level, Narrative Events will provide meaningful choices to the player, through trade-offs that connect game play systems which normally would not interact with each other and unique rewards that can give a player tools outside their core strategy. When a moral dilemma is at odds with an economic one, many a benevolent Godir has been lured on the path of evil in this fourth Age of Wonders…

Event Format

When it comes to the presentation of our Narrative Events, our art and UI team has blessed us with beautiful scenes in which one (or sometimes multiple) of our event actors are getting rendered in 3D. Those scenes are dynamic and will adjust to the locations, structures or factions involved. Ambient sounds, occasional weather effects and music tracks invite the player into a rich, living game world.

Transparency and player information are of high importance in a strategy game like ours. Therefore our event options give a full tooltip breakdown of all the gameplay effects that will happen when a button is clicked. This is complemented by tooltip (in tooltip) information for gameplay entities, concepts and lore, allowing players to make well-informed decisions within our events.

Event Types and Conditions

Our Narrative Events come in many different types and flavors, and can be categorized in different ways. From a player perspective an intuitive way to sort them is by assigning them to the following three groups:

Type 1: Exploration Events

These are all events that will happen as a direct response to a player army movement, be it due to gaining vision of an unknown faction or an encounter with another army on the map. They promote exploration and give a narrative context to the locations, factions and armies you find on the map.

The above example is an encounter with a Free City army guarding a resource node. It allows the player to peacefully take over the structure, while also giving room for special interactions (here, hiring some of the guards) or a surprise attack.

This is only one archetype of exploration events we have in the game, others include army surrenders, Free City diplomatic meet events and our dungeon exploration events when entering an Ancient Wonder (which will be looked at in their own dev diary later on 🙂 ).

Type 2: Emergent Events

These events always happen at the start of the player’s turn. They are diverse in their theme, actors and options and will come with a sense of surprise to the player, though the narrative will provide a context and usually leave some clues why the particular event is happening.

Each Narrative Event within the pool of events the player may receive comes with a custom set of conditions and settings, reflecting on the player situation, but also the general state of the map and factions present. They are managed by what we call our Story Flow System, which provides the player with a steady stream of narrative events in a controlled and fair fashion. Fairness and balance is of importance since our narrative events are given to AI players and are active in multiplayer mode too. Naturally, with an inherently random system such as this one, some RNG with lucky or unlucky event picks for a particular player will still happen. But we have paid much attention to event reward and cost balancing and scaling, as well as the scope and frequency of narrative events, to ensure that the system integrates well into the competitive strategy game that is Age of Wonders 4.

Type 3: Quests

The two event types we discussed so far were all instant in their resolution and consequences (even if some of those consequences may have a longer lasting effect). Quests as the third type give the player a task to complete within a given time and are presented in the same format with a Narrative Event starting and ending the quest. Just like regular events, quests may be offered to the player from different types of sources including Free Cities, heroes or the player’s own population (cities). We have 7 archetypes of quest objectives in the main game, ranging from standard “defeat this army” quests to diplomatic quests to improve the standing with a Free City. (More types of objectives may be encountered in our story missions ;))

In the above example, the player is asked to obtain a Magic Material, which are special resource nodes on the map that the player may connect to their cities for unique empire buffs. The quest already foreshadows the rewards that will be given to the player upon completion. However the exact rewards are not revealed to not undermine the narrative with spoilers. The “Mystery Bonus” is what the player will pick in the completion event of the quest.

Roleplaying Event Choices

Role-playing is an important part of Age of Wonders 4. What starts with faction creation, ruler customization and continues in game with tome picks and empire building is also complemented by narrative event choices that will suit different types of characters.

To support this we have different types of choice options in our Narrative Events. On the one hand there are good and evil deeds that inform the alignment of the player. The most extreme ones of those will only be available if you are already at a certain level of good or evil alignment and will otherwise be hidden.

On the other hand we have Affinity Checks, where the player ruler attempts to channel their magical skill in order to resolve a problem. They are similar to pen and paper roleplaying actions, where a challenge level and dice roll are compared to the stat of a character, only that in our game the affinity scores of the player empire are used instead.

  • Affinity Checks are hidden until the player empire has a high enough matching affinity (namely it must be as high as the challenge level of the check)
  • They are the only options in our events with a random chance attached. Still you can see beforehand the results of each possible outcome within the button tooltip.
  • The success chance is 50% when the affinity score equals the challenge level
  • Each affinity point on top will increase the chances of success by 10% (yes, this means guaranteed success is possible)
  • A lower success chance than 50% is not possible (then the option is still hidden)
  • Next to the gameplay effects, there are short narrative snippets within the tooltip that provide further context to what will happen with each outcome.
  • Affinity Checks are marked with a matching button icon, so they may easily be spotted when they are unlocked.
  • Failing an affinity check will always result in the player ruler temporarily losing affinity points of the involved affinity.

There are some other affinity informed options that do not involve affinity checks, but we will leave those to be explored within the game itself.

Dynamic Text

Attentive readers of this dev diary will have noticed the many underlined text snippets within the narrative text and tooltips.

As can be seen above those underlined words indicate that a tooltip (in tooltip) is available, but it also gives a hint to the amount of dynamic text present in our Narrative Events. Dynamic means that the exact text is dependent on the specific context of the event instance when the Narrative Event is shown to the player. In the screenshot above this is the Free City name and the name of its Lord or Lady, but there could be other qualities derived from gameplay entities: titles, unit names, hero items, world map structures, etc… They are needed to keep up with the procedural nature of our game and promote replayability by giving variation to the same base event in different instances. Remember the quest about the shattered Chaos Orb? In another playthrough it may be about a Sword instead and in yet another about a famous Axe.

Normally dynamic text insertions cause all kinds of linguistic problems, starting with gendered text when the grammatical gender of the inserted words asks for different text versions – pronouns, adjectives, articles, all may change with what we insert and this gets amplified once texts are being translated (or localized as we say) into other languages. Often this means that the writing needs to adhere to many additional restrictions, the quality of translations will suffer or that inserting this many derived text entries is simply not possible (without breaking grammar).

However for Age of Wonders 4 we could secure the service of the Lingoona Grammar module and integrate it into our own pipeline. It is a linguistic engine that is made for supporting text variable insertions, parsing our text and making it conform with the correct grammar as long as we use its syntax where needed and annotate all text insertions properly. As a brief example of what this actually means let us look at the following sentence from a Narrative Event[…]

It contains two inserted text entries (a hero (blue) and the player leader title(yellow)) and several pronoun (red) references to the hero. In the source text this looks like that[…]

As can be seen EventHero and PlayerLeader are both stored as variables in this Narrative Event. Using a mix of our own custom markup and the lingoona markup syntax then lets this source text be parsed in what could be seen above. (What is not visible here is that hero names and leader titles that may be inserted here all have annotations added to their string as well!)

Event Scripting

Following up with some more tech, we can take a brief look at how our Narrative Events are set up under the hood. Generally speaking they are managed through our Resource Editor, which is our primary development tool for non-art asset content and system settings of the game. What makes the Narrative Events different from regular resource types is that they are heavily entwined with scripts. For this we have taken the Trigger System from Planetfall and pushed it to the next level.

The Trigger System is a modular high level scripting language that comes with a visual interface and lets us combine and instantiate the building blocks provided by our gameplay programmers to read and interact with the game and the state of a player getting the narrative event. At the core the scripting blocks are divided into four types:

  • Events These are the trigger moments that make the game evaluate the script.
  • Setups These are the variables created and stored as context of the script. (These may also contain conditions further defining the variable content.)
  • Conditions The conditions that must be fulfilled for the script to be valid and execute its actions.
  • Actions The changes the script makes to the game or player UX.

The trigger system is a very powerful tool, which includes many goodies you would expect from a simple programming language, such as core logical and mathematical operators, if/then statements and loops. It also allows the creation of Macros, which may be called in other scripts (or Macros ;-)) and are a vital boon for keeping our narrative event content consistent and maintainable.

For the community perhaps the greatest advantage of our narrative event setup (and part of the reason to make a more implementation focused detour in this dev diary) is that they will be fully moddable when the game comes out, as they are contained within the Resource Editor. This means that it will be possible to mod in new narrative events, also ones that completely deviate from the event content we developers have created. A fair warning that this will involve a quite steep learning curve, but I know by experience that the Age of Wonders modding community has very dedicated and talented members among them, who do not fear challenges like this one.


To reflect a bit on what we have read in this dev diary, it can be said from a developer perspective that with the Narrative Event framework and their surrounding systems we have created a powerful narrative tool, which has enough robustness and flexibility to support any narrative ambitions we (will) have for the ongoing development and support of the game.

From a player perspective, the Narrative Events we created will lead to personal stories and immersion within the gameworld that is more tangible and player agency driven than ever before within an Age of Wonders game. Where previous Age of Wonders excelled at bespoke Campaign storytelling, the Narrative Events are set up to give previous campaign players an intriguing experience in all modes of our game, not just the Story Realms.

I thank you all for reading my dev diary 🙂

Best regards, Eomolch

Share this article:
Val Hull
Val Hull

Resident role-playing RPG game expert. Knows where trolls and paladins come from. You must fight for your right to gather your party before venturing forth.

Articles: 9834
Notify of

Inline Feedbacks
View all comments