RE:CORD
REC_WorldManager

World editor

Welcome to REC_WorldManager documentation.
Added
Updated

The editor runs as a session. A calling resource supplies the entities to edit, the allowed actions, and the format expected for the result.

Targets can be objects, peds, vehicles, existing client entity handles, or particle markers. The returned record keeps the caller's key, label, group, and data, and adds the final transform and a status of unchanged, moved, added, or removed.

KeyAction
LMB clickSelect under the pointer; empty space deselects
LMB dragTurn the view, unless dragging the gizmo
W A S DFly; in edit mode, only while turning the view
Q / EMove down/up while turning the view or with no selection
ShiftFly faster
Mouse wheelChange camera speed or placement distance
E / QEnter/leave selection edit mode
RMB clickEdit the target in translation mode
W / E / LTranslation/rotation/local axes while editing
PPick up the selection for aim placement
LMB / E / QDrop/drop/restore the held entity
Arrow keysRotate while placing; Shift uses a larger step
XToggle surface snapping
GPlace on the surface below, preserving rotation
FFocus the camera on the selection
LCtrl + C / VCopy/paste
LCtrl + Z / YUndo/redo a transform
DelDelete the selection
EnterReturn session results; standalone copies vector4
BackspaceExit, asking for confirmation while the scene has entities

Opening a client session

openEditorAndWait waits until the player saves or closes the editor.

sample.lua
local result = exports.REC_WorldManager:openEditorAndWait({
    label = "REC_YachtHeist / yacht-1",
    targets = myEntities,
    format = {
        fields = { "type", "model", "coords", "heading", },
        typePrefix = "entityTypes.",
        precision = 2,
    },
    permissions = { spawn = true, delete = true, transform = true, select = false, },
})

if result ~= nil and result.saved == true then
    print(result.text)
end

Opening a server session

Server-side callbacks stay in the calling resource while the serializable request crosses the network. onSave and onClose receive the player ID before the result.

sample.lua
exports.REC_WorldManager:openEditorFor(src, {
    label = "yacht-1",
    targets = svCfg.locations["yacht-1"].entities,
    format = { typePrefix = "entityTypes.", precision = 2, },
    onSave = function (playerId, result)
        svCfg.locations["yacht-1"].entities = result.records
    end,
})

Set permissions.select = false when the player must only edit the supplied targets. Set teleport = false when the player must remain in place, although distant targets may not stream correctly.

Closing and sharing a scene

Use the top toolbar, the scene/model catalog on the left and the selection panel on the right. The pointer automatically operates panels when over them and the world elsewhere; TAB focus switching is no longer needed. The catalog supports objects, peds and vehicles.

Closing removes spawned entities by default and restores existing world entities. Set config.editor.keepSpawned for standalone /worldeditor, or request.keepEntities for a caller-owned session, to retain spawned entities. Changes and deletions to the session’s own handle targets are committed only when saved.

config.editor.session.confirmExit controls the exit confirmation when the scene contains entities. closeEditor and server-forced closes do not ask.

The Share button offers nobody, nearby players or selected players. Nearby sharing uses the same routing bucket and defaults to 50 m from an entity. Shared local copies disappear when sharing stops or the editor closes. Existing networked entities are not replicated this way. Sharing requires the editor ACE; configure it through config.editor.share.enabled and radius.

Placement without the editor

startPlacementAndWait lets an entity follow the gameplay camera’s aim and returns its placement. It cannot run at the same time as the editor.

local result = exports.REC_WorldManager:startPlacementAndWait({
    model = "prop_cctv_cam_01a",
    surface = "wall",
    alignToSurface = true,
    reach = 6.0,
})

if result ~= nil and result.confirmed == true then
    print(result.spot.coords, result.spot.rotation)
end

E or left click places, left/right arrows rotate, X toggles surface snapping and Backspace cancels. Use items for a sequence; Enter finishes early after minCount is met. Defaults live in config.placement.

Use surface, reach, area and validate for placement restrictions. Previews are removed on completion by default: spawn persistent/networked entities from the confirmed spots in the calling resource. keepEntities = true retains client previews, which still disappear on resource restart. Server callers use startPlacementFor / startPlacementForAndWait. The server revalidates positions and restrictions and returns reason = "rejected" for invalid results.

©2026 RE:CORD Development Group. All rights reserved.