# actor.rpg.generator

> Published by [rpg.actor](https://lexicon.garden/identity/did:plc:kwgllf365cwmxbnxitx4pjdj)

✓ This is the authoritative definition for this NSID.

## Description

Generator metadata and decomposed layers for a sprite built with the rpg.actor sprite generator.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:kwgllf365cwmxbnxitx4pjdj/actor.rpg.generator)
- [Documentation](https://lexicon.garden/lexicon/did:plc:kwgllf365cwmxbnxitx4pjdj/actor.rpg.generator/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:kwgllf365cwmxbnxitx4pjdj/actor.rpg.generator/examples)

## Definitions

### `actor.rpg.generator#colors`

**Type**: `object`

Selected recolor channels.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `main` | `string` | No |  |
| `sub1` | `string` | No |  |
| `sub2` | `string` | No |  |
| `sub3` | `string` | No |  |

### `actor.rpg.generator#eyes`

**Type**: `object`

Eye color configuration.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `hex` | `string` | No |  |
| `mode` | `string` | No |  |
| `tone` | `integer` | No |  |

### `actor.rpg.generator#fallback`

**Type**: `object`

Rendered replacement used when a layer is class-suppressed.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `assetName` | `string` | Yes |  |
| `behindRows` | `array` | No |  |
| `blob` | `blob` | Yes |  |
| `colors` | `ref` → `#colors` | No |  |
| `subtractMask` | `blob` | No |  |
| `title` | `string` | No |  |
| `zSlot` | `integer` | No |  |
| `zSlotByDir` | `unknown` | No |  |

### `actor.rpg.generator#layer`

**Type**: `object`

A rendered generator layer and its recomposition metadata.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `assetName` | `string` | No |  |
| `behindRows` | `array` | No | Rows rendered behind the body. Empty explicitly means all rows render in front. |
| `blob` | `blob` | Yes |  |
| `colors` | `ref` → `#colors` | No |  |
| `disabled` | `boolean` | No |  |
| `id` | `string` | Yes |  |
| `layerClass` | `string` | No | Class assigned to this layer, such as hind.cloak. |
| `submaskExclusions` | `ref` → `#submaskExclusions` | No | Target-side exceptions to submaskRule. The layers array contains exact canonical source layer IDs and the classes array contains exact source layerClass or fitClass values; matching source masks are skipped before submaskRule is evaluated. Omission or empty arrays means no source-specific exclusions. |
| `submaskRule` | `string` | No | Controls which external subtractive masks may affect this layer. Omission means respect-all. |
| `subtractMask` | `blob` | No |  |
| `suppress` | `ref` → `#suppressionRules` | No |  |
| `suppressAs` | `ref` → `#fallback` | No |  |
| `suppressSpecific` | `unknown` | No | Map from suppressor layerClass to either a structured fallback matching #fallback or a rule with default and bodyTypeAlt fallbacks. The active body-specific value takes priority over the class default, then suppressAs. |
| `title` | `string` | No |  |
| `zSlot` | `integer` | No | Legacy all-direction draw-order slot. zSlotByDir takes precedence. |
| `zSlotByDir` | `unknown` | No | Per-direction draw-order slots [down, left, right, up]. Entries are non-negative integers or null when the category default applies. |

### `actor.rpg.generator`

**Type**: `record`

Stores the recolored layers and configuration used to rebuild a generated sprite.

**Key**: `literal:self`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `bodyType` | `string` | Yes |  |
| `createdAt` | `string` (datetime) | Yes |  |
| `eyes` | `ref` → `#eyes` | Yes |  |
| `faceMode` | `string` | No | Whether face layers are selected intentionally. Omission is reserved for legacy records pending migration. |
| `items` | `array` | No |  |
| `layers` | `array` | Yes | Ordered recolored layers, back-to-front. |
| `skin` | `ref` → `#skin` | Yes |  |
| `updatedAt` | `string` (datetime) | No |  |

### `actor.rpg.generator#skin`

**Type**: `object`

Skin color configuration.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `hex` | `string` | No |  |
| `mode` | `string` | No |  |
| `tone` | `integer` | No |  |

### `actor.rpg.generator#submaskExclusions`

**Type**: `object`

Target-side exceptions for subtractive masks. List exact canonical source layer IDs in layers, or exact source layerClass or fitClass values in classes; matching source masks must not erase the target layer. Omission or empty arrays means no source-specific exclusions.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `classes` | `array` | No | Exact source layerClass or fitClass values whose subtractive masks must be skipped. |
| `layers` | `array` | No | Exact canonical source layer IDs whose subtractive masks must be skipped. |

### `actor.rpg.generator#suppressionRules`

**Type**: `object`

Layer IDs and classes hidden while this layer is active.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `classes` | `array` | No |  |
| `layers` | `array` | No |  |

## Examples

The following examples demonstrate valid data for this lexicon. [View all examples](https://lexicon.garden/lexicon/did:plc:kwgllf365cwmxbnxitx4pjdj/actor.rpg.generator/examples)

### Example 1 (`#main`)

**Description**: Example record

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "colors": {
      "description": "Selected recolor channels.",
      "properties": {
        "main": {
          "maxLength": 7,
          "type": "string"
        },
        "sub1": {
          "maxLength": 7,
          "type": "string"
        },
        "sub2": {
          "maxLength": 7,
          "type": "string"
        },
        "sub3": {
          "maxLength": 7,
          "type": "string"
        }
      },
      "type": "object"
    },
    "eyes": {
      "description": "Eye color configuration.",
      "properties": {
        "hex": {
          "maxLength": 7,
          "type": "string"
        },
        "mode": {
          "maxLength": 10,
          "type": "string"
        },
        "tone": {
          "maximum": 100,
          "minimum": 0,
          "type": "integer"
        }
      },
      "type": "object"
    },
    "fallback": {
      "description": "Rendered replacement used when a layer is class-suppressed.",
      "properties": {
        "assetName": {
          "maxLength": 100,
          "type": "string"
        },
        "behindRows": {
          "items": {
            "maximum": 3,
            "minimum": 0,
            "type": "integer"
          },
          "maxLength": 4,
          "type": "array"
        },
        "blob": {
          "accept": [
            "image/png"
          ],
          "maxSize": 1000000,
          "type": "blob"
        },
        "colors": {
          "ref": "#colors",
          "type": "ref"
        },
        "subtractMask": {
          "accept": [
            "image/png"
          ],
          "maxSize": 50000,
          "type": "blob"
        },
        "title": {
          "maxLength": 100,
          "type": "string"
        },
        "zSlot": {
          "maximum": 30,
          "minimum": 0,
          "type": "integer"
        },
        "zSlotByDir": {
          "type": "unknown"
        }
      },
      "required": [
        "assetName",
        "blob"
      ],
      "type": "object"
    },
    "layer": {
      "description": "A rendered generator layer and its recomposition metadata.",
      "properties": {
        "assetName": {
          "maxLength": 100,
          "type": "string"
        },
        "behindRows": {
          "description": "Rows rendered behind the body. Empty explicitly means all rows render in front.",
          "items": {
            "maximum": 3,
            "minimum": 0,
            "type": "integer"
          },
          "maxLength": 4,
          "type": "array"
        },
        "blob": {
          "accept": [
            "image/png"
          ],
          "maxSize": 1000000,
          "type": "blob"
        },
        "colors": {
          "ref": "#colors",
          "type": "ref"
        },
        "disabled": {
          "type": "boolean"
        },
        "id": {
          "maxLength": 30,
          "type": "string"
        },
        "layerClass": {
          "description": "Class assigned to this layer, such as hind.cloak.",
          "maxLength": 90,
          "type": "string"
        },
        "submaskExclusions": {
          "description": "Target-side exceptions to submaskRule. The layers array contains exact canonical source layer IDs and the classes array contains exact source layerClass or fitClass values; matching source masks are skipped before submaskRule is evaluated. Omission or empty arrays means no source-specific exclusions.",
          "ref": "#submaskExclusions",
          "type": "ref"
        },
        "submaskRule": {
          "description": "Controls which external subtractive masks may affect this layer. Omission means respect-all.",
          "knownValues": [
            "respect-all",
            "ignore-all",
            "ignore-layers-above",
            "ignore-layers-below"
          ],
          "maxLength": 24,
          "type": "string"
        },
        "subtractMask": {
          "accept": [
            "image/png"
          ],
          "maxSize": 50000,
          "type": "blob"
        },
        "suppress": {
          "ref": "#suppressionRules",
          "type": "ref"
        },
        "suppressAs": {
          "ref": "#fallback",
          "type": "ref"
        },
        "suppressSpecific": {
          "description": "Map from suppressor layerClass to either a structured fallback matching #fallback or a rule with default and bodyTypeAlt fallbacks. The active body-specific value takes priority over the class default, then suppressAs.",
          "type": "unknown"
        },
        "title": {
          "maxLength": 100,
          "type": "string"
        },
        "zSlot": {
          "description": "Legacy all-direction draw-order slot. zSlotByDir takes precedence.",
          "maximum": 30,
          "minimum": 0,
          "type": "integer"
        },
        "zSlotByDir": {
          "description": "Per-direction draw-order slots [down, left, right, up]. Entries are non-negative integers or null when the category default applies.",
          "type": "unknown"
        }
      },
      "required": [
        "id",
        "blob"
      ],
      "type": "object"
    },
    "main": {
      "description": "Stores the recolored layers and configuration used to rebuild a generated sprite.",
      "key": "literal:self",
      "record": {
        "properties": {
          "bodyType": {
            "maxLength": 20,
            "type": "string"
          },
          "createdAt": {
            "format": "datetime",
            "type": "string"
          },
          "eyes": {
            "ref": "#eyes",
            "type": "ref"
          },
          "faceMode": {
            "description": "Whether face layers are selected intentionally. Omission is reserved for legacy records pending migration.",
            "knownValues": [
              "standard",
              "faceless"
            ],
            "type": "string"
          },
          "items": {
            "items": {
              "maxLength": 50,
              "type": "string"
            },
            "maxLength": 20,
            "type": "array"
          },
          "layers": {
            "description": "Ordered recolored layers, back-to-front.",
            "items": {
              "ref": "#layer",
              "type": "ref"
            },
            "maxLength": 32,
            "type": "array"
          },
          "skin": {
            "ref": "#skin",
            "type": "ref"
          },
          "updatedAt": {
            "format": "datetime",
            "type": "string"
          }
        },
        "required": [
          "bodyType",
          "skin",
          "eyes",
          "layers",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    },
    "skin": {
      "description": "Skin color configuration.",
      "properties": {
        "hex": {
          "maxLength": 7,
          "type": "string"
        },
        "mode": {
          "maxLength": 10,
          "type": "string"
        },
        "tone": {
          "maximum": 100,
          "minimum": 0,
          "type": "integer"
        }
      },
      "type": "object"
    },
    "submaskExclusions": {
      "description": "Target-side exceptions for subtractive masks. List exact canonical source layer IDs in layers, or exact source layerClass or fitClass values in classes; matching source masks must not erase the target layer. Omission or empty arrays means no source-specific exclusions.",
      "properties": {
        "classes": {
          "description": "Exact source layerClass or fitClass values whose subtractive masks must be skipped.",
          "items": {
            "maxLength": 90,
            "type": "string"
          },
          "maxLength": 64,
          "type": "array"
        },
        "layers": {
          "description": "Exact canonical source layer IDs whose subtractive masks must be skipped.",
          "items": {
            "maxLength": 30,
            "type": "string"
          },
          "maxLength": 32,
          "type": "array"
        }
      },
      "type": "object"
    },
    "suppressionRules": {
      "description": "Layer IDs and classes hidden while this layer is active.",
      "properties": {
        "classes": {
          "items": {
            "maxLength": 90,
            "type": "string"
          },
          "maxLength": 20,
          "type": "array"
        },
        "layers": {
          "items": {
            "maxLength": 30,
            "type": "string"
          },
          "maxLength": 20,
          "type": "array"
        }
      },
      "type": "object"
    }
  },
  "description": "Generator metadata and decomposed layers for a sprite built with the rpg.actor sprite generator.",
  "id": "actor.rpg.generator",
  "lexicon": 1
}
```
