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
516d5b9f Poul Sander 2021-11-11 19:06 3
This is a sample mod for Block Attack - Rise of the Blocks.  
516d5b9f Poul Sander 2021-11-11 19:06 4
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 5
516d5b9f Poul Sander 2021-11-11 19:06 6
## Enabling mods
516d5b9f Poul Sander 2021-11-11 19:06 7
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 8
516d5b9f Poul Sander 2021-11-11 19:06 9
### Command line
516d5b9f Poul Sander 2021-11-11 19:06 10
```
516d5b9f Poul Sander 2021-11-11 19:06 11
./blockattack --mod MODNAME
516d5b9f Poul Sander 2021-11-11 19:06 12
# Example:
516d5b9f Poul Sander 2021-11-11 19:06 13
./blockattack --mod 1.3.0.bricks
516d5b9f Poul Sander 2021-11-11 19:06 14
```
516d5b9f Poul Sander 2021-11-11 19:06 15
Mods loaded from command line are loaded last. They take priority over the mod file.
516d5b9f Poul Sander 2021-11-11 19:06 16
516d5b9f Poul Sander 2021-11-11 19:06 17
### Mod file
516d5b9f Poul Sander 2021-11-11 19:06 18
516d5b9f Poul Sander 2021-11-11 19:06 19
It is possible using a "mod_list.txt"-file in config directory.
516d5b9f Poul Sander 2021-11-11 19:06 20
  * Windows: `%APPDATA%/blockattack/mod_list.txt`
516d5b9f Poul Sander 2021-11-11 19:06 21
  * Linux: `$HOME/.local/share/blockattack/mod_list.txt`
516d5b9f Poul Sander 2021-11-11 19:06 22
516d5b9f Poul Sander 2021-11-11 19:06 23
The file is a csv-file without header and a line for each mod.
516d5b9f Poul Sander 2021-11-11 19:06 24
```
516d5b9f Poul Sander 2021-11-11 19:06 25
1.3.0.bricks,1
516d5b9f Poul Sander 2021-11-11 19:06 26
```
516d5b9f Poul Sander 2021-11-11 19:06 27
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 28
516d5b9f Poul Sander 2021-11-11 19:06 29
## Mod structure
516d5b9f Poul Sander 2021-11-11 19:06 30
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 31
New sprite files can also be created. See "Modinfo file".
516d5b9f Poul Sander 2021-11-11 19:06 32
516d5b9f Poul Sander 2021-11-11 19:06 33
## Modinfo file
516d5b9f Poul Sander 2021-11-11 19:06 34
516d5b9f Poul Sander 2021-11-11 19:06 35
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 36
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 37
516d5b9f Poul Sander 2021-11-11 19:06 38
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 39
516d5b9f Poul Sander 2021-11-11 19:06 40
This allows you to override individual sprites from blockattack.data without replicating the entire file.
516d5b9f Poul Sander 2021-11-11 19:06 41
516d5b9f Poul Sander 2021-11-11 19:06 42
## Sprites
516d5b9f Poul Sander 2021-11-11 19:06 43
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 44
325b4507 Poul Sander 2021-11-16 19:59 45
## Example
325b4507 Poul Sander 2021-11-16 19:59 46
The example example mod features the following:
325b4507 Poul Sander 2021-11-16 19:59 47
textures/ball_*.png just overwrites files in blockattack.data
325b4507 Poul Sander 2021-11-16 19:59 48
325b4507 Poul Sander 2021-11-16 19:59 49
The example mod add one new texture "textures/bricks130.png" or just "bricks130".
325b4507 Poul Sander 2021-11-16 19:59 50
325b4507 Poul Sander 2021-11-16 19:59 51
The sprite file "sprites/bricks1.3.0.sprite" uses the "bricks130" texture.
325b4507 Poul Sander 2021-11-16 19:59 52
325b4507 Poul Sander 2021-11-16 19:59 53
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 54
516d5b9f Poul Sander 2021-11-11 19:06 55
## Tips
325b4507 Poul Sander 2021-11-16 19:59 56
Use lowercase letters for all filenames. This prevents surprises when developing on case insensitive file systems.
516d5b9f Poul Sander 2021-11-11 19:06 57
516d5b9f Poul Sander 2021-11-11 19:06 58
Create new sprite files rather than overwriting an existing one. Failure to do so might result in mod conflicts.
1970-01-01 00:00 59