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

# Map Editor

## ATY Map Editor - Complete Documentation

ATY Map Editor is a professional, advanced, and feature-rich prop and map editor resource that redefines mapping and world customization on FiveM. Built with a stunning Vue.js 3 interface and a robust server-side synchronization architecture.

***

### 🚀 1. Installation

#### Requirements

Ensure you have the following dependencies installed and started on your server **before** starting `aty_mapeditor`:

* `ox_lib`
* `aty_lib`

#### `server.cfg` Configuration

Your server configuration file must be set up properly to ensure all features of the map editor work correctly. Add the following to your `server.cfg`:

```cfg
# Enable dynamic door creation for the custom door system to function properly
setr game_enableDynamicDoorCreation "true"

# Start the required resources in order
ensure ox_lib
ensure aty_lib
ensure aty_mapeditor
```

> \[!IMPORTANT] The `setr game_enableDynamicDoorCreation "true"` convar is strictly required. Without it, dynamically generated doors (such as custom gates or interior doors you place via the editor) will refuse to open, fail to synchronize across players, or bug out completely.

***

### ⚙️ 2. Configuration (`shared/config.lua`)

The editor is highly customizable. Open `shared/config.lua` to tweak these parameters to fit your server's needs.

#### General Settings

* `Config.Locale` - Set the language of the script (e.g., `"en"` for English, `"tr"` for Turkish).
* `Config.MaxPropsPerPlayer` - Limits the number of props a single player can spawn. Set to `0` or `nil` to disable the limit.

#### Editor & Sync Settings

* `Config.MaxFreecamDistance` - Maximum distance (in meters) the freecam can travel away from the player ped.
* `Config.Editor.ZoneSize` - The chunk size (in meters) for spatial partitioning. Props are grouped into these zones for optimized network synchronization.
* `Config.Editor.PropSpawnDistance` - Distance (in meters) at which props will visibly render to players.

#### Freecam Settings

* `Config.Freecam.BaseSpeed` - Default camera movement speed.
* `Config.Freecam.MinSpeed` / `MaxSpeed` - The minimum and maximum speed limits you can reach by scrolling.
* `Config.Freecam.FOV` - Field of view for the freecam.
* `Config.Freecam.Sensitivity` - Mouse look sensitivity.

#### World Prop Eraser (`Config.WorldPropDeletion`)

This feature allows you to permanently suppress/delete default GTA V objects (e.g., removing a default building to place a custom one).

* `Enabled` - Master switch for the eraser feature.
* `CheckInterval` - Milliseconds between checks to re-delete standard props if the game tries to respawn them.
* `CheckRadius` - Range around the player to monitor for deleted world props.
* `HighlightColor` - The RGBA color used to outline world props when hovering over them to delete.

***

### 🎮 3. Commands

You can use the following commands in-game (configurable in `config.lua`):

* `/opencreator` - Opens or closes the Map Editor interface and activates the Freecam.
* `/cleanprops` - Validates all saved props and removes any invalid models from the database.
* `/clearworldprops` - Clears all saved world prop deletions, restoring the default GTA V map.

***

### ⌨️ 4. Controls & Keybinds

#### Movement (Freecam)

* **W / A / S / D:** Move Camera Forward/Left/Back/Right
* **E / Q:** Move Camera Up / Down
* **Mouse Scroll:** Adjust Base Camera Speed smoothly
* **LShift (Hold):** Move Fast (Multiplier)
* **LCtrl (Hold):** Move Slow (Precision Multiplier)
* **Right Click (Hold):** Look around / Rotate Camera

#### Editor Tools & Gizmo

* **Left Alt:** Show/Hide NUI Cursor. *(Use this to toggle between navigating the UI and using your Freecam).*
* **Left Click:** Select a prop, Place a prop, or interact with Gizmo handles.
* **Right Click:** Deselect the current prop / Cancel action.
* **W:** Switch to **Translate (Move)** Mode.
* **R:** Switch to **Rotate** Mode.
* **Q:** Toggle Axis Space between **Local** and **World** space.
* **Spacebar:** Instantly align the selected prop to the ground.
* **LAlt (Hold while moving):** Surface Align (Aligns the prop's rotation to match the surface normal beneath it).
* **LCtrl (Hold while moving/rotating):** Grid/Vertex/Angle Snapping.
* **LCtrl + Left Click:** Multi-Select. Add multiple props to your selection.
* **G:** Reset prop rotation to `0,0,0`.
* **Delete:** Remove the selected prop.
* **C:** Clone the selected prop.
* **Ctrl + Z:** Undo last action.

***

### 🛠️ 5. Interface Overview

#### The HUD & Modes

When the editor is open, an overlay displays your active snapping modes, freecam speed, and contextual keybinds. If you engage snapping or surface alignment, pulse indicators will appear.

#### Tab Navigation

1. **Created Objects (Active Tab):** Lists all props currently placed in the world. You can rename props here, see their coordinates, or use the drag-and-drop handles to move them into Layers.
2. **All Objects (Available Tab):** Browse the massive library of props. Features a **Smart Concept Search** (e.g., search for "office" or "beach" to find conceptually matching items). Click the `+` to create Custom Categories.
3. **Deleted Props:** Displays all default GTA V objects you have removed using the World Eraser tool. You can restore them from here.
4. **Layers:** Create folders (layers) to group your props. You can toggle visibility for an entire layer (e.g., hide all "Exterior" props while working on the "Interior").

#### Advanced Tools (Top Bar)

* **Grid Icon (Mass Create):** Select a rectangular area on the ground, choose one or multiple models, pick a density, and batch-spawn props (great for forests, parking lots, etc).
* **Trash Grid Icon (Mass Delete):** Select a rectangular area to instantly delete all custom props within that zone.
* **Export Icon:** Export your map into various formats (JSON, Sollumz XML, CodeWalker, Lua) for use in other scripts or YMAP conversions.
* **Import Icon:** Import existing JSON maps.
* **Activity Log:** View a real-time log of who spawned, moved, or deleted props on the server.
* **Environment (Env):** Adjust the server's time and weather while mapping to see how your scene looks in different conditions.
* **Lights Editor:** Spawn custom, invisible light sources. Choose between Point, Spot, or Shadow lights. Adjust intensity, color (RGB), range, and falloff.
* **World Eraser:** Toggle this mode to outline default GTA V props in red. Click them to permanently delete them from the map.

***

> \[!TIP] **Missing Pictures for Custom Props?** The script fetches prop preview images from a centralized online repository (`atiysuu/objects`) to keep your server lightweight. If you are using custom add-on props or obscure models, it is normal for them to display a 3D box icon instead of an image. They will still spawn perfectly in-game.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://atiysus-organization.gitbook.io/aty-scripts/map-editor/map-editor.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
