#21 Allow maps to be defined in an ascii art file

open
nobody
None
5
2009-10-19
2009-10-19
No

Allow maps to be defined in an ascii art file

Discussion

  • Example of how this works:

    <map id="0" type="world" fname="custom-world.map" isAscii="true" width="19" height="17" levels="1"
    borderbehavior="wrap" showavatar="true" music="1" tileset="base" tilemap="base">
    </map>

    custom-world.map:
    ##.####--===~~~~~=-
    #$...;;;--===~~~~=-
    .....;;;;-====~~~=-
    .*........---==~~=-
    ............-====--
    ..........@..----^^
    ............::|:^^^
    ..+........:!!-:^#^
    ..........:!!!!:^^^
    -.........::!!:::^^
    ===--|-...%::::::..
    -..........^.......
    ...................
    ........CANDY......
    .?.......[&].......
    ........LA.ND......
    ...................

    subset of modified tilemap-base.xml:
    [...]
    <mapping symbol="~" tile="sea"/>
    <mapping symbol="=" tile="water"/>
    <mapping symbol="-" tile="shallows"/>
    <mapping symbol=";" tile="swamp"/>
    <mapping symbol="." tile="grass"/>
    <mapping symbol=":" tile="brush"/>
    <mapping symbol="!" tile="forest"/>
    <mapping symbol="^" tile="hills"/>
    <mapping symbol="#" tile="mountains"/>
    <mapping symbol="$" tile="dungeon"/>
    <mapping symbol="*" tile="city"/>
    <mapping symbol="@" tile="castle"/>
    <mapping symbol="+" tile="town"/>
    <mapping symbol="[" tile="lcb_west"/>
    <mapping symbol="&" tile="lcb_entrance"/>
    <mapping symbol="]" tile="lcb_east"/>
    [...]