Overview

This file controls how tiles can be substituted in for other tiles. The game will divide the level into clusters and iterate through these clusters to randomly substitute tiles with different ones for more visual diversity.

Data Fields

Name – This is a reference field to describe the Level Substitution

Type – This refers to the “SubType” field from the Levels.txt file. This defines a group that multiple substitutions can share.

File – Specifies the name of which ds1 file to use. The ds1 files contain data for building Level Presets.

CheckAll – Boolean Field. If equals 1, then substitute each tile in the room. If equals 0, then substitute random tiles in the room.

BordType – This controls how often substituting tiles can work for border tiles

CodeDescription
0Single One Only. This allows substituting for 1 border in total
1One Per Cluster. This allows substituting 1 border for each cluster in the level
Other valuesAllow substituting borders for all of the level

GridSize – Controls the tile size of a cluster for substituting tiles. This evenly affects both the X and Y size values of a room.

Dt1Mask – This functions as a bit field mask with a size of a 32 bit value. This explains to the ds1 file which of the 32 dt1 tile files to use from a Level Type when assembling selecting a tile for substitution. Each “File#” field from LevelType.txt is assigned a bit value, up to the 32 possible bit values. (For example: File1 = 1, File2=2, File3 = 4, File4=8, File5=16….File32 = 2147483648). To build the “Dt1Mask”, you would select which “File#” fields to use from LevelTypes.txt and add their associated bit values together for a total value. This total value is the bitmask value.

Prob0 (to Prob4) – This value affects the probability that the tile substitution is used. This is a random chance out of 100. Which “Prob#” field that is checked depends on the “SubTheme” value from the Levels.txt file.

Trials0 (to Trials4) – Controls the number of times to randomly substitute tiles in a cluster. If this value equals -1, then the game will try to do as many tile substitutions that can be allowed based on the cluster and tile size. This field depends on the “CheckAll” field being equals to 0.

Max0 (to Max4) – The maximum number of clusters of tiles to substitute randomly. This field depends on the “CheckAll” field being equals to 0.