Bablo ResourcesDocs

Installation

Follow these steps in order. The steps marked optional can be skipped and done later. A full server.cfg example is at the end of the page.

StepWhat you set upNeeded?
1Download the resourceYes
2server.cfg: start orderYes
3Who may use the editorYes
4The databaseAutomatic
5The exports folder for PublishCheck
6Opening the editor the first timeYes
7Thumbnails, custom props, language and limitsOptional

1. Download the resource

To download the asset, you must have purchased it on your own CFX account. Otherwise, use the transfer system to move it to a different account.

After purchasing from our website, the asset is delivered to your CFX Portal. Download it there and put the bablo-mapeditor folder in your resources folder.

There is no SQL to import and no item to add. The database tables are made on the first start, see step 4.


2. server.cfg

Your framework (es_extended, qb-core or qbx_core) must be started before bablo-mapeditor.

PLAINTEXT
ensure ox_lib
ensure oxmysql
ensure qb-core

ensure bablo-mapeditor

Use es_extended or qbx_core instead of qb-core for your framework. ox_lib and oxmysql are dependencies: without them the resource does not start.

The framework is picked up on its own. To see what was found, turn Config.DEBUG on once: the console then prints a line such as Detected framework: qbcore. If the wrong one is picked, set it by hand in config.lua. See Configuration.

Set Config.DEBUG = false in config.lua on a live server. While it is on, the test commands and the thumbnail studio work, and some of them have no permission check. See Commands.


3. Giving access

Only editors can open the editor. Editors are the players with the ACE in Config.AcePermission, and framework admins.

LUA
-- ACE permission that grants editor access alongside framework admin
Config.AcePermission = 'mapeditor.use'

Give the ACE to your admin group with one line in server.cfg:

PLAINTEXT
add_ace group.admin mapeditor.use allow

To let builders in who are not admins, give them a group of their own:

PLAINTEXT
add_ace group.mapper mapeditor.use allow
add_principal identifier.license:your_license group.mapper

Framework admins are editors without the ACE:

FrameworkAdmins
ESXPlayers in the admin or superadmin group
QBCorePlayers with the QBCore permission admin or god
QboxPlayers with the Qbox permission admin

On all three, players with the ACE command count as admins as well. group.admin has it in the default server.cfg (add_ace group.admin command allow). Everyone else gets You don’t have permission. when they use /mapeditor.

The server checks the rights when the editor opens and again for every change an editor saves. If you change Config.AcePermission to a name of your own, grant that name instead. See Permission.


4. Database

Nothing to do. bablo-mapeditor uses the database oxmysql is connected to. On every start it creates the tables that are missing, adds the columns and indexes an update needs, and prints:

PLAINTEXT
[bablo-mapeditor] Database ready: 9 tables checked.

The database user needs the rights to create and alter tables. The tables are listed on General information.

When the database has no map yet, the start creates one, named after Config.DefaultMapName:

LUA
Config.DefaultMapName = 'Main'

This map is switched on, so what you place on it shows for every player. It is also the working map: new props land on it until an editor picks another map in the Workshop. See Map Workshop.

When the database has no categories yet, the start also creates one Workshop category for each entry in Config.Categories, named after its label: Furniture, Seating, Tables and so on. Editors use them to sort placed props, and can rename or remove them. See Categories.

Both checks run on every start, so a later restart creates the map or the categories again if every map or every category was deleted in the meantime.

If a step fails, the console prints the error and then Database not ready: 1 step(s) failed, so the editor stays disabled until this is fixed. Players then get no placed props, and editors get The map editor database isn’t ready. Fix the database error and restart the resource.


5. Exports folder

The Publish tab of the Workshop turns a map into a resource of its own, which loads the map without the editor. The editor writes that resource into its own exports folder:

PLAINTEXT
bablo-mapeditor/exports/my_city_map/
    fxmanifest.lua
    client.lua
    map.json
    my_city_map.json
    my_city_map.csv
    stream/

The exports folder ships with the resource. The server creates the folders inside it by itself, so it needs write access to the bablo-mapeditor folder. When it can’t create them, the server console prints [bablo-mapeditor] publish: could not create with the folder and the reason. The editor shows The exports folder is missing — create it inside bablo-mapeditor and retry., and the Publish tab says The server couldn’t create /home/fivem/resources/bablo-mapeditor/exports/my_city_map. Create that folder with an empty stream folder inside it, then publish again. Give the server write access, or create the two folders by hand, and publish again.

A published folder can’t run inside the editor. Move it to your resources folder and start it with ensure my_city_map. See Import, Export & Publish.


6. First time in the editor

Join the server as an editor, step out of any vehicle and run:

PLAINTEXT
/mapeditor
  1. The camera flies free from where the game camera was, and your character waits, frozen. The top bar shows Current project: Main, your working map.
  2. Look around: hold the right mouse button and move the mouse. Fly with W A S D, E and Q.
  3. Pick a prop in the Prop Browser at the bottom and click in the world to place it. Because Main is switched on, every player near it sees the prop straight away.
  4. Workshop in the top bar opens the Map Workshop with your maps, placed props, categories, schedules, publishing and keys.
  5. Esc backs out one step at a time and closes the editor at the end. /mapeditor closes it as well.

See Camera & Controls, Prop Browser and Placing Props.


7. Optional extras

ExtraWhen you need itHow
ThumbnailsThe pictures in the prop browser should come from your own host, or from the resource itself.Config.ThumbBaseUrl. See Custom Props & Thumbnails.
Custom propsYour server streams props of its own that editors should place.Config.CustomProps. See Custom Props & Thumbnails.
LanguageYour server does not use English.Config.Locale. See Languages.
Browser categoriesThe categories of the prop browser should have other names.label in Config.Categories. See Categories.
LimitsYour maps need more or fewer props or lights.Config.MaxObjectsPerMap, Config.MaxObjectsTotal and Config.Lights. See Maps and limits and Lights.

Full server.cfg example

PLAINTEXT
ensure ox_lib
ensure oxmysql
ensure qb-core

add_ace group.admin mapeditor.use allow

ensure bablo-mapeditor

Use your own framework name. Leave out the add_ace line if your admins are already framework admins or have the ACE command.


Commands to get started

WhatDefaultChange it with
Open or close the editor/mapeditorConfig.Command
Free cursor on or offCaps LockSettings → Key Bindings → FiveM in the game
Open the Map WorkshopWorkshop in the top bar
Set your own editor keysThe Workshop’s Keybinds tab

Every command and key is listed on Commands.


Next steps