> For the complete documentation index, see [llms.txt](https://docs.uct.ucserver.it/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.uct.ucserver.it/dev/developers-dream/spawn-data-extensions.md).

# Spawn Data Extensions

With the introduction of the modular **Settings** system in `SpawnData`, properties like `TargetScp` or `SpawnPosition` are no longer directly accessible as class properties. They are stored in a Dictionary.

To safely retrieve these values in your code, you **must** use the provided Extension Methods found in `SpawnDataExtensions` class.

## Generic Retrieval

If you need to get a raw value from the settings dictionary safely:

```csharp
// GetSetting<T>(key, defaultValue)
int myValue = team.SpawnConditions.GetSetting<int>("my_custom_key", 0);
```

## Built-in Helpers

We provide strong-typed helper methods for all standard UCT settings.

#### **Positioning**

```csharp
// Returns Vector3 based on pos_x, pos_y, pos_z (or 0,0,0)
Vector3 pos = team.SpawnConditions.GetSpawnPosition();

// Returns Vector3 based on rot_x, rot_y, rot_z (or 0,0,0)
Vector3 rot = team.SpawnConditions.GetSpawnRotation();
```

## **Wave-Specific Data**

#### Generators:

```csharp
// Gets 'required_engaged'
int required = team.SpawnConditions.GetRequiredGenerators();
```

#### Team Dependencies:

```csharp
// Gets 'after_team_spawn' ID
uint parentSpawnId = team.SpawnConditions.GetAfterTeamSpawn();

// Gets 'after_team_death' ID
uint parentDeathId = team.SpawnConditions.GetAfterTeamDeath();
```

#### Items:

```csharp
// Gets 'used_item' as ItemType
ItemType item = team.SpawnConditions.GetUsedItem();

// Gets 'custom_item_id' (int?)
int? customId = team.SpawnConditions.GetCustomItemId();
```

#### SCP Death:

```csharp
// Gets 'target_scp' (returns "None", "Scp173", "SCPs", etc.)
string target = team.SpawnConditions.GetTargetScp();

// Gets 'count_zombies' bool
bool countZombies = team.SpawnConditions.IsScp0492CountedAsScp();
```

#### Roles & Lists:

```csharp
// Gets 'required_roles' list
List<RoleTypeId> required = team.SpawnConditions.GetRequiredAliveRoles();

// Gets 'affected_roles' list (RoundStarted)
List<RoleTypeId> affected = team.SpawnConditions.GetRolesAffectedOnRoundStart();
```


---

# 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 dynamically by asking a question.

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

```
GET https://docs.uct.ucserver.it/dev/developers-dream/spawn-data-extensions.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
