Customizing the battlefield.
The following sections will show you how to modify the main battlefield, as well as the character and item benches. The number of cells can be modified, as well as their shape, position, rotation and separation from each other.
Battle grid
The battle grid is the main battlefield, where characters can move and attack each other.
To modify it, start by selecting the "Auto-Battle/Grid" object in the scene. Select the Grid object in the scene.
Battle grid settings
The options explained below will be shown in the inspector that will be displayed once the object is selected.
In the Grid Shape dropdown, the following options can be chosen:
Squared: The cells will be placed in a square grid. In the Grid Squared option, it will be necessary to associate a prefab with a square shape. By default it will be associated with the one that comes in the package. Squared shaped grid.
Hex: The cells will be placed in a hexagonal grid. In the Grid Hex option, it will be necessary to associate a prefab with a hexagonal shape. By default it will be associated with the one that comes in the package. Hexagonal shaped grid.
- If a cell is created from scratch, note that it must be in the GridCell layer.
Cell Scale: When the cell prefab is instantiated, its X and Z scale values will be multiplied by this value. Due to this, it is important to keep the scale of the prefab to (1,1,1).
Separation: Separation distance between cells. Note that in the prefab of the cells that come with the package, the sprite they contain is slightly smaller than the cell itself, giving the impression that they are not a little bit separated even when the value is zero. It is recommended to keep this value at 0, and instead scale the sprite down or up. This way, you can avoid possible bugs linked to a character who does not know which cell it is in.
Grid Width: The amount of cells on the grid width.
Grid Height: The amount of cells on the grid height.
Rotate Cells: Rotate the cells depending on the grid type:
If the grid type is squared, the cells will be rotated 45 degrees Squared rotated grid. The cells are rotated 45 degrees.
If the grid type is hexagonal they will be rotated 15 degrees. Hexagonal rotated grid. The cells are rotated 15 degrees.
Team 1 Row Number: Number of rows in the grid assigned to team 1. The player will be able to move and place characters only in these rows. The rest will be assigned to team 2, the enemy characters will be spawned in these rows and will not be interactive for the player.
Battle grid color settings
Team 1 Empty Cell: The default color of a cell belonging to team 1 side. The cell will have this color if it is unoccupied.
Team 1 Occupied Cell: The color of a cell belonging to the side of team 1 if a character is located above the cell.
Team 1 Drag: The color of a cell belonging to the side of team 1 if a character is being dragged on top of the cell.
Team 2 Empty Cell: The default color of a cell belonging to team 2 side. The cell will have this color if it is unoccupied.
Team 2 Occupied Cell: The color of a cell belonging to the side of team 2 if a character is located above the cell.
Team 2 Drag: The color of a cell belonging to the side of team 2 if a character is being dragged on top of the cell.
Battle grid colors explanation. Team 2 Drag color would appear if a character from team 1 were dragged over one of the team 2's cells.
Character and item benches
The character bench is the area where the player will place the characters that will not play in the next round. It is also the area where the newly purchased characters will be placed. The player can take characters from the bench to the field and vice versa, as long as the maximum number of characters allowed on the field is not exceeded.
To modify character bench, start by selecting the "Auto-Battle/CharacterBench" object in the scene. Select the Character Bench object in the scene.
The item bench is the area where the player will place the items not equipped to characters. It is also the area where newly purchased items will be placed.
To modify character bench, start by selecting the "Auto-Battle/ItemBench" object in the scene. Select the Item Bench object in the scene.
Benches settings
The options of the benches are completely the same as those of the Battle grid except for the options related to team 2.
How to create a battlefield for more than 2 players.
Currently there is no automatic way to create a field for more than two players, however, we can change the values and colors of each cell to assign them to a specific player.
In the scene, select the multiple boxes to be assigned to a specific player. In the Grid Cell inspector indicate the index of the player you want to assign, index 0 being player 1, index 1 being player 2 and so on. Enter an index -1 if you do not want to assign the cell to any player.
In the same way, in the Grid Cell Effect inspector, select the colors for the squares assigned to the player. Then, right-click on the Grid Cell Effect inspector, and press "Update colors".
Example of how to assign player and color to cells.
Note that you will also have to assign benches for items and characters for each player.