> 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/import.md).

# Import

## Import

Import reads a map from text, stages it as **ghosts** in the world, lets you position it, and only then writes it.

Open it from the toolbar and paste your data.

### Formats it reads

The parser tries each in turn, so you do not have to say which one you have.

| Format          | Recognised by                                                                                                  |
| --------------- | -------------------------------------------------------------------------------------------------------------- |
| **JSON**        | This editor's own export — the `{ schemaVersion, props: [...] }` envelope, or a bare array from older versions |
| **Lua**         | This editor's Lua export — `CreateObject(hash_model, x, y, z…)` with optional `SetEntityRotation`              |
| **CSV**         | `model,x,y,z[,heading]` per line. `#` and `//` start a comment                                                 |
| **YMAP XML**    | `<Item type="CEntityDef">` — quaternion rotations are converted to Euler                                       |
| **Spooner XML** | `<Placement>` with `<Position>`, `<Rotation>`, `<ModelHash>`                                                   |

CSV is the lowest common denominator — what people paste out of a spreadsheet or a forum post. It works.

{% hint style="info" %}
JSON is the only format that carries **everything**. Scale, layer, custom name and the full feature table survive a JSON round trip; the others carry position, rotation and model. Importing a ymap gets you the geometry back, not the properties.
{% endhint %}

### Placing what you imported

Parsing does not place anything. The props appear as translucent ghosts, and a placement step opens:

| Control              | Effect                                |
| -------------------- | ------------------------------------- |
| **Offset X / Y / Z** | Move the whole set                    |
| **Rotate**           | Rotate the set around its own centre  |
| **To camera**        | Move the set to where you are looking |
| **Drop to ground**   | Land the set on the terrain below it  |
| **Cancel**           | Discard without writing anything      |

This is what makes an import from someone else's server usable: their coordinates are theirs, and *to camera* plus *drop to ground* puts the build where you actually want it in two clicks.

### Duplicates

**Skip duplicates** is on by default. A prop of the same model at effectively the same position as an existing one is not placed again, and the count of skipped entries is reported.

Turn it off when you deliberately want two copies in the same place.

### Confirming

**Place** writes the props to the server. From that moment they are ordinary placements — selectable, editable, exportable, undoable.

The import is **one** undo step regardless of how many props it contained.

### Common problems

**"No recognised format"** — the text did not match any parser. Check for a truncated paste; JSON in particular fails silently if the closing brace is missing.

**Everything landed underground or in the sky** — the source used different coordinates. Use **drop to ground**, or offset Z.

**Props are there but flat and grey** — you imported a ymap, which carries no scale or properties. Re-export from the source as JSON if you can.
