- 33
- Posts
- 10
- Years
- The Netherlands
- Seen Oct 24, 2023
Hello all, yet another novice scripter here.
I mainly like mapping, so I made a new map out of Pallet Town, but because im a novice at scripting I prefer to stick to/learn from/recycle/alter already existing for the more complex scripts.
So I was trying to see if I could edit the Oak script in Pallet Town where he guides you to his lab and you follow.
Since my map is different, I was going to have to just change all the movements to the movements that are needed to reach the lab in my map, at least I thought.
Thus, I counted the steps, editted the movements and opened up the game in VBA to test it and it went smooth and the player tagged along just fine to the new position of the lab door.
But as soon as the professor, along with the player, entered the door nothing happened. I was stuck. But I didn't change anything besides the movement?
Well and I changed the coordinates for setdoorclosed and setdooropened with the new coordinates of the lab door.
So yeah, am I missing anything? How do I make warp work again? Might be really stupid but I just can't get it right.
Script is below.
All the movements are right, I tested that.
It just doesn't warp when the door closes.
Oh yeah, map here so you have an image. Staircase is where the script triggers.
______________________________________________________________________________________________________
Edit:
So I opened the script offset like it was in AdvancedMap and I found that it was totally different and left out a lot of stuff compared to what the actual script was...
Very stupid me thought it was enough to repoint only everything that was going to be actually changed...
But apparently because I didn't repoint the goto it started to mess up the whole script as soon as I compiled.
So nvm I got off my lazy ass and just actually repointed everything so it does no longer mess up the scripts.
I mainly like mapping, so I made a new map out of Pallet Town, but because im a novice at scripting I prefer to stick to/learn from/recycle/alter already existing for the more complex scripts.
So I was trying to see if I could edit the Oak script in Pallet Town where he guides you to his lab and you follow.
Since my map is different, I was going to have to just change all the movements to the movements that are needed to reach the lab in my map, at least I thought.
Thus, I counted the steps, editted the movements and opened up the game in VBA to test it and it went smooth and the player tagged along just fine to the new position of the lab door.
But as soon as the professor, along with the player, entered the door nothing happened. I was stuck. But I didn't change anything besides the movement?
Well and I changed the coordinates for setdoorclosed and setdooropened with the new coordinates of the lab door.
So yeah, am I missing anything? How do I make warp work again? Might be really stupid but I just can't get it right.
Script is below.
All the movements are right, I tested that.
It just doesn't warp when the door closes.
Spoiler:
'---------------
#dynamic 0x1655ED
#org @start
lockall
setvar 0x4001 0x0 (or 0x1 / 0x2 depending on where you walk down the 3-tile-stairs. Instead of a 2-tile exit to trigger the event in Pallet I have a 3-tile staircase. So I also added an entirely new movement)
goto 0x8165605
'---------------
#org 0x165605
setvar 0x8004 0x0
setvar 0x8005 0x2
special 0x174
textcolor 0x0
pause 0x1E
playsong 0x12E 0x0
preparemsg @1
waitmsg
pause 0x55
closeonkeypress
applymovement MOVE_PLAYER @Playerface
waitmovement 0x0
sound 0x15
applymovement MOVE_PLAYER @NoticeOak
waitmovement 0x0
pause 0x1E
showsprite 0x3
compare 0x4001 0x0 (if you walk down the stairs on the left tile)
if 0x1 call 0x81656B8
compare 0x4001 0x1 (if you walk down the stairs on the middle tile)
if 0x1 call 0x81656C3
compare 0x4001 0x2 (if you walk down the stairs on the right tile)
if 0x1 call @NewMovementIfRight (The script used to be on two tiles but I have three so I have an extra movement)
pause 0x1E
msgbox @2 MSG_KEEPOPEN
closeonkeypress
pause 0x1E
compare 0x4001 0x0
if 0x1 call 0x81656CE
compare 0x4001 0x1
if 0x1 call 0x81656E0
compare 0x4001 0x2
if 0x1 call @NewFollowIfRight (Extra movement)
setdooropened 0x17 0x19 (new coordinates of the door)
doorchange
applymovement 0x3 @OakEnterDoor
applymovement MOVE_PLAYER @PlayerEnterDoor
waitmovement 0x0
setdoorclosed 0x17 0x19 (new coordinates of the door)
doorchange
setvar 0x4055 0x1
clearflag 0x2B
setvar 0x4050 0x1
setflag 0x2C
setflag 0x4001
warp 0x4 0x3 0xFF 0x6 0xC (Everything below setdoorclosed until end isn't changed from vanilla but warp doesn't work? I still want to warp to the lab)
waitstate
releaseall
end
'---------------
#org 0x1656B8
applymovement 0x3 @MoveUpIfLeft
waitmovement 0x0
return
'---------------
#org 0x1656C3
applymovement 0x3 @MoveUpIfMid
waitmovement 0x0
return
'---------------
#org @NewMovementIfRight
applymovement 0x3 @MoveUpIfRight
waitmovement 0x0
return
'--------------
#org 0x1656CE
applymovement 0x3 @OakToHouseIfLeft
applymovement MOVE_PLAYER @FollowToHouseIfLeft
waitmovement 0x0
return
'---------------
#org 0x1656E0
applymovement 0x3 @OakToHouseIfMid
applymovement MOVE_PLAYER @FollowToHouseIfMid
waitmovement 0x0
return
'--------------
#org @NewFollowIfRight
applymovement 0x3 @OakToHouseIfRight
applymovement MOVE_PLAYER @FollowToHouseIfRight
waitmovement 0x0
return
'---------
' Strings
'---------
#org @1
= Tjikko: Hey! Wait!\nDon't go further out, [Player]!\lI am on my way already!
#org @2
= Tjikko: It's unsafe!\nPokemon live in the tall grass here!\lAllow me to escort you to my place.\lWe will discuss things there.
'-----------
' Movements
'-----------
#org @Playerface
#raw 0x2D 'Face Down (Delayed)
#raw 0xFE 'End of Movements
#org @NoticeOak
#raw 0x62 'Exclamation Mark (!)
#raw 0xFE 'End of Movements
#org @OakEnterDoor
#raw 0x11 'Step Up (Normal)
#raw 0x60 'Hide
#raw 0xFE 'End of Movements
#org @PlayerEnterDoor
#raw 0x11
#raw 0x11 'Step Up (Normal)
#raw 0x60 'Hide
#raw 0xFE 'End of Movements
#org @MoveUpIfLeft
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x12
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x12
#raw 0x12
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11
#raw 0xFE 'End of Movements
#org @MoveUpIfMid
#raw 0x12
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x12
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0xFE 'End of Movements
#org @MoveUpIfRight
#raw 0x11
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x12
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0xFE 'End of Movements
#org @OakToHouseIfLeft
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x13
#raw 0x13
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x13
#raw 0x13
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x11
#raw 0xFE 'End of Movements
#org @FollowToHouseIfLeft
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10
#raw 0x13
#raw 0x13
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x13
#raw 0x13
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13
#raw 0xFE 'End of Movements
#org @OakToHouseIfMid
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x13
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x13
#raw 0x13
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x11
#raw 0xFE 'End of Movements
#org @FollowToHouseIfMid
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10
#raw 0x13
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x13
#raw 0x13
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13
#raw 0xFE 'End of Movements
#org @OakToHouseIfRight
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x13
#raw 0x13
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x11
#raw 0xFE 'End of Movements
#org @FollowToHouseIfRight
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x13
#raw 0x13
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13
#raw 0xFE 'End of Movements
#dynamic 0x1655ED
#org @start
lockall
setvar 0x4001 0x0 (or 0x1 / 0x2 depending on where you walk down the 3-tile-stairs. Instead of a 2-tile exit to trigger the event in Pallet I have a 3-tile staircase. So I also added an entirely new movement)
goto 0x8165605
'---------------
#org 0x165605
setvar 0x8004 0x0
setvar 0x8005 0x2
special 0x174
textcolor 0x0
pause 0x1E
playsong 0x12E 0x0
preparemsg @1
waitmsg
pause 0x55
closeonkeypress
applymovement MOVE_PLAYER @Playerface
waitmovement 0x0
sound 0x15
applymovement MOVE_PLAYER @NoticeOak
waitmovement 0x0
pause 0x1E
showsprite 0x3
compare 0x4001 0x0 (if you walk down the stairs on the left tile)
if 0x1 call 0x81656B8
compare 0x4001 0x1 (if you walk down the stairs on the middle tile)
if 0x1 call 0x81656C3
compare 0x4001 0x2 (if you walk down the stairs on the right tile)
if 0x1 call @NewMovementIfRight (The script used to be on two tiles but I have three so I have an extra movement)
pause 0x1E
msgbox @2 MSG_KEEPOPEN
closeonkeypress
pause 0x1E
compare 0x4001 0x0
if 0x1 call 0x81656CE
compare 0x4001 0x1
if 0x1 call 0x81656E0
compare 0x4001 0x2
if 0x1 call @NewFollowIfRight (Extra movement)
setdooropened 0x17 0x19 (new coordinates of the door)
doorchange
applymovement 0x3 @OakEnterDoor
applymovement MOVE_PLAYER @PlayerEnterDoor
waitmovement 0x0
setdoorclosed 0x17 0x19 (new coordinates of the door)
doorchange
setvar 0x4055 0x1
clearflag 0x2B
setvar 0x4050 0x1
setflag 0x2C
setflag 0x4001
warp 0x4 0x3 0xFF 0x6 0xC (Everything below setdoorclosed until end isn't changed from vanilla but warp doesn't work? I still want to warp to the lab)
waitstate
releaseall
end
'---------------
#org 0x1656B8
applymovement 0x3 @MoveUpIfLeft
waitmovement 0x0
return
'---------------
#org 0x1656C3
applymovement 0x3 @MoveUpIfMid
waitmovement 0x0
return
'---------------
#org @NewMovementIfRight
applymovement 0x3 @MoveUpIfRight
waitmovement 0x0
return
'--------------
#org 0x1656CE
applymovement 0x3 @OakToHouseIfLeft
applymovement MOVE_PLAYER @FollowToHouseIfLeft
waitmovement 0x0
return
'---------------
#org 0x1656E0
applymovement 0x3 @OakToHouseIfMid
applymovement MOVE_PLAYER @FollowToHouseIfMid
waitmovement 0x0
return
'--------------
#org @NewFollowIfRight
applymovement 0x3 @OakToHouseIfRight
applymovement MOVE_PLAYER @FollowToHouseIfRight
waitmovement 0x0
return
'---------
' Strings
'---------
#org @1
= Tjikko: Hey! Wait!\nDon't go further out, [Player]!\lI am on my way already!
#org @2
= Tjikko: It's unsafe!\nPokemon live in the tall grass here!\lAllow me to escort you to my place.\lWe will discuss things there.
'-----------
' Movements
'-----------
#org @Playerface
#raw 0x2D 'Face Down (Delayed)
#raw 0xFE 'End of Movements
#org @NoticeOak
#raw 0x62 'Exclamation Mark (!)
#raw 0xFE 'End of Movements
#org @OakEnterDoor
#raw 0x11 'Step Up (Normal)
#raw 0x60 'Hide
#raw 0xFE 'End of Movements
#org @PlayerEnterDoor
#raw 0x11
#raw 0x11 'Step Up (Normal)
#raw 0x60 'Hide
#raw 0xFE 'End of Movements
#org @MoveUpIfLeft
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x12
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x12
#raw 0x12
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11
#raw 0xFE 'End of Movements
#org @MoveUpIfMid
#raw 0x12
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x12
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0xFE 'End of Movements
#org @MoveUpIfRight
#raw 0x11
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x12
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0xFE 'End of Movements
#org @OakToHouseIfLeft
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x13
#raw 0x13
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x13
#raw 0x13
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x11
#raw 0xFE 'End of Movements
#org @FollowToHouseIfLeft
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10
#raw 0x13
#raw 0x13
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x13
#raw 0x13
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13
#raw 0xFE 'End of Movements
#org @OakToHouseIfMid
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x13
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x13
#raw 0x13
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x11
#raw 0xFE 'End of Movements
#org @FollowToHouseIfMid
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10
#raw 0x13
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x13
#raw 0x13
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13
#raw 0xFE 'End of Movements
#org @OakToHouseIfRight
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x13
#raw 0x13
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x11
#raw 0xFE 'End of Movements
#org @FollowToHouseIfRight
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x13
#raw 0x13
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13
#raw 0xFE 'End of Movements
Oh yeah, map here so you have an image. Staircase is where the script triggers.
Spoiler:
______________________________________________________________________________________________________
Edit:
So I opened the script offset like it was in AdvancedMap and I found that it was totally different and left out a lot of stuff compared to what the actual script was...
Very stupid me thought it was enough to repoint only everything that was going to be actually changed...
But apparently because I didn't repoint the goto it started to mess up the whole script as soon as I compiled.
So nvm I got off my lazy ass and just actually repointed everything so it does no longer mess up the scripts.
Last edited: