The input text is now expected to be a toml file with a leading comment section defining the battle map, according to the following rules: 1. Blank lines are ignored 2. Lines at the top of the file beginning with '#', optionally with leading spaces, is treated as map data 3. Map data continues until the first line not starting with a #. 4. Any subsequent lines are treated as metadata in toml format. 5. The metadata must contain the [map] section. 6. The [map] section must contain the "name" attribute. The metadata is available as BattleMap.metadata; the map source is available as BattleMap.map_string. New convenience properties ahve been added to the BattleMap class for accessing portions of the text-only output. This includes the header and footer attributes.
42 lines
645 B
TOML
42 lines
645 B
TOML
# ..... 1
|
|
# ..... ..... 2
|
|
# ..........D....
|
|
# ..... ..D..
|
|
# .
|
|
# .
|
|
# S.........
|
|
# . .
|
|
# . .
|
|
# ..... 3 .L.... 4
|
|
# ..... ......
|
|
# ..... ......
|
|
# ....v.
|
|
#
|
|
# .^.........
|
|
# ...,,,,,...
|
|
# ...,___,...
|
|
# ...,,,,,...
|
|
# ........... 5
|
|
#
|
|
|
|
[map]
|
|
name = "Five Room Dungeon"
|
|
description = "An example dungeon"
|
|
author = "evilchili <hello@evilchi.li>"
|
|
license = "CC0"
|
|
|
|
[1]
|
|
description = "First Room"
|
|
|
|
[2]
|
|
description = "Second Room"
|
|
|
|
[3]
|
|
description = "Third Room"
|
|
|
|
[4]
|
|
description = "Forth Room"
|
|
|
|
[5]
|
|
description = "Fifth Room"
|