> For the complete documentation index, see [llms.txt](https://october-studio.gitbook.io/monster-survivors-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://october-studio.gitbook.io/monster-survivors-documentation/stages/stage-settings.md).

# Stage Settings

## Stage Data

Besides timeline sequence, each stage has separate settings file, also called Stage Data.

When you open a Stage Data file, it should look like this:

<figure><img src="/files/WsloOldh0AJCiUNVeLan" alt="" width="410"><figcaption><p>Stage Data example</p></figcaption></figure>

Here you can see a list of parameters in order:

<table><thead><tr><th width="238">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong>Icon</strong></td><td>An image that will represent this stage in the main menu</td></tr><tr><td><strong>Display Name</strong></td><td>Stage name for the main menu preview image</td></tr><tr><td><strong>Timeline</strong></td><td>Reference to a specific timeline file for this stage</td></tr><tr><td><strong>Stage Type</strong></td><td>Shape and direction of this stage</td></tr><tr><td><strong>Stage Field Data</strong></td><td>Reference to a field data file</td></tr><tr><td>Spawn Prop<em><mark style="color:purple;">*</mark></em></td><td>Whether or not to spawn prop</td></tr><tr><td>Remove Prop from Boss<em><mark style="color:purple;">*</mark></em></td><td>Destroys prop inside of the boss fight arena</td></tr><tr><td><strong>Spotlight</strong></td><td>Color of the decorative spotlight effect in the center</td></tr><tr><td><strong>Spotlight Shadow</strong></td><td>Color of the vignette effect around the edges</td></tr><tr><td><strong>Enemy Damage</strong></td><td>Damage multiplier for this stage</td></tr><tr><td><strong>Enemy HP</strong></td><td>Enemy health multiplier for this stage</td></tr><tr><td>Use Custom Music<em><mark style="color:purple;">**</mark></em></td><td>Whether or not play another music when entering the stage</td></tr><tr><td>Music Name<em><mark style="color:purple;">**</mark></em></td><td>The name of the music in the Audio Database</td></tr><tr><td>Unlock Description<em><mark style="color:purple;">***</mark></em></td><td>The text that will be shown when the player clicks on info button near locked stage.</td></tr><tr><td>Unlock Conditions List<em><mark style="color:purple;">***</mark></em></td><td>The list of conditions that need to be met in order to unlock this stage.</td></tr></tbody></table>

*<mark style="color:purple;">\*Available in version 1.0.2 and above.</mark>*\
*<mark style="color:purple;">\*\*Available in version 1.1.1 and above.</mark>*\
*<mark style="color:purple;">\*\*\*Available in version 1.4.0 and above.</mark>*

## Stage Background

Among the parameters you will find Stage Field Data. This file lets you set up different level backgrounds and shapes.&#x20;

You can access the file either by clicking on the field in the screenshot above, or simply navigating to this path: ![](/files/SFLlsCnE4jWILgNAp4Hx) .

When opened, the file should look like this:

<figure><img src="/files/8q95WR3qCDxBUyUDzFL7" alt=""><figcaption><p>Stage Field Data example</p></figcaption></figure>

There you can see a list of assigned Background Prefabs. Every field corresponds to a specific point of the level grid. An example set of background images can be seen below.

<figure><img src="/files/zot4pYAaIfWh3u1NfefG" alt="" width="375"><figcaption><p>Set of images forming a background grid</p></figcaption></figure>

**Background Prefabs** contains a list of background prefabs. The engine randomly selects a prefab from this list whenever a new background tile is spawned, allowing you to create visual variation in the level.

Depending on your level shape, you will need a different number of background images:

* **Endless** will require only the center prefab, as it will repeat endlessly:

<figure><img src="/files/jZcDDYWpNUy9QjYbwQN6" alt="" width="96"><figcaption><p>Endless</p></figcaption></figure>

* **Horizontal** requires top and bottom rows, along with the center one:

<figure><img src="/files/okISj8aW7Qy1Z9yeBYVM" alt="" width="96"><figcaption><p>Horizontal</p></figcaption></figure>

* **Vertical** requires side rows and the center one:

<figure><img src="/files/GGUdflLBtbSVndUOnAgO" alt="" width="96"><figcaption><p>Vertical</p></figcaption></figure>

* **Rect** requires all prefabs:

<figure><img src="/files/L5CzibOvXKbrYBCuPHMh" alt="" width="96"><figcaption><p>Rectangular</p></figcaption></figure>

Since the [v1.5.0](https://october-studio.gitbook.io/monster-survivors-documentation/stages/pages/2GSJW4TQ4qncHqDlz1OM#version-1.5.0) we introduced margins for Horizontal, Vertical and Rect stages. It will allow expand playing area inside the sides and corners.

{% hint style="info" %}
If you are building a stage with only one specific shape, you can assign only the prefabs that are needed, while the other fields can be empty.
{% endhint %}

## How To Change Background

{% stepper %}
{% step %}

### Preparation

Before starting, check if you have all the components needed. Depending on the stage shape, you will need a set of images. On how to decide what you need, check the [previous step](#stage-background). \
Additionally, the background images must be configured as sprites.\
For the best quality, we recommend images with at least 1024x1024 resolution.
{% endstep %}

{% step %}

### Background Prefabs

Navigate to ![](/files/wqctH4IFGBbTvDQrOO60). There you will find the prefabs for all the stages in the game. Select a prefab you want to change and open it.

A typical background prefab will have a following structure:

<figure><img src="/files/SxfIDIfo3vOwa0amYeqx" alt="" width="200"><figcaption><p>Background Prefab example</p></figcaption></figure>

Background child typically holds a Sprite Renderer component, with a sprite for background attached:&#x20;

<figure><img src="/files/rQzzx9mZK8amMIO3d65i" alt="" width="313"><figcaption><p>Background Sprite Renderer example</p></figcaption></figure>

This holds true, with one important exception: center background prefab should also hold a special script, as seen below:

<figure><img src="/files/VX107VYWR6dH1TZQuRTA" alt="" width="315"><figcaption><p>Center Background script</p></figcaption></figure>
{% endstep %}

{% step %}

### Sprite Swap

To change the background, click on the Sprite field in the Sprite Renderer, and select your new background. Repeat this step for all the other prefabs that you require.&#x20;

<mark style="color:yellow;">If your newly set background doesn't match the size of the previous one, tweak its Pixel Per Unit value.</mark>
{% endstep %}

{% step %}

### Additional Info

Each background prefab has to hold at least one image, but you are also free to place additional layers to your liking. This can be useful if  you want to decorate a background somehow, or add depth, etc. An example of this can be seen in the border prefabs, as they have an additional decorative object.
{% endstep %}
{% endstepper %}

## Stage Prop

Version 1.0.2 introduces a new feature - Stage Prop. It allows to randomly spawn a set of predefined objects, specific for each stage.

Prop has two types of collision:

* Collision for the player only.
* Collision for both enemies and the player.

{% hint style="info" %}
If you experience unexpected results with bosses and obstacle collision, try enabling the Remove Prop from Bossfight option in the [Stage Data](#stage-data).
{% endhint %}

## How to Add Stage Prop

Here's how to populate your stages with prop:

{% stepper %}
{% step %}

### Preparation

Before you begin, make sure you have the sprites for obstacles you want to add. The template features demo prop sprites for each stage:

<figure><img src="/files/mlNlznXhXHY9sFGWalD6" alt="" width="256"><figcaption><p>Demo Prop</p></figcaption></figure>

<mark style="color:yellow;">For better sorting results, we recommend setting the pivot of these sprites to bottom.</mark>
{% endstep %}

{% step %}

### Prop Prefab

Every prop needs to have its own prefab. You can find them here: ![](/files/UMIQcaZC4NnJLRN7qc9u)

Lets take a look at a typical prop prefab. Open one from the directory above. In the inspector you will find several components attached:

Sprite Renderer, 2D Collider, and the Prop Behavior Script.

<figure><img src="/files/rKYY7HtpuneNawc0M5bd" alt="" width="375"><figcaption><p>Prop Prefab</p></figcaption></figure>

The easiest way to add your Prop Prefab is to copy an existing one.

To change the visuals assign the sprite you want in the Sprite Renderer.

<mark style="color:yellow;">If you want to have a more complex structure, with several layers inside, you can do that by copying the parent object and changing it to your needs.</mark>
{% endstep %}

{% step %}

### Obstacle Layers

1. For these prop objects to properly collide, you need to make sure the object has a proper Layer set up.&#x20;

In the same Inspector window, take a look at the Layer field on top.&#x20;

<figure><img src="/files/HqY34hi2dvwKwaO9n9PD" alt=""><figcaption><p>Prop Layer</p></figcaption></figure>

Make sure it has a proper Layer you need:

If you want for both the Player and Enemies to collide with an object, choose Player & Enemy Obstacle Layer.

If you want a prop that only the Player collides with, choose Player Only Obstacle Layer.

2. For this to work properly, you also need to set an appropriate Layer for the Character itself. To do that, navigate to your Characters prefab folder, typically located here: ![](/files/81jOA5GlQIIRzQ4FwQWL).

Open a desired prefab, and change its Layer to Player & Enemy Obstacle Helper, like in the screenshot below:

<figure><img src="/files/O9sCHeBUVoecX0wp80FF" alt="" width="375"><figcaption><p>Character Layer</p></figcaption></figure>

<mark style="color:yellow;">In some cases you might want to change obstacle's Sorting Layer, to display this prop above or below something. You will find this setting in the Sprite Renderer component of a prop prefab.</mark>
{% endstep %}

{% step %}

### Collision

For this to work properly, make sure all the prop objects have a 2D Collider attached.&#x20;

For the best performance, its recommended to use Circle Collider 2D, however, you can replace it with any 2D Collider of your choice.
{% endstep %}

{% step %}

### Adding Prop Prefabs to a Stage

Now you can add your prop prefabs to a stage you want.&#x20;

1. To do that, navigate to Stage Field Data folder ![](/files/5ebS7u64XvGoFb0Fbdkd). Select a stage you need, and open it.
2. In the Inspector you will see an array of prop prefabs. It should look like this:

<figure><img src="/files/AAxTdkci9WJ1MaBZzTPK" alt="" width="375"><figcaption><p>Stage Prop</p></figcaption></figure>

3. There you will find a prop prefab field. Assign your newly created prefab.
4. Under the Prefab field you will find prop spawn settings:

**Max Amount** determines the amount of this prop objects to spawn (*In a range of 1 to Max Amount*).

**Chance**, naturally, determines the chance of set prop to spawn, in percentages.

5. Set these settings according to your needs.

<mark style="color:yellow;">You can add as many prop objects to a Stage as you like, but keep in mind that every collision and additional rendered object will cause a drop in performance.</mark>
{% endstep %}

{% step %}

### Enabling Prop Spawn

Last important thing is to enable the prop spawn in [Stage Data](#stage-data).

When you're done, test your obstacles in the game.
{% endstep %}
{% endstepper %}

{% hint style="info" %}
If you want to spawn prop in more orderly fashion, you may want to disable Spawn Prop option in the Stage Data, and manually add everything you need in the Stage Background prefab. Make sure to use proper Layering and Colliders.&#x20;
{% endhint %}


---

# 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, and the optional `goal` query parameter:

```
GET https://october-studio.gitbook.io/monster-survivors-documentation/stages/stage-settings.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
