Stage Settings
Last updated
Last updated
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:
Here you can see a list of parameters in order:
Icon
An image that will represent this stage in the main menu
Display Name
Stage name for the main menu preview image
Timeline
Reference to a specific timeline file for this stage
Stage Type
Shape and direction of this stage
Stage Field Data
Reference to a field data file
Spawn Prop*
Whether or not to spawn prop
Remove Prop from Boss*
Destroys prop inside of the boss fight arena
Spotlight
Color of the decorative spotlight effect in the center
Spotlight Shadow
Color of the vignette effect around the edges
Enemy Damage
Damage multiplier for this stage
Enemy HP
Enemy health multiplier for this stage
*Available in version 1.0.2 and above.
Among the parameters you will find Stage Field Data. This file lets you set up different level backgrounds and shapes.
When opened, the file should look like this:
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.
Background Prefab contains the main background image that you will see most often. It's in the center of the grid above.
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:
Horizontal requires top and bottom rows, along with the center one:
Vertical requires side rows and the center one:
Rect requires all prefabs:
A typical background prefab will have a following structure:
Background child typically holds a Sprite Renderer component, with a sprite for background attached:
This holds true, with one important exception: center background prefab should also hold a special script, as seen below:
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.
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.
Here's how to populate your stages with prop:
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.
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.
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.
For these prop objects to properly collide, you need to make sure the object has a proper Layer set up.
In the same Inspector window, take a look at the Layer field on top.
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.
Open a desired prefab, and change its Layer to Player & Enemy Obstacle Helper, like in the screenshot below:
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.
Now you can add your prop prefabs to a stage you want.
In the Inspector you will see an array of prop prefabs. It should look like this:
There you will find a prop prefab field. Assign your newly created prefab.
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.
Set these settings according to your needs.
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.
You can access the file either by clicking on the field in the screenshot above, or simply navigating to this path: .
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 . Additionally, the background images must be configured as sprites. For the best quality, we recommend images with at least 1024x1024 resolution.
Navigate to . There you will find the prefabs for all the stages in the game. Select a prefab you want to change and open it.
If you experience unexpected results with bosses and obstacle collision, try enabling the Remove Prop from Bossfight option in the .
Every prop needs to have its own prefab. You can find them here:
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: .
To do that, navigate to Stage Field Data folder . Select a stage you need, and open it.
Last important thing is to enable the prop spawn in .