• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.
Showing developer posts only. Show all posts in this thread.

HeyTiko

Sergeant
Paradox Staff
Moderator
Nov 22, 2022
82
1.775
Hello everyone and welcome to today’s development diary about Narrative Events. I am Jakob (@Eomolch) from Triumph’s narrative team and I’ll be picking up where my colleague Michelle (@MichelleTriumph) left off two weeks ago with her more lore and story-focused journal.

Introduction​

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​

aow4-devdiary6-1.jpg


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.
aow4-devdiary6-2.jpg


Inspecting the player city Centerspike through tooltips

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.
aow4-devdiary6-3-jpg.949994

The guards of Dawnspire need a break.

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.


aow4-devdiary6-4.jpg

This event may happen for a city with a strong military focus.

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 ;))

aow4-devdiary6-5.jpg

A hero asks for the broken weapon of his kin to be reforged.

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.

aow4-devdiary6-6.jpg

Quest completions are set up as “pick your own reward” events.

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.

aow4-devdiary6-7.jpg

Negotiations with toads. Time to find the right antidote…

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.

aow4-devdiary6-8.jpg


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:

DevDiaryLingoonaParsed.png


It contains two inserted text entries (a hero and the player leader title) and several pronoun references to the hero. In the source text this looks like that:

devdiarylingoonasource-png.950001


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.

ResourceED_2023-02-15_11-46-10.png

A sample narrative event script at its highest level. More actions and conditions are attached to the individual button options of the narrative event.

ResourceED_2023-02-15_13-23-00.png

The first layer of a variable creation script - all input fields are further defined in deeper layers of the script.

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.

Conclusion​

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

Stay tuned for a new dev diary next week and consider adding the game to the Wishlist!
 

Attachments

  • aow4-devdiary6-3.jpg
    aow4-devdiary6-3.jpg
    164,2 KB · Views: 0
  • aow4-devdiary6-9.jpg
    aow4-devdiary6-9.jpg
    12,6 KB · Views: 0
  • DevDiaryLingoonaSource.png
    DevDiaryLingoonaSource.png
    26,2 KB · Views: 0
Last edited:
  • 56Like
  • 30Love
  • 7
Reactions:
Thanks for all the enthusiastic replies here in the thread, very cool to see :) Also love the immediate mod ideas getting thrown into the ring!
For now, let me try to answer all the questions I spotted so far. (There will be some disappointments, sorry!)

I don't get one thing in this Diary. And it's in relation to Affinity Check.

Why decisions are only possible when the chances of success are bigger or equal to 50%? Why are the decisions hidden otherwise? Why can't I gamble my life for that 10% of success?
TulajMnie explained it quite well from a flavor perspective: you need a certain skill to even be able to attempt or think of a certain move. Besides that there is the simple UX reason of protecting players from themselves and the quite important role-playing reason that in an RPG you also don't want to see Necromancer options pop up when you play as a Paladin or Ranger options when playing as a Wizard. The options available still have to match the ruler you are playing.

Hard question: Will characters from previous game act like old themselves usually?

So if I meet Ham Binger or Sundren or Werlac can I expect how they will act?
Or magic blast did change them all? :D
In Story Realms you can expect recurring characters to act in line with their character / evolution of that character. In regular realms they are given AI personality settings according to what best suits them within our options, but they will not have bespoke text lines.

I got a question related to the soldiers that, like in that military city example, join you, are they determined by the leaders inside the realm or by the saved empires? in other words, lets say i make a race of ice-cold Tigrans. can those now appear in any event. only when the leader of said faction is ascended, or only when the leader is active in the current campaign?
In theory it might be possible to have unit rewards from narrative events that match a race of some ruler from your Pantheon. However in practice I don't know of any event that would do this - it always sticks to what is present on the current realm in terms of racial units, so usually derived from your own race or that of another PvE or PvP faction.

Will there be only one type of affinity check? For example, in the antidote case, can we cast on ourselves a healing spell or shrug off the effects because of our high constitution, or what happens if we are a toad ourselves?
There will be affinity checks for all of our 6 affinities, but that doesn't mean each event has an affinity check of each affinity. Just like in regular RPG, where it does not make sense for all classes to have special interaction with every situation - some situations certain classes (here: affinities) can just better solve than others.

Then concerning "high constitution", or "being a toad yourself", we don't do special options based on character stats or form. (Form was tempting, but it does not bode well with the freedom of our faction creation system.)

So if I enter a narrative event on turn 3 it would be different from entering it in turn 32, because my faction evolved in those turns, my situation might have changed, my affinity scores growed etc.?
Yes. Higher affinity or different alignment may have unlocked event options turn 32 that you would have not seen turn 3. Rewards and costs will have generally scaled up on turn 32 (though different scope events will still give different scope rewards/costs in direct comparison). And if it involves units of your race, then those will come with the transformations etc active.

Mentioning the quests I wonder, will there be unique npc factions with dwellings like the dragons in AoW3 or the Growth and Psi-fish in AoWPF?
No, there will not be Dwelling like factions in AoW4 (base game, can't talk of future content). However the higher tier Free Cities will have mutators applied to them that make them incorporate different spells and (monster) units in their line-up. But I don't want to go more in depth here, as that should be best talked about in a (PvE) Diplomacy Dev Diary.

I know we can create our own races, factions and leaders who might can turn up as potential allies or enemies in games. But can we also create our own Heroes who might turn up in game also? As heroes we can recruit through normal gameplay (or earn through events like "Bread and Circuses"), or come across serving other factions and leaders? Or perhaps even turn up as leaders of Free Cities that we can interact with? It may have been answered already, but I love to know.
I think this was answered somewhere before, but currently there is no hero creation tool in the game that would let you add heroes to a hero pool. Also because there is no hero pool in the classical sense since heroes are dynamically generated for each realm you play. There is however an option to edit the appearance and name of heroes joining you (and you can reskill them too, if you like).

Two questions - can events be linked (I imagine so), so that a branching storyline can be achieved. Specifically can they be linked in the non story mode maps. Ie. If an initial ‘quest stage 1’ triggers then subsequent steps (stage 2, 3) could either have automatic countdowns to then trigger or increase likelihood to do so. I suppose you could do things like create an enemy stack with stage 1 than when interacted with could trigger the second stage, but then you are at risk of other players or npcs taking it out accidentally. Regardless that would be amazing if you can do that.

Second question kind of building on that. Could they be linked to happen one after another? I’m envisioning a dungeon or arena style interactions - so you explore a ruin and it triggers as a multi level dungeon, where you have to clear multiple armies in a row to fully clear the dungeon. Or with an arena where you go as long as you can again enemy armies with event windows between each one and greater and greater rewards being possible. Again the modding potential and just the fun factor as it is is awesome. Thank you for including such fun features.
The system in itself is quite powerful. You can set up linked ("branching") events that require the player to have seen previous event(s), make it dependent on chosen event options, set up timers till next event would happen or have it be part of regular flow with chance to show etc. Direct follow up is also possible for the most part. There might be some problems when passing on variables, but in principle it should be possible.

Just to be clear, talking about theoretical options within the system, not necessarily existing content :D

Nice. As another player suggested recently, it would be great if a more limited version of this could be used to create quests (with rewards) for players to assign in game to NPCs and other players. Would improve the use of NPC allies if we could incentivise them to perform specific tasks. Really great for both solo and multiplayer gameplay and could create some interesting dynamic storytelling.
It's a cool idea. We actually looked into it for PF at one point. The catch is, that it would be way too much work for what we felt it would have added to the game experience. Basically take the time you would think this takes to implement and multiply it by 100 :p

Does having a specific perk(from social traits,research or hero upgrade) affect dialog options?
Another thing I'm curious about is the event screen mentioned a "warlock". I wonder how hero classes are defined in AOW4.
I can't delve into hero specifics, but the Warlock from the event is a unit (so Warlock is a unit name).
And no perk specific event options, no.

If I understand this correctly, may we assume that this Resource Editor includes a "map editor", or am I reaching here?
Sorry, but no, this does not include a map editor, that would be a different tool ;) We are still looking into whether or not we can ship modding tools with a map editor, can't make any promise.

While reading this one, a small fear started creeping up: Are any of these events used as a “catch up” mechanic for the AI or other players? I.E. Player X is pulling too far ahead so an event nerfs them, or vice versa? I hope not. I did see that it said mostly random, but I also saw it mention the event system takes into account player situation.
To a degree, yes, but not in the literal sense that you picture. Players that are doing badly (== had negative things happen to them a lot, such as losing cities or battles) will have higher chances for positive events, but there is no "nerfing" or "catching up" scripted into the system. But I don't really want to lay open all details of event flow manager as it would invite to attempts of gaming the system and just generally take fun out of the game if you overthink it and try to manipulate the system, but then get angry because it doesn't do what you want it to :D Let it just be said that there are more ways to look at player situation for event picking than looking at victory progression.
 
  • 14Like
  • 10
  • 5Love
Reactions: