Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Goals:
- # Read last 2 numbers of [file name_##.bin]
- # Use that number to index file "tilesets.bin"
- # Save the value as "tileset"
- # if tileset = 00 then name "tileset_name" "Town"
- # if tileset = 01 then name "tileset_name" "Castle"
- # if tileset = 02 then name "tileset_name" "Volcano"
- # if tileset = 03 then name "tileset_name" "Cave"
- # if tileset = 04 then name "tileset_name" "Tower"
- # if tileset = 05 then name "tileset_name" "Shrine"
- # if tileset = 06 then name "tileset_name" "SkyPalace"
- # if tileset = 07 then name "tileset_name" "ToF"
- #
- # copy this to the top of each map, with only the [tileset_name] variable changing:
- #<?xml version="1.0" encoding="UTF-8"?>
- #<map version="1.2" tiledversion="1.3.4" orientation="orthogonal" renderorder="right-down" width="64" height="64" tilewidth="16" tileheight="16" infinite="0" nextlayerid="2" nextobjectid="1">
- # <tileset firstgid="1" source="Tilesets/[tileset_name].tsx"/>
- # <layer id="1" name="Tile Layer 1" width="64" height="64">
- # <data encoding="csv">
- #
- # If the read file is over 4069 bytes, its the Overworld, so set [tileset_name] to "Overworld" and
- # change width="64" and height="64" to 256
- #
- # Read 64 (or 256) bytes from file
- # convert hex to decimal, and put one "," after each number
- # after every 64 (or 256) bytes, start a new row
- # on the last byte of the file, do not put a "," after the number
- #
- # end with:
- #</data>
- # </layer>
- #</map>
- #
- # Save file as filename.tmx
- # For Tiled to Bin:
- # Read only the decimal numbers after <data encoding="csv">
- # convert decimal to hex, writing 4096 bytes (or more, for Overworld), until </data> is read
- # Save as filename.bin
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement