Exporting to FiveM
Before you export
Section titled “Before you export”Open Problems (the counter in the status bar): fix the errors (red) and read the warnings (amber). The Export window shows the same counts. It tells you, for example:
- that the walls enclose no room yet;
- that a room is sealed (no door, window or opening), or that no door or window leads outside;
- that something stands outside every room and is left out;
- that a model is missing from the project.
The Export window
Section titled “The Export window”File > Export… (Ctrl+E, or the blue Export button in the menu bar) offers three formats:
| Format | What it is for |
|---|---|
| Resource (FiveM) | A built resource folder, ready for the server. This is the one you want. |
| glTF (.glb) | Raw files for Blender or any glTF tool: the interior with its textures, the collision and a .json with rooms, portals and lights. |
| CodeWalker XML | .ydr.xml with .dds textures, .ybn.xml, .ytyp.xml, .ymap.xml, to edit in Sollumz or CodeWalker. |
glTF and CodeWalker XML cannot be imported back.
Choose a folder. For the resource it is the resource’s folder, and its name is the resource name. Export builds the files in the background and a report lists what was written.
GTA V Legacy and Enhanced
Section titled “GTA V Legacy and Enhanced”A resource is for the game your server’s players run. For Resource (FiveM), choose Game in the Export window:
| Game | What it writes |
|---|---|
| Legacy (the default) | stream/, as FiveM on GTA V (Legacy) loads it. The same as before. |
| Enhanced | stream_enhanced/ only. FiveM on GTA V Enhanced loads that folder instead of stream/. |
| Both | stream/ and stream_enhanced/: one resource that works on either game. |
What differs between the two editions and what is shared:
- Written in the Enhanced format: the textures, models and fragments (
.ytd,.ydr,.ydd,.yft). - The same in both and copied: the collision, the
.ytyp, the.ymap, the manifest and the occlusion file.
The choice is saved with the project. A walk-in building’s replaced model is the Legacy model written for Enhanced.
What is written
Section titled “What is written”| File | What it is |
|---|---|
stream/<name>_shell.ydr |
The shell |
stream/<name>_shadow.ydr, stream/<name>_reflect.ydr |
Its shadow and reflection proxies |
stream/<name>_<room>_details.ydr |
One per room: trims, props’ lights, dirt and decals (textures embedded) |
stream/<name>.ybn |
Collision, with a room id on every polygon |
stream/<name>.ytyp |
The interior with its rooms and portals |
stream/<name>_props.ytyp |
Door and prop definitions copied from the game |
stream/<name>_milo.ymap |
Where it stands |
stream/_manifest.ymf |
The streaming manifest the game needs (without it, the game crashes on approach) |
stream/<hash>.ymt, audio/*.rel |
Audio occlusion and per-room audio settings |
| Other models | Your own props and imports, scaled copies, custom doors, cloth and breakable glass, and (walk-in) the building and map files with the game’s names |
fxmanifest.lua |
The resource manifest |
modlo_teleport.lua |
Only for a teleport interior |
With Game set to Enhanced the same files go in stream_enhanced/ instead of stream/; with Both they are in both
folders.
The Game workspace’s Export report section shows the shell’s statistics after cleanup (vertices, triangles, T-junctions fixed, portals).
On the server
Section titled “On the server”- Copy the whole resource folder to the server’s
resourcesfolder. - Add
ensure <resource name>toserver.cfg. - Restart the server (not only the resource) after the first export and after the audio data changes: the game reads
audio/*.relat start.
Exporting again into the same folder replaces the files. Files an earlier export made for map replacements that this one no longer needs are removed.
Step by step: Testing on your FiveM server.
Placing the interior
Section titled “Placing the interior”A World interior is placed at the world position and heading set on the World page. A Walk-in one is placed through its building (see Walk-in buildings). A Teleport one has an entrance and an arrival point. The position is in the project, so re-exporting never moves it.
After the export
Section titled “After the export”Check the report for warnings first. Exported files can be checked in CodeWalker (open the .ytyp and .ymap) before you take
them to the server.
Exporting from the command line
Section titled “Exporting from the command line”The same export runs without the window, for build scripts:
modlo-creator --interior <project>.ieproj --export <folder> [--export-format resource|gltf|xml] [--export-xml]--export-xml adds CodeWalker XML copies next to the resource. Command-line runs need an activated licence on that computer.