Skip to content

OPTIONS Format 1

BLOODWIING edited this page Aug 13, 2021 · 6 revisions

Note:

This explanation uses the example of the Brawl Stars preset, which came default with this generator. (This project is called BrawlMapGen, so what did you expect?)

File's tree

Tree in detail

This section will show every single parameter's meaning + usage.

🞜 format (integer)

The OPTIONS.JSON format specifier.

Currently, there's only one format available in BMG (the format is documented on this page). However, there are more data formats planned for BMG's 2.0.0 release.

This is a required option so as to prepare for any future releases. In order to use BMG, please set this setting to 1.


🞜 generator

This doesn't affect the generator in any way, it's here to somewhat tell the user some info about this project, like the creator and link to this GitHub repository.


🞜 preset (string)

The generator is designed to adapt to given files. That includes presets.

A preset in BrawlMapGen is a file that describes everything needed to know for the generator to make a map. Each preset also comes with its own folder for its tiles.

Presets usually define a game. For example, the Brawl Stars preset called brawlstars.json describes every tile to the generator.


🞜 batch[] [array]

The generator is capable of batch exporting, below will be documented each parameter that goes in when making maps themselves.

⬦ name (string)

The name of each map is only here for the design. If the map's name is specified in the console and logs (if enabled) when making the map the text will display Drawing map "name"... instead of the usual Drawing map no "number"...

⬦ map[] (string[array])

This is the most important part when it comes to making a map. These string arrays with each of their characters describes how the map should look like, where the tiles would be.

Here is the table which explains what each letter corresponds to which tile. (This list was extracted from the file tiles.csv in the game client.)

Tile Code Tile Name More Info Examples
M blocking1 These are the blocks are only destructible with supers. Wooden block, Stone block
X blocking2 These are the blocks are only destructible with supers. Minerals / Crystals in Gem Grab, Grass block, Wood block
Y blocking3 These are the blocks are only destructible with supers. Crate
C blocking4 These are the blocks are only destructible with supers. Barrel
F forest Also known as Bushes or Tall Grass by the community. Grass / Bush
T respawningWall These are the blocks are only destructible with supers though they have a "plant"-y theme to them Cactus, Mushroom
B blockingDestroyableWithWeapon These are easily destroyed using normal bullets. Skulls, Vases
N fence Name is self-explanatory Fence
W water Name is self-explanatory Fence
1 player1 A player's spawn (when starting the game) Blue spawn circle, Gray spawn circle
2 player2 A player's spawn (when starting the game) Red spawn circle, Gray spawn circle, Big Brawler's spawn circle, Robo Boss' spawn circle
8 objective The objectives of each event The vault (there are more, but they are Game Mode tiles)
H springpadRight A pad that launches player to the right Springpad / Launchpad (Right Arrow)
G springpadLeft A pad that launches player to the left Springpad / Launchpad (Left Arrow)
L springpadBottom A pad that launches player to towards the bottom of the screen Springpad / Launchpad (Down Arrow)
K springpadTop A pad that launches player to towards the top of the screen Springpad / Launchpad (Up Arrow)
P springpadBottomRight A pad that launches player to the bottom right Springpad / Launchpad (Bottom Right Arrow)
Z springpadTopLeft A pad that launches player to the top left Springpad / Launchpad (Top Left Arrow)
O springpadBottomLeft A pad that launches player to towards the bottom left of the screen Springpad / Launchpad (Bottom Down Arrow)
U springpadTopRight A pad that launches player to towards the top right of the screen Springpad / Launchpad (Top Up Arrow)
, ikeRange The dashed curved line which shows how far does the IKEs range go. Added automatically as a Game Mode tile IKE Range
Q rails The Rails on the Minecart Madness map. This tile has a premade path like in game and is added automatically as a Game Mode tile Minecart rails
E bench1 Benches which face the top and left of the screen Benches
A bench2 Benches which face the bottom and right of the screen Benches
c teleporterBlue A color-coded teleporter tile, which transports players to its other self on the map Blue teleporter
d teleporterGreen A color-coded teleporter tile, which transports players to its other self on the map Green teleporter
e teleporterRed A color-coded teleporter tile, which transports players to its other self on the map Red teleporter
f teleporterYellow A color-coded teleporter tile, which transports players to its other self on the map Yellow teleporter
a RopeFence A rope barrier, which blocks movement but allows bullets to travel through Rope barrier
v intervalDamage Spikes that retract and extend to deal damage and block paths Spikes
x damage Showdown-styled poison clouds Poison Cloud
y healing A pad that heals the player above Heal pad
z slow A tile that slows down all brawlers who step on it Slowing pad
w fast A tile that speeds up all brawlers who step on it Speeding pad

⬦ biome (integer)

A biome in BrawlMapGen is a tile type preset. In other words: It automatically sets which asset to use out of a number when a tile code has different assets assigned.

This is the biome current table (It can change):

Index Biome name More info Usually used in Game Modes
0 Canyon The more red looking background colored map Bounty (normal), Heist (normal)
1 Jungle The more green looking background colored map Bounty (normal), Heist (normal)
2 Mine Self-explanatory Gem Grab (normal)
3 Canyon Showdown This biome is always used for Showdown Showdown
4 Grassfield Also known as "The football/soccer field" Brawl Ball
5 Snow The chillier version of Gem Grab's biome Gem Grab (winter)
6 Town This biome appeared when the Year of the Pig was being celebrated in Brawl Stars Gem Grab (lunar), Bounty (lunar), Heist (lunar)
7 Retro The neon themed biome Gem Grab (retro), Bounty (retro), Heist (retro)
8 Mortuary The spooky biome, home of Mortis and Frank Gem Grab (mortuary), Showdown (mortuary)
9 Darryl Ship themed biome Gem Grab (darryl), Bounty (darryl), Present Plunder (darryl)
10 Arcade The arcade-y themed biome, possible home of 8-Bit Gem Grab (arcade), Hot Zone (arcade)
11 Galaxy Arena The Soccer / PSG Brawl Ball field PSG Brawl Ball
12 Gene's Lamporium The environment introduced in Season 1 (Tara's Bazaar) Gem Grab (lamporium), Heist (lamporium)
13 Mini City The environment introduced in Season 2 (Summer of Monsters) Super City Rampage, Hot Zone (mini), Gem Grab (mini), Heist (mini), Bounty (mini)
14 Gift Shop The environment introduced in Season 3 (Starr Park) Gem Grab (gift), Heist (gift)
15 Poco's Bandstand The center of entertainment and home of Poco, El Primo and Amber. Gem Grab (bandstand), Heist (bandstand), Bounty (bandstand)
16 Snowtel The cold outside of a cozy hotel ran by Mr.P. The environment introduced in Season 4 (Holiday Getaway) Gem Grab (snowtel), Hot Zone (snowtel), Bounty (snowtel)
17 Scrapyard Pam's workshop Siege
18 Starrforce Colonel Ruff's spaceship. The environment introduced in Season 5 (The Starr Force!) Gem Grab (starrforce), Hot Zone (starrforce), Bounty (starrforce)
19 Actionshow The wild west. The environment introduced in Season 6 (The Goldarm Gang) Gem Grab (actionshow), Heist (actionshow), Knockout
20 Waterpark A dinosaur-themed beach. The environment introduced in Season 6 (The Jurassic Splash) Gem Grab (waterpark), Bounty (actionshow), Hot Zone (waterpark), Knockout (waterpark)
21 [CUSTOM] Volley Arena A modded version of the Galaxy Arena that has a red and blue background. Made to match the in-game look. Volley Brawl
22 [CUSTOM] Galaxy Arena A modded version of the Galaxy Arena that has a more accurate grass background. Made to match the in-game look. PSG Brawl Ball

⬦ sizeMultiplier (integer)

This number specified the size of each tile.

If this number is set to 1, then each tile will be 1px wide. If this number is set to 125, then each tile will be 125px wide.

It's called this way because it just multiplies each size of each tile asset by itself (each tile SVG is scaled to work with 1px wide tiles).

⬦ skipTiles[] (character[array])

This defines which tiles to leave blank completely, even skipping the background drawing.

⬦ exportFileName (string)

It'll set how the image will be named when saved.

⬦ overrideBiome[] [array]

These options change one or multiple tile types from the biome.

⬩ tile (string)

This sets the tile name of which types will need to be changed from the biome defaults.

⬩ type (integer)

This sets to what type will the biome default be changed.

⬦ replaceTiles[] [array]

This array will specify the code which tiles should be replaced with what before drawing.

⬩ from (character)

This is what the code will be looking for when replacing.

⬩ to (character)

This is what the code will set the tile when replacing.

⬦ specialTileRules[] [array]

Special Tile Rules or STR for short, simply tells the code to replace what tile's at which was found at N time type is.

This was added because the Vaults in Heist were different, the top one was half a tile higher than the one on the bottom. STR however helped with this, since it's looking for specific tiles which were encountered N times only to change.

⬩ tileCode (character)

This is what tile the code will be looking for.

⬩ tileTime (integer)

This is the number which specifies the time needed of tiles encounters by the code to execute STR's rule.

⬩ tileType (integer)

This tells to what type will the tile change on the conditions of the STR.

⬦ emptyBorderAmount[] (float[array])

This is optional. If not defined then the default is used.

This tells BMG what gap to leave between where the tiles are and where the image ends. This helps with the problem of tiles going out of the edges of the image and getting cut off.

The values are in tiles, not pixels. Hence making it possible to use floating-point numbers. This is helpful especially when you want to have a space half the size of a single tile around.

The default is 1 tile on each side.

This is how you use it:

Array length Top Bottom Left Right Explaination
0 (default) (default) (default) (default) Using default values.
1 1st value 1st value 1st value 1st value The single item sets all borders around.
2 1st value 1st value 2nd value 2nd value The First item sets the Vertical ends, Second - Sides
3 1st value 2nd value 3rd value 3rd value First - Top, Second - Bottom, Third - Sides
4 1st value 2nd value 3rd value 4th value Values set these edges in this order: Top, Bottom, Left, Right

⬦ gamemode (string)

Game Modes in BrawlMapGen mean: drawing tiles in specific locations even though they were not specified in the map.

When working with maps things such as the Mine in Gem Grab, the Bounty star in Bounty, the Goal flags in Brawl Ball are obvious that they should be in the locations they are, but to make things easier they are added automatically if the Game Mode is specified.

This is the Game Mode table which is currently supported:

NOTE: Some of the Biomes have been removed due to a new feature in version 1.9.4

Game Mode Name What's added Auto biomeOverride
Heist none none
Gem Grab The Mine none
Bounty The Bounty Star none
Brawl Ball The Brawl Ball, The Goal Flags none
Big Game nothing Player1 (Default: Blue Spawn) will be auto set to Grey Spawn, Player2 (Default: Red Spawn) to Big Brawler Spawn
Robo Rumble nothing Player1 (Default: Blue Spawn) will be auto set to Blue Spawn, Player2 (Default: Red Spawn) to the Invisible Tile
Boss Fight nothing Player1 (Default: Blue Spawn) will be auto set to Blue Spawn, Player2 (Default: Red Spawn) to the Robo Boss Spawn
Takedown Boss Robot Spawn Player1 (Default: Blue Spawn) will be auto set to Grey Spawn, Player2 (Default: Red Spawn) to Nothing
Lone Star The Bounty Star none
Present Plunder Nothing The Objective (Default: Vault) will be auto set to Presents (CTF)
Hot Zone Nothing The Objective (Default: Vault) will be auto-set to Hot Zones
Hot Zone (mod) Nothing The Objective (Default: Vault) will be auto-set to Modded Hot Zones (as seen on BrawlStats)
Super City Rampage Nothing Player2 (Default: Red Spawn) will be auto-set to Mega Monster Spawn
Super City Rampage (mod) Nothing Player2 (Default: Red Spawn) will be auto-set to Modded Mega Monster Spawn (as seen on BrawlStats)
Hold The Trophy The Golden Trophy none
Trophy Thieves none Present Plunder-like objectives, just with team-colored trophies
Volley Brawl Volleyball none
Basket Brawl Basketball, Basketball hoops and Basketball throw ranges none

⬦ randomSeed (integer)

A new option introduced in 1.9.3

The map-specific seed. This value updates the randomizer, which also affects any other maps after the one with a set seed. Use this feature if you want maps to look the same randomized.

⬦ mapMetadata <dictionary>

A new option introduced in 1.9.3

Extra map data that isn't part of the actual map. This can be used to display numbers, or to draw extra assets on top.

The type of this parameter is a Dictionary. The key is the "ID" of the metadata, which is defined in the preset file, while the value is an array of metadatas.

Map Metadata has 3 fields. The x and y is the location in the map, while the t is the "type" of metadata.
Differently from tile tyles, metadata can have their own types, but they reference assets from actual tiles.

The list of currently supported metadatas and their types:

Metadata ID Description Type Count Types Explained
bolts The numbers that display the spawn order of the bolts in Siege 11 Types change the number displayed. The 10 index shows a ...

🞜 exportFileName (string)

If the file name isn't specified in the batch options then the code turn to the default, which is this.


🞜 exportFolderName (string)

When working with batch exporting it's best to keep everything clean. This parameter helps by redirecting to a different folder the code should save it's images. It can work with making a sub folder if the folder the executable is or directing it to a totally different location on your computer.


🞜 saveLogFile (boolean)

If this is true then everything said in the Console screen will be saved to a file, that includes errors.


🞜 console

This group of boolean parameters tells what to write and what not to write in the console.

However, errors and basic statuses like "beginning to draw map..." can't be disabled.

⬦ setup (boolean)

If this is enabled then the initialization text is shown.

These messages won't display anything important to you. It will only show that the bot is operating and loading.

⬦ tileDraw (boolean)

This toggles the drawing announcements.

The format goes like this:

operation type [tile code] < y: vertical location / x: horizontal location > action (uppercase)

This is what each operation type combination means:

Operation Types Meaning
m--o-- (Map Metadata) Delayed to draw later Ordered tile
-g---d (Game Mode) Drawing a tile
--s--- Tile skipped
--so-- (STR) Delayed to draw later Ordered tile
--soh- (STR) Delayed to draw later Horizontally Ordered tile
--so-d (STR) Drawing Ordered tile
--sohd (STR) Drawing Horizontally Ordered tile
---o-- Delayed to draw later Ordered tile
---oh- Delayed to draw later Horizontally Ordered tile
---o-d Drawing Ordered tile
---ohd Drawing Horizontally Ordered tile
-----d Drawing a tile

⬦ orderedHorTileDraw (boolean)

This toggles messages about Horizontally Ordered Tiles.

⬦ orderedTileDraw (boolean)

This toggles messages about Horizontally Ordered Tiles.

⬦ saveLocation (boolean)

This toggles a message which displays where the map image was saved.

⬦ aal (boolean)

AAL (Advanced Activity Logger) messages the user through console when a file is read or written in the following format:

[ AAL ] READ << file

or

[ AAL ] WRITE >> file


🞜 render

A new option introduced in 1.9.0

This setting informs the program which maps in the batch[] array to whitelist and blacklist.

Useful for testing or for keeping the OPTIONS.JSON file without having to delete any map entries.

Ignored maps will be completely skipped over. Tile pre-loading is affected by this setting.

Even though it's possible to set both an include[] and an exclude[], it is recommended to only use one at a time.

⬦ include[] (integer[array])

Informs the program which maps indexes to include/whitelist. Every other index not present will be skipped.

⬦ exclude[] (integer[array])

Informs the program which maps indexes to exclude/blacklist. Indexes in this map will be skipped.


🞜 autoCrop

A new option introduced in 1.9.1

With the addition of a few new Brawl Stars game modes, BMG can now cut off the empty tile space present in maps.

Usually, it is recommended to use this to enhance skipTiles[]. Having tiles that are to be skipped on the outside of the map can create a margin, however, to remove it is as simple as setting this option.

⬦ enabled (boolean)

A simple toggle for this feature.

⬦ tiles[] (character[array])

The list of characters to be cropped out.

Even though this is optional and will not error the program, it is still incredibly recommended to be set.

Leaving this option blank will cause the program to display a warning and pause for 15 seconds. The program will then use the first map's skipTiles[] as the list of tiles to be cropped out.

If you don't want the warning to be displayed, please disable this option or set your own tiles.


🞜 assetSwitchers [array]

A new option introduced in 1.9.2

Using overrideBiome is helpful when it comes to a single map that should have a slightly different theme, but sometimes there come assets where we just want to avoid and replace.

This option is global - meaning it affects every single map and is the last check before drawing a tile. So even after all overrides and modding, the asset will just never be rendered in the final image.

It is more recommended to use the overrideBiome for more control, but if there is a repeating override then use this option to help save the hassle of copying and pasting.

The assetSwitcher also supports replacing assets between different tile classes. So a poison cloud can appear as a bunch of bounty stars - this is not possible with overrideBiomes.

Sometimes maps are just made to appear differently to different regions of the world, this is the tool for that.

⬦ find

An object of 2 fields: tile and type.

The tile refers to the tile's name, not the representative code, while the type is an integer and refers to the "type" or variation of the tile.

This combination is used to narrow the switcher down to a single asset, an SVG file that it will try to replace.

⬦ replace

Same fields as find.

This also narrows it down to an asset, but this will be the asset that will be used instead of the original one to draw the tile.


🞜 randomizers

A new option introduced in 1.9.3

All options related to tile randomizations. You can toggle this feature with the enabled boolean property of this object.

⬦ seed (integer)

The seed of which to randomize everything, the same as setting a seed for the first map in the array.

BMG WIKI

DOCUMENTATION

CHANGE LOG

BEHIND THE SCENES

Clone this wiki locally