For the complete documentation index, see llms.txt. This page is also available as Markdown.

Placements

A placement is the surface a minigame renders on. Three exist. The same minigame reuses across all three, so untangle looks identical whether it renders fullscreen, on a hand-held tablet, or on a wall monitor. The placement is picked at the callsite:

exports['rm_3dminigames']:untangle({ placement = 'screen' })
exports['rm_3dminigames']:untangle({ placement = 'prop' })
exports['rm_3dminigames']:untangle({ placement = 'monitor', _targetEntity = entity })

Or in a hack point, the placement comes from the type preset in cfg.hacks.types.


screen

Classic fullscreen NUI overlay. SetNuiFocus(true, true), dim the world, draw the minigame in front of everything. This is the default when no placement is passed.

Best for: anything that needs a lot of screen real estate, benefits from mouse precision, or is called from a menu.

Under the hood: SendNUIMessage with the minigame name and props. The React app in web/ renders it, calls back with success or fail, and SetNuiFocus(false, false) releases the cursor.

Cancel: Backspace, or the minigame's own quit button.


prop

The player's tablet (rm_tablet_02) pops out into their hands, they hold the tourist-map anim, and the minigame is drawn onto the tablet screen.

Best for: discreet reads, mobile-feeling minigames, jobs where the player is already handling a device.

Under the hood: PropTablet.open() attaches the prop to the right-hand bone with cfg.propPresets.tablet offsets, opens a DUI at 1500x820, and draws it to the tablet as a quad with DrawSpritePoly (four passes, so it stays visible from both sides). Keyboard input is forwarded from raw VK codes to the React side through DuiInputBridge.

Cancel: Backspace, ped death, entering a vehicle, or the minigame's quit button. The tablet slides away and the anim releases.

Prop mode looks the same to other players. They see you standing there holding a tablet, they do not see the minigame itself.


monitor

The camera slides to a world prop and the minigame is painted onto its screen. Two render modes:

Texture replace (default)

AddReplaceTexture swaps the prop's screen texture for the DUI's runtime texture. The shipped monitor and laptop_open types use this.

Best for: dedicated screens that are only placed once in a scene (security desks, dispatch terminals, single wall monitors).

Quad render

Set renderMode = 'quad' in the monitor preset and the renderer switches to DrawSpritePoly instead. The DUI is drawn as a screen-space quad locked to the prop's local origin, no texture is swapped, so other instances of the same model stay untouched.

The shipped tabletWall preset uses this to draw onto rm_tablet_02 without stealing the hand-held tablet's texture.

Under the hood: PropMonitor.open(entity) builds the DUI, either issues AddReplaceTexture or starts a per-frame quad-draw thread, then lerps a fresh cam from the player to the prop's local offset.

Cancel: Backspace, or the minigame's quit button. The cam eases back out.


Meta keys

A handful of options control the placement itself rather than the minigame. They are stripped from the props before they reach React:

Key
Meaning

placement

screen, prop or monitor

preset

Prop preset key (only when placement = 'prop')

_targetEntity

Entity handle to paint on (only when placement = 'monitor', and only for callsite use, hack points resolve their own entity)

_hackType

Hack type key. Used by runMinigame to pull the right monitor preset. Set by the hack-point system, not you

difficulty

Difficulty key. Consumed by resolveProps before dispatch

Last updated