Streaming Custom Maps and Assets
How to stream custom maps, models, and textures to FiveM clients using a resource's stream folder.
Overview
FiveM's streaming system allows the server to push custom game assets — maps, models, textures, and more — to connecting clients. Assets are placed inside a resource's stream/ folder and declared in fxmanifest.lua. Clients download them automatically on first connection and cache them for subsequent sessions.
Supported Asset Types
| Extension | Type | Purpose |
|---|---|---|
.ymap |
Map data | Adds or modifies world map placements (props, buildings, lights) |
.ytyp |
Archetype definition | Defines object types referenced by .ymap files |
.ytd |
Texture dictionary | Replaces or adds textures for models |
.ydr |
Drawable model | Single-LOD 3D model |
.ydd |
Drawable dictionary | Multiple models in one file |
.yft |
Fragment | Destructible or animated object model |
.ybn |
Collision | Collision mesh for custom geometry |
Directory Structure
Place all stream assets inside the resource's stream/ subfolder:
resources/
[maps]/
my-custom-map/
fxmanifest.lua
stream/
custom_map.ymap
custom_map.ytyp
custom_textures.ytd
fxmanifest.lua Configuration
Declare streamed files in the manifest using the files key. File declarations are required for the client to receive the assets:
fx_version 'cerulean'
games { 'gta5' }
author 'YourName'
description 'Custom map resource'
version '1.0.0'
files {
'stream/*.ymap',
'stream/*.ytyp',
'stream/*.ytd',
'stream/*.ydr',
'stream/*.ydd'
}
data_file 'DLC_ITYP_REQUEST' 'stream/*.ytyp'
The data_file directive registers .ytyp files with the game engine so archetypes are available when the .ymap is loaded. Without it, .ymap placements referencing custom archetype names will be invisible or replaced with default objects.
Enabling the Resource
Add an ensure line in server.cfg:
ensure my-custom-map
Start or restart the server. Clients will download the stream files when they next connect.
Verifying Streaming Works
Connect a test client and check:
- The FiveM loading screen shows the resource download progress.
- In-game, navigate to the map coordinates where custom content should appear.
- Open the FiveM console (F8) and run
resmonto confirm the resource is running.
If assets are invisible, check the txAdmin console for streaming errors. A common cause is a missing data_file declaration for .ytyp files.
File Size Considerations
FiveM streams assets to every connecting client. Large asset bundles increase:
- Client connection time (assets must download before the player spawns)
- Server bandwidth consumption
- Client disk usage in the FiveM cache folder
Keep individual .ytd files under 16 MB where possible. Split large map releases into multiple resources grouped by zone rather than one monolithic resource.
Replacing Existing GTA Textures
To replace a vanilla texture dictionary, name your .ytd file to match the original (e.g., hospitalinterior.ytd). FiveM's streaming system gives resource-loaded assets priority over the base game files for clients connected to your server. This only applies to connected players — the base game files on the client's machine are never modified.
Using Map Editor Exports
If you build maps in tools like CodeWalker or the FiveM Map Editor:
- Export to
.ymapformat. - If custom archetypes are used, export the
.ytypas well. - Place both in the
stream/folder. - Add both extensions to the
filesblock and add adata_filefor.ytyp.