Language…
6 users online: Cristian Cardoso, fsvgm777, JezJitzu, KoJi, playagmes169, stormitive - Guests: 239 - Bots: 356
Users: 64,795 (2,377 active)
Latest user: mathew

Creating new sprites?

Hi,
I'm completely new to Lunar Magic and YY-CHR. I am wanting to create some completely new sprites that don't replace the existing sprites -- is that possible?

Secondly, I've edited some existing sprites -- how would I go about changing the palette used with that sprite? I'm wanting to make a blue box/platform instead of yellow, but it comes out as kind of glass-like. Blue seems to activate a transparency. Any way around this?
Thanks


Well, there's a couple things depending on what specifically you want to do.

If you want to change the graphics of a sprite to something different, then you would use YY-CHR to create ExGFX. ExGFX lets you insert addional graphics which don't completely replace the original graphics, and rather let you change them on a per-level basis.

If you're looking to create completely-new sprites, you would have to learn ASM (or check the sprite section for what you want). I'd recommend this tutorial for an introduction to ASM, and this one for coding specifically sprites. You can then insert the sprite with Pixi.
Should also be noted that the sprite section includes disassemblies of most of the original sprites as well, which you can use if you need copies of the original sprites with modifications to their graphics or behavior.


Now, for your other question about changing the palette, the transparency thing is probably due to color math. Color math is an SNES feature that lets you "blend" multiple layers of the screen together, producing translucent effects like that. For sprites, though, color math only applies to palettes C-F (not 8-B), which is probably why only that palette has the effect. As for why that's currently happening, you might have color math enabled through the level mode (in #lm{MARIO69}); check the upper digit of the "CGADSUB" value there for whatever setting you pick. If the upper digit is odd, then color math is enabled for sprites, so you get that translucency.

If you actually do want to change a sprite's palette, though, there's a couple of ways. If it is a sprite from the original game, try using Tweaker to change the palette; if a custom sprite, use the CFG editor included with Pixi to edit the sprite's CFG/JSON file. You'll see a palette dropdown in either.
That's not a guaranteed fix, though, as not all sprites use that value for the palette. In some cases, it may be defined as part of the actual code. For original-game sprites, you'll have to search the ROM map for the spot, while for custom sprites you'll have to check the actual ASM file (usually, the values should be in a table or define at the top of the sprite). Generally, these values will be in the YXPPCCCT binary format.

Professional frame-by-frame time wizard. YouTube - Twitter - SMW Glitch List - SMW Randomizer