Skip to Content
ToolsWorld Editor
Report an error
Open in ChatGPTOpen in Claude

Edit map objects with the FxDK World Editor

World Editor is an FxDK editing mode for transforming supported existing map objects and placing additional objects. It provides position, rotation and scale controls in local or global coordinates. It is not a general MLO authoring tool or a compiler for arbitrary building collision. Follow the official World Editor source  and FxDK platform requirements.

Patches and additions are different objects

A patch modifies an existing map object. The documented limitation permits patching objects with embedded collision, such as suitable props. A building may have collision in a separate global mesh, so moving its visible geometry does not move that collision. Existing objects cannot be deleted through the documented patch workflow, but can be hidden. Test the collision and any nearby interactions after hiding or moving an object.

An addition is an object placed from the object browser. Additions have normal transform controls and can ask the game to position them on the ground. That operation is an attempted placement, not proof of a correct floor, ramp, collision mesh or usable doorway. Adding a collection of props does not create an MLO’s rooms, portals and interior data.

Save and compile the map asset

World Editor stores a map as a map-file asset. Before the server uses it, FxDK compiles that asset into a normal resource with a runtime for the additions and script bindings. It is not simply an export to an ordinary static YMAP: the runtime is needed for the documented binding behavior.

The editor should compile automatically when leaving World Editor. The map asset’s context-menu Recompile action is the recovery path when automatic compilation did not run, for example after an interrupted session. Save the source map, leave the editor normally, inspect the generated resource and test it in the project. Keep source maps separate from deployable output. See FxDK builds for the project handoff.

Addition lifecycle events

An addition can define arbitrary event names for its creation and deletion. Both events are emitted on the client with the object’s handle. They run after the corresponding operation. In particular, a deletion event does not provide an entity that can still safely receive native calls.

This client-side example uses the creation event to track an existing addition and the deletion event only to forget its handle. Configure these exact names on the intended addition in World Editor; do not register them as network events:

local tracked = {} AddEventHandler('doc:mapAdditionCreated', function(object) if type(object) ~= 'number' or not DoesEntityExist(object) then return end tracked[object] = true end) AddEventHandler('doc:mapAdditionDeleted', function(object) -- Deletion already happened. Do not invoke entity natives on this handle. tracked[object] = nil end) AddEventHandler('onResourceStop', function(resource) if resource ~= GetCurrentResourceName() then return end tracked = {} end)

Local handles can later be reused. Do not turn this table into a durable entity database or send its keys to another client. A custom system that performs delayed work must also check its own generation and entity identity. The map runtime owns its objects; an observer should not delete them merely because its own resource stops.

Play-test and editing controls

ControlDocumented behavior
F5 or the play buttonEnter play-test mode with a controllable ped at the editor camera. A setting can instead start in a vehicle.
ESC during play testReturn to the editor and restore the pre-test camera position.
Shift+ESC during play testReturn while leaving the camera at the test position.
Environment panelChange weather, change time or freeze time for inspection.
Ctrl+ZUndo an editor operation.
Ctrl+Shift+ZRedo an editor operation.
Ground-positioning actionAsk the game to place an addition on the ground; inspect the result.

Use the built-in introductory tour for the exact UI of the installed version. Do not assume unsupported grid-snapping, group-editing or global collision tools from a generic 3D-editor tutorial.

Verification and troubleshooting

Check an addition’s placement in daytime and low light, on foot and in a vehicle. Leave and re-enter its streaming area, repeat play test with both exit shortcuts, and verify that each configured lifecycle event fires in the client console. Delete or hide the intended object and confirm that an unrelated object was not affected.

When a visible object moves but collision does not, first determine whether it is a supported embedded-collision patch. Recompiling cannot supply a missing global collision-editing feature. When a server does not load the latest layout, check that the source map was saved and compiled, inspect the actual output and verify which resource the server started.

The guide documents the source-defined behavior. No graphical FxDK execution or in-game collision certification is inferred from the website build. For reproducible original geometry, use the asset lab, collision diagnosis and door authoring.