• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[SOLVED] Additional SPRITE_* added to map always appears as player character.

2
Posts
109
Days
    • Seen Mar 19, 2024
    I have no idea why the SPRITE_OAK I've added to PalletTown.asm is showing up as the player character

    I've added cont PALLETTOWN_OAK at the top.
    Code:
        object_const_def
        const PALLETTOWN_TEACHER
        const PALLETTOWN_FISHER
        const PALLETTOWN_OAK

    And I've added an object_event SPRITE_OAK at the bottom.
    Code:
        def_object_events
        object_event  3,  8, SPRITE_TEACHER, SPRITEMOVEDATA_WANDER, 2, 2, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, PalletTownTeacherScript, -1
        object_event 12, 14, SPRITE_FISHER, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 2, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, PalletTownFisherScript, -1
        object_event 10,  5, SPRITE_OAK, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_OAK_IN_PALLET_TOWN

    But the sprite shows up as the player character with Oak's brown coloring.
    I've tried switching the sprite to SPRITE_SUPER_NERD to troubleshoot, and it still showed up as the player character, but this time with a blue coloring.

    I know the sprite for SPRITE_OAK works correctly in the game in-general, because when I walk into the OaksLab map, Oak is standing there with his appropriate sprite.

    I added the SPRITE_SUPER_NERD to Oaks Lab, and it shows up properly there...

    UPDATE: If I set the sprite to SPRITE_TEACHER or SPRITE_FISHER, they show up properly.
    I can only assume that only certain sprites are loaded for the PalletTown map, but I can't find anywhere where that would be specified elsewhere in the disassembly...

    UPDATE2: I added SPRITE_OAK to Route 1, he looks like the player character there too.
    I added new sprites for both Giovanni and a variable sprite Looker according to this tutorial:
    I added both of them to Pallet Town, they both look like the player character.
    I added both of them to New Bark Town, and they still look like the player character there, too.
     
    Last edited:
    2
    Posts
    109
    Days
    • Seen Mar 19, 2024
    I found what I was missing.
    \data\maps\outdoor_sprites.asm

    The sprites that were not showing properly were not defined in the list of sprites for that map group.
     
    Back
    Top