User:Polavux/Technical:Bloons TD 5 (multiplatform)/Tracks: Difference between revisions
Created page with "==Track lists== The list of tracks that can be played in-game normally are defined in <code>tracklist.json</code> for singleplayer and <code>coop_tracklist.json</code> for Co-op (BTD5). Both files use the same structure. Any tracks without an entry in either of these files in the vanilla game are exclusive to Special Missions and events or are unused. {| class="wikitable sortable" !Key !Description !Type !Required? !Behavior when absent |- |<code>Size</code> | |Arra..." Tag: Disambiguation links |
|||
| Line 173: | Line 173: | ||
===Mask file=== | ===Mask file=== | ||
Uses a custom file format. Some tracks in the console version (apparently the ones that had to be modified to define the extra horizontal space) use a slightly different format. | Uses a custom <code>.mask</code> file format, which is essentially a bitmap. Some tracks in the console version (apparently the ones that had to be modified to define the extra horizontal space) use a slightly different format. | ||
====Header==== | |||
{|class="wikitable sortable" | {|class="wikitable sortable" | ||
!Address | !Address | ||
| Line 182: | Line 184: | ||
|— | |— | ||
|<tt>0x0000</tt> | |<tt>0x0000</tt> | ||
| | |The first four bytes are always "NKBM" (Ninja Kiwi bitmap?), and the meaning of the last eight are unknown. | ||
| | |4 bytes | ||
|- | |||
|— | |||
|<tt>0x0004</tt> | |||
|Unknown. | |||
|8 bytes | |||
|- | |- | ||
|<tt>0x0000</tt> | |<tt>0x0000</tt> | ||
| Line 194: | Line 201: | ||
|The height of the track in units. | |The height of the track in units. | ||
|4 bytes | |4 bytes | ||
|} | |} | ||
====Data==== | |||
The rest of the file is a series of [[wp:Run-length encoding|run-length encoded]] byte pairs. The first byte of a pair is the length of the run in pixels from left to right, wrapping when it reaches the width of the mask. The second byte of a pair defines the terrain. | |||
Revision as of 18:47, 23 October 2025
Track lists
The list of tracks that can be played in-game normally are defined in tracklist.json for singleplayer and coop_tracklist.json for Co-op. Both files use the same structure. Any tracks without an entry in either of these files in the vanilla game are exclusive to Special Missions and events or are unused.
| Key | Description | Type | Required? | Behavior when absent |
|---|---|---|---|---|
Size
|
Array of numbers | |||
DifficultyColours
|
The colour values to use when displaying a track's name. Each array is three entries long and the values correspond to the red, green, and blue channels in that order. | Array of array of numbers | ||
DifficultyDescriptions
|
The localisation keys for the difficulty levels. | Array of numbers | ||
Tracks
|
The list of track entries. | Array of arrays |
Track entries
| Index | Description | Type | Required? | Behavior when absent |
|---|---|---|---|---|
| 0 | The track difficulty.
|
Integer | ||
| 1 | The track ID. | String | ||
| 2 | The track's localisation key. | String | ||
| 3 | The number of tracks of the previous difficulty the player is required to win on to unlock this track. Can be set to 0 or -1 to disable this requirement.
|
Integer | ||
| 4 | The rank the player is required to reach to unlock this track. Can be set to 0 or -1 to disable this requirement.
|
Integer | ||
| 5 | Indicates if the track has water. If true, the Monkey Sub and Monkey Buccaneer can be randomly selected on this track in Daily Challenges.
|
Boolean | ||
| 6 | Indicates if the track is new to this version. If true, this track displays a special highlight on the track selection menu.
|
Boolean | ||
| 7 | If true, this track is hidden from the menu until the player meets its unlock criteria.
|
Boolean | Defaults to false
| |
| 8 | A list of tower IDs of towers the player must unlock in order to unlock this track. | Array of strings |
LevelDefinitions
Map file
| Key | Description | Type | Required? | Behavior when absent |
|---|---|---|---|---|
Music
|
The background music. | String | ||
entryMarkers
|
The positions of the entrance markers that appear when the track is loaded. In each entry, the first element is an array of two elements representing the X and Y coordinates in units, and the second element is the rotation in degrees. | Array of arrays | ||
reverseEntryMarkers
|
Same as above, but for Reverse mode. | Array of arrays | ||
ipadEntryMarkers
|
Array of arrays | |||
ipadReverseEntryMarkers
|
Array of arrays | |||
Modifiers
|
Array of strings | |||
BossSpawn
|
In Bloons Monkey City, this is the ID of the boss to spawn after starting the first round (0 = Bloonarius, 1 = Vortex, 2 = Dreadbloon, 3 = Blastapopoulos). This also exists in Bloons TD 5, but is unused and has no apparent functionality.
|
Integer | ||
Effects
|
A list of visual effects to apply.
|
Array of strings | ||
OnNewGame
|
Unused. | Object |
Path file
Props file
Mask file
Uses a custom .mask file format, which is essentially a bitmap. Some tracks in the console version (apparently the ones that had to be modified to define the extra horizontal space) use a slightly different format.
Header
| Address | Address (console) | Description | Size |
|---|---|---|---|
| — | 0x0000 | The first four bytes are always "NKBM" (Ninja Kiwi bitmap?), and the meaning of the last eight are unknown. | 4 bytes |
| — | 0x0004 | Unknown. | 8 bytes |
| 0x0000 | 0x000C | The width of the track in units. | 4 bytes |
| 0x0004 | 0x0010 | The height of the track in units. | 4 bytes |
Data
The rest of the file is a series of run-length encoded byte pairs. The first byte of a pair is the length of the run in pixels from left to right, wrapping when it reaches the width of the mask. The second byte of a pair defines the terrain.