• 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?".
  • Staff applications for our PokéCommunity Daily and Social Media team are now open! Interested in joining staff? Then click here for more info!
  • 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.

[Other] Get tile number

  • 88
    Posts
    13
    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.
     
    Also, cut checks something similar to this, except for wild grass. Take a look at the cut routine :)
     
    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