You are not logged in.
I'm trying to add Lorelei to the Ice Path. It's simple enough to add a new person_event with a Lass sprite. But when I change it to use SPRITE_LORELEI, the other sprites glitch: the nearby smashable rock turns into the player sprite, and the player turns into a smashable rock depending on how you face+walk.
I've been having similar issues with outdoor maps that depend on their group's sprites being declared in engine/overworld.asm, but didn't expect any problems with an indoor map.
Here's everything I did to add a Lorelei sprite to the game. Is there something I missed?
• constants/sprite_constants.asm: Add "const SPRITE_LORELEI" after "const SPRITE_STANDING_YOUNGSTER".
• gfx/overworld/sprite_headers.asm: Add "LoreleiSprite: sprite_header LoreleiSpriteGFX, 3, WALKING_SPRITE, PAL_OW_RED" after "StandingYoungsterSprite".
• gfx/overworld/sprites_3.asm: Add "LoreleiSpriteGFX: INCBIN "gfx/overworld/102.2bpp"" after "StandingYoungsterSpriteGFX".
• gfx/overworld/102.2bpp: This image, the same size as other walking sprites, converted to 2bpp with gfx.py.
• main.asm: Add "SECTION "sprites_3", ROMX INCLUDE "gfx/overworld/sprites_3.asm"" after "SECTION "sprites_2"". (There's no room for more sprites in that section.)
• maps/IcePathB3F.asm: Add a "person_event" that uses SPRITE_LORELEI. (Using SPRITE_LASS works just fine.)
I tried adding SPRITE_LORELEI as one of the Group3Sprites in engine/overworld.asm just in case, but of course that didn't fix it.
Here's BGB's view of the VRAM in both cases. I don't understand why changing LASS to LORELEI makes the rock and Poké Ball load in different locations.
Edit: I rearranged the three person_events so Lorelei is the last one—now it's SPRITE_POKE_BALL, SPRITE_ROCK, SPRITE_LORELEI instead of SPRITE_LORELEI, SPRITE_POKE_BALL, SPRITE_ROCK. And the problem has disappeared. All three sprites, plus the player, look correct, even after I open and close menus. Interestingly, SPRITE_POKE_BALL is 083.2bpp, SPRITE_ROCK is 088, and SPRITE_LORELEI is 102. Is this an unmentioned requirement of the person_events, that they have to be ordered by sprite ID? Or is the reordering just coincidentally hiding some deeper bug with my code?
Last edited by Rangi (2016-06-19 04:13:38)
Has this issue ever been fully figured out? I'm in a very similar situation. I have a the same setup with a 3rd section containing two additional walking sprites that I'm trying to use inside a cave. If I only call one of them, as long as I call it last, I'm good to go. But if I try to call both, whichever one is last replaces the player sprite, and on opening text or a menu, the NPC and player both turn into player sprites. I'm confused because it doesn't seem to matter what I call last; if I create an NPC with SPRITE_OAK, then Oak will also replace the player in the same fashion. And I can use any combination of walking sprites in any order from the first two banks with no problem?