summaryrefslogtreecommitdiff
path: root/data/scripts
diff options
context:
space:
mode:
authorGriffinR <griffin.g.richards@gmail.com>2020-08-16 05:59:10 -0400
committerGriffinR <griffin.g.richards@gmail.com>2020-08-16 05:59:10 -0400
commit65bd2faf9460d4e5986c30e54b283d7674d77c55 (patch)
tree250c345d17b8d8f910d327d98f577afddfb3a64a /data/scripts
parent2749948eebe65aa8b55738d820e4a0252dd45c1a (diff)
parent25f45ffa8441b0f0a999355c9755782ccb4809dc (diff)
Merge branch 'master' of https://github.com/pret/pokeemerald into doc-contest
Diffstat (limited to 'data/scripts')
-rw-r--r--data/scripts/apprentice.inc6
-rw-r--r--data/scripts/battle_pike.inc25
-rw-r--r--data/scripts/berry_blender.inc26
-rw-r--r--data/scripts/contest_hall.inc126
-rw-r--r--data/scripts/day_care.inc4
-rw-r--r--data/scripts/field_move_scripts.inc15
-rw-r--r--data/scripts/flash.inc2
-rw-r--r--data/scripts/gabby_and_ty.inc1
-rw-r--r--data/scripts/lilycove_lady.inc11
-rw-r--r--data/scripts/new_game.inc2
-rw-r--r--data/scripts/players_house.inc17
-rw-r--r--data/scripts/roulette.inc4
-rw-r--r--data/scripts/secret_base.inc2
-rw-r--r--data/scripts/trainer_hill.inc4
14 files changed, 143 insertions, 102 deletions
diff --git a/data/scripts/apprentice.inc b/data/scripts/apprentice.inc
index b3ae904a0..f5fa3aeeb 100644
--- a/data/scripts/apprentice.inc
+++ b/data/scripts/apprentice.inc
@@ -1,3 +1,5 @@
+.set LOCALID_APPRENTICE, 6
+
BattleFrontier_BattleTowerLobby_EventScript_Apprentice:: @ 82B688D
lock
faceplayer
@@ -225,7 +227,7 @@ Apprentice_EventScript_LeaveNorth: @ 82B6E54
apprentice_shouldleave
compare VAR_0x8004, FALSE @ Always TRUE here
goto_if_eq Apprentice_EventScript_DontMove
- applymovement 6, Apprentice_Movement_LeaveNorth
+ applymovement LOCALID_APPRENTICE, Apprentice_Movement_LeaveNorth
waitmovement 0
end
@@ -233,7 +235,7 @@ Apprentice_EventScript_Leave: @ 82B6E72
apprentice_shouldleave
compare VAR_0x8004, FALSE @ Always TRUE here
goto_if_eq Apprentice_EventScript_DontMove
- applymovement 6, Apprentice_Movement_Leave
+ applymovement LOCALID_APPRENTICE, Apprentice_Movement_Leave
waitmovement 0
end
diff --git a/data/scripts/battle_pike.inc b/data/scripts/battle_pike.inc
index 83cc6ec61..67eb19011 100644
--- a/data/scripts/battle_pike.inc
+++ b/data/scripts/battle_pike.inc
@@ -1,3 +1,4 @@
+@ Note: LOCALIDs shared with BattleFrontier_BattlePikeRoomNormal
BattleFrontier_BattlePikeRoomNormal_MapScripts_2C3E1B: @ 82C3E1B
map_script MAP_SCRIPT_ON_TRANSITION, BattleFrontier_BattlePikeRoom_OnTransition
map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, BattleFrontier_BattlePikeRoom_OnWarp
@@ -17,28 +18,28 @@ BattleFrontier_BattlePikeRoom_OnTransition: @ 82C3E25
end
BattleFrontier_BattlePikeRoomNormal_EventScript_SetDoubleBattleObjPos:: @ 82C3E93
- setobjectxyperm 1, 2, 5
- setobjectxyperm 2, 6, 5
+ setobjectxyperm LOCALID_OBJ_0, 2, 5
+ setobjectxyperm LOCALID_OBJ_1, 6, 5
end
BattleFrontier_BattlePikeRoomNormal_EventScript_SetTwoObjectRoomPos:: @ 82C3EA2
- setobjectxyperm 1, 4, 4
- setobjectxyperm 2, 3, 4
+ setobjectxyperm LOCALID_OBJ_0, 4, 4
+ setobjectxyperm LOCALID_OBJ_1, 3, 4
end
BattleFrontier_BattlePikeRoomNormal_EventScript_SetOneObjectRoomPos:: @ 82C3EB1
- setobjectxyperm 1, 4, 4
- setobjectxyperm 2, 0, 0
+ setobjectxyperm LOCALID_OBJ_0, 4, 4
+ setobjectxyperm LOCALID_OBJ_1, 0, 0
end
BattleFrontier_BattlePikeRoomNormal_EventScript_SetNPCRoomObjPos:: @ 82C3EC0
- setobjectxyperm 1, 5, 5
- setobjectxyperm 2, 0, 0
+ setobjectxyperm LOCALID_OBJ_0, 5, 5
+ setobjectxyperm LOCALID_OBJ_1, 0, 0
end
BattleFrontier_BattlePikeRoomNormal_EventScript_SetBrainRoomObjPos:: @ 82C3ECF
- setobjectxyperm 1, 4, 3
- setobjectxyperm 2, 4, 4
+ setobjectxyperm LOCALID_OBJ_0, 4, 3
+ setobjectxyperm LOCALID_OBJ_1, 4, 4
end
BattleFrontier_BattlePikeRoom_OnWarp: @ 82C3EDE
@@ -57,7 +58,7 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_InitRoomObjects:: @ 82C3EE8
goto_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_InitTwoObjectRoom
compare VAR_RESULT, PIKE_ROOM_BRAIN
goto_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_InitBrainRoomObjects
- hideobjectat 2, MAP_BATTLE_FRONTIER_BATTLE_PIKE_ROOM_NORMAL
+ hideobjectat LOCALID_OBJ_1, MAP_BATTLE_FRONTIER_BATTLE_PIKE_ROOM_NORMAL
setvar VAR_TEMP_4, 1
turnobject OBJ_EVENT_ID_PLAYER, DIR_NORTH
end
@@ -70,7 +71,7 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_InitTwoObjectRoom:: @ 82C3F35
BattleFrontier_BattlePikeRoomNormal_EventScript_InitBrainRoomObjects:: @ 82C3F3F
setvar VAR_TEMP_4, 1
turnobject OBJ_EVENT_ID_PLAYER, DIR_NORTH
- hideobjectat 1, MAP_BATTLE_FRONTIER_BATTLE_PIKE_ROOM_NORMAL @ Pike Queen hidden initially
+ hideobjectat LOCALID_OBJ_0, MAP_BATTLE_FRONTIER_BATTLE_PIKE_ROOM_NORMAL @ Pike Queen hidden initially
end
BattleFrontier_BattlePikeThreePathRoom_EventScript_LeftRoomWarp:: @ 82C3F4E
diff --git a/data/scripts/berry_blender.inc b/data/scripts/berry_blender.inc
index 28c3d6de7..d98add74d 100644
--- a/data/scripts/berry_blender.inc
+++ b/data/scripts/berry_blender.inc
@@ -1,3 +1,11 @@
+@ Note: local IDs shared with scripts.inc for LilycoveCity_ContestLobby
+.set LOCALID_MAN, 3
+.set LOCALID_BOY, 9
+.set LOCALID_TWIN, 10
+.set LOCALID_POKEFAN_F, 15
+.set LOCALID_EXPERT_M, 16
+.set LOCALID_GIRL, 17
+
BerryBlender_Text_WantToMakePokeblocks: @ 8292DEE
.string "Oh? Did you want to make some {POKEBLOCK}S\n"
.string "with this old-timer?$"
@@ -236,7 +244,7 @@ BerryBlender_EventScript_BerryBlender1:: @ 8293C3E
lockall
goto_if_unset FLAG_HIDE_LILYCOVE_CONTEST_HALL_BLEND_MASTER, BerryBlender_EventScript_BlendMasterPresent
setvar VAR_0x8009, 1
- applymovement 16, BerryBlender_Movement_BlendLeaderWalkInPlace
+ applymovement LOCALID_EXPERT_M, BerryBlender_Movement_BlendLeaderWalkInPlace
waitmovement 0
msgbox BerryBlender_Text_WantToMakePokeblocks, MSGBOX_YESNO
compare VAR_RESULT, YES
@@ -321,8 +329,8 @@ BerryBlender_EventScript_Blender1NoCase: @ 8293D43
BerryBlender_EventScript_BerryBlender2:: @ 8293D4D
lockall
setvar VAR_0x8009, 2
- applymovement 10, Common_Movement_FaceOriginalDirection
- applymovement 3, BerryBlender_Movement_BlendLeaderWalkInPlace
+ applymovement LOCALID_TWIN, Common_Movement_FaceOriginalDirection
+ applymovement LOCALID_MAN, BerryBlender_Movement_BlendLeaderWalkInPlace
waitmovement 0
msgbox BerryBlender_Text_WantToBlendPokeblocksWithUs, MSGBOX_YESNO
compare VAR_RESULT, YES
@@ -384,10 +392,10 @@ BerryBlender_EventScript_Blender2NoCase: @ 8293E14
BerryBlender_EventScript_BerryBlender3:: @ 8293E1E
lockall
- setvar VAR_0x8008, 15
+ setvar VAR_0x8008, LOCALID_POKEFAN_F
setvar VAR_0x8009, 3
- applymovement 9, Common_Movement_FaceOriginalDirection
- applymovement 17, Common_Movement_FaceOriginalDirection
+ applymovement LOCALID_BOY, Common_Movement_FaceOriginalDirection
+ applymovement LOCALID_GIRL, Common_Movement_FaceOriginalDirection
applymovement VAR_0x8008, BerryBlender_Movement_BlendLeaderWalkInPlace
waitmovement 0
msgbox BerryBlender_Text_LookGoodAtBlendingJoinUs, MSGBOX_YESNO
@@ -630,9 +638,9 @@ BerryBlender_EventScript_FourPlayerLink: @ 8294139
BerryBlender_EventScript_DoLinkBerryBlending: @ 8294147
setvar VAR_0x8004, 0
fadescreen FADE_TO_BLACK
- removeobject 240
- removeobject 239
- removeobject 238
+ removeobject 240 @ Unclear where these local IDs come from,
+ removeobject 239 @ but presumably they'd be the 4 link players
+ removeobject 238
removeobject 237
special DoBerryBlending
waitstate
diff --git a/data/scripts/contest_hall.inc b/data/scripts/contest_hall.inc
index d08267c8e..984e1b93b 100644
--- a/data/scripts/contest_hall.inc
+++ b/data/scripts/contest_hall.inc
@@ -1,3 +1,19 @@
+.set LOCALID_MC, 1
+.set LOCALID_JUDGE, 2
+.set LOCALID_CONTESTANT_1, 3
+.set LOCALID_CONTESTANT_2, 4
+.set LOCALID_CONTESTANT_3, 5
+.set LOCALID_AUDIENCE_1, 6
+.set LOCALID_AUDIENCE_3, 7
+.set LOCALID_AUDIENCE_4, 8
+.set LOCALID_AUDIENCE_5, 9
+.set LOCALID_AUDIENCE_6, 10
+.set LOCALID_AUDIENCE_7, 11
+.set LOCALID_AUDIENCE_2, 12
+.set LOCALID_POKEBALL, 13
+.set LOCALID_CONTESTANT_4, 14
+.set LOCALID_ARTIST, 15
+
@ Either ends or returns to EventScript_ContestReceptionist after submitting a contest entry
LilycoveCity_ContestLobby_EventScript_SpeakToContestReceptionist:: @ 8279CC5
lock
@@ -193,9 +209,9 @@ ContestHall_EventScript_DoContest:: @ 8279F97
special LinkContestTryShowWirelessIndicator
setvar VAR_0x8006, 0
lockall
- applymovement 14, ContestHall_Movement_Player4FaceUp
+ applymovement LOCALID_CONTESTANT_4, ContestHall_Movement_Player4FaceUp
waitmovement 0
- applymovement 1, ContestHall_Movement_MCWalkDown
+ applymovement LOCALID_MC, ContestHall_Movement_MCWalkDown
waitmovement 0
releaseall
call ContestHall_EventScript_TryWaitForLink
@@ -271,7 +287,7 @@ ContestHall_EventScript_ContestGettingStarted:: @ 827A097
bufferstdstring 2, VAR_0x8009
call ContestHall_EventScript_GettingStarted
lockall
- applymovement 1, ContestHall_Movement_MCBackUp
+ applymovement LOCALID_MC, ContestHall_Movement_MCBackUp
waitmovement 0
releaseall
return
@@ -341,37 +357,37 @@ ContestHall_EventScript_ContestantWalkToCenter:: @ 827A149
ContestHall_EventScript_Player1WalkToCenter:: @ 827A176
call ContestHall_EventScript_TryWaitForLink
lockall
- applymovement 3, ContestHall_Movement_Player1WalkToCenter
+ applymovement LOCALID_CONTESTANT_1, ContestHall_Movement_Player1WalkToCenter
waitmovement 0
releaseall
- setvar VAR_0x800B, 3
+ setvar VAR_0x800B, LOCALID_CONTESTANT_1
return
ContestHall_EventScript_Player2WalkToCenter:: @ 827A18D
call ContestHall_EventScript_TryWaitForLink
lockall
- applymovement 4, ContestHall_Movement_Player2WalkToCenter
+ applymovement LOCALID_CONTESTANT_2, ContestHall_Movement_Player2WalkToCenter
waitmovement 0
releaseall
- setvar VAR_0x800B, 4
+ setvar VAR_0x800B, LOCALID_CONTESTANT_2
return
ContestHall_EventScript_Player3WalkToCenter:: @ 827A1A4
call ContestHall_EventScript_TryWaitForLink
lockall
- applymovement 5, ContestHall_Movement_Player3WalkToCenter
+ applymovement LOCALID_CONTESTANT_3, ContestHall_Movement_Player3WalkToCenter
waitmovement 0
releaseall
- setvar VAR_0x800B, 5
+ setvar VAR_0x800B, LOCALID_CONTESTANT_3
return
ContestHall_EventScript_Player4WalkToCenter:: @ 827A1BB
call ContestHall_EventScript_TryWaitForLink
lockall
- applymovement 14, ContestHall_Movement_Player4WalkToCenter
+ applymovement LOCALID_CONTESTANT_4, ContestHall_Movement_Player4WalkToCenter
waitmovement 0
releaseall
- setvar VAR_0x800B, 14
+ setvar VAR_0x800B, LOCALID_CONTESTANT_4
return
ContestHall_EventScript_ShowContestMonPic:: @ 827A1D2
@@ -384,7 +400,7 @@ ContestHall_EventScript_ShowContestMonPic:: @ 827A1D2
releaseall
call ContestHall_EventScript_TryWaitForLink
call ContestHall_EventScript_CheckIfContestWithRSPlayer
- addobject 13 @ Place Poke Ball down
+ addobject LOCALID_POKEBALL
playse SE_DANSA
lockall
applymovement VAR_0x800B, ContestHall_Movement_ContestantDelay32
@@ -414,13 +430,13 @@ ContestHall_EventScript_AudienceVote:: @ 827A230
playse SE_W227B
waitmessage
call ContestHall_EventScript_AudienceLookAround
- applymovement 1, ContestHall_Movement_MCFaceJudge2
+ applymovement LOCALID_MC, ContestHall_Movement_MCFaceJudge2
waitmovement 0
- applymovement 2, ContestHall_Movement_JudgeFaceMC
+ applymovement LOCALID_JUDGE, ContestHall_Movement_JudgeFaceMC
waitmovement 0
delay 20
- applymovement 1, ContestHall_Movement_FaceContestants
- applymovement 2, ContestHall_Movement_FaceContestants
+ applymovement LOCALID_MC, ContestHall_Movement_FaceContestants
+ applymovement LOCALID_JUDGE, ContestHall_Movement_FaceContestants
waitmovement 0
return
@@ -463,25 +479,25 @@ ContestHall_EventScript_VotingUnderWayLink:: @ 827A2CA
ContestHall_EventScript_AudienceReactToContestant:: @ 827A2D5
call ContestHall_EventScript_TryWaitForLink
- applymovement 1, ContestHall_Movement_AudienceMemberLookLeft
+ applymovement LOCALID_MC, ContestHall_Movement_AudienceMemberLookLeft
waitmovement 0
playse SE_W227B
call ContestHall_EventScript_VObjectAudienceLookAround
- applymovement 9, ContestHall_Movement_AudienceMemberLookRight
- applymovement 12, ContestHall_Movement_AudienceMemberLookDown
- applymovement 7, ContestHall_Movement_AudienceMemberLookRight
+ applymovement LOCALID_AUDIENCE_5, ContestHall_Movement_AudienceMemberLookRight
+ applymovement LOCALID_AUDIENCE_2, ContestHall_Movement_AudienceMemberLookDown
+ applymovement LOCALID_AUDIENCE_3, ContestHall_Movement_AudienceMemberLookRight
waitmovement 0
- applymovement 1, ContestHall_Movement_AudienceMemberLookRight
+ applymovement LOCALID_MC, ContestHall_Movement_AudienceMemberLookRight
waitmovement 0
- applymovement 10, ContestHall_Movement_AudienceMemberLookLeft
- applymovement 11, ContestHall_Movement_AudienceMemberLookDown
- applymovement 6, ContestHall_Movement_AudienceMemberLookUp
- applymovement 8, ContestHall_Movement_AudienceMemberLookLeft
+ applymovement LOCALID_AUDIENCE_6, ContestHall_Movement_AudienceMemberLookLeft
+ applymovement LOCALID_AUDIENCE_7, ContestHall_Movement_AudienceMemberLookDown
+ applymovement LOCALID_AUDIENCE_1, ContestHall_Movement_AudienceMemberLookUp
+ applymovement LOCALID_AUDIENCE_4, ContestHall_Movement_AudienceMemberLookLeft
waitmovement 0
- applymovement 1, ContestHall_Movement_MCLookAtJudge
+ applymovement LOCALID_MC, ContestHall_Movement_MCLookAtJudge
waitmovement 0
- applymovement 1, ContestHall_Movement_MCWalkInPlaceDown
- applymovement 2, ContestHall_Movement_JudgeLookAtMC
+ applymovement LOCALID_MC, ContestHall_Movement_MCWalkInPlaceDown
+ applymovement LOCALID_JUDGE, ContestHall_Movement_JudgeLookAtMC
waitmovement 0
releaseall
call ContestHall_EventScript_TryWaitForLink
@@ -683,7 +699,7 @@ ContestHall_EventScript_Set8Hearts:: @ 827A654
ContestHall_EventScript_TryDisplayHeartAudienceMember1:: @ 827A65A
compare VAR_TEMP_1, 1
goto_if_eq ContestHall_EventScript_AudienceMember1AlreadyEmoted
- applymovement 6, ContestHall_Movement_Heart
+ applymovement LOCALID_AUDIENCE_1, ContestHall_Movement_Heart
playse SE_PIN
delay 14
setvar VAR_TEMP_1, 1
@@ -696,7 +712,7 @@ ContestHall_EventScript_AudienceMember1AlreadyEmoted:: @ 827A67D
ContestHall_EventScript_TryDisplayHeartAudienceMember2:: @ 827A67E
compare VAR_TEMP_2, 1
goto_if_eq ContestHall_EventScript_AudienceMember2AlreadyEmoted
- applymovement 12, ContestHall_Movement_Heart
+ applymovement LOCALID_AUDIENCE_2, ContestHall_Movement_Heart
playse SE_PIN
delay 14
setvar VAR_TEMP_2, 1
@@ -709,7 +725,7 @@ ContestHall_EventScript_AudienceMember2AlreadyEmoted:: @ 827A6A1
ContestHall_EventScript_TryDisplayHeartAudienceMember3:: @ 827A6A2
compare VAR_TEMP_3, 1
goto_if_eq ContestHall_EventScript_AudienceMember3AlreadyEmoted
- applymovement 7, ContestHall_Movement_Heart
+ applymovement LOCALID_AUDIENCE_3, ContestHall_Movement_Heart
playse SE_PIN
delay 14
setvar VAR_TEMP_3, 1
@@ -722,7 +738,7 @@ ContestHall_EventScript_AudienceMember3AlreadyEmoted:: @ 827A6C5
ContestHall_EventScript_TryDisplayHeartAudienceMember4:: @ 827A6C6
compare VAR_TEMP_4, 1
goto_if_eq ContestHall_EventScript_Audience4MemberAlreadyEmoted
- applymovement 8, ContestHall_Movement_Heart
+ applymovement LOCALID_AUDIENCE_4, ContestHall_Movement_Heart
playse SE_PIN
delay 14
setvar VAR_TEMP_4, 1
@@ -735,7 +751,7 @@ ContestHall_EventScript_Audience4MemberAlreadyEmoted:: @ 827A6E9
ContestHall_EventScript_TryDisplayHeartAudienceMember5:: @ 827A6EA
compare VAR_TEMP_5, 1
goto_if_eq ContestHall_EventScript_AudienceMember5AlreadyEmoted
- applymovement 9, ContestHall_Movement_Heart
+ applymovement LOCALID_AUDIENCE_5, ContestHall_Movement_Heart
playse SE_PIN
delay 14
setvar VAR_TEMP_5, 1
@@ -748,7 +764,7 @@ ContestHall_EventScript_AudienceMember5AlreadyEmoted:: @ 827A70D
ContestHall_EventScript_TryDisplayHeartAudienceMember6:: @ 827A70E
compare VAR_TEMP_6, 1
goto_if_eq ContestHall_EventScript_AudienceMember6AlreadyEmoted
- applymovement 10, ContestHall_Movement_Heart
+ applymovement LOCALID_AUDIENCE_6, ContestHall_Movement_Heart
playse SE_PIN
delay 14
setvar VAR_TEMP_6, 1
@@ -761,7 +777,7 @@ ContestHall_EventScript_AudienceMember6AlreadyEmoted:: @ 827A731
ContestHall_EventScript_TryDisplayHeartAudienceMember7:: @ 827A732
compare VAR_TEMP_7, 1
goto_if_eq ContestHall_EventScript_AudienceMember7AlreadyEmoted
- applymovement 11, ContestHall_Movement_Heart
+ applymovement LOCALID_AUDIENCE_7, ContestHall_Movement_Heart
playse SE_PIN
delay 14
setvar VAR_TEMP_7, 1
@@ -774,7 +790,7 @@ ContestHall_EventScript_AudienceMember7AlreadyEmoted:: @ 827A755
ContestHall_EventScript_TryDisplayHeartAudienceMember8:: @ 827A756
compare VAR_TEMP_8, 1
goto_if_eq ContestHall_EventScript_AudienceMember8AlreadyEmoted
- applymovement 15, ContestHall_Movement_Heart
+ applymovement LOCALID_ARTIST, ContestHall_Movement_Heart
playse SE_PIN
delay 14
setvar VAR_TEMP_8, 1
@@ -787,7 +803,7 @@ ContestHall_EventScript_AudienceMember8AlreadyEmoted:: @ 827A779
ContestHall_EventScript_ContestantReturn:: @ 827A77A
closemessage
release
- removeobject 13 @ Poke Ball
+ removeobject LOCALID_POKEBALL
special HideContestEntryMonPic
call ContestHall_EventScript_TryWaitForLink
switch VAR_0x8006
@@ -831,13 +847,13 @@ ContestHall_EventScript_Player4WalkBack:: @ 827A7EF
ContestHall_EventScript_DoContestAppeals:: @ 827A801
lockall
- applymovement 1, ContestHall_Movement_FaceContestants2
+ applymovement LOCALID_MC, ContestHall_Movement_FaceContestants2
waitmovement 0
call ContestHall_EventScript_TryWaitForLink
call ContestHall_EventScript_LetsAppeal
waitmessage
- applymovement 1, ContestHall_Movement_WalkStageLeft
- applymovement 2, ContestHall_Movement_WalkStageRight
+ applymovement LOCALID_MC, ContestHall_Movement_WalkStageLeft
+ applymovement LOCALID_JUDGE, ContestHall_Movement_WalkStageRight
waitmovement 0
releaseall
call ContestHall_EventScript_TryWaitForLink
@@ -847,8 +863,8 @@ ContestHall_EventScript_DoContestAppeals:: @ 827A801
special LinkContestTryShowWirelessIndicator
setvar VAR_TEMP_9, 0
lockall
- applymovement 1, ContestHall_Movement_WalkStageRight
- applymovement 2, ContestHall_Movement_WalkStageLeft
+ applymovement LOCALID_MC, ContestHall_Movement_WalkStageRight
+ applymovement LOCALID_JUDGE, ContestHall_Movement_WalkStageLeft
waitmovement 0
releaseall
return
@@ -886,13 +902,13 @@ ContestHall_EventScript_ContestResults:: @ 827A8A5
call ContestHall_EventScript_TryWaitForLink
call ContestHall_EventScript_ThankYouForAppeals
call ContestHall_EventScript_TryWaitForLink
- applymovement 1, ContestHall_Movement_MCFaceJudge
+ applymovement LOCALID_MC, ContestHall_Movement_MCFaceJudge
waitmovement 0
call ContestHall_EventScript_JudgeLooksReady
call ContestHall_EventScript_TryWaitForLink
call ContestHall_EventScript_WeWillDeclareWinner
call ContestHall_EventScript_TryWaitForLink
- applymovement 1, ContestHall_Movement_FaceContestants
+ applymovement LOCALID_MC, ContestHall_Movement_FaceContestants
waitmovement 0
closemessage
releaseall
@@ -965,19 +981,19 @@ ContestHall_EventScript_GetWinnerObjEventId:: @ 827A987
return
ContestHall_EventScript_GetPlayer1ObjEventId:: @ 827A9BC
- setvar VAR_TEMP_3, 3
+ setvar VAR_TEMP_3, LOCALID_CONTESTANT_1
return
ContestHall_EventScript_GetPlayer2ObjEventId:: @ 827A9C2
- setvar VAR_TEMP_3, 4
+ setvar VAR_TEMP_3, LOCALID_CONTESTANT_2
return
ContestHall_EventScript_GetPlayer3ObjEventId:: @ 827A9C8
- setvar VAR_TEMP_3, 5
+ setvar VAR_TEMP_3, LOCALID_CONTESTANT_3
return
ContestHall_EventScript_GetPlayer4ObjEventId:: @ 827A9CE
- setvar VAR_TEMP_3, 14
+ setvar VAR_TEMP_3, LOCALID_CONTESTANT_4
return
ContestHall_EventScript_CongratulateWinner:: @ 827A9D4
@@ -1009,14 +1025,14 @@ ContestHall_EventScript_AudienceLookAround:: @ 827AA1B
lockall
compare VAR_CONTEST_TYPE, CONTEST_TYPE_NPC_NORMAL
call_if_gt ContestHall_EventScript_VObjectAudienceLookAround
- applymovement 9, ContestHall_Movement_AudienceMemberLookRight
- applymovement 12, ContestHall_Movement_AudienceMemberLookDown
- applymovement 7, ContestHall_Movement_AudienceMemberLookRight
+ applymovement LOCALID_AUDIENCE_5, ContestHall_Movement_AudienceMemberLookRight
+ applymovement LOCALID_AUDIENCE_2, ContestHall_Movement_AudienceMemberLookDown
+ applymovement LOCALID_AUDIENCE_3, ContestHall_Movement_AudienceMemberLookRight
delay 30
- applymovement 10, ContestHall_Movement_AudienceMemberLookLeft
- applymovement 11, ContestHall_Movement_AudienceMemberLookDown
- applymovement 6, ContestHall_Movement_AudienceMemberLookUp
- applymovement 8, ContestHall_Movement_AudienceMemberLookLeft
+ applymovement LOCALID_AUDIENCE_6, ContestHall_Movement_AudienceMemberLookLeft
+ applymovement LOCALID_AUDIENCE_7, ContestHall_Movement_AudienceMemberLookDown
+ applymovement LOCALID_AUDIENCE_1, ContestHall_Movement_AudienceMemberLookUp
+ applymovement LOCALID_AUDIENCE_4, ContestHall_Movement_AudienceMemberLookLeft
compare VAR_TEMP_1, 4
goto_if_ne ContestHall_EventScript_AudienceLookAround
delay 30
diff --git a/data/scripts/day_care.inc b/data/scripts/day_care.inc
index 6506897ee..87995581f 100644
--- a/data/scripts/day_care.inc
+++ b/data/scripts/day_care.inc
@@ -1,3 +1,5 @@
+.set LOCALID_DAYCARE_LADY, 1
+
Route117_EventScript_DaycareMan:: @ 8291C18
lock
faceplayer
@@ -211,7 +213,7 @@ Route117_PokemonDayCare_EventScript_CheckEnoughMoney:: @ 8291EC8
end
Route117_PokemonDayCare_EventScript_RetrieveMon:: @ 8291EE2
- applymovement 1, Route117_PokemonDayCare_Movement_RetrieveDaycareMon
+ applymovement LOCALID_DAYCARE_LADY, Route117_PokemonDayCare_Movement_RetrieveDaycareMon
waitmovement 0
specialvar VAR_RESULT, TakePokemonFromDaycare
special SubtractMoneyFromVar0x8005
diff --git a/data/scripts/field_move_scripts.inc b/data/scripts/field_move_scripts.inc
index 56e3297b6..2d689348b 100644
--- a/data/scripts/field_move_scripts.inc
+++ b/data/scripts/field_move_scripts.inc
@@ -1,4 +1,4 @@
-
+@ Interact with cuttable tree
EventScript_CutTree:: @ 82906BB
lockall
goto_if_unset FLAG_BADGE01_GET, EventScript_CheckTreeCantCut
@@ -18,7 +18,8 @@ EventScript_CutTree:: @ 82906BB
goto EventScript_CutTreeDown
end
-EventScript_FldEffCut:: @ 8290705
+@ Use cut from party menu
+EventScript_UseCut:: @ 8290705
lockall
dofieldeffect FLDEFF_USE_CUT_ON_TREE
waitstate
@@ -58,6 +59,7 @@ Text_CantCut: @ 829077D
.string "This tree looks like it can be\n"
.string "CUT down!$"
+@ Interact with smashable rock
EventScript_RockSmash:: @ 82907A6
lockall
goto_if_unset FLAG_BADGE03_GET, EventScript_CantSmashRock
@@ -77,7 +79,8 @@ EventScript_RockSmash:: @ 82907A6
goto EventScript_SmashRock
end
-EventScript_FldEffRockSmash:: @ 82907F0
+@ Use rock smash from party menu
+EventScript_UseRockSmash:: @ 82907F0
lockall
dofieldeffect FLDEFF_USE_ROCK_SMASH
waitstate
@@ -89,10 +92,10 @@ EventScript_SmashRock:: @ 82907FB
waitmovement 0
removeobject VAR_LAST_TALKED
specialvar VAR_RESULT, TryUpdateRusturfTunnelState
- compare VAR_RESULT, 1
+ compare VAR_RESULT, TRUE
goto_if_eq EventScript_EndSmash
special RockSmashWildEncounter
- compare VAR_RESULT, 0
+ compare VAR_RESULT, FALSE
goto_if_eq EventScript_EndSmash
waitstate
releaseall
@@ -141,7 +144,7 @@ EventScript_StrengthBoulder:: @ 82908BA
goto EventScript_ActivateStrength
end
-EventScript_FldEffStrength:: @ 82908FD
+EventScript_UseStrength:: @ 82908FD
lockall
dofieldeffect FLDEFF_USE_STRENGTH
waitstate
diff --git a/data/scripts/flash.inc b/data/scripts/flash.inc
index 916b50719..bb4ae84eb 100644
--- a/data/scripts/flash.inc
+++ b/data/scripts/flash.inc
@@ -1,4 +1,4 @@
-EventScript_FldEffFlash:: @ 82926F8
+EventScript_UseFlash:: @ 82926F8
animateflash 1
setflashradius 1
end
diff --git a/data/scripts/gabby_and_ty.inc b/data/scripts/gabby_and_ty.inc
index dfe8780e7..84cd315f7 100644
--- a/data/scripts/gabby_and_ty.inc
+++ b/data/scripts/gabby_and_ty.inc
@@ -13,6 +13,7 @@ EventScript_UnusedRet:: @ 828CCC6
@ Gabby and Ty always move to the same spots for the first 5 battles
@ From the 6th battle onwards, they move randomly between locations 6-8
+@ Note: The local IDs of Gabby and Ty are hard-coded in GabbyAndTySetScriptVarsToObjectEventLocalIds
GabbyAndTy_EventScript_UpdateLocation:: @ 828CCC7
cleartrainerflag TRAINER_GABBY_AND_TY_6
specialvar VAR_RESULT, GabbyAndTyGetBattleNum
diff --git a/data/scripts/lilycove_lady.inc b/data/scripts/lilycove_lady.inc
index bdd670031..7f629e5db 100644
--- a/data/scripts/lilycove_lady.inc
+++ b/data/scripts/lilycove_lady.inc
@@ -1,3 +1,6 @@
+.set LOCALID_LILYCOVE_LADY, 4
+.set LOCALID_LADYS_MON, 5
+
LilycoveCity_PokemonCenter_1F_EventScript_LilycoveLady:: @ 82A836B
special Script_GetLilycoveLadyId
switch VAR_RESULT
@@ -444,10 +447,10 @@ LilycoveCity_PokemonCenter_1F_EventScript_GivePokeblock:: @ 82A88F6
@ VAR_0x8004 here is the return value from GivePokeblockToContestLady
LilycoveCity_PokemonCenter_1F_EventScript_FeedPokeblock:: @ 82A890A
- applymovement 4, LilycoveCity_PokemonCenter_1F_Movement_LadyFaceMon
+ applymovement LOCALID_LILYCOVE_LADY, LilycoveCity_PokemonCenter_1F_Movement_LadyFaceMon
waitmovement 0
delay 60
- applymovement 5, LilycoveCity_PokemonCenter_1F_Movement_MonFaceLady
+ applymovement LOCALID_LADYS_MON, LilycoveCity_PokemonCenter_1F_Movement_MonFaceLady
waitmovement 0
delay 60
waitse
@@ -461,11 +464,11 @@ LilycoveCity_PokemonCenter_1F_EventScript_FeedPokeblock:: @ 82A890A
@ VAR_0x8004 here is the return value from GivePokeblockToContestLady
LilycoveCity_PokemonCenter_1F_EventScript_MonEnjoyPokeblock:: @ 82A893F
- applymovement 5, LilycoveCity_PokemonCenter_1F_Movement_MonJump
+ applymovement LOCALID_LADYS_MON, LilycoveCity_PokemonCenter_1F_Movement_MonJump
waitmovement 0
delay 60
LilycoveCity_PokemonCenter_1F_EventScript_FinishFeedPokeblock:: @ 82A894C
- applymovement 4, LilycoveCity_PokemonCenter_1F_Movement_LadyFacePlayer
+ applymovement LOCALID_LILYCOVE_LADY, LilycoveCity_PokemonCenter_1F_Movement_LadyFacePlayer
waitmovement 0
delay 60
compare VAR_0x8004, 0
diff --git a/data/scripts/new_game.inc b/data/scripts/new_game.inc
index 74fff4aea..3c68dfa13 100644
--- a/data/scripts/new_game.inc
+++ b/data/scripts/new_game.inc
@@ -195,7 +195,7 @@ EventScript_ResetAllMapFlags:: @ 82715DE
setflag FLAG_HIDE_MAUVILLE_CITY_SCOTT
setflag FLAG_HIDE_CHAMPIONS_ROOM_RIVAL
setflag FLAG_HIDE_CHAMPIONS_ROOM_BIRCH
- setflag FLAG_HIDE_ROUTE_110_RIVAL_2
+ setflag FLAG_HIDE_ROUTE_110_RIVAL_ON_BIKE
setflag FLAG_HIDE_ROUTE_119_RIVAL_ON_BIKE
setflag FLAG_HIDE_ROUTE_104_RIVAL
setflag FLAG_HIDE_LILCOVE_MOTEL_GAME_DESIGNERS
diff --git a/data/scripts/players_house.inc b/data/scripts/players_house.inc
index b6ab10300..440f47a6a 100644
--- a/data/scripts/players_house.inc
+++ b/data/scripts/players_house.inc
@@ -1,3 +1,8 @@
+@ Local IDs are the same for both players houses
+.set LOCALID_MOM, 1
+.set LOCALID_DAD, 5
+.set LOCALID_MOM_2F, 14
+
PlayersHouse_2F_EventScript_BlockStairsUntilClockIsSet:: @ 82926FE
setvar VAR_LITTLEROOT_INTRO_STATE, 5
return
@@ -74,7 +79,7 @@ PlayersHouse_2F_EventScript_WallClock:: @ 8292799
end
PlayersHouse_2F_EventScript_MomComesUpstairsMale:: @ 82927DF
- setvar VAR_0x8008, 14
+ setvar VAR_0x8008, LOCALID_MOM_2F
addobject VAR_0x8008
applymovement VAR_0x8008, PlayersHouse_2F_Movement_MomEntersMale
waitmovement 0
@@ -87,7 +92,7 @@ PlayersHouse_2F_EventScript_MomComesUpstairsMale:: @ 82927DF
return
PlayersHouse_2F_EventScript_MomComesUpstairsFemale:: @ 829280F
- setvar VAR_0x8008, 14
+ setvar VAR_0x8008, LOCALID_MOM_2F
addobject VAR_0x8008
applymovement VAR_0x8008, PlayersHouse_2F_Movement_MomEntersFemale
waitmovement 0
@@ -514,14 +519,14 @@ PlayersHouse_1F_EventScript_AirLatiBroadcast:: @ 8292C72
PlayersHouse_1F_EventScript_SetUpObjectEventVarsMale:: @ 8292C76
setvar VAR_0x8008, MALE
- setvar VAR_0x8009, 5 @ Dad object event ID
- setvar VAR_0x800A, 1 @ Mom object event ID
+ setvar VAR_0x8009, LOCALID_DAD
+ setvar VAR_0x800A, LOCALID_MOM
return
PlayersHouse_1F_EventScript_SetUpObjectEventVarsFemale:: @ 8292C86
setvar VAR_0x8008, FEMALE
- setvar VAR_0x8009, 5 @ Dad object event ID
- setvar VAR_0x800A, 1 @ Mom object event ID
+ setvar VAR_0x8009, LOCALID_DAD
+ setvar VAR_0x800A, LOCALID_MOM
return
PlayersHouse_1F_EventScript_DadApproachPlayerMale:: @ 8292C96
diff --git a/data/scripts/roulette.inc b/data/scripts/roulette.inc
index 9aea65054..f590ca358 100644
--- a/data/scripts/roulette.inc
+++ b/data/scripts/roulette.inc
@@ -6,7 +6,7 @@ Roulette_EventScript_Table1:: @ 82A5AB1
getpricereduction POKENEWS_GAME_CORNER
compare VAR_RESULT, FALSE
goto_if_eq Roulette_EventScript_Play
- addvar VAR_0x8004, 128
+ addvar VAR_0x8004, ROULETTE_SPECIAL_RATE
goto Roulette_EventScript_Play
end
@@ -18,7 +18,7 @@ Roulette_EventScript_Table2:: @ 82A5ADF
getpricereduction POKENEWS_GAME_CORNER
compare VAR_RESULT, FALSE
goto_if_eq Roulette_EventScript_Play
- addvar VAR_0x8004, 128
+ addvar VAR_0x8004, ROULETTE_SPECIAL_RATE
goto Roulette_EventScript_Play
end
diff --git a/data/scripts/secret_base.inc b/data/scripts/secret_base.inc
index b5c3251b5..0de890aa6 100644
--- a/data/scripts/secret_base.inc
+++ b/data/scripts/secret_base.inc
@@ -308,7 +308,7 @@ SecretBase_EventScript_PutAwayDecorationLoop:: @ 8275D39
compare VAR_0x8005, 0
goto_if_eq SecretBase_EventScript_PutAwayDecorationLoop
removeobject VAR_0x8006
- setflag 0x8005 @ UB: GF likely meant setvar here; setflag 0x8005 is out of bounds
+ setflag VAR_0x8005 @ UB: GF likely meant setvar here; setflag 0x8005 is out of bounds
goto SecretBase_EventScript_PutAwayDecorationLoop
end
diff --git a/data/scripts/trainer_hill.inc b/data/scripts/trainer_hill.inc
index ca692e1ef..34d0462bb 100644
--- a/data/scripts/trainer_hill.inc
+++ b/data/scripts/trainer_hill.inc
@@ -32,8 +32,8 @@ EventScript_TrainerHillTimer:: @ 82C8393
TrainerHill_1F_EventScript_DummyWarpToEntranceCounter:: @ 82C83A6
setvar VAR_TEMP_2, 1
- trainerhill_clearresult
- compare VAR_RESULT, 1 @ VAR_RESULT always 0 here
+ trainerhill_getusingereader
+ compare VAR_RESULT, TRUE @ VAR_RESULT always FALSE here
goto_if_eq TrainerHill_1F_EventScript_WarpSilentToEntranceCounter
end