> For the complete documentation index, see [llms.txt](https://marangonico.gitbook.io/four-seasons/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://marangonico.gitbook.io/four-seasons/miscellanea/bonus-make-a-scenery-compatible-with-four-seasons.md).

# Make a scenery compatible with Four Seasons

{% hint style="info" %}
This section is for advanced users. Knowledge of the [X-plane library.txt format](https://developer.x-plane.com/article/library-library-txt-file-format-specification/) is necessary. &#x20;
{% endhint %}

If a scenery includes winter textures, but these textures must be switched manually by the end user, you can make them working in combination with Four Seasons.

In order to do this, we need to create the following sections inside the scenery library.txt:

* common assets
* summer assets
* winter assets

Should the scenery also include optional textures for Autumn or Spring, just add the related sections.&#x20;

{% hint style="warning" %}
Note: making a backup of the scenery before working on it, **is always a good idea.**
{% endhint %}

Four Seasons exposes a custom dataref called "*nm/four\_seasons/season*".

This dataref can assume the following values:

* 10: (Season=Spring)
* 20: (Season=Summer)
* 30: (Season=Fall)
* 40: (Season=Winter without ground snow)
* 45: (Season=Winter with patchy snow)
* 50: (Season=Winter with ground snow)
* 60: (Season=Deep Winter) (Only working with TerraMaxx e SAM Seasons compatible sceneries)

Here is an example of a library.txt modified for Four Seasons:

```
A
800
LIBRARY

PRIVATE

REGION_DEFINE	MyAirport_Common
REGION_RECT	008 63 008 63
REGION MyAirport_Common
{EXPORTS directives here}

REGION_DEFINE 	MyAirport_SUMMER
REGION_RECT	008 63 008 63
REGION MyAirport_SUMMER
REGION_DREF     nm/four_seasons/season < 45
{EXPORTS directives here}

REGION_DEFINE	MyAirport_WINTER
REGION_RECT	008 63 008 63
REGION MyAirport_WINTER
REGION_DREF     nm/four_seasons/season >= 45
{EXPORTS directives here}
```


---

# 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://marangonico.gitbook.io/four-seasons/miscellanea/bonus-make-a-scenery-compatible-with-four-seasons.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.
