Graphics in Excel (New: 'Tiled' Map Translation Tools!)

Discussion of hardware and software development for Super NES and Super Famicom. See the SNESdev wiki for more information.

Moderator: Moderators

Forum rules
  • For making cartridges of your Super NES games, see Reproduction.
User avatar
rainwarrior
Posts: 8732
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Graphics in Excel (New: TileMap Editor)

Post by rainwarrior »

Okay, well I wish someone had told me about pip (so, thanks for telling me about it now). I remember trying to get PIL running on Windows Python 3.4 took me a couple of hours.
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Graphics in Excel (New: TileMap Editor)

Post by tepples »

The reason you may not have heard of it might be that only recently did PSF start to bundle pip with Python for Windows.
User avatar
ikari_01
Posts: 141
Joined: Sat Jul 04, 2009 2:28 pm
Location: Wunstorf, Germany

Re: Graphics in Excel

Post by ikari_01 »

Ramsis wrote:
93143 wrote:
Ramsis wrote:disable echo
Why?
Sorry, no clue whatsoever. :P
You only need to disable echo if you don't plan on initializing/using the S-DSP at all.
If you don't disable echo on the uninitialized DSP it might play back the current contents of the echo buffer, resulting in static noise/buzzing.
93143
Posts: 1717
Joined: Fri Jul 04, 2014 9:31 pm

Re: Graphics in Excel (New: TileMap Editor)

Post by 93143 »

Thanks; that's good to know. It seemed like a really weird and even unfortunate requirement, but that makes sense.
User avatar
Khaz
Posts: 314
Joined: Thu Dec 25, 2014 10:26 pm
Location: Canada

Re: Graphics in Excel (NEW: Map Tools with Tiled Support)

Post by Khaz »

Hi guys, been a while. I decided my last approach at map editing was impractical, so I tried using Tiled ( http://www.mapeditor.org/ ) and translating its output into something I can use instead. Thought I'd share what I came up with, sorry that it's more VBA macros.

Brief description of what they all do:
* DrawPaletteSheetFromHex - Renders a palette sheet according to the hex values in it
* DrawTileSet - Renders tile set in a different palette
* ExportMapAsBitmap - Creates a 16-color bitmap image of your map, using the tile set and palettes in the excel file (uses the sheet labelled "TILE SET").
* ExportSNESMap - Creates a .inc file containing your map in a WLA-readable format.
* ExportTilesetAsBitmap - Creates a 16-color bitmap image of your tileset (for use in Tiled)
* ExportTMX - Creates a .tmx file for Tiled of the active map sheet. Can add layers as desired. Object layer support pending
* ImportPalettes - Reads data from a SNES-formatted file to populate Palettes worksheet
* ImportSNESMap - Reads a text file containing a map in a WLA-readable format and dumps it to a new worksheet
* ImportSNESTileSet - Reads a text file containing a tile set in a WLA-readable format and dumps it to a new worksheet
* ImportTMX - Creates map sheets and object list sheets as needed to dump data from a Tiled .tmx file into excel
* PaletteShiftMap - For tweaking palette numbers en masse in map sheets. The macro explains how it's used in detail when you run it.

Things to know:

* As before, edit the VBA code and change "rootpath" at the top to somewhere you'd like the program to save files to before first use. Default is "E:\SNES\"
* Tiled supports V/H tile flipping, but also tile rotation. Rotated tiles will cause errors of some sort.
* Tiled has no direct way of handling palettes or priority of tiles
* Tiled requires at least one tile set in a TMX file. When writing a TMX file this program presumes a generic 256x128 file TileSet.bmp to be present for the tmx file to use.
* Supports up to 4 tile sets in 1 file
* Macros designed with 16x16 tile size in mind, if you encounter 8x8 problems let me know

If people find this useful I'm willing to maintain and expand this set of tools to improve it. Let me know what you think, if anyone here tries it out.
Attachments
MapReaderTILED.xlsm
Excel VBA tools for converting maps between SNES and Tiled TMX format
(424.13 KiB) Downloaded 178 times
Post Reply