# games.cavu.codex

> Published by [pardy.at](https://lexicon.garden/identity/did:plc:dp7v5b5kejmmzzpwmqyf5wj6)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:dp7v5b5kejmmzzpwmqyf5wj6/games.cavu.codex)
- [Documentation](https://lexicon.garden/lexicon/did:plc:dp7v5b5kejmmzzpwmqyf5wj6/games.cavu.codex/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:dp7v5b5kejmmzzpwmqyf5wj6/games.cavu.codex/examples)

## Definitions

### `games.cavu.codex`

**Type**: `record`

A card in a game's world: an item (a program, a weapon), an encounter (a piece of ICE, a monster, a trap), a character or a place. One record per card, not a player's copy of one: a player owns an item as an equipment.rpg.item whose `give` is this record's URI and whose stats carry a strongRef to it. It lives in the repo of the player whose play made it, signed by the game service so its stats can be trusted. rkey MUST be '<game>:<id>' (a TID); readers reject records whose rkey doesn't start with their own `game`.

**Key**: `any`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `category` | `string` | Yes | What sort of card, in terms any app understands: something a player can own (item), something a player faces (encounter), someone (character), somewhere (place). |
| `createdAt` | `string` (datetime) | Yes |  |
| `description` | `string` | No |  |
| `game` | `ref` → `games.cavu.defs#slug` | Yes |  |
| `image` | `blob` | No |  |
| `imageAlt` | `string` | No | Alt text for the image. |
| `kind` | `string` | Yes | What sort of card in the game's own terms (e.g. 'ice', 'program', 'hardware'). Copied to equipment.rpg.item's `kind` for items. |
| `name` | `string` | Yes |  |
| `origin` | `ref` → `#origin` | No |  |
| `signatures` | `array` | No |  |
| `stats` | `unknown` | No | Game-specific, typed by the game: an object with $type in the game's own lexicon (e.g. games.cavu.aiSlop#ice). |

### `games.cavu.codex#origin`

**Type**: `object`

How the thing was made.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `generated` | `boolean` | No | Made (in whole or part) by generative models. |
| `models` | `array` | No | The models used, e.g. 'openrouter:<model id>'. |
| `variantOf` | `ref` → `com.atproto.repo.strongRef` | No | The codex entry this one is a variation of. |

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "A card in a game's world: an item (a program, a weapon), an encounter (a piece of ICE, a monster, a trap), a character or a place. One record per card, not a player's copy of one: a player owns an item as an equipment.rpg.item whose `give` is this record's URI and whose stats carry a strongRef to it. It lives in the repo of the player whose play made it, signed by the game service so its stats can be trusted. rkey MUST be '<game>:<id>' (a TID); readers reject records whose rkey doesn't start with their own `game`.",
      "key": "any",
      "record": {
        "properties": {
          "category": {
            "description": "What sort of card, in terms any app understands: something a player can own (item), something a player faces (encounter), someone (character), somewhere (place).",
            "knownValues": [
              "item",
              "encounter",
              "character",
              "place"
            ],
            "maxLength": 32,
            "type": "string"
          },
          "createdAt": {
            "format": "datetime",
            "type": "string"
          },
          "description": {
            "maxGraphemes": 300,
            "maxLength": 3000,
            "type": "string"
          },
          "game": {
            "ref": "games.cavu.defs#slug",
            "type": "ref"
          },
          "image": {
            "accept": [
              "image/png",
              "image/jpeg",
              "image/webp"
            ],
            "maxSize": 1000000,
            "type": "blob"
          },
          "imageAlt": {
            "description": "Alt text for the image.",
            "maxGraphemes": 300,
            "maxLength": 3000,
            "type": "string"
          },
          "kind": {
            "description": "What sort of card in the game's own terms (e.g. 'ice', 'program', 'hardware'). Copied to equipment.rpg.item's `kind` for items.",
            "maxLength": 20,
            "type": "string"
          },
          "name": {
            "maxGraphemes": 64,
            "maxLength": 640,
            "type": "string"
          },
          "origin": {
            "ref": "#origin",
            "type": "ref"
          },
          "signatures": {
            "items": {
              "refs": [
                "games.cavu.defs#signature",
                "com.atproto.repo.strongRef"
              ],
              "type": "union"
            },
            "type": "array"
          },
          "stats": {
            "description": "Game-specific, typed by the game: an object with $type in the game's own lexicon (e.g. games.cavu.aiSlop#ice).",
            "type": "unknown"
          }
        },
        "required": [
          "game",
          "category",
          "kind",
          "name",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    },
    "origin": {
      "description": "How the thing was made.",
      "properties": {
        "generated": {
          "description": "Made (in whole or part) by generative models.",
          "type": "boolean"
        },
        "models": {
          "description": "The models used, e.g. 'openrouter:<model id>'.",
          "items": {
            "maxLength": 256,
            "type": "string"
          },
          "maxLength": 16,
          "type": "array"
        },
        "variantOf": {
          "description": "The codex entry this one is a variation of.",
          "ref": "com.atproto.repo.strongRef",
          "type": "ref"
        }
      },
      "type": "object"
    }
  },
  "id": "games.cavu.codex",
  "lexicon": 1
}
```
