Work In Progress: Quests system

Hi everyone ! My name is Hadrien and I am Gameplay and Rendering programmer here at Wolcen Studio, but you may know me as Nyhlus on the game’s Discord and our Steam forums. I have worked on Wolcen : Lords of Mayhem for over a year now, and I’ve created several features that changed the way you play, like the rotating Passive Skills Tree (PST) or the Resource Opposition System (ROS). Yeah, I’m the guy putting acronyms everywhere. And today’s feature is not really different, because I call it the NQM and it will change your whole experience of Wolcen in the future : the New Quest Manager.

You probably feel like me on this : Wolcen current quests are not that cool. They are too short and not very interesting, and that’s not what we want you to experience. We want the open-world to be challenging, rewarding and immersive, and this usually comes with solid quests that bring you hours of fun gameplay without repeating themselves too much. Such quests surely are a challenge to script, but we also needed a robust system that would be easy to maintain and to debug, because quests bugs can be really annoying and quite hard to fix. So a few months ago I started the development of the NQM, along with my colleagues from the Environments department who started to work on the new version of the open-world, and together we tried to design a system that would be super-powerful and easy to setup at the same time.

The implementation on my side was a bit tricky and needed a lot of strictness, because the world state had to be precisely saved and loaded depending on your progression inside each available quest, and data management needed to be handled carefully but I made it through with a lot of testing. Creating the system also required a global rework of the quests User Interface, so as to show different windows for rewards, tracking objectives and accepting / declining quests. This has been achieved by my colleague Lucas, the UI-Master of Wolcen.

2017_04_questsUI1.jpg

 

 

The result is a few thousand lines of code that allow us to track quests progression, launch tons of different actions and animate the whole world so that you feel like you’re part of something real. Without being too technical, let’s just say the system sees quests as a list of steps, themselves containing a set of goals that need to be reached in order for the quest to be achieved. A step can be seen as a quest checkpoint since it represents where the game will save your progression (intra-step goals progression won’t be saved), whereas global progression in the game is coded through a forward-links architecture that tell which one unlocks which other and what are all the quests that must be achieved to reach the next story milestone. By knowing your exact progression inside an act but also in the various secondary questlines, we’re able to instantiate the world when loading the game at the exact state in which you left it during your last play.

As for the quest itself, the whole game-interaction trick is done through a dedicated events system that can be fired, linked or read by the other game systems in real time and that allow us to script the behavior of the world. When initializing a quest, we setup triggers for all pending events and wait for you to perform key actions. Then the ProcessEvent function (1.2k lines long) parses and dispatches all things we need to do in order to react to your actions. Events may or may not be triggered and cover a wide variety of situations, and the implementation of the whole events-system surely was the trickiest part of the NQM development.

As an example, now that I write those lines we have 10 fully functional sub-goals that when combined together create a simple task (go there, talk to someone, kill those enemies without leaving the area, gather items, interact with this object within the given time, etc.) associated with 32 unique event types that rule what happens on screen (spawning that monster here, moving this entity, playing a specific music or animation, switching gameplay parameters, changing weather, etc.) and that can be triggered in 13 different ways (entering an area, failing a goal, killing somebody, waiting too much time, etc.), so when mixing them all we get a ton of possible objectives, not forgetting that the layout of the world itself also plays a role in how the situation must be handled, like the terrain disposition or the positioning of doors and obstacles. And since the system is now developed and functional, we regularly add new events types and goals types when we need them, within a few minutes.

The main issue we had with that system is that describing quests in XML files for those of us who were not familiar with it could be a pain, so we internally created a small tool for editing quests files and managing goals, events and triggers. As an example, quests file in their initial form looked like this :

2017_04_quest1-1024x480.jpg

 

This was neither user-friendly nor easy to read, so we had an intern working exclusively on a dedicated software for writing those files without ever needing to read them in their raw form. In addition to the quests writing aspect, this tool also needed to have a back-end interface for adding new events, event triggers or goals through configuration files without modifying its code, so its implementation was a bit tedious. Then, in January 2017, the Wolcen Quest Manager baby was born and was weighing a few MB. We managed to take a few pictures of it when it was sleeping :

 

 

Quest edition window

 

Event edition window

 

Events and triggers management

 

You guessed it right, using this tool make things a lot easier for us, since it allows us to create a fully functional quest with a few clicks only. Imagine what modders could do if we publically released such a tool along with the game, right ? Not counting the Affixes Manager and Lootclasses Manager already packed in the software… But I digress.

The NQM was born and with time we understood that there’s nothing we can’t do with this system, at least there’s no existing feature of the game that we can’t link to quests. For instance, we created events to start and pause sequences, which are sequential actions recordings that have direct access to most game systems (entities, visual effects, camera movements, sounds and so on) and allow to script entire scenes. More practically, we can move the camera when you enter an area without preventing you to play, or we can animate the objects around you when you perform a key action. Pretty cool, right ? Here’s an exemple of simple sequence that took a few minutes to setup and during which you can still move :

 

We want the playthrough to be immersive and dynamic, with always something happening on screen, and we believe sequences will help in that direction. Of course, never-ending action also mean tough fights, and we plan on improving the game a lot in that way, with scenarized areas of the open-world and coherent enemies, and a lot of hidden secondary quests that lead you to interesting places and rare rewards. On my end, the coding part of the NQM is almost over, although I may have to add goals or events in the future. But the scripting part has just began, and I also have to handle all the dialog writing since I’m the one in charge of this for now, while we don’t have a proper writer. So it’s needless to say that creating a strong first act for Wolcen represent a lot of work and will take time.

Moreover, new game mechanics and features are often needed when creating a new quest. For instance, I am currently creating destroyable spawners and bigger “nodes” that will spread them on the ground and that will be a key feature of act 1 quests. I simulate its life cycle with a series of states in order to link animations and visual effects to gameplay, with an implementation based on a simple state machine pattern. A good example for this application is the spawning egg that start with a birth action (the egg become activated when an active player enter its global vicinity), then starts growing and scaling up. When in growing state, you can attack the egg to stop it before it hatches, in which case it will go straight to decaying phase. But if you don’t and after reaching maturity, the egg will hatch and spawn its contained enemy in the world, then will slowly decay and finally disappear.

All those states have their own animations and visual effects and this system will allow us to create a dynamic world where you always need to fight evil or it will spread even more. The bigger nodes will spread a goo-like thing on the ground that moves further with time and that spawns new smaller eggs, themselves containing enemies. And the characteristics of a node (density of eggs, damage resistance but also rewards amount) will change depending on its current propagation state, meaning that it could be harder but also more rewarding to let the goo spread before destroying the spawner.

I can’t say more about their purpose in the main story, but those challenging entities will surely help us create some memorable situations. Anyway, that’s just an example of the new mechanics we have to develop before releasing the new version of the world and the first act. And because I know you crave for new things, I managed to pull an early concept of such an object from Alex’s old dusty concept-arts drawer :

 

 

Such additional features represent a lot of side work, and in my case they included all kind of things like reviving the player from a checkpoint when dying in a story-driven area, creating a system of automated animated doors that can be locked or unlocked depending on your progression, being able to force a quest equipment or skillbar and prevent the player from removing it, dynamically unlock waypoints and override their usual handling, etc. So finally the whole NQM development turned out to be way more complex and deeper than expected, with a lot of new features added during quests scripting, and I guess I will continue to create more of those features as soon as we need them for a new quest.

I hope the first act of Wolcen will give you satisfaction and that you will enjoy all those new interactions and events inside quests, we can’t wait for you to experience this new world and its stories. Although I can’t give you a precise ETA for this world, I do know that the worst in terms of development is already behind us.

Hadrien,
Wolcen Studio.

Replies: 0

Created: 6 years, 12 months ago

Category: Announcements

Your email is not verified, resend your confirmation email from your profile page.