I made this script a month ago to help with my SNES game. While I have some intuition for whether something might fit in a 256 tile limit, I have no idea how to tell whether or not something would fit in a 1024 tile (or more, with multiple layers) limit. So I fixed it by making a script that looks at the tilemap layers on the current sprite's current frame, and calculates how many unique 8x8 tiles there are, keeping flips in mind. That way I can just check it as I draw.
I previously made another script that lets you quickly switch between different palettes on the same image, because I like to draw tile sets as PNG files, sometimes it makes a lot of sense to have tiles with multiple palettes represented in the same PNG. This is a lot like changing the palette around in a VRAM viewer to choose which of the tiles should look correct. I know you can just have a long PNG palette with multiple SNES palettes in there but I feel like that could get messy.
Link here: https://github.com/NovaSquirrel/AsepriteScripts
Aseprite tilemap layer unique tile counter
Moderator: Moderators
Forum rules
- For making cartridges of your Super NES games, see Reproduction.
- NovaSquirrel
- Posts: 483
- Joined: Fri Feb 27, 2009 2:35 pm
- Location: Fort Wayne, Indiana
- Contact:
- rainwarrior
- Posts: 8731
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Re: Aseprite tilemap layer unique tile counter
Woah I did not realize Aseprite had Lua capabilities now! Neat!
- NovaSquirrel
- Posts: 483
- Joined: Fri Feb 27, 2009 2:35 pm
- Location: Fort Wayne, Indiana
- Contact:
Re: Aseprite tilemap layer unique tile counter
I added another script that flattens the image temporarily and then counts the unique tiles on the image as a whole. This means it works for both tilemaps and regular layers (without me having to have any code to handle tilemaps specifically ) and it's good for things like game backgrounds.