> For the complete documentation index, see [llms.txt](https://wiki.redmodding.org/cyberpunk-2077-modding/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.redmodding.org/cyberpunk-2077-modding/modding-guides/quest/how-to-use-worldcommunityregistry-and-worldcompiledcommunity.md).

# How to use worldCommunityRegistry and worldCompiledCommunity

This page describes how to use worldCompiledCommunityAreaNode and worldCommunityRegistryNode

{% hint style="warning" %}
This guide explains the theory on how to setup communties, and how they tie into quests

For actually creating communities, it is recommended to instead follow the [communities with Object Spawner guide](/cyberpunk-2077-modding/modding-guides/world-editing/ai-and-npcs/creating-communities.md)
{% endhint %}

## Summary

**Published:** Nov 10 by [Sergey](mailto:undefined)\
Last documented update: Dec 4 by [Sergey](mailto:undefined)

### Wait, this is not what I want!

* If you want to learn about [Quests & Scenes](/cyberpunk-2077-modding/modding-guides/quest.md), please check the corresponding section.
* If you want to learn about [World Editing](/cyberpunk-2077-modding/modding-guides/world-editing.md), please check the corresponding section.
* [NodeRefs](/cyberpunk-2077-modding/for-mod-creators-theory/files-and-what-they-do/file-formats/the-whole-world-.streamingsector/noderefs.md) explained

## Requirements

* [ArchiveXL](/cyberpunk-2077-modding/for-mod-creators-theory/core-mods-explained/archivexl.md) 1.17.0+

## Basics

There are two types `worldCompiledCommunityAreaNode` and `worldCompiledCommunityAreaNode_Streamable`

The difference between them is only that `worldCompiledCommunityAreaNode` must be registered in `AlwaysLoaded` type of `.streamingsector`

`worldCompiledCommunityAreaNode_Streamable` can be registered in other types of `.streamingsector` (exterior/quest/etc)

## Theory

Working with `worldCompiledCommunityAreaNode` and `worldCommunityRegistryNode`

In general, we are specifying in `worldCompiledCommunityAreaNode` all our spots where we want to spawn NPCs/etc by its `entryName`/`phase`.

For example in the quest **Riders on the Storm** CDPR reactivates all needed NPCs by their reference, entry name, and phase name.

<figure><img src="https://1427525421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4gzcGtLrr90pVjAWVdTc%2Fuploads%2Fgit-blob-b7538ea36595537a5c95863ffe422f4a7d748ff1%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

Setup your Wkit project.

Create `.questphase` `.streamingblock` and `.streamingsector` files

<figure><img src="https://1427525421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4gzcGtLrr90pVjAWVdTc%2Fuploads%2Fgit-blob-27addd3bbc9abf284cdacb240e52fe7b0b9b575c%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

1. Create `archiveXL` file and specify your `.streamingblock` and `.questphase` files

   <figure><img src="https://1427525421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4gzcGtLrr90pVjAWVdTc%2Fuploads%2Fgit-blob-ec693b8ca740faa2eec873c37b4d4d11b64565f3%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

   <figure><img src="https://1427525421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4gzcGtLrr90pVjAWVdTc%2Fuploads%2Fgit-blob-48def1355724930fb6b85731d9b99848c3d4c536%2Fimage.png?alt=media" alt=""><figcaption><p>we will use .questphase file later</p></figcaption></figure>
2. Create NodeRefs for `worldAiSpotNode` and `worldCompiledCommunityAreaNode`

   <figure><img src="https://1427525421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4gzcGtLrr90pVjAWVdTc%2Fuploads%2Fgit-blob-824e72be809ae1c9da7234f68c39035230fc4fe6%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>
3. Create `worldAiSpotNode` and its `worldNodeData` and assign created `NodeRef`before

   <figure><img src="https://1427525421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4gzcGtLrr90pVjAWVdTc%2Fuploads%2Fgit-blob-39818df677e0d3e80195da2cae4ead4866f09dba%2Fimage.png?alt=media" alt=""><figcaption><p>In the spot property u need to specify workspot that you want to use</p></figcaption></figure>
4. Create `worldCompiledCommunityAreaNode` and its `worldNodeData`

   <figure><img src="https://1427525421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4gzcGtLrr90pVjAWVdTc%2Fuploads%2Fgit-blob-af04b6f47aff8a8c815b8acada404786cdef7246%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

   **Important**:\
   \- In the `Node/area/entriesData` we specify an `entryName/phaseName/spotId(AiSpoNodeHash)` so in the future, we can `Activate/Reactivate/Deactivate` its entities by these params\
   \- `sourceObjectId` - it should match `id`of registry item
5. Create `worldCommunityRegistryNode` and its `worldNodeData`

   <figure><img src="https://1427525421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4gzcGtLrr90pVjAWVdTc%2Fuploads%2Fgit-blob-67ab53d97176a1cd7b415a8976aab5b0d9c30c0d%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

Details about the registry:

**Important:**

`communitiesData` - there are we specifying the type of NPC its template, entryName, and all possible phases

<figure><img src="https://1427525421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4gzcGtLrr90pVjAWVdTc%2Fuploads%2Fgit-blob-04bf994c9b0e07a0860a5429576797ff5baee31b%2Fimage.png?alt=media" alt=""><figcaption><p>In this example, i set Panam with entryName panam and phase A to be able to activate on the spot we created earlier</p></figcaption></figure>

`workspotsPersistentData` - there we are adding a new spot into the engine's global registry by the hash of our `AiSpotNode`

<figure><img src="https://1427525421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4gzcGtLrr90pVjAWVdTc%2Fuploads%2Fgit-blob-08acaf8f2de8cb7d1fa9162d16b809c5f48502ad%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

Trying to spawn:

I set the point in front of H10 V's apartment so we should see Panam spawning once we send a command. To do so we need to create a few nodes in our `.questphase`

In our .xl file, we set that`.questphase` will trigger whenever we enter the apartment.

<figure><img src="https://1427525421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4gzcGtLrr90pVjAWVdTc%2Fuploads%2Fgit-blob-b983016c243db993cd878ac44da4366c528f6189%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1427525421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4gzcGtLrr90pVjAWVdTc%2Fuploads%2Fgit-blob-ac95cdc851395492dc2c8e2cd2c30e1f461e378e%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1427525421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4gzcGtLrr90pVjAWVdTc%2Fuploads%2Fgit-blob-1b800720d58eafdabc5dfa6ef5e70bfa3ac3ad78%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

Then you can deactivate/reactive with SpawnManager


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://wiki.redmodding.org/cyberpunk-2077-modding/modding-guides/quest/how-to-use-worldcommunityregistry-and-worldcompiledcommunity.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
