tilemap-studio icon indicating copy to clipboard operation
tilemap-studio copied to clipboard

Feature request: loading palette files

Open logicplace opened this issue 2 years ago • 4 comments

When I use the Image to Tiles tool on a PNG to export either GBC format with (almost) any palette format, it exports the proper palette but doesn't load it into the tool for editing. It "works" for indexed mode, though the actual palette isn't correct (didn't check the export for it, tho). I also don't see any button for loading palettes manually but maybe I'm missing something.

I tried GBA mode and it seems to work fine there, unfortunately this work is for GBC.

It's not that it's unusable without the palette or anything, just a bit harder to differentiate which palette is in use for a tile when placing tiles (have to switch tabs and remember which is which).

tl;dr Expected: load palette from respective file in GBC modes; and/or manual palette load button Actual: no palette loaded, just uses grayscale/bold palette per setting (rainbow doesn't seem to do anything)

logicplace avatar Apr 27 '22 04:04 logicplace

There is no feature yet to read palettes. When you generate a palette to be indexed within the tileset PNG, it is all there, but the tiles will all use the first palette. This is based on how multi-palette PNGs in pokeemerald work, like https://github.com/pret/pokeemerald/blob/master/graphics/slot_machine/menu.png and https://github.com/pret/pokeemerald/blob/master/graphics/frontier_pass/bg.png. It's definitely a feature I'd like to add, but would require significant internal changes to work well.

Rangi42 avatar Apr 27 '22 18:04 Rangi42

Since this is now a full feature request, one thing I'd like to add is that, I believe this tool will primarily be for hacking existing games, so it seems reasonable that when doing a Image to Tiles conversion one could restrict the palette to an existing one so that it doesn't change (and thus require you to find and change the palettes in the ROM when doing so is generally unnecessary).

The portions of that request which affect the actual conversion tool can be a separate ticket if you prefer, but I expect it ties into this request a bit, as well.

logicplace avatar Apr 27 '22 18:04 logicplace

Yes, #10 already discusses that as "indexed palette input" re: using the indexed palette of the mockup image for the tileset image. When/if I implement reading separate palette files for rendering the tilemap, it would make sense to allow them for inputting a palette too. (Note that [superfamiconv](https://github.com/ISSOtm/SuperFamiconvX can already do this as a command-line program. It also lets you specify a pre-existing tileset image, to just generate the tilemap.)

Rangi42 avatar Apr 27 '22 19:04 Rangi42

Ahh that post makes a lot more sense now. And thanks for the tip!

logicplace avatar Apr 27 '22 19:04 logicplace