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)
ROM hack: Pokémon Polished Crystal — version 2.2.0 released!