• 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.

[Script] Scripting a Warp - query

DaleFails

Pokémon: Giovanni Origins developer
208
Posts
12
Years
    • Seen today
    Hi all,

    I have recently returned to ROM hacking and intend to finish a game I started 10 years ago. I am currently re-scripting most of the events in the early game but have one script I cannot crack.

    I am trying to do a basic warp function.

    Everything works in my script except the warp. You obtain a Rainbow Pass and then speak to an NPC who offers to sail you to a new port. You say Yes, the seagallop animation plays, the screen fades back in but I am not warping to where I am telling the game to warp the player.

    My script is below. I have highlighted the warp. I want to warp the a place in a map, map bank 3, map 0, position 1E 32. I have followed the scripting tutorials online but instead I get warped to a completely different map.

    Any obvious errors with the warp in my script?

    Thanks guys!

    Spoiler:
     

    DaleFails

    Pokémon: Giovanni Origins developer
    208
    Posts
    12
    Years
    • Seen today
    @DaleH771

    Probably change 0x001E to 0x1E and 0x0032 to 0x32?

    I did try that but made no difference. I have also tried changing the map and position as well but regardless I get warped to the same map and same place...

    Thanks though!
     

    Asith

    Uwao
    237
    Posts
    3
    Years
    • Seen Apr 13, 2024
    I have also tried changing the map and position as well but regardless I get warped to the same map and same place...

    I'm just spitballing here but if it always warps you to the same map regardless of your warp script, then it might not be your warp doing the warping at all.
    I assume special 0x17B is the Seagallop animation? I would look into whether that special forces the player to warp as well. Try running the script without your warp command and see if the player is still warped.

    EDIT: Yep, the Seagallop special automatically warps you to Vermilion when used like that. You can edit that special by using it like this:
    setvar 0x8006 0x[place where you want to go]
    setvar 0x8004 0x[0 for rightward animation, 1 for leftward animation]
    special 0x17B


    The place where you want to go is taken from here. 0x0 would be the first listing, 0x1 would be the second, and so on. You can edit the destinations to custom ones using a hex editor :)
     
    Last edited:

    DaleFails

    Pokémon: Giovanni Origins developer
    208
    Posts
    12
    Years
    • Seen today
    @DaleH771

    To which map are you warped?

    Looks like the user below has solved it but thanks for the assistance anyway, really appreciate it! Scripting can be hella frustrating.

    I'm just spitballing here but if it always warps you to the same map regardless of your warp script, then it might not be your warp doing the warping at all.
    I assume special 0x17B is the Seagallop animation? I would look into whether that special forces the player to warp as well. Try running the script without your warp command and see if the player is still warped.

    EDIT: Yep, the Seagallop special automatically warps you to Vermilion when used like that. You can edit that special by using it like this:
    setvar 0x8006 0x[place where you want to go]
    setvar 0x8004 0x[0 for rightward animation, 1 for leftward animation]
    special 0x17B


    The place where you want to go is taken from here. 0x0 would be the first listing, 0x1 would be the second, and so on. You can edit the destinations to custom ones using a hex editor :)

    Hey - thanks so much. I wont get time to test it tonight but will do over the weekend. You've identified the source of the issue anyway. Will give your suggestion a shot when I get the chance. Really appreciate it.


    Side note: great to see active members on here, it's been ten or so years since I was active!
     
    760
    Posts
    15
    Years
    • Seen today
    @DaleH771

    Aah yes, the seagallop special has its own warp table. Glad the issue is fixed;)
     
    120
    Posts
    5
    Years
    • Seen Nov 2, 2023
    The setvar 0x8006 does change the map the player is warped to, but var 0x8004 never seemed to change the direction of the sailing boat in the cutscene.

    I figured out that the animation was linked to each map, like ship sailing left when going to Vermillion, and ship sailing right when going anywhere else.

    The var 0x8004 did change the name of the destination when I used it with a multichoice box of the Vermillion script.
     
    Back
    Top