16 users online: Anas, Darkanine, Lane, LightAligns,  MarioFanGamer, MORC, nicolascrafter, Ralshi02, Romano338, SFan, Shuttles, solgaleo35, SolveForX, SoSure, Spicy Jalapeno, WarioWill - Guests: 67 - Bots: 290
Users: 55,720 (2,334 active)
Latest user: taste1122

PIXI v1.2: Some Sprite Insertion Tool of Sorts

I have repatched using Lunar IPS and updated the links above. Thank you for your help.
Your rom has conflicting Exntended NSTL patch and PIXI's custom cluster sprites routine.

1) don't use Extended NSTL patch (recommended)
Since NSTL routine is slow, I think should not use as extended, minor and cluster sprites in non sa-1 rom.

2) replace cluster.asm to this file
probably works fine. but when implement custom minor sprites feature on PIXI, would be occur same issue.
Thank you so much, Akaginite, your second solution works absolutely perfect for my needs so far. And thank you for locating the problem area as well, you rock!

Looks like that i patched the NSTL patch while i'm making my hack.
And now? What will i do? Is there something better than NSTL patch?
If you used Extended No More Sprite Tile Limits, than try this.
Pixi DOES works perfectly fine with ordinary NSTL. If you Have NSTL, but don't have ENSTL, than it's problem with something else.

Or just use the cluster.asm file Akaginite linked if you really did apply extended NSTL
I figured out why extra bytes aren't loaded properly in vertical levels.

The code responsible for loading extra bytes is in PIXI's SubLoadHack. It's executed at $02A963, which is the routine for loading sprite data... Except it also isn't.

A couple of instructions earlier, at $02A93C, the game checks if the level is vertical and runs separate code for it. The code which loads sprites in vertical levels is hijacked at $02A94B to run SubLoadHack2, which is nearly equivalent to SubLoadHack, except it doesn't load the extra bytes, so it leaves them undefined. To fix it, take everything between the PHY and the PLY from SubLoadHack (the code which loads extra bytes) and put it before the PLA in SubLoadHack2. This is what it should look like.

Looking at it closer, SubLoadHack is identical to SubLoadHack2, so the latter is unnecessary.

Edit: SubLoadHack and SubLoadHack2 are not identical, because X and Y positions are swapped in vertical levels. Do not merge them if you do this fix.
Huh, so Nintendo considered vertical levels like a different game mode or something?

Also, I've used ASAR on my ROM and am still concerned about that bug with the level-specific sprites...
Let's milk Sunny Milk. Then she'll have enough money to fund Sunny Milk Real Estate.
Everypony's digging with a shovel
What are you concerned about?
Asar does not do anything to your rom the patch you apply doesn't tell it to do. The levelspecific Sprite bug people are talking about is just a softlock in asar, nothing that would affect your rom in anyway. All it does is causing pixi to not insert sprites.

Also, I it didn't consider vertical level it's own gamemode, probably just a different loading code because the layout is completely different which is unrelated to the gamemodes themselves
Okay, that's good to know. Still waiting on the remoderation and if necessary PIXI (and GPS) to update, though.
Let's milk Sunny Milk. Then she'll have enough money to fund Sunny Milk Real Estate.
Everypony's digging with a shovel
I hope I can get GPS done by the end of the week, as for PIXI who knows when that'll be updated.
Dunno about the remoderation either though there isn't too much left
Well, doesn't seem like my ROM is compatible with Pixi. I tried several list setups, the donut lift is in an incompatible format, it can't load subfolders, and when I finally get it down to just the default three it just freezes. I'll have to just use vanilla sprites for everything...

Here's the last thing I tried to insert:
00 level_ender.cfg
10 roto_disc.cfg
1A piranha_sideways.cfg
Let's milk Sunny Milk. Then she'll have enough money to fund Sunny Milk Real Estate.
Everypony's digging with a shovel
Freeze as in it doesn't show the "Sprites inserted successfully" message?
Or freeze as in actual crash?

If it's the former try my version of PIXI
If it's the latter I have no idea.
It inserts the three sprites, then, I forgot exactly what it said, but it more or less softlocks, like it's waiting for something that's missing. Still doesn't help with the return error in one of the sprites or ignoring the subfolders, though...
Let's milk Sunny Milk. Then she'll have enough money to fund Sunny Milk Real Estate.
Everypony's digging with a shovel
1) Yeah, sounds like the softlock my version is supposed to fix. It's a bug in asar, not really PIXI's fault.

2) No idea what return error you're talking about.

3) What exactly is not working about subfolders? They work perfectly fine for me.
1. So, what exactly is causing it? Some incompatible ASM? Does it work if I actually insert 177+ sprites without leaving any gaps?

2. Something about a return error in the Donut Lift, I wonder if I'm missing something?

3. Either I'm using the wrong slashes or it just doesn't seem to be working on my end...
Let's milk Sunny Milk. Then she'll have enough money to fund Sunny Milk Real Estate.
Everypony's digging with a shovel
1 I don't know if anyone really knows what is causing it. It has to do with asars freedata align command, but as far as I know no one actually knows what circumstances cause it to softlock.
How many sprites you insert does not seem to affect the softlock in any way though

2 what does the error say?

3 forward slashes should work. (You do mean inside the Sprite list, right?)
1. So it seems to just be a random edge case like DK64's memory leak? That doesn't sound too promising...

2. I forgot what it said. I'll have to try it again. It might be due to the fact I'm not assigning it a block to spawn.

3. I'll try that. And yes, it's the List.txt.

Also, are there graphics for the included sprites somewhere?
Let's milk Sunny Milk. Then she'll have enough money to fund Sunny Milk Real Estate.
Everypony's digging with a shovel
Originally posted by Wiimeiser

Also, are there graphics for the included sprites somewhere?

In your PIXI folder, should be a folder called Graphics for Included Sprites
Happy early Christmas from the ghost of past-perfect Christmas.
So yeah, I decided to finally pull through on this. Fun fact, I was actually done for a while on most pixi related stuff and only had the CFG-Editor left to worry about. Well, some other pixi stuff did come up eventually so meh.

Anyway, here's v1.02 which is also, most likely, the last version I actively worked on.
That is to say, I've kinda lost motivation for SMW as a whole and working on this tool doesn't really help. I'll do any important bug fix patches or so but other than that I guess this is now free for everyone.
If you want to keep a common source, you can either just file pull-request on github or I could try adding you as editor or whatever it's called, just fire me an email (see profile, not a PM as I likely won't check them).

So yeah, let's get over whats new.
Biggest change is the introduction of json instead of the old cfg files for sprites. The old cfg files will remain compatible but I'd recommend switching over to json. You can use the included CFG-Editor for that. Just note that when opening files, you need to select *.cfg files otherwise it will only show .json.
Json now presents a much more humanly readable and manageable format (except for the base64 encoded stuff).

The new json files can now also contain information on how to display the sprite within Lunar Magic. I tried to replicate the LM editor but it ended up having some shortcomings, it get's the job done though (note to self, use streams next time instead of arrays).
Basically this means that pixi will now create the .ssc, .mwt, .mw2, .s16 files for you:

I added an option to disable the per level sprites feature, since it still causes problems with "freedata align" (a bug within asar). Running the tool with the option -npl (no per level) will have it insert things like normal sprite tool.
You should pay attention though to not use this feature if you have any sprites B0-BF already inserted in levels. Pixi sets the sprites B0-BF to be 7 bytes long by default (3+4 extra bytes as we don't know the per-level needed amount) where as in normal mode it will insert with the actual number selected in the cfg/json file. As such, it could corrupt levels due to sprite size changes.

I've added the option to change the asm path for all you lunatics who throw everything in one huge directory and somehow expect things not to crash...
The tool should now also handle situations where the rom is not in the same folder as the tool better by actually converting the paths to a relative point (either the exe or the rom).
That is to say, paths like sprites, routines, asm, etz. (even when changed via command line) will always use the location of pixi as a reference. Whereas the list file will always use the location of the rom as a reference. Suppose you have:


Then when executing, the tool will use:
and so on.

Couldn't really get to include OW sprites since converting Lui's patch to work with pixi defines is a nightmare. Including the actual functionality within pixi would be no trouble at all (is mostly done and commented out already).
If someone were to pick it up in the future, I'm sure you can just copy-paste most of it. Have it also use .json for ow sprites so that it's possible to create the display files for the OW like for levels now.

Download: SMWC (under moderation) (accepted), GitHub
Anime statistic on MyAnimeList:
400 animes completed ✓
6000 episodes completed ✓
100 Days completed ✓
... what even am I doing with my life?