Bablo ResourcesDocs

Commands

Bablo Map Editor has one command for everyday use: the one that opens the editor. Everything else is done in the editor and the Map Workshop, with the mouse and the keys below. The other commands are for testing, for the thumbnail studio and for the prop catalogue, and most of them only work while Config.DEBUG = true.

CommandDefaultKeyWhoSet in
Open or close the editor/mapeditorEditorsConfig.Command
Free cursor on or offmapeditor_cursorCaps LockEditors, while the editor is openFixed name, key in the GTA settings
Stop a thumbnail run/mapeditor_thumbs_stopEndEvery player, only with Config.DEBUG = trueFixed
Test, thumbnail and catalogue commandsSee Debug commandsDepends on the commandOnly with Config.DEBUG = true
Test props and catalogue changesSee Server console commandsServer consoleFixed

Editors are the players with the ACE in Config.AcePermission (default mapeditor.use) and framework admins. See Installation.


/mapeditor

Opens the editor, or closes it when it is open.

PLAINTEXT
/mapeditor

Every player can type it, but the server only lets editors in. When the editor does not open, the player gets one of these:

MessageWhy
You don’t have permission.The player is not an editor.
You can’t open the map editor from a vehicle.Leave the vehicle first.
You’re doing that too fast.Too many editor requests in a short time, see Rate limit.
The map editor database isn’t ready.The database is not set up yet, or setting it up failed. The server console says why.
The editor didn’t answer. If the resource just restarted, try again in a few seconds.The server did not answer.

The command also does nothing while a thumbnail run is going on. Inside the editor, Esc backs out one step at a time and closes the editor at the end.

The name comes from Config.Command. The command has no key of its own. See Command and Camera & Controls.


Free cursor

Caps Lock switches between cursor mode, where the cursor is free for the panels and for clicking props, and fly mode, where the mouse turns the camera. It is the FiveM key binding of the command mapeditor_cursor, named Map Editor: free cursor, so every player can change it in the game under Settings → Key Bindings → FiveM.

It only works while the editor is open, and not while you type in a text field.

FiveM saves a key binding for each player the first time they join. The default Caps Lock is set in the script, not in config.lua. The key hint bar and the Workshop’s Keybinds tab show the label from Config.Keybinds (CAPS), also when a player picked another key.


Keys in the editor

These are the default keys in cursor mode, the mode the editor opens in. Every editor can change the keys of the first table in the Workshop’s Keybinds tab, up to three keys for each action. See Keybinds, and Camera & Controls for fly mode and the camera.

ActionDefault keyWhat it does
Forward, Back, Left, RightW, S, A, DFly the camera
Up / DownE or ↑ / Q or ↓Rise or descend
Fast / SlowShift / AltHold to fly faster or slower
FreecamFTurn the free camera off or on
CancelXCancel placement or the active tool
Gizmo modeGSwitch the gizmo between move and rotate
GroundShift + GSet the selection down on the ground below it
UndoCtrl + ZUndo the last change
RedoCtrl + Y or Ctrl + Shift + ZRedo what you undid
Copy / Cut / PasteCtrl + C / Ctrl + X / Ctrl + VCopy or cut the selection, paste at the cursor
DeleteDeleteDelete the selection

These keys can’t be changed in the Keybinds tab:

ActionKeyWhat it does
ExitEscClose the editor, or back out of what is open
Free CursorCaps LockSwitch the free cursor on or off. Changed in the GTA settings, see Free cursor.
LookHold the right mouse buttonLook around
PlaceLeft mouse buttonPlace the prop
BrushHold the left mouse buttonKeep placing props
RotateMouse wheelTurn the prop you are placing
HeightShift + mouse wheelRaise or lower the prop you are placing

The Map Workshop has no key. Open it with Workshop in the top bar.


Debug commands

These commands only work while Config.DEBUG = true. Some of them have no permission check, so every player can use them. Keep Config.DEBUG = false on a live server.

They are meant for setting up and testing. Most of them print their result in the F8 console.

Test commands

CommandWhat it doesWho
/mapeditor_probe <model>Spawns the model out of sight 3 metres in front of your character, prints its size box and whether its origin sits at the centre or at the base, and removes it again.Every player
/mapeditor_probe_batch <count>Measures <count> models spread over the whole catalogue, your custom props included. Prints how many were measured, how many failed and which have their origin at the centre.Every player

The lines start with [mapeditor:probe]. A model that can’t be loaded gives [mapeditor:probe] <model> could not be spawned or measured. These two commands only exist when Config.DEBUG is on while the resource starts.

Thumbnail studio

CommandWhat it doesWho
/mapeditor_thumbs [first] [count] [all]Photographs the catalogue props that have no thumbnail yet.Editors
/mapeditor_thumbs_find <text> [count]Photographs the catalogue props whose model name contains <text>.Editors
/mapeditor_thumbs_retry [count]Tries the props that failed before once more.Editors
/mapeditor_thumbs_preview <model>Shows one model in the studio light, without saving anything.Every player
/mapeditor_thumbs_stopStops a run or the preview. Bound to End.Every player

End is the FiveM key binding Map Editor: stop thumbnail run. A run or a preview can’t start while the editor is open: Close the map editor before running a thumbnail batch. Players who are not editors can start a run, but the server does not answer them and the run stops with You don’t have permission to generate thumbnails. Everything about the studio is on Custom Props & Thumbnails.

Catalogue

CommandWhat it doesWho
/mapeditor_catalog_validateChecks every catalogue model against the game files and prints how many can’t be spawned, with up to 15 names.Every player
/mapeditor_catalog_validate applyRemoves those models from the catalogue.Editors
/mapeditor_catalog_cleanThe same check, plus the models that failed to spawn in thumbnail runs. Models that only photograph as one flat colour are kept.Every player
/mapeditor_catalog_clean applyRemoves the listed models from the catalogue.Editors

With apply they change the prop catalogue data/props.json. See Catalogue commands.


Server console commands

Type these in the server console or the txAdmin live console.

mapeditor_seed

Fills the oldest map that is switched on with test props.

PLAINTEXT
mapeditor_seed [count] [x] [y] [z]
ArgumentDefaultWhat it is
count1000How many props.
x, y0, 0The centre of the square the props are laid out in, 5 metres apart.
z72The height of every prop.

The props are picked at random from ten GTA props, such as prop_bench_01a and prop_crate_01a, with a random heading. Every player gets them at once. The command does not check the prop limits of the map and the server. The console answers seeded 1000 objects on map 1.

It only works from the server console, and only while Config.DEBUG = true.

mapeditor_wipeseed

Deletes every prop that mapeditor_seed placed, for every player.

PLAINTEXT
mapeditor_wipeseed

The console answers wiped 1000 seeded objects, or nothing to wipe. It only works from the server console, and only while Config.DEBUG = true.

mapeditor_thumbs_prune

Writes every model listed in data/thumbs/failed.json to data/thumbs/failed_models.txt, and removes all of them from the prop catalogue data/props.json.

PLAINTEXT
mapeditor_thumbs_prune

This command also works in the server console while Config.DEBUG is off. It removes every model in failed.json, also models that only failed to photograph and place fine. The failed.json that ships with the resource lists 970 catalogue props. To remove only props that can’t be spawned, use /mapeditor_catalog_clean apply.

mapeditor_catalog_remove

Removes every model from the prop catalogue whose name starts with <prefix>.

PLAINTEXT
mapeditor_catalog_remove <prefix>

The prefix needs at least 4 characters: letters, digits or _. Capital letters don’t matter.

Both catalogue commands work in the server console at any time. In game, only editors can use them, and only while Config.DEBUG = true. The first time one of them changes the catalogue, the original is saved as data/props.backup.json. They print what they did, and when models were removed the line ends with restart bablo-mapeditor to apply. Restart the resource afterwards. See Catalogue commands.