Advertisement
Guest User

Untitled

a guest
Jul 3rd, 2020
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.63 KB | None | 0 0
  1. # Goals:
  2. # Read last 2 numbers of [file name_##.bin]
  3. # Use that number to index file "tilesets.bin"
  4. # Save the value as "tileset"
  5. # if tileset = 00 then name "tileset_name" "Town"
  6. # if tileset = 01 then name "tileset_name" "Castle"
  7. # if tileset = 02 then name "tileset_name" "Volcano"
  8. # if tileset = 03 then name "tileset_name" "Cave"
  9. # if tileset = 04 then name "tileset_name" "Tower"
  10. # if tileset = 05 then name "tileset_name" "Shrine"
  11. # if tileset = 06 then name "tileset_name" "SkyPalace"
  12. # if tileset = 07 then name "tileset_name" "ToF"
  13. #
  14. # copy this to the top of each map, with only the [tileset_name] variable changing:
  15. #<?xml version="1.0" encoding="UTF-8"?>
  16. #<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">
  17. # <tileset firstgid="1" source="Tilesets/[tileset_name].tsx"/>
  18. # <layer id="1" name="Tile Layer 1" width="64" height="64">
  19. # <data encoding="csv">
  20. #
  21. # If the read file is over 4069 bytes, its the Overworld, so set [tileset_name] to "Overworld" and
  22. # change width="64" and height="64" to 256
  23. #
  24. # Read 64 (or 256) bytes from file
  25. # convert hex to decimal, and put one "," after each number
  26. # after every 64 (or 256) bytes, start a new row
  27. # on the last byte of the file, do not put a "," after the number
  28. #
  29. # end with:
  30. #</data>
  31. # </layer>
  32. #</map>
  33. #
  34. # Save file as filename.tmx
  35.  
  36. # For Tiled to Bin:
  37. # Read only the decimal numbers after <data encoding="csv">
  38. # convert decimal to hex, writing 4096 bytes (or more, for Overworld), until </data> is read
  39. # Save as filename.bin
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement