• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • There is an important update regarding account security and 2FA. Please click here for more information.
  • 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.
  • Imgur has blocked certain regions from viewing any images uploaded to their site. If you use Imgur, please consider replacing any image links/embeds you may have on PokéCommunity so everyone can see your images. Click here to learn more.

[Other] Get tile number

  • 88
    Posts
    14
    Years
    • Seen Jun 18, 2020
    Hi,

    Is there any way to get the tile number at a given position ?
    Something like "getmaptile" ?

    Thanks ;)
     
    I know the setmaptile command.

    I want to know if I am on a grass tile.
     
    Just had a look through the XSE command directory and there doesn't seem to be a command like that, the closest are 'setmaptile' of course and 'getplayerpos'.

    I think you might be able to achieve what you want with scripts, but you'd need a lot.

    In the end you'll probably need to use ASM.
     
    Yeah, I know I'll probably need ASM. I was wondering if someone know the offset of a routine for example.
     
    I'm not sure if there is a routine but I'm tempted to try and make one.
     
    Thanks guys ! :)

    A bit earlier, I wrote a routine which give me the "composition" of the tile at the specified position. The "composition" is in fact tile number + movement permission like that :

    Composition = Tile number + (Movement permission * 4)

    For example, the composition of a tile 0x001C with a movement permission 0x1 is :
    001C > 1C00 > 1C04

    That's enough for what I want to do, but how can the game (and A-Map) differenciate the tile number and the movement permission ?
     
    Thanks guys ! :)

    A bit earlier, I wrote a routine which give me the "composition" of the tile at the specified position. The "composition" is in fact tile number + movement permission like that :



    For example, the composition of a tile 0x001C with a movement permission 0x1 is :
    001C > 1C00 > 1C04

    That's enough for what I want to do, but how can the game (and A-Map) differenciate the tile number and the movement permission ?

    https://www.pokecommunity.com/posts/8690907/

    Touched suggested how it can be done using ASM :).
     
    Back
    Top