# Open77.appearance — client runtime

Runs inside the game process. Reads and presentation are local; anything that changes shared state has to go through the server.

7 functions.

## apply

```lua
Open77.appearance.apply(snapshot)
```

`GAME` — Requires a live game instance.

Applies a previously captured appearance snapshot to the local player.

Requires `player.appearance.edit`. The runtime validates the schema, build, catalog digest, gender, option identities, choice bounds, and duplicates before touching the game.

| Parameter | Type | Required | Default |
|---|---|---|---|
| `snapshot` | `table` | required | — |

Returns: `true on success, otherwise false`, `reason`

Registered in `ResourceHost.cpp` (line 6770) as `LuaAppearanceApply`.

## capture

```lua
Open77.appearance.capture()
```

`GAME` — Requires a live game instance.

Captures the local player's complete validated appearance snapshot.

Requires `player.appearance.read`. The snapshot is bound to schema version 1, game build 2.31, a catalog digest, gender hash, and at most 256 head/body/arms options.

Returns: `table { schemaVersion, gameBuild, catalogDigest, gender, options }, or nil`, `reason`

Registered in `ResourceHost.cpp` (line 6769) as `LuaAppearanceCapture`.

## finishCommit

```lua
Open77.appearance.finishCommit()
```

`GAME` — Requires a live game instance.

Finishes the current appearance commit transaction.

Requires `player.appearance.edit`. Call after a successful apply/persistence flow so the native editor can release its commit state.

Returns: `true on success, otherwise false`, `reason`

Registered in `ResourceHost.cpp` (line 6771) as `LuaAppearanceFinish`.

## isOpen

```lua
Open77.appearance.isOpen()
```

`GAME` — Requires a live game instance.

Whether the local appearance editor is open.

Requires `player.appearance.read`; returns false when the permission or backend is unavailable.

Returns: `boolean`

Registered in `ResourceHost.cpp` (line 6768) as `LuaAppearanceIsOpen`.

## open

```lua
Open77.appearance.open([options])
```

`GAME` — Requires a live game instance.

Opens the local Cyberpunk appearance editor.

Requires `player.appearance.edit`. The optional value may be a mode string or `{ mode = string }`; `ripperdoc` is used by default.

| Parameter | Type | Required | Default |
|---|---|---|---|
| `options` | `string|table` | optional | — |

Returns: `true on success, otherwise false`, `reason`

Registered in `ResourceHost.cpp` (line 6767) as `LuaAppearanceOpen`.

## switchBodyFamily

```lua
Open77.appearance.switchBodyFamily([arg2])
```

`GAME` — Requires a live game instance.

Starts a guarded body-family transition.

Starts a guarded transition to the requested body family and optionally resumes the native editor afterward. It requires player.appearance.edit; completion is consumed with takeBodyFamilyTransition.

| Parameter | Type | Required | Default |
|---|---|---|---|
| `arg2` | `boolean` | optional | — |

Registered in `ResourceHost.cpp` (line 6772) as `LuaAppearanceSwitchBodyFamily`.

## takeBodyFamilyTransition

```lua
Open77.appearance.takeBodyFamilyTransition()
```

`GAME` — Requires a live game instance.

Consumes the pending body-family transition result.

Consumes the pending body-family transition result once, returning its serialized payload or nil while no result is ready. It requires player.appearance.edit.

Returns: `value`, `reason (when the first is nil)`

Registered in `ResourceHost.cpp` (line 6773) as `LuaAppearanceTakeBodyFamilyTransition`.

