General information | Included variations | .var file reference |
---|
Variations are text files that contain game rules. They are stored in variations\ folder. Variations with .var extension are shown in loader's menu. Variations with other extensions can be loaded from within other variations.
The easiest way to make a new variation is to modify one of the existing ones. So, the first step is to open variations/ folder, make a copy of an existing variation, rename it and open in text editor.
Variation text file consists of several segments. Segments begin with name of the segment, followed by opened square ( { ) bracket. Segment content begins in the next line. Segment ends with a line that contains only closed square bracket ( } ).
This is an example segment:
Title { Tetromino factory }
The interpretation of segments is quite rigid, so don't change upper/lower case or add any extra spaces in titles or within segments. You can however type any text in areas outside of segments.
Title { Tetromino factory }
Contains the title. One line only.
Settings { tiles:7 gravity }
Contains one or more lines. Each line is a keyword, which turns on a special feature of the game.
In variation file, Settings should appear before Tilesets
keyword | effect |
---|---|
gravity | Blocks will fall down. If absent, blocks can be moved in any direction, and must be placed with ![]() |
tiles:n | This setting is mandatory. It indicates how many tiles will be loaded. When used with randominputs it indicates tiles to be used in shapes controlled by player, tiles with higher number can be used for walls, decorations, etc. |
randominputs | Indicates that numbers in input shapes will be interpreted as random colors. See Input segment. |
randomgoals | Indicates that numbers in goal shapes will be interpreted as random colors. See Goals segment. |
Playfield { !!!!!!!! ........ ........ ........ ........ ........ ........ ........ ........ ........ }
Playfield is consists of characters, mainly dots, placed in a rectangular formation. Playfield must be rectangular.
valid characters | meaning |
---|---|
. (dot) or 0 (zero) | empty space, where blocks can pass |
numbers or letters | various tiles, serving as obstacles. See Tilesets segment. |
! | source |
@ | destination |
A playfield must have a source. Input shapes appear in source. A source must be large enough for input shapes to appear in it. If an input shape, selected at random, cannot fit inside a source, it is cycled (see Cycle). If neither of cycled shapes can fit, the game is over.
Input { 1 2 3 4 5 6 7 }(In this example, input shapes are all single blocks of different colors.)
Inputs segment contains definitions of several input shapes. The definitions are separated with empty line. The definitions must be of rectangular shape, empty space filled with dots (as in Playfield and Goals)
Valid characters are dots, numbers and letters. Dots represent empty space. With numbers and letters, two modes are possible (see Settings).
Mode | Meaning of numbers and letters |
---|---|
Normal mode | Numbers and letters represent respective tiles (see Tilesets). |
randominputs | Numbers and letters represent random tiles, but the same numbers and letters represent same tiles. For example, 1122 would mean two tiles of one random color, and two tiles of another random color. |
Cycle { 1234567 }(in this example no cycling appears)
Cycle segment defines which shape is current shape replaced with when player presses the "rotate" button.
Cycle segment consists of a single line, which can contain numbers and letters, excluding 0 (zero). Number on the first position denotes cycle shape for the first shape. Number on second position denotes cycle shape for the second shape, etc. If the cycle would be 23415786, if player controls one of the first four shapes, he could exchange them with one another by pressing "rotate". Same goes for last 3 shapes. Shape 5 would not get rotated.
Goals { 111 .1. 1. 11 1. .1. 111 .1 11 .1 22 .2 .2 222 2.. 2. 2. 22 ..2 222 33 3. 3. 3.. 333 .3 .3 33 333 ..3 4. 44 .4 .44 44. .5 55 5. 55. .55 6666 6 6 6 6 77 77 }(In this example, goals are tetris shapes, each in its own color. This variation's goal is to form tetris shapes which then disappear.)
When goals are formed, they disappear. If gravity setting is on (see Settings) other blocks fall in their place.
Goal segment contains definitions of one or several goal shapes, divided by empty line. Definitions are rectangular, empty spaces denoted by dots (as in Playfield and Input). Other valid characters are numbers, letters and asterisk (*). Asterisk denotes any block.
Mode | Meaning of numbers and letters |
---|---|
Normal mode | Numbers and letters represent respective tiles (see Tilesets). |
randomgoals | Numbers and letters represent random tiles, but the same numbers and letters represent same tiles. For example, 1122 would mean two tiles of one random color, and two tiles of another random color. |
Help { factory.html }
Sets file name of the current variation's help file. Default path is variations/
Next { }
Sets file name of variation which will be loaded when player covers all output tiles (see Playfield). Default path is variations/ . File name can have any extension. Files with extension other than .var will not be shown in loader module.
Tilesets { tiles.bmp tilesbig.bmp tetiles2.bmp tetiles2big.bmp }
This segment contains several names of tile images. Tile images contain tiles which will be rendered on the screen.
In variation file, Tilesets should appear after Settings
Tile image is a BMP image. Tiles are squares, arranged in tile image from top to bottom.
Tile | Meaning | Represented with |
---|---|---|
![]() |
background | 0 (zero) or . (dot) |
![]() |
source | ! |
![]() |
destination | @ |
![]() |
tile 1 | 1 |
![]() |
tile 2 | 2 |
![]() |
tile 3 | 3 |
![]() |
tile 4 | 4 |
![]() |
tile 5 | 5 |
![]() |
tile 6 | 6 |
![]() |
tile 7 | 7 |