The Level data file contains all the information needed to generate a level.
For examples, please create a level in Manic Miners yourself and locate the saved file. You should be able to read the exact syntax. This is more of a support document if you want to write converters or support programs.
The file has several data fields that tell the game what to expect from parsing that part of the file. Please note that ALL fields use lower case letters, they are capitalized below to be more readable.
This contains the metadata for the level, such as name, biome, and many other small aspects that change the game flow. The parameters "rowcount" and "colcount" are incredibly important, as they tell the game what map size to prepare for in the "tiles" section. A mismatch will likely generate a fatal error and cause problems.
Tiles simply tells the data how the map looks. To make the game handle easier, all level files have to be a multiple of the size of one Chunk, which is 8. The map also has to be square. Both of these limitations are subject to change, but if this is not followed, the program will generate a fatal error, as this can cause very unwanted level behaviour.
This section is a CSV file of numbers. Each tile is thus represented by a number, or a "Tile ID", in this "matrix". The number directly reflects the texture that will be used for that tile. Please note that some Tile IDs are not to be used manually. For instance, the Tile ID for Dirt is 26, with 27 being the "corner" version of Dirt, 28 being the "edge" version of Dirt, and 29 being the "intersection" version of dirt. If these values are put in manually, they will not work. The game automatically calculates the texture only using the base Tile ID, in this case 26.
What tile IDs correspond to what textures can be found below.
The heightmap determines how the map is to be sloped and how each individual vertex is to be manipulated. Only the height, not the X/Y position, can be altered. This is determined by an integer, showing the height change in Unreal Units. For reference, each tile is 300 Unreal Units wide. The data is, just like tiles, stored as a CSV
The heightmap has to be exactly 1 row and 1 column larger than the Tiles matrix. If this is not followed, the program will generate a fatal error, as this can cause very unwanted level behaviour.
This part is split into ore and crystal sections. They are each defined by a CSV matrix that defines how many resources to spawn where.
This section decides where and what miners to spawn. each miner takes exactly 3 lines: Any more than that breaks the loading. The first line takes in the miner's ID, the second one determines their transform, and the third one gives their tools and trainings. A miner is hidden if it is spawned on a hidden tile. Health=MAX is a macro to always spawn them with max health.
Similar to miners, using 3 lines of info, but they have more info. Instead of an ID they have the Vehicle Class, and instead of Tools they have more arguments. The driver of the vehicle will get teleported to the vehicle when the map starts. If the vehicle is hidden and then discovered, the vehicle still teleports miners based on their ID. Therefore, if you are editing the level file manually, make sure that it does not have a Driver ID that a regular miner in your level can get, as that might even teleport that miner out of vehicles. HP=MAX is a macro to always spawn them with max health.
Buildings use 6 lines of info: Building class, transform, level, if the building should teleport or not, starting health, and Power Path placements.
Defines landslide frequencies. The first number resembles the cooldown between landslides and the following list determines where the events are placed. Landslides can only originate from walls that have 3 neighbours and will stop when a wall does not have 3 neighbours anymore.
Defines where erosion can spread. The first number resembles the cooldown between each erosion stage, and the following list determines where the events are placed in a (Row,Column) coordinate grid (or the reverse, I can't remember). Only certain ground tiles can erode. The initial wait before erosion starts is defined in the "info" section.
The script executes events according to what happens while playing the level. For more information, please visit the scripting page.
Here you can put your creator comments on the level. You can also input comments by putting a # at the start of a line or putting # after a line HOWEVER this does not save to the final file yet. It is very useful if you are editing scripts via a text editor though (when scripting is implemented).
The following fields are obsolete. They will not generate errors, but do not change the level file in any way.
Tile ID list:
Tile IDs are mapped to their respective texture. That is why Dirt walls have ID 26, but the next wall has ID 30 and anything in between is not placable. There are four types of wall textures:
- Regular, where it has 3 neighbour tiles and 2 diagonal neighbours adjacent to each other
- Corner, where it has 4 neighbours and 3 diagonal neighbours
- Edge, where it has 2 neighbour tiles and 1 diagonal neighbours,
- Intersect, where it has 4 neighbours and 2 diagonal neighbours opposite to each other
Here is a list of all tile IDs. Bold names signify that tile is recognized by the game and not just a cosmetic texture.
- Rubble Level 1
- Rubble Level 2
- Rubble Level 3
- Rubble Level 4
- Erosion level 4
- Erosion level 3
- Erosion level 2
- Erosion level 1
- Slimy slug hole
- Power path in progress
- Power path building
- Power path building powered
- Power path 1
- Power path 1 powered
- Power path 2 adjacent
- Power path 2 adjacent powered
- Power path 2 opposite
- Power path 2 opposite powered
- Power path 3
- Power path 3 powered
- Power path 4
- Power path 4 powered
- Dirt regular
- Dirt corner
- Dirt edge
- Dirt intersect
- Loose rock regular
- Loose rock corner
- Loose rock edge
- Loose rock intersect
- Hard rock regular
- Hard rock corner
- Hard rock edge
- Hard rock intersect
- Solid rock regular
- Solid rock corner
- Solid rock edge
- Solid rock intersect
- Crystal Seam regular
- Crystal Seam corner
- Crystal Seam edge
- Crystal Seam intersect
- Ore seam regular
- Ore seam corner
- Ore seam edge
- Ore seam intersect
- Recharge seam regular
- Recharge seam corner
- Recharge seam edge
- Recharge seam intersect
- Fake rubble 1
- Fake rubble 2
- Fake rubble 3
- Fake rubble 4
- Cliff type 1 (experimental)
- Cliff type 2 (experimental)
Reinforced walls currently just have 50 added to the base value.
Hidden walls currently just have 100 added to the base value.