git repos / blockattack-game

blame: Game/mods/1.3.0.bricks_unpacked.data/README.md

normal view · raw

516d5b9f Poul Sander 2021-11-11 19:06 1
# 1.3.0.bricks
516d5b9f Poul Sander 2021-11-11 19:06 2
This is a sample mod for Block Attack - Rise of the Blocks.  
516d5b9f Poul Sander 2021-11-11 19:06 3
It changes the bricks to use the graphic from 1.3.0. Not that way are good but it shows how it works.
516d5b9f Poul Sander 2021-11-11 19:06 4
516d5b9f Poul Sander 2021-11-11 19:06 5
## Enabling mods
516d5b9f Poul Sander 2021-11-11 19:06 6
At the moment it is possible to start mod in two ways. Command line argument or mod file.
516d5b9f Poul Sander 2021-11-11 19:06 7
516d5b9f Poul Sander 2021-11-11 19:06 8
### Command line
50644cb7 Poul Sander 2022-01-18 19:14 9
```bash
516d5b9f Poul Sander 2021-11-11 19:06 10
./blockattack --mod MODNAME
516d5b9f Poul Sander 2021-11-11 19:06 11
# Example:
516d5b9f Poul Sander 2021-11-11 19:06 12
./blockattack --mod 1.3.0.bricks
516d5b9f Poul Sander 2021-11-11 19:06 13
```
516d5b9f Poul Sander 2021-11-11 19:06 14
Mods loaded from command line are loaded last. They take priority over the mod file.
516d5b9f Poul Sander 2021-11-11 19:06 15
516d5b9f Poul Sander 2021-11-11 19:06 16
### Mod file
516d5b9f Poul Sander 2021-11-11 19:06 17
It is possible using a "mod_list.txt"-file in config directory.
3055700a Poul Sander 2022-01-10 19:01 18
* Windows: `%APPDATA%/blockattack/mod_list.txt`
3055700a Poul Sander 2022-01-10 19:01 19
* Linux: `$HOME/.local/share/blockattack/mod_list.txt`
516d5b9f Poul Sander 2021-11-11 19:06 20
516d5b9f Poul Sander 2021-11-11 19:06 21
The file is a csv-file without header and a line for each mod.
50644cb7 Poul Sander 2022-01-18 19:14 22
```csv
516d5b9f Poul Sander 2021-11-11 19:06 23
1.3.0.bricks,1
516d5b9f Poul Sander 2021-11-11 19:06 24
```
516d5b9f Poul Sander 2021-11-11 19:06 25
The fist column is the modname, the second column is "1" if enabled. A 0 means disabled. It is possible preserve the order while remembering the mod order.
516d5b9f Poul Sander 2021-11-11 19:06 26
516d5b9f Poul Sander 2021-11-11 19:06 27
## Mod structure
516d5b9f Poul Sander 2021-11-11 19:06 28
Mods override files from blockattack.data, so any file in blockattack.data can be modified and made into a mod.
516d5b9f Poul Sander 2021-11-11 19:06 29
New sprite files can also be created. See "Modinfo file".
516d5b9f Poul Sander 2021-11-11 19:06 30
516d5b9f Poul Sander 2021-11-11 19:06 31
## Modinfo file
516d5b9f Poul Sander 2021-11-11 19:06 32
The game contains a file modinfo/1.3.0.bricks.json which contains metadata about the mod.
516d5b9f Poul Sander 2021-11-11 19:06 33
Note that the filename MUST be "MODNAME.json". The game will only search for the modinfo file if a given mod has been loaded.
516d5b9f Poul Sander 2021-11-11 19:06 34
516d5b9f Poul Sander 2021-11-11 19:06 35
The file contains a "sprites" section. Sprite files mentioned in this value will be loaded in mod order, so the last loaded mod will take priority.
516d5b9f Poul Sander 2021-11-11 19:06 36
516d5b9f Poul Sander 2021-11-11 19:06 37
This allows you to override individual sprites from blockattack.data without replicating the entire file.
516d5b9f Poul Sander 2021-11-11 19:06 38
516d5b9f Poul Sander 2021-11-11 19:06 39
## Sprites
516d5b9f Poul Sander 2021-11-11 19:06 40
As mentioned sprites can be overridden. The documentation for Saland Adventures https://salandgame.github.io/development_info/sprites/ also applies to Block Attack - Rise of the Blocks.
516d5b9f Poul Sander 2021-11-11 19:06 41
325b4507 Poul Sander 2021-11-16 19:59 42
## Example
325b4507 Poul Sander 2021-11-16 19:59 43
The example example mod features the following:
325b4507 Poul Sander 2021-11-16 19:59 44
textures/ball_*.png just overwrites files in blockattack.data
325b4507 Poul Sander 2021-11-16 19:59 45
325b4507 Poul Sander 2021-11-16 19:59 46
The example mod add one new texture "textures/bricks130.png" or just "bricks130".
325b4507 Poul Sander 2021-11-16 19:59 47
325b4507 Poul Sander 2021-11-16 19:59 48
The sprite file "sprites/bricks1.3.0.sprite" uses the "bricks130" texture.
325b4507 Poul Sander 2021-11-16 19:59 49
325b4507 Poul Sander 2021-11-16 19:59 50
The mod file "modinfo/1.3.0.bricks.json" refers the sprite file so that it takes priority.
325b4507 Poul Sander 2021-11-16 19:59 51
516d5b9f Poul Sander 2021-11-11 19:06 52
## Tips
325b4507 Poul Sander 2021-11-16 19:59 53
Use lowercase letters for all filenames. This prevents surprises when developing on case insensitive file systems.
516d5b9f Poul Sander 2021-11-11 19:06 54
516d5b9f Poul Sander 2021-11-11 19:06 55
Create new sprite files rather than overwriting an existing one. Failure to do so might result in mod conflicts.
1970-01-01 00:00 56