> For the complete documentation index, see [llms.txt](https://atiysus-organization.gitbook.io/aty-scripts/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://atiysus-organization.gitbook.io/aty-scripts/map-editor/reference/export.md).

# Export

## Export

Export produces a **resource you can start**, not a text file you then have to work out how to package.

Open it from the toolbar.

### Scope — what gets exported

| Scope        | Exports                                                                                        |
| ------------ | ---------------------------------------------------------------------------------------------- |
| **All**      | Every placed prop                                                                              |
| **Selected** | Only the props you tick in the list                                                            |
| **Layer**    | One layer                                                                                      |
| **Area**     | Everything inside an X/Y rectangle. **Snap from props** fills the bounds from your current map |

### Name

The export name becomes the resource folder name, so it is sanitised as you type: lowercased, spaces and hyphens to underscores, anything else stripped, cannot start with a digit, 48 characters maximum. Minimum two characters.

### Formats

#### YMAP / XML — CodeWalker

A CodeWalker-compatible `.ymap`, plus everything needed to run it.

**Saved on the server** to `aty_mapeditor/exports/<name>/`:

```
<name>/
├── fxmanifest.lua        this_is_a_map 'yes'
└── stream/
    └── <name>.ymap
```

**Downloaded in your browser:** the `.ymap` on its own, for opening in CodeWalker.

Copy the folder into your resources, `ensure <name>`, and the map streams.

{% hint style="success" %}
The `<streamingExtents>` are calculated from the real model bounds of every prop — including scale, and widened by the largest LOD distance in the export. A ymap with zero extents does not stream anywhere, which is the usual reason a hand-made export "loads nothing".
{% endhint %}

{% hint style="danger" %}
A ymap describes static geometry only. **Peds and vehicles are dropped**, along with light sources. The modal tells you how many entities the format cannot represent before you export, rather than writing entries the game would reject.
{% endhint %}

Entity guids are derived from the prop itself, so re-exporting the same map produces the same file instead of a diff full of new random numbers.

#### Model List

A plain text list of every model used, one per line. What you hand to whoever is preparing a stream folder — it answers "which models does this map need".

#### Lua Resource

A complete client-side resource that creates every prop at runtime.

```
<name>/
├── fxmanifest.lua
└── props.lua
```

Carries everything: peds, vehicles, vehicle customization, lights, scale, features, custom names. Use this when the map has to keep its non-static entities.

#### Blender Python

A script that recreates the layout in Blender — empties at each position with the right rotation and scale. For planning, previewing and screenshots outside the game.

#### JSON

The full-fidelity format. This is what the editor reads back, so it round-trips: model, custom name, layer, position, rotation, scale and the complete feature table.

Use JSON for backups, for moving a map between servers, and for anything you intend to re-import.

### Where files go

Server-saved exports land in `aty_mapeditor/exports/`. Paths are sanitised server-side: no parent-directory traversal, no absolute paths, and only these extensions are written — `ymap`, `xml`, `lua`, `json`, `py`, `txt`. Limits are `Config.Permission.MaxExportFiles` (8) and `MaxExportBytesPerFile` (\~5 MB).

Your browser also downloads the primary file, so you have a copy without touching the server filesystem.

### Copy

**Copy** puts the generated output on your clipboard. For pasting into a script, a message or an editor without going near the server.

### Choosing a format

| You want to                         | Use                |
| ----------------------------------- | ------------------ |
| Ship a streamed map resource        | **YMAP**           |
| Keep vehicles, peds and lights      | **Lua Resource**   |
| Back up or move a map               | **JSON**           |
| Tell someone which models to stream | **Model List**     |
| Work on the layout outside the game | **Blender Python** |
