Skip to content

MAIN Blocks

BLOODWIING edited this page Aug 13, 2021 · 2 revisions

AMG!Blocks

This is where you can find a lot of information about how AMG!Blocks work and how to use them.

AMG!Blocks are BMG's unique programming language that you can use in JSON. Each JSON object is called a "block". There are multiple types of blocks, only a few can be used in certain parameters.

To aid you with writing AMG!Block code, there is a publicaly available schema for them, please add this schema to your json files:
https://github.com/thedonciuxx/BrawlMapGen/blob/master/schemas/amg-mark.schema.json

Here's the change log for AMG!Blocks: Link


BLOCK TYPES

As mentioned previously, there are multiple types of AMG!Blocks. Here's the list of them:


LISTS OF BLOCKS

If you wanted to scroll though every single type of block, here's where you can:


DESCRIPTIONS

🞜 ACTION

Is runnable, does some form of action and even though yields a value, can't be used as a value block.

List of ACTION blocks: Link


🞜 CONDITION

Is solvable, solves the inputs to yield a boolean output, these can be chained however wanted, they always can have their own type as an input along with any other VALUE Block. There are only a few exceptions for blocks.

COMPARATIVE

These types of CONDITION blocks, depending on the actual block, can have any or a few types as the inputs, but both inputs must have matching types, the operators that can be used in these blocks are all comparative, such as EQUALS, LESS, etc.

LOGICAL

These types of CONDITION blocks have 2 boolean inputs, the operators that can be used in these blocks are all logic-based, such as AND, OR, XNOR, etc.

List of CONDITION blocks: Link


🞜 VALUE

Is readable, they have a value type (Null, Number, String, Boolean, Color, Object) and, depending on where it's used, can be read differently.

A Number type can be converted to a Color type if needed. The object type means that the Value needs to be calculated first, as if there was a MATH Block in it.

MATH

These types of VALUE blocks can solve Number or Color equations. These blocks can help you get the number you need by calculating. Most blocks take 2 inputs and accept Numbers or Colors, only a few blocks are exceptional). If any input of a math block is of a Color type, then it will yield a Color output.

List of VALUE blocks: Link