# Creating Area Nodes

## Usage

* Area nodes are used for a wide variety of things, for example:
  * Soundscapes (E.g. Muffling of outdoor sounds while indoor)
  * Locations (For location notifications)
  * Vehicle Forbidden (Prevents you from driving cars into the area)
  * Prevention (E.g. Removing wanted level)
  * Interior (E.g. For applying gameplay restrictions like no weapons)
  * Death areas
  * Quest Notifiers
  * And more...

## Requirements

### Tools

* [World Builder](https://github.com/justarandomguyintheinternet/CP77_entSpawner/releases) (v.0.9. or newer)
* [ArchiveXL](https://github.com/psiberx/cp2077-archive-xl)
* [Codeware ](https://github.com/psiberx/cp2077-codeware/releases)(1.14.1 or newer)
* [WolvenKit](https://github.com/WolvenKit/WolvenKit) (With latest version of World Builder import script)

### Knowledge

* You need to have a basic understanding of:
  * Working with WolvenKit
  * Using World Builder (Spawning things and [importing](https://wiki.redmodding.org/cyberpunk-2077-modding/modding-guides/world-editing/object-spawner/exporting-from-object-spawner) into WolvenKit)

## General setup

* In order to have an area node that functions, you need:
  * An area node
  * An outline, defined as a group containing multiple outline markers
* It is generally recommended to create a new group for each outline, which only contains the markers for that specific outline
* Additionally, it is good practice to have one group containing all the outline groups

<figure><img src="https://1427525421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4gzcGtLrr90pVjAWVdTc%2Fuploads%2Fgit-blob-d32dc0e76f2f14f681b1cf4aa26cd196a4ce4228%2Fimage.png?alt=media" alt="" width="391"><figcaption><p>Example project layout, one group for all outlines, containing one group per outline</p></figcaption></figure>

## Creating outline

* An outline consists of a group containing at least 3 Outline Markers
  * Ideally, the group contains only the markers and nothing else
  * The outline is only useable within the same root group
* Select `Area -> Outline Marker`in World Builder, as the spawn category
* Spawn the markers, one by one (Make sure you put them in the correct group, e.g. by selecting the group in the "Spawn New" tab)
* The markers will connect in the order in which they are within the group
* To insert a marker in the middle, simply duplicate the closest marker (`CTRL-D`)

<figure><img src="https://1427525421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4gzcGtLrr90pVjAWVdTc%2Fuploads%2Fgit-blob-2d0e273c9c17ab1bed7dc19190074d710aef00b7%2Fimage.png?alt=media" alt=""><figcaption><p>Example of an outline group with five markers</p></figcaption></figure>

## Linking outline to area node

* In order to make an area node use the outline, select the path of the outline group from the `Outline Path`dropdown of the area node
  * Note that only groups containing at least 3 markers, and located within the same root group (In our case the common root group is `Some Mod`) are valid outlines

<figure><img src="https://1427525421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4gzcGtLrr90pVjAWVdTc%2Fuploads%2Fgit-blob-e4b24865ceec64b7b8d165760a864c2c1dd5ea0d%2Fimage.png?alt=media" alt="" width="428"><figcaption><p>Example of linking the outline to an ambient area</p></figcaption></figure>

{% hint style="warning" %}
Since the outlines get linked via their path, if you change the name of the outline group, or any parent group (Thus changing its path), the link will break.

Thus it is recommended to keep the outlines in their own group which's name and path will not get changed
{% endhint %}

## Finishing up

* Now simply export your group from Object Spawner, and import into WKit using the Object Spawner [import feature](https://wiki.redmodding.org/cyberpunk-2077-modding/modding-guides/world-editing/object-spawner/exporting-from-object-spawner)


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://wiki.redmodding.org/cyberpunk-2077-modding/modding-guides/world-editing/object-spawner/features-and-guides/setting-area-outlines.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
