Friday 24 September 2021

#38 NPC Communities: Langeness Pt. 2

 The second post in this series is about concretizing a NPC community concept.

Environmental Storytelling

By placing certain actors in certain places, having certain looks and being surrounded by certain objects, we can tell something about the place and the people living there. This telling becomes even more evident when things are moving: People work, birds fly, plants move in the wind and a mill might be driven by water. This all certainly is worldbuilding and might even be storytelling, if the used actors/places/objects/.. are part of a story. The following video shows how the environment in Cyberpunk 2077 heavily influences its storytelling by mood-setting, contextualization etc.

Cyberpunk 2077 Environment Breakdown with 3D Artist

I decided to not share one of the countless articles on the craft of environmental storytelling itself here, since on the one hand it is a pretty well-discussed topic in narrative and level game design, and on the other hand I simply didn't have a concrete ressource to recommend. 

A Witcher 3 Community: Langeness

First step for community creation and environment art with the radish modding tools (besides basic project setup) is defining a new layer. A layer is like a container for anything that can be placed into the gameworld, including e.g. regular assets like tables and such, but also waypoints, areas and actionpoints (a point that defines the execution of a certain NPC behaviour without yet saying who does it).

A layer definition might look like this (written in YAML):

You can see that a layer "nekkerlayer" in skellige is being defined. It has six actionpoints, each with positional data (x, y, z, rotation) and an action (e.g. "nekker/nekker_angry_jt") assigned. Next come two areas, which consist of a height parameter and an arbitrary number of corner points. Under "statics" various assets are listed; here a blood decal referenced from the engine's asset depot is used.

Such layers can be defined via a game mod and their definition can be dumped directly into the right format.

Not all work, however, has a nice GUI-tool. The community definition itself, meaning the definition of NPCs and assignments of NPCs to actionpoints, possibly also for different phases, times and dynamic world conditions is all written manually.

In the screenshot above you can see how both shown communities (bear- and nekker_community) have actors defined based on existing templates and phases. Phases are used to define different community states that change via quests, e.g. when the community is happily living in one phase, and after the player triggered a local assault a phase were the community is devastated.

In a phase, for one actor (who might be used multiple times) it is defined how they spawn and behave. They might wander around in wanderareas (bear), guard an area and follow an intruding player up to a certain distance (bear), spawn in packs (there are always 2 bears spawning, with a respawn time intervall of 20 seconds). They might also have a pursuit area defining how far they follow the player and show different behaviours (be at different actionpoints) at different times.

After defining layer and community in a file, the radish encoder from the modding tools and the official mod kit translate these definitions into game data and bundle them into mod/dlc extensions, which can be easily plugged into the game.

This makes the main task understanding the concepts behind the many options for layer and community definitions, of which I showed only a fraction here. I'm quite grateful to be able to work on such a high level at all, considering the fact that the official mod kit at release had a much more narrow scope and was much more technical.

Conclusion

Next time, I'll either be done with this trial and present the final post in this series or - and considering the problems I'm having right now with the remaining tasks this might very well be the case - another project will find its way onto the blog.

Hope you're doing well and are taking your time to do nothing!


No comments:

Post a Comment