# Presets

Customization presets define which elements and colors are available for a specific character setup, along with default selections.

## Creating a Preset Entry

Open the Spark Editor, go to **Character Customization > Presets** and click **Create New**.

Each preset entry defines:

| Field             | Description                                                     |
| ----------------- | --------------------------------------------------------------- |
| Display Name      | Preset name (e.g., "Human Male Preset", "Elf Female Preset").   |
| Category Elements | Visual elements available for this preset, grouped by category. |
| Category Colors   | Color options available for this preset, grouped by category.   |

### Category Elements

Each category element group defines:

| Field                 | Description                                                         |
| --------------------- | ------------------------------------------------------------------- |
| Category              | The customization category.                                         |
| Elements              | List of element entries available in this category for this preset. |
| Default Element Index | Which element is selected by default (0-based index).               |

### Category Colors

Each category color group defines:

| Field               | Description                                                       |
| ------------------- | ----------------------------------------------------------------- |
| Category            | The customization category.                                       |
| Colors              | List of color entries available in this category for this preset. |
| Default Color Index | Which color is selected by default (0-based index).               |

## Setting Up the CharacterCustomizationEntity

To enable customization on a character, add a **CharacterCustomizationEntity** component in the Inspector.

| Field                | Description                                                                                                                                                                             |
| -------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Customization Preset | The preset entry that defines available options for this character.                                                                                                                     |
| Element Entry Slots  | Visual element slots populated from the preset. Each slot pairs an element entry with a list of visual options — each option has a name and a target GameObject to activate/deactivate. |
| Element Color Slots  | Color slots populated from the preset. Each slot pairs a color entry with target renderers to apply colors to.                                                                          |

The editor provides an **Initialize From Preset** button that auto-populates the element and color slots from the assigned preset. After initialization, assign the target GameObjects and renderers for each slot.

Additional editor buttons available in Play Mode: **Randomize** (applies random customization for testing) and **Apply Default** (resets to preset defaults).

## Persistence

Character customization is automatically saved and loaded through Spark's save system. What is saved includes the active element option index for each element and the current color value for each color slot.


---

# 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://docs.sparkframework.dev/documentation/user-guide/plugins/customization/presets.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.
