# Surgery

{% hint style="danger" %}
Surgery can break your level in ways that are not recoverable!

Please, if you are doing this, make sure to create a copy of your level before continuing
{% endhint %}

## What is File Surgery?

**Surgery** is the act of changing your level from writing directly into the file, rather than using the editor interface.

As you know, whenever you save a level inside the Game Editor, a file that contains all the settings,  actions, and decorations is updated. But in this case, we can do those changes over the file itself.

## What do I need to start the Surgery?

-> A **Text Editor** software to read and edit the text file

Here are a few you can use for free:

\---> Windows Notepad *(You most likely already have this)*\
\---> [Notepad++](https://notepad-plus-plus.org/downloads/) *(Better Notepad)*\
\---> Any IDE software *(Integrated development environment)*

## How to start Surgery on files.adofai?

First, find the location of your file. You can easily open your most recent file with the [Open the directory location window of most recent level](/english/shortcuts-listing/editor-workflow/open-the-directory-location-window-of-most-recent-level.md) **Shortcut**

After that, <mark style="color:yellow;">`Mouse right-click`</mark> on top of your level and click on **Open with** and select your Text Editor of choice. For this example, we will be using Notepad++

<figure><img src="/files/ppdhvVHuucwlYL5daNwF" alt="" width="563"><figcaption><p>Notepad++ - Adofai Level Surgery Content</p></figcaption></figure>

From here, it's a matter of adding and replacing values within each setting. Do have in mind, although you can put anything inside each setting, the game might not allow you to use them when you save and open the level file again

## Surgery Details

* **Angle Data** - Every tile angle will be storage here

{% hint style="info" %}
Check how to associate every tile angle on the [Tile Placement](/english/know-the-basics/tile-placement.md) section
{% endhint %}

* **Settings** - All the information about the level, descriptions and starting values of events

{% hint style="info" %}
Check how to associate every level setting on the [Editor Menu List](/english/editor-menu-list.md) section
{% endhint %}

* **Actions** - Every event added to the tiles will be set up here, including all its value settings

{% hint style="info" %}
Check how to associate every action with events in the [Events](/english/events.md) section
{% endhint %}

* **Decorations** - Every decoration and text added will be saved here, including all its value settings

{% hint style="info" %}
Check how to associate every decoration on the [Decoration and Text Creative Format](/english/event-skillful-formatting-and-showcases/decoration-and-text-creative-format.md) section
{% endhint %}

## Surgery advantages

### Easy Copy-Paste

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fipb5NkFjq0eBOIGewqlQ%2Fuploads%2FAt5wSlbmYSKd7uTyfOnK%2FSurgery%20-%20CopyPaste.mp4?alt=media&loop=false&token=feb351dd-bd7a-4f86-8761-a270359d5ce7>" %}

### Events at Tile 0

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fipb5NkFjq0eBOIGewqlQ%2Fuploads%2FoGrBPoNpaaBNRLZOPQBD%2FSurgery%20-%20Tile%200.mp4?alt=media&loop=false&token=593d6521-ea6e-4a03-a26b-77e2b1de4be5>" %}


---

# Agent Instructions: 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://adofaieditor.gitbook.io/english/surgery.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.
