Pyxel Edit Forum Archive
ArchiveBug reports

Same Tile Ends Up With Different Colors

K
Kasumi
Jul 23, 2014 at 2:19 am
Here's an odd thing I've been encountering recently. When I right click to select a tile, the blue in that tile will be replaced with white.

When I alt+click to color drop from the white part of the tile, it gives me white. When I alt+click to color from from the blue part of the same tile, it gives me blue. But... it's the same tile in the same location. See the .gif.

I've now realized a large part of my tileset has white instead of blue, and yet the file loads/saves fine displaying the blue instead of the white until changes are made. All of that's pretty scary and I don't know what I might have done to cause it. Might have been sessions ago, since it seems to be persistent across loads.

Edit: Ugh... I just unzipped the .pyxel, and it seems like my tileset got corrupted somehow. layer0.png is fine, most tileX.png images now have white instead of the blue, except for a few that are just... mostly white where they're supposed to be blue, and somewhat blue in random spots. This would be fairly easy to manually fix, except there are tiles that contain both white AND blue that were affected.

So... I could reimport layer 0.png and then make the tileset order like it was I guess. Wish I knew what caused it. (For the record, I've never manually edited the .pyxel before, so it's not power user meddling.)

Edit2: Actually... there's a lot of reasons I don't necessarily want to recover this manually. I thought I was being careful by saving multiple versions of this. But apparently version 49 (current), and 48 have this white issue. There's at least one case where I have two tiles that are made not different due to the white replacing the blue, which have since been merged. This means even the tile info in the json is "wrong" for my data. I was hoping I could just grab tiles from older versions and save the set, but with that being done the map itself is also wrong.

Reimporting means the huge blank space around my actual tiles then become mapped instead of unmapped...

I guess I should figure out what I did to make this happen.
Danik
Jul 23, 2014 at 6:54 am
That's odd. :(
Could you possibly send me the .pyxel file so I can take a look?

Which version are you using, 0.3.107?
Do the tiles have the white or blue in the tileset panel?
Are you using tile transformations?
Did you use the fill tool with "fill outside tile boundries", holding shift? (I have found a bug where filling outside tile bounds into other mapped tiles means those tiles are not restored on undo)

It obviously seems the canvas and the tile data has gotten out of sync.

The easiest fix I think would be to place the affected tiles in the canvas and fill the white parts, but I realize this could take time with a lot of tiles.

The upcoming version (0.3.108) will have a feature to remove all references to a tile, which could be used when you reimport and get large areas of a certain tile. In the current version (0.3.107) you could delete that tile to remove all references, and then recreate it. It won't help non-identical tiles getting merged though.
K
Kasumi
Jul 23, 2014 at 7:46 am
After all the complaining, I've already soldiered on and got my file back. (I figured out the delete/readd the tile thing, hurray!)

An issue with filling was that there are some blue parts that became white which were also touching things that were actually meant to be white, heh.

Yes, version is 0.3.107.

They have white in the tileset panel. Any tile that is drawn on that has the white on the tileset panel will have its blue parts become white.

No (intentional) transformations because NES doesn't support them.

I do recall using a fill outside the boundaries by accident which I promptly undid. I... probably wasn't holding shift, but that might be it honestly. (Also explains how some parts of tiles are still blue. They were likely just not accessible by the fill.)

I will PM you the three latest .pyxels shortly after I post this. The latest uncorrupted and the two corrupted.

Edit: Fixed some of the weird paragraph breaks after words that didn't appear in the preview...
Danik
Jul 23, 2014 at 9:06 am
Ah, that is probably what happened then. I will fix the bug asap.
I'm glad you managed to fix the document.