# CyberM.blips — client runtime

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

18 functions.

## attachToEntity

```lua
CyberM.blips.attachToEntity(id, entity, [slot], [offset])
```

`GAME` — Requires a live game instance.

Makes a blip follow a CyberM entity.

Changes an owned blip from a fixed world position to tracking a streamed CyberM entity. The entity id is ephemeral and the call requires `ui.vanilla.map`; remove or reattach the blip when its gameplay target changes.

| Parameter | Type | Required | Default |
|---|---|---|---|
| `id` | `decimal string` | required | — |
| `entity` | `entity` | required | — |
| `slot` | `string` | optional | `poi_mappin` |
| `offset` | `table { x, y, z }` | optional | — |

Returns: `boolean`, `reason`

Registered in `ResourceHost.cpp` (line 6779) as `LuaBlipAttachToEntity`.

## clear

```lua
CyberM.blips.clear()
```

`GAME` — Requires a live game instance.

Removes every blip owned by the current resource.

Removes every vanilla-map blip owned by the calling resource generation. Other resources' blips are left untouched, and generation teardown performs the same cleanup automatically.

Returns: `true`

Registered in `ResourceHost.cpp` (line 6790) as `LuaBlipClear`.

## create

```lua
CyberM.blips.create(options)
```

`GAME` — Requires a live game instance.

Creates a resource-owned vanilla map pin.

Requires `ui.vanilla.map`. Provide exactly one of `position` or `entity`. The returned 64-bit generation handle is a decimal string and is cleaned up automatically when the resource stops.

| Parameter | Type | Required | Default |
|---|---|---|---|
| `options` | `table { position|entity, sprite?, label?, icon?, active?, visibleThroughWalls?, slot?, offset? }` | required | — |

Returns: `decimal-string blip id, or nil`, `reason`

```lua
local id = assert(CyberM.blips.create({
  position = { x = 10, y = 20, z = 30 },
  sprite = "objective", label = "Street race"
}))
```

Registered in `ResourceHost.cpp` (line 6776) as `LuaBlipCreate`.

## get

```lua
CyberM.blips.get(id)
```

`GAME` — Requires a live game instance.

Reads one blip owned by the current resource.

Returns a read-only snapshot of one blip owned by the calling resource. The handle must still belong to the current generation; a stale or foreign id is rejected.

| Parameter | Type | Required | Default |
|---|---|---|---|
| `id` | `decimal string` | required | — |

Returns: `snapshot table, or nil`, `reason`

Registered in `ResourceHost.cpp` (line 6791) as `LuaBlipGet`.

## list

```lua
CyberM.blips.list()
```

`GAME` — Requires a live game instance.

Lists blips owned by the current resource.

Lists snapshots of all vanilla-map blips owned by the calling resource generation. The returned tables are copies and changing them does not mutate the map.

Returns: `array of snapshot tables`

Registered in `ResourceHost.cpp` (line 6792) as `LuaBlipList`.

## remove

```lua
CyberM.blips.remove(id)
```

`GAME` — Requires a live game instance.

Removes one owned blip.

Deletes one blip owned by the calling resource and invalidates its handle. Removal is resource-scoped, so one package cannot erase another package's map state.

| Parameter | Type | Required | Default |
|---|---|---|---|
| `id` | `decimal string` | required | — |

Returns: `boolean`, `reason`

Registered in `ResourceHost.cpp` (line 6789) as `LuaBlipRemove`.

## setActive

```lua
CyberM.blips.setActive(id, active)
```

`GAME` — Requires a live game instance.

Activates or deactivates a vanilla mappin.

Updates the active/highlighted state of an owned vanilla-map blip. This changes presentation only and does not create a route or change server state.

| Parameter | Type | Required | Default |
|---|---|---|---|
| `id` | `decimal string` | required | — |
| `active` | `boolean` | required | — |

Returns: `boolean`, `reason`

Registered in `ResourceHost.cpp` (line 6785) as `LuaBlipSetActive`.

## setDescription

```lua
CyberM.blips.setDescription(id, description)
```

`GAME` — Requires a live game instance.

Sets the custom fullscreen-map description of an owned blip.

Requires `ui.vanilla.map`. The description is displayed by CyberM's fullscreen-map tooltip for the selected native mappin.

| Parameter | Type | Required | Default |
|---|---|---|---|
| `id` | `string` | required | — |
| `description` | `string` | required | — |

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

Registered in `ResourceHost.cpp` (line 6783) as `LuaBlipSetDescription`.

## setIcon

```lua
CyberM.blips.setIcon(id, icon)
```

`GAME` — Requires a live game instance.

Sets a declared PNG icon or restores the native sprite.

Accepts a path, a texture descriptor, `{ asset, size }`, or false. The native mappin remains underneath for map selection, routing, tooltips, and fallback.

| Parameter | Type | Required | Default |
|---|---|---|---|
| `id` | `decimal string` | required | — |
| `icon` | `string|table|false` | required | — |

Returns: `boolean`, `reason`

Registered in `ResourceHost.cpp` (line 6784) as `LuaBlipSetIcon`.

## setLabel

```lua
CyberM.blips.setLabel(id, label)
```

`GAME` — Requires a live game instance.

Changes the fullscreen-map tooltip title.

CyberM keeps the label in private script data, independent from the vanilla variant's generic title.

| Parameter | Type | Required | Default |
|---|---|---|---|
| `id` | `decimal string` | required | — |
| `label` | `string` | required | — |

Returns: `boolean`, `reason`

Registered in `ResourceHost.cpp` (line 6782) as `LuaBlipSetLabel`.

## setPosition

```lua
CyberM.blips.setPosition(id, position)
```

`GAME` — Requires a live game instance.

Moves a blip to a world position.

Also detaches an entity-following blip.

| Parameter | Type | Required | Default |
|---|---|---|---|
| `id` | `decimal string` | required | — |
| `position` | `table { x, y, z }` | required | — |

Returns: `boolean`, `reason`

Registered in `ResourceHost.cpp` (line 6778) as `LuaBlipSetPosition`.

## setSprite

```lua
CyberM.blips.setSprite(id, sprite)
```

`GAME` — Requires a live game instance.

Changes the vanilla mappin variant.

Accepts an exact 2.31 variant name, a stable alias, or an integer from 0 through 146. See `wiki/blips.md` for the complete list.

| Parameter | Type | Required | Default |
|---|---|---|---|
| `id` | `decimal string` | required | — |
| `sprite` | `string|integer` | required | — |

Returns: `boolean`, `reason`

Registered in `ResourceHost.cpp` (line 6780) as `LuaBlipSetSprite`.

## setTitle

```lua
CyberM.blips.setTitle(id, title)
```

`GAME` — Requires a live game instance.

Sets the custom fullscreen-map title of an owned blip.

Requires `ui.vanilla.map`. This is the semantic title alias of `setLabel`; the HUD does not permanently render it beside the icon.

| Parameter | Type | Required | Default |
|---|---|---|---|
| `id` | `string` | required | — |
| `title` | `string` | required | — |

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

Registered in `ResourceHost.cpp` (line 6781) as `LuaBlipSetTitle`.

## setTrackingAlternative

```lua
CyberM.blips.setTrackingAlternative(id, target)
```

`GAME` — Requires a live game instance.

Sets another owned blip as the routing alternative.

Passing nil clears it. This does not force the world-map controller to start tracking.

| Parameter | Type | Required | Default |
|---|---|---|---|
| `id` | `decimal string` | required | — |
| `target` | `decimal string|nil` | required | — |

Returns: `boolean`, `reason`

Registered in `ResourceHost.cpp` (line 6787) as `LuaBlipSetTrackingAlternative`.

## setVisibleThroughWalls

```lua
CyberM.blips.setVisibleThroughWalls(id, visible)
```

`GAME` — Requires a live game instance.

Changes vanilla through-wall visibility.

Controls whether an owned world marker remains visible when geometry occludes it. The setting affects presentation on this client only and requires `ui.vanilla.map`.

| Parameter | Type | Required | Default |
|---|---|---|---|
| `id` | `decimal string` | required | — |
| `visible` | `boolean` | required | — |

Returns: `boolean`, `reason`

Registered in `ResourceHost.cpp` (line 6786) as `LuaBlipSetVisibleThroughWalls`.

## sprites

```lua
CyberM.blips.sprites()
```

`GAME` — Requires a live game instance.

Lists every usable mappin variant in the current build.

Returns 147 entries for Cyberpunk 2077 2.31. This metadata query does not require map mutation permission.

Returns: `array of { name, value }`

Registered in `ResourceHost.cpp` (line 6793) as `LuaBlipSprites`.

## untrack

```lua
CyberM.blips.untrack(id)
```

`GAME` — Requires a live game instance.

Safely clears manual tracking for this blip.

The native action is invoked only if this owned blip is currently tracked, so a resource cannot untrack a quest or another system's pin.

| Parameter | Type | Required | Default |
|---|---|---|---|
| `id` | `decimal string` | required | — |

Returns: `true`, `whether it was tracked`

Registered in `ResourceHost.cpp` (line 6788) as `LuaBlipUntrack`.

## update

```lua
CyberM.blips.update(id, patch)
```

`GAME` — Requires a live game instance.

Updates several properties of an owned blip.

A replacement mappin is registered before the previous one is removed. `position` switches to positional mode; `entity` switches to attached mode.

| Parameter | Type | Required | Default |
|---|---|---|---|
| `id` | `decimal string` | required | — |
| `patch` | `table` | required | — |

Returns: `boolean`, `reason`

Registered in `ResourceHost.cpp` (line 6777) as `LuaBlipUpdate`.

