Closed bbb651 closed 9 months ago
glad to hear it's helped you!
Nice idea, I've made the change. If you choose "slices" and then "subdivide slices" I think that'll do what you want -- converting a "snowman" slice into "snowman0", "snowman1", "snowman2", etc
First of all thank you so much for making this script, I've been working on my first PuzzleScript game and it's been incredibly helpful :)
One thing I noticed is that it doesn't handle splitting sprites that are larger than 5x5 to multiple PuzzleScript sprites, instead outputting one large one (which might be useful for forks? I don't know if there are any that allow increasing sprite size). It's not that big of a deal for small sprites but with multiple multi-sprite sprites it gets a bit tedious to rename all the slices. I've tried integrating Better Slicer but it deletes all other slices in the file and supports only one selection so it doesn't work.
I think it should automatically detect when when the width or height is greater than 5 for each zone and output multiple sprites with a suffix like
x{x}y{y}
or_{index}
or something like that.I'll try to see if I can do a pr, I've barely used lua so I'll see how it goes. I've actually already made a very similar script to this in python before I found your script (I just uploaded it and I'll share it in the thinky games discord in-case someone will find it useful, the code is kinda horrible though xD), but it's more orientated towards backgrounds that you export once rather than a split sprite as part of a workflow. Hence the whole random-unicode-character-assignment part.