> 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/world-editing/devices/device-operations-container.md).

# Device Operations Container

How to use DeviceOperationsContainer to trigger sound, VFX, animations, and component changes from device entity data, without any scripting.

### Summary

**Published: 23/04/2026 by** [@Spuddeh](https://discord.com/users/124447344279158784)

**Last documented update: 23/08/2026 by** [@Spuddeh](https://discord.com/users/124447344279158784)

Every entity that extends `Device` has a built-in system for reacting to state changes and triggering effects: sound, VFX, animations, component toggles, all without writing a single line of Redscript. It's driven entirely by data you set up in the `.ent` file.

The system is called `DeviceOperationsContainer` and lives on the device's persistent state (PS) chunk. It hooks into `EvaluateBaseStateTriggers`, which is called automatically in `deviceBase.swift` whenever the device's state changes.

{% hint style="info" %}
This page documents a system that is still being actively explored by the modding community. The trigger and operation type tables are based on reading the decompiled game scripts rather than exhaustive in-game testing, so some types may behave differently than described or have undocumented requirements. If you find something that doesn't match, please update the page.
{% endhint %}

### Requirements

#### Tools

| Tool                                                | Notes                    |
| --------------------------------------------------- | ------------------------ |
| [WolvenKit](https://github.com/WolvenKit/WolvenKit) | For editing `.ent` files |

#### Knowledge

* Navigating the WolvenKit entity editor and working with chunks
* Basic understanding of how device entities are structured in CP2077
* Familiarity with WWise event names if you are using `PlaySoundDeviceOperation`

  <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>Setting up the container is done entirely in the .ent file before packing, so no in-game tools are needed for that part. To actually place the device in the world you will need World Builder, or you can edit an existing device entity that is already present in a sector.</p></div>

### How It Works

The container holds two arrays:

* **`triggers[]`**: conditions that fire when something happens (state change, action, quest fact, player entering a volume, etc.)
* **`operations[]`**: named effects to execute when a trigger fires (play a sound, start a VFX, toggle a component, etc.)

When a trigger fires, it references an `operationName` CName. The container looks up a matching operation by name and runs it. The match is exact and case-sensitive; a single space in the name means the trigger fires but nothing happens.

If you want to trace this yourself, `deviceBase.swift` in the [adamsmasher/cyberpunk decompiled scripts](https://codeberg.org/adamsmasher/cyberpunk) (at `cyberpunk/devices/core/`) is where the `EvaluateBaseStateTriggers` call lives. The operation classes are in the `deviceOperations/` subdirectory alongside it.

{% hint style="warning" %}
`deviceOperationsSetup` must be placed on the **PS chunk** (e.g. `FanControllerPS`), not the root entity chunk. If you put it on the root, it will never be evaluated.
{% endhint %}

### Trigger Types

| `$type`                            | Fires when...                                                                |
| ---------------------------------- | ---------------------------------------------------------------------------- |
| `BaseStateOperationsTrigger`       | Device state changes to an `EDeviceStatus` value (ON/OFF/UNPOWERED/DISABLED) |
| `DeviceActionOperationsTrigger`    | A specific device action class is executed                                   |
| `FactOperationsTrigger`            | A quest fact changes to a specific value                                     |
| `TriggerVolumeOperationsTrigger`   | Player or NPC enters or exits a trigger volume                               |
| `SensesOperationsTrigger`          | The entity is sensed (seen or heard)                                         |
| `HitOperationsTrigger`             | The entity takes damage below a health threshold                             |
| `FocusModeOperationsTrigger`       | Player enters or exits scanner mode                                          |
| `DoorStateOperationsTrigger`       | Door state changes (OPEN/CLOSED/LOCKED)                                      |
| `ActivatorOperationsTrigger`       | Entity initialises, fires once on load                                       |
| `CustomActionOperationsTriggers`   | A custom-named action ID is triggered                                        |
| `InteractionAreaOperationsTrigger` | Player enters or exits the device's interaction area                         |

That is all of them, and every one is reactive. There is no timer or interval trigger, so nothing here fires on a clock.

A few details that are easy to miss:

* `DeviceActionOperationsTrigger` matches on the action's **class name**, read from `m_triggerData.action.GetClassName()`. The `action` field holds an instance of the class and only its type is compared, so there is nothing to fill in inside it.
* `FactOperationsTrigger` takes a comparison, not just equality: `Equal`, `NotEqual`, `More`, `MoreOrEqual`, `Less`, `LessOrEqual`.
* `BaseStateOperationsTrigger` and `DoorStateOperationsTrigger` remember the last state they saw and skip repeats, so they fire on a change rather than on every evaluation.

### Operation Types

| `$type`                                   | What it does                                                        |
| ----------------------------------------- | ------------------------------------------------------------------- |
| `PlaySoundDeviceOperation`                | Plays or stops a WWise audio event                                  |
| `PlayEffectDeviceOperation`               | Starts or stops a VFX particle effect                               |
| `PlayTransformAnimationDeviceOperation`   | Plays, pauses, or resets a transform animation                      |
| `ToggleComponentsDeviceOperation`         | Enables or disables named components on the entity                  |
| `GenericDeviceOperation`                  | Combination operation: VFX, SFX, component toggles, mesh appearance |
| `MeshAppearanceDeviceOperation`           | Switches the mesh appearance                                        |
| `FactsDeviceOperation`                    | Sets or modifies a quest fact value                                 |
| `StimDeviceOperation`                     | Broadcasts a distraction stimulus                                   |
| `ApplyStatusEffectDeviceOperation`        | Applies a status effect to nearby entities                          |
| `ApplyDamageDeviceOperation`              | Deals damage to nearby entities                                     |
| `SetMessageDeviceOperation`               | Sets the message on another node's LCD screen                       |
| `ItemsDeviceOperation`                    | Grants or removes inventory items                                   |
| `TeleportDeviceOperation`                 | Teleports a target to a point                                       |
| `TeleportNodetoSlotOperation`             | Teleports another node's object onto a slot on this device          |
| `PlayerWokrspotDeviceOperation`           | Puts the player into a workspot (the engine's own spelling)         |
| `PlayBinkDeviceOperation`                 | Plays a Bink video                                                  |
| `ToggleCustomActionDeviceOperation`       | Enables or disables a custom action                                 |
| `ToggleOffMeshConnectionsDeviceOperation` | Toggles navmesh off-mesh links                                      |
| `RequestCLSStateChangeDeviceOperation`    | Requests a crowd lighting system state change                       |

For effect operations, `EEffectOperationType` values are `START`, `STOP`, and `BRAKE_LOOP` (lets a looping effect finish its current cycle before stopping).

Every operation also carries `isEnabled` (on by default), `executeOnce` (turns itself off after running), and `disableDevice`. The `delay` field is not on the operation: it sits on the trigger's reference to it, so the same operation can be instant from one trigger and delayed from another.

#### What It Cannot Do

Three limits, each of which sends people down a dead end.

**It cannot perform a device action.** There is no operation that makes a device do one of its own actions. That is the boundary of the whole system: only a quest node or Redscript can do it, so anything needing a device to act belongs in a quest phase.

**It cannot switch a WWise switch group.** `PlaySoundDeviceOperation` is `PlaySound` and `StopSound` on an event name, and nothing here performs an `AudioSwitch`. Audio events work, audio states do not, so radio stations are out of reach.

**It cannot reach another device, with two narrow exceptions.** Nearly every operation acts on its own owner. Two resolve a NodeRef to another node, and both are hardcoded to one job: `SetMessageDeviceOperation` only ever sets an LCD screen's message (the controller class is fixed to `LcdScreenControllerPS`), and `TeleportNodetoSlotOperation` only teleports an object onto a slot. Neither lets you say "do X on device Y".

For that, use a quest fact. Device A writes one with `FactsDeviceOperation`, device B reads it with `FactOperationsTrigger`, and the two never need to be wired together or know about each other. They only need to agree on the fact name.

`SFactOperationData` has an `operationType` of `Set` (writes the value exactly) or `Add` (adds to what is already there), so a fact can be a counter as well as a flag. Bear in mind these are global quest facts that go into the player's save and stay there, shared with every other mod, so put your mod's name in them.

### Example: Adding Sound to a Fan

The vanilla `Fan` class has no audio. `TurnOnDevice()` and `TurnOffDevice()` don't play anything. Here's how to fix that with `DeviceOperationsContainer`.

1. Open the `.ent` file in WolvenKit and find the `FanControllerPS` chunk. Locate `deviceOperationsSetup`; it will be empty.

<figure><img src="https://1427525421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4gzcGtLrr90pVjAWVdTc%2Fuploads%2F635eRbj5nkvWFjwVAj77%2Fdevice%20operations%20-%20null.png?alt=media&amp;token=02ef58e5-1ae6-48b9-94ae-999a45050f6f" alt="The FanControllerPS chunk in WolvenKit&#x27;s entity editor, with deviceOperationsSetup shown as null"><figcaption><p>The PS chunk is where the container lives. The root entity chunk will not work.</p></figcaption></figure>

2. Create a `DeviceOperationsContainer` with empty `operations` and `triggers` arrays.

<figure><img src="https://1427525421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4gzcGtLrr90pVjAWVdTc%2Fuploads%2Fd26KzGUVd1dMRdRD43RS%2Fdevice%20operations%20-%20new.png?alt=media&amp;token=fa244d5e-d476-4ada-ae62-208a96c174ad" alt="A newly created DeviceOperationsContainer with both arrays collapsed and empty"><figcaption><p>Both arrays start empty. Operations go in first, then triggers that reference them by name.</p></figcaption></figure>

3. Add two operations:
   * `fan_sound_start`: `PlaySoundDeviceOperation` with `START` and your WWise event name
   * `fan_sound_stop`: `PlaySoundDeviceOperation` with `STOP` and the same event

<figure><img src="https://1427525421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4gzcGtLrr90pVjAWVdTc%2Fuploads%2FbjqSTwcEur9wn8t3CN60%2Fdevice%20operations%20-%20operations.png?alt=media&amp;token=b960bded-70ae-4aac-a49b-8af707cfd694" alt="A filled-out PlaySoundDeviceOperation showing the operationName field, SFXs array, and EEffectOperationType set to START"><figcaption><p>The <code>operationName</code> field is what triggers reference. The SFXs array holds the WWise event name.</p></figcaption></figure>

4. Add two triggers:
   * `BaseStateOperationsTrigger` for state `ON`, referencing `fan_sound_start`
   * `BaseStateOperationsTrigger` for state `OFF`, referencing `fan_sound_stop`

<figure><img src="https://1427525421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4gzcGtLrr90pVjAWVdTc%2Fuploads%2Foi5FX8XiqfAHE7u0M1Kq%2Fdevice%20operations%20-%20triggers.png?alt=media&amp;token=54520515-0786-469f-aee5-b9479ddcec7b" alt="A filled-out BaseStateOperationsTrigger showing the status field set to ON and the operationName matching the operation above"><figcaption><p>The <code>operationName</code> here must match the operation name exactly, including capitalisation.</p></figcaption></figure>

5. Make sure the entity has a `gameaudioSoundComponent`. It doesn't need an `audioName` set; it just needs to exist for `PlaySoundDeviceOperation` to have something to route through.

<figure><img src="https://1427525421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4gzcGtLrr90pVjAWVdTc%2Fuploads%2Fw5qwN4YMU5ErDXxJq81n%2Fdevice%20operations%20-%20gameaudiosound%20component.png?alt=media&amp;token=d3b6b4a8-ea70-43a8-af6e-997227560510" alt="The entity&#x27;s components list in WolvenKit showing a gameaudioSoundComponent entry"><figcaption><p>No <code>audioName</code> needed on the component itself. Its presence is enough.</p></figcaption></figure>

{% hint style="warning" %}
`operationName` is a CName. Any whitespace, including a trailing space, will cause silent failure. The trigger fires, no operation runs, and there's no error message.
{% endhint %}

### Common Mistakes

| Mistake                                          | What you'll see                | Fix                                                                                                                                                    |
| ------------------------------------------------ | ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Space in `operationName`                         | Trigger fires, nothing happens | Check the name character by character                                                                                                                  |
| Missing `gameaudioSoundComponent`                | No sound                       | Add the component to the entity                                                                                                                        |
| HandleID collision                               | WolvenKit import error         | Make sure all HandleIds in the buffer are unique                                                                                                       |
| Container on entity root instead of PS chunk     | Effects never fire             | Move `deviceOperationsSetup` to the PS chunk                                                                                                           |
| Testing on a save that already loaded the device | Your changes are ignored       | The operations array is saved with the device. In World Builder, use the reload button next to the device's Persistent checkbox, or load an older save |
| Trying to set this up in World Builder           | The field is not there to edit | `deviceOperationsSetup` starts empty, and World Builder's instance data editor only shows fields that already have a value. Build it in the `.ent`     |

### What You Can Do With This

Since any entity extending `Device` has access to this system, it opens up a lot of options without any scripting:

* **Ambient sound on any device**: computers, TVs, industrial machines
* **VFX tied to state**: sparks on power-on, smoke when disabled
* **Component visibility based on state**: show or hide mesh parts depending on whether the device is active
* **State-driven animations**: start and stop transform animations without Redscript
* **Chain reactions via quest facts**: `FactsDeviceOperation` sets a fact, which triggers `FactOperationsTrigger` on another device
* **Distraction stimuli**: `StimDeviceOperation` broadcasts when a device activates, useful for AI reactions
* **Driving a quest from a device**: a fact written here can be read by a quest phase, and a quest phase *can* perform actions on other devices. That combination gets you past the "cannot perform a device action" limit above, and it is how one radio can be made to control others


---

# 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/world-editing/devices/device-operations-container.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.
