Skip to content

Commit

Permalink
Continue adding local IDs to map.json files
Browse files Browse the repository at this point in the history
  • Loading branch information
GriffinRichards committed Oct 12, 2024
1 parent a2a3255 commit cb66ea6
Show file tree
Hide file tree
Showing 169 changed files with 1,233 additions and 1,325 deletions.
4 changes: 2 additions & 2 deletions data/event_scripts.s
Original file line number Diff line number Diff line change
Expand Up @@ -774,8 +774,8 @@ EventScript_HideMrBriney::
return

RusturfTunnel_EventScript_SetRusturfTunnelOpen::
removeobject LOCALID_WANDAS_BF
removeobject LOCALID_WANDA
removeobject LOCALID_RUSTURF_TUNNEL_WANDAS_BF
removeobject LOCALID_RUSTURF_TUNNEL_WANDA
clearflag FLAG_HIDE_VERDANTURF_TOWN_WANDAS_HOUSE_WANDAS_BOYFRIEND
clearflag FLAG_HIDE_VERDANTURF_TOWN_WANDAS_HOUSE_WANDA
setvar VAR_RUSTURF_TUNNEL_STATE, 6
Expand Down
1 change: 1 addition & 0 deletions data/maps/BattleFrontier_BattlePikeLobby/map.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"connections": null,
"object_events": [
{
"local_id": "LOCALID_BATTLE_PIKE_LOBBY_ATTENDANT",
"graphics_id": "OBJ_EVENT_GFX_LINK_RECEPTIONIST",
"x": 5,
"y": 5,
Expand Down
4 changes: 1 addition & 3 deletions data/maps/BattleFrontier_BattlePikeLobby/scripts.inc
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
.set LOCALID_ATTENDANT, 1

BattleFrontier_BattlePikeLobby_MapScripts::
map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattlePikeLobby_OnFrame
map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, BattleFrontier_BattlePikeLobby_OnWarp
Expand Down Expand Up @@ -198,7 +196,7 @@ BattleFrontier_BattlePikeLobby_EventScript_ShowResults::
end

BattleFrontier_BattlePikeLobby_EventScript_WalkToCorridor::
applymovement LOCALID_ATTENDANT, BattleFrontier_BattlePikeLobby_Movement_AttendantWalkToCorridor
applymovement LOCALID_BATTLE_PIKE_LOBBY_ATTENDANT, BattleFrontier_BattlePikeLobby_Movement_AttendantWalkToCorridor
applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattlePikeLobby_Movement_PlayerWalkToCorridor
waitmovement 0
return
Expand Down
1 change: 1 addition & 0 deletions data/maps/BattleFrontier_BattleTowerElevator/map.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"connections": null,
"object_events": [
{
"local_id": "LOCALID_BATTLE_TOWER_ELEVATOR_ATTENDANT",
"graphics_id": "OBJ_EVENT_GFX_TEALA",
"x": 1,
"y": 5,
Expand Down
6 changes: 2 additions & 4 deletions data/maps/BattleFrontier_BattleTowerElevator/scripts.inc
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
.set LOCALID_ATTENDANT, 1

BattleFrontier_BattleTowerElevator_MapScripts::
map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattleTowerElevator_OnFrame
map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, BattleFrontier_BattleTowerElevator_OnWarp
Expand All @@ -11,15 +9,15 @@ BattleFrontier_BattleTowerElevator_OnFrame:

BattleFrontier_BattleTowerElevator_EventScript_EnterElevator::
setvar VAR_TEMP_0, 1
applymovement LOCALID_ATTENDANT, BattleFrontier_BattleTowerElevator_Movement_AttendantEnter
applymovement LOCALID_BATTLE_TOWER_ELEVATOR_ATTENDANT, BattleFrontier_BattleTowerElevator_Movement_AttendantEnter
applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattleTowerElevator_Movement_PlayerEnter
waitmovement 0
special BufferBattleTowerElevatorFloors
waitse
special MoveElevator
waitstate
delay 48
applymovement LOCALID_ATTENDANT, BattleFrontier_BattleTowerElevator_Movement_AttendantExit
applymovement LOCALID_BATTLE_TOWER_ELEVATOR_ATTENDANT, BattleFrontier_BattleTowerElevator_Movement_AttendantExit
applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattleTowerElevator_Movement_PlayerExit
waitmovement 0
call BattleFrontier_BattleTowerElevator_EventScript_WarpToNextRoom
Expand Down
3 changes: 2 additions & 1 deletion data/maps/BattleFrontier_Mart/map.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"connections": null,
"object_events": [
{
"local_id": "LOCALID_BATTLE_FRONTIER_MART_CLERK",
"local_id": "LOCALID_FRONTIER_MART_CLERK",
"graphics_id": "OBJ_EVENT_GFX_MART_EMPLOYEE",
"x": 1,
"y": 3,
Expand All @@ -29,6 +29,7 @@
"flag": "0"
},
{
"local_id": "LOCALID_FRONTIER_MART_OLD_WOMAN",
"graphics_id": "OBJ_EVENT_GFX_OLD_WOMAN",
"x": 5,
"y": 4,
Expand Down
4 changes: 1 addition & 3 deletions data/maps/BattleFrontier_Mart/scripts.inc
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
.set LOCALID_OLD_WOMAN, 2

BattleFrontier_Mart_MapScripts::
.byte 0

Expand Down Expand Up @@ -38,7 +36,7 @@ BattleFrontier_Mart_EventScript_OldMan::

BattleFrontier_Mart_EventScript_OldWoman::
lock
applymovement LOCALID_OLD_WOMAN, Common_Movement_FaceDown
applymovement LOCALID_FRONTIER_MART_OLD_WOMAN, Common_Movement_FaceDown
waitmovement 0
msgbox BattleFrontier_Mart_Text_ProteinMakeNiceGift, MSGBOX_DEFAULT
release
Expand Down
1 change: 1 addition & 0 deletions data/maps/BattleFrontier_PokemonCenter_1F/map.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"connections": null,
"object_events": [
{
"local_id": "LOCALID_FRONTIER_NURSE",
"graphics_id": "OBJ_EVENT_GFX_NURSE",
"x": 7,
"y": 2,
Expand Down
4 changes: 1 addition & 3 deletions data/maps/BattleFrontier_PokemonCenter_1F/scripts.inc
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
.set LOCALID_NURSE, 1

BattleFrontier_PokemonCenter_1F_MapScripts::
map_script MAP_SCRIPT_ON_TRANSITION, BattleFrontier_PokemonCenter_1F_OnTransition
map_script MAP_SCRIPT_ON_RESUME, CableClub_OnResume
Expand All @@ -10,7 +8,7 @@ BattleFrontier_PokemonCenter_1F_OnTransition:
end

BattleFrontier_PokemonCenter_1F_EventScript_Nurse::
setvar VAR_0x800B, LOCALID_NURSE
setvar VAR_0x800B, LOCALID_FRONTIER_NURSE
call Common_EventScript_PkmnCenterNurse
waitmessage
waitbuttonpress
Expand Down
1 change: 1 addition & 0 deletions data/maps/BattleFrontier_ScottsHouse/map.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"connections": null,
"object_events": [
{
"local_id": "LOCALID_SCOTTS_HOUSE_SCOTT",
"graphics_id": "OBJ_EVENT_GFX_SCOTT",
"x": 2,
"y": 3,
Expand Down
12 changes: 5 additions & 7 deletions data/maps/BattleFrontier_ScottsHouse/scripts.inc
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
.set LOCALID_SCOTT, 1

BattleFrontier_ScottsHouse_MapScripts::
.byte 0

Expand Down Expand Up @@ -149,7 +147,7 @@ BattleFrontier_ScottsHouse_EventScript_WelcomeToFrontier::
call_if_eq VAR_FACING, DIR_EAST, BattleFrontier_ScottsHouse_EventScript_ScottFaceAwayEast
call_if_eq VAR_FACING, DIR_WEST, BattleFrontier_ScottsHouse_EventScript_ScottFaceAwayWest
msgbox BattleFrontier_ScottsHouse_Text_HowMuchEffortItTookToMakeReal, MSGBOX_DEFAULT
applymovement LOCALID_SCOTT, Common_Movement_FacePlayer
applymovement LOCALID_SCOTTS_HOUSE_SCOTT, Common_Movement_FacePlayer
waitmovement 0
msgbox BattleFrontier_ScottsHouse_Text_HaveThisAsMementoOfOurPathsCrossing, MSGBOX_DEFAULT
goto_if_eq VAR_SCOTT_STATE, 13, BattleFrontier_ScottsHouse_EventScript_Give4BattlePoints
Expand Down Expand Up @@ -192,22 +190,22 @@ BattleFrontier_ScottsHouse_EventScript_GiveBattlePoints::
end

BattleFrontier_ScottsHouse_EventScript_ScottFaceAwayNorth::
applymovement LOCALID_SCOTT, Common_Movement_WalkInPlaceFasterUp
applymovement LOCALID_SCOTTS_HOUSE_SCOTT, Common_Movement_WalkInPlaceFasterUp
waitmovement 0
return

BattleFrontier_ScottsHouse_EventScript_ScottFaceAwaySouth::
applymovement LOCALID_SCOTT, Common_Movement_WalkInPlaceFasterDown
applymovement LOCALID_SCOTTS_HOUSE_SCOTT, Common_Movement_WalkInPlaceFasterDown
waitmovement 0
return

BattleFrontier_ScottsHouse_EventScript_ScottFaceAwayEast::
applymovement LOCALID_SCOTT, Common_Movement_WalkInPlaceFasterRight
applymovement LOCALID_SCOTTS_HOUSE_SCOTT, Common_Movement_WalkInPlaceFasterRight
waitmovement 0
return

BattleFrontier_ScottsHouse_EventScript_ScottFaceAwayWest::
applymovement LOCALID_SCOTT, Common_Movement_WalkInPlaceFasterLeft
applymovement LOCALID_SCOTTS_HOUSE_SCOTT, Common_Movement_WalkInPlaceFasterLeft
waitmovement 0
return

Expand Down
1 change: 1 addition & 0 deletions data/maps/DesertUnderpass/map.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"connections": null,
"object_events": [
{
"local_id": "LOCALID_UNDERPASS_FOSSIL",
"graphics_id": "OBJ_EVENT_GFX_FOSSIL",
"x": 132,
"y": 10,
Expand Down
6 changes: 2 additions & 4 deletions data/maps/DesertUnderpass/scripts.inc
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
.set LOCALID_FOSSIL, 1

DesertUnderpass_MapScripts::
map_script MAP_SCRIPT_ON_TRANSITION, DesertUnderpass_OnTransition
.byte 0
Expand All @@ -18,13 +16,13 @@ DesertUnderpass_EventScript_Fossil::

DesertUnderpass_EventScript_GiveClawFossil::
giveitem ITEM_CLAW_FOSSIL
removeobject LOCALID_FOSSIL
removeobject LOCALID_UNDERPASS_FOSSIL
release
end

DesertUnderpass_EventScript_GiveRootFossil::
giveitem ITEM_ROOT_FOSSIL
removeobject LOCALID_FOSSIL
removeobject LOCALID_UNDERPASS_FOSSIL
release
end

Expand Down
2 changes: 2 additions & 0 deletions data/maps/DewfordTown/map.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"flag": "0"
},
{
"local_id": "LOCALID_DEWFORD_BRINEY",
"graphics_id": "OBJ_EVENT_GFX_EXPERT_M",
"x": 12,
"y": 9,
Expand All @@ -65,6 +66,7 @@
"flag": "0"
},
{
"local_id": "LOCALID_DEWFORD_BOAT",
"graphics_id": "OBJ_EVENT_GFX_MR_BRINEYS_BOAT",
"x": 12,
"y": 8,
Expand Down
46 changes: 17 additions & 29 deletions data/maps/DewfordTown/scripts.inc
Original file line number Diff line number Diff line change
@@ -1,15 +1,3 @@
@ Sailing to and from Dewford uses local IDs from different maps
@ e.g. Route 104's sail to Dewford script references local IDs from Dewford's map
@ All of these local IDs are labeled here
.equ LOCALID_BRINEY_DEWFORD, 2
.equ LOCALID_BOAT_DEWFORD, 4

.equ LOCALID_BOAT_R109, 1
.equ LOCALID_BRINEY_R109, 2

.equ LOCALID_BOAT_R104, 7
.equ LOCALID_BRINEY_R104, 8

DewfordTown_MapScripts::
map_script MAP_SCRIPT_ON_TRANSITION, DewfordTown_OnTransition
.byte 0
Expand Down Expand Up @@ -123,16 +111,16 @@ DewfordTown_EventScript_FishingNotSoGood::

DewfordTown_EventScript_SailToPetalburg::
call EventScript_BackupMrBrineyLocation
setobjectsubpriority LOCALID_BRINEY_DEWFORD, MAP_DEWFORD_TOWN, 0
setobjectsubpriority LOCALID_DEWFORD_BRINEY, MAP_DEWFORD_TOWN, 0
setobjectsubpriority OBJ_EVENT_ID_PLAYER, MAP_DEWFORD_TOWN, 0
applymovement LOCALID_BRINEY_DEWFORD, DewfordTown_Movement_BrineyBoardBoat
applymovement LOCALID_DEWFORD_BRINEY, DewfordTown_Movement_BrineyBoardBoat
waitmovement 0
removeobject LOCALID_BRINEY_DEWFORD
removeobject LOCALID_DEWFORD_BRINEY
applymovement OBJ_EVENT_ID_PLAYER, DewfordTown_Movement_PlayerBoardBoat
waitmovement 0
hideobjectat OBJ_EVENT_ID_PLAYER, MAP_DEWFORD_TOWN
call Common_EventScript_PlayBrineysBoatMusic
applymovement LOCALID_BOAT_DEWFORD, DewfordTown_Movement_SailToPetalburg
applymovement LOCALID_DEWFORD_BOAT, DewfordTown_Movement_SailToPetalburg
applymovement OBJ_EVENT_ID_PLAYER, DewfordTown_Movement_SailToPetalburg
waitmovement 0
showobjectat OBJ_EVENT_ID_PLAYER, MAP_ROUTE104
Expand All @@ -144,7 +132,7 @@ DewfordTown_EventScript_SailToPetalburg::
clearflag FLAG_HIDE_BRINEYS_HOUSE_PEEKO
clearflag FLAG_HIDE_ROUTE_104_MR_BRINEY_BOAT
setflag FLAG_HIDE_MR_BRINEY_BOAT_DEWFORD_TOWN
hideobjectat LOCALID_BOAT_DEWFORD, MAP_DEWFORD_TOWN
hideobjectat LOCALID_DEWFORD_BOAT, MAP_DEWFORD_TOWN
setvar VAR_BOARD_BRINEY_BOAT_STATE, 2
resetobjectsubpriority OBJ_EVENT_ID_PLAYER, MAP_DEWFORD_TOWN
warp MAP_ROUTE104_MR_BRINEYS_HOUSE, 5, 4
Expand All @@ -155,39 +143,39 @@ DewfordTown_EventScript_SailToPetalburg::

DewfordTown_EventScript_SailToSlateport::
call EventScript_BackupMrBrineyLocation
setobjectsubpriority LOCALID_BRINEY_DEWFORD, MAP_DEWFORD_TOWN, 0
setobjectsubpriority LOCALID_DEWFORD_BRINEY, MAP_DEWFORD_TOWN, 0
setobjectsubpriority OBJ_EVENT_ID_PLAYER, MAP_DEWFORD_TOWN, 1
applymovement LOCALID_BRINEY_DEWFORD, DewfordTown_Movement_BrineyBoardBoat
applymovement LOCALID_DEWFORD_BRINEY, DewfordTown_Movement_BrineyBoardBoat
waitmovement 0
removeobject LOCALID_BRINEY_DEWFORD
removeobject LOCALID_DEWFORD_BRINEY
applymovement OBJ_EVENT_ID_PLAYER, DewfordTown_Movement_PlayerBoardBoat
waitmovement 0
hideobjectat OBJ_EVENT_ID_PLAYER, MAP_DEWFORD_TOWN
call Common_EventScript_PlayBrineysBoatMusic
applymovement LOCALID_BOAT_DEWFORD, DewfordTown_Movement_SailToSlateport
applymovement LOCALID_DEWFORD_BOAT, DewfordTown_Movement_SailToSlateport
applymovement OBJ_EVENT_ID_PLAYER, DewfordTown_Movement_SailToSlateport
waitmovement 0
call Common_EventScript_StopBrineysBoatMusic
showobjectat OBJ_EVENT_ID_PLAYER, MAP_ROUTE109
applymovement OBJ_EVENT_ID_PLAYER, DewfordTown_Movement_ExitBoatSlateport
waitmovement 0
setobjectxyperm LOCALID_BRINEY_R109, 21, 26
addobject LOCALID_BRINEY_R109
setobjectsubpriority LOCALID_BRINEY_R109, MAP_ROUTE109, 0
applymovement LOCALID_BRINEY_R109, DewfordTown_Movement_BrineyExitBoat
setobjectxyperm LOCALID_ROUTE109_BRINEY, 21, 26
addobject LOCALID_ROUTE109_BRINEY
setobjectsubpriority LOCALID_ROUTE109_BRINEY, MAP_ROUTE109, 0
applymovement LOCALID_ROUTE109_BRINEY, DewfordTown_Movement_BrineyExitBoat
waitmovement 0
clearflag FLAG_HIDE_ROUTE_109_MR_BRINEY
addobject LOCALID_BOAT_R109
addobject LOCALID_ROUTE109_BOAT
clearflag FLAG_HIDE_ROUTE_109_MR_BRINEY_BOAT
setflag FLAG_HIDE_MR_BRINEY_BOAT_DEWFORD_TOWN
hideobjectat LOCALID_BOAT_DEWFORD, MAP_DEWFORD_TOWN
hideobjectat LOCALID_DEWFORD_BOAT, MAP_DEWFORD_TOWN
call_if_unset FLAG_DELIVERED_DEVON_GOODS, DewfordTown_EventScript_LandedSlateportDeliverGoods
call_if_set FLAG_DELIVERED_DEVON_GOODS, DewfordTown_EventScript_LandedSlateport
closemessage
copyvar VAR_BRINEY_LOCATION, VAR_0x8008
resetobjectsubpriority OBJ_EVENT_ID_PLAYER, MAP_DEWFORD_TOWN
resetobjectsubpriority LOCALID_BRINEY_R109, MAP_ROUTE109
copyobjectxytoperm LOCALID_BRINEY_R109
resetobjectsubpriority LOCALID_ROUTE109_BRINEY, MAP_ROUTE109
copyobjectxytoperm LOCALID_ROUTE109_BRINEY
release
end

Expand Down
4 changes: 4 additions & 0 deletions data/maps/DewfordTown_Hall/map.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
"flag": "0"
},
{
"local_id": "LOCALID_DEWFORD_HALL_EXPERT_M",
"graphics_id": "OBJ_EVENT_GFX_EXPERT_M",
"x": 9,
"y": 3,
Expand All @@ -67,6 +68,7 @@
"flag": "0"
},
{
"local_id": "LOCALID_DEWFORD_HALL_TWIN",
"graphics_id": "OBJ_EVENT_GFX_TWIN",
"x": 5,
"y": 2,
Expand All @@ -93,6 +95,7 @@
"flag": "0"
},
{
"local_id": "LOCALID_DEWFORD_HALL_SCHOOL_KID_M",
"graphics_id": "OBJ_EVENT_GFX_SCHOOL_KID_M",
"x": 12,
"y": 3,
Expand All @@ -106,6 +109,7 @@
"flag": "0"
},
{
"local_id": "LOCALID_DEWFORD_HALL_PSYCHIC_M",
"graphics_id": "OBJ_EVENT_GFX_PSYCHIC_M",
"x": 15,
"y": 3,
Expand Down
13 changes: 4 additions & 9 deletions data/maps/DewfordTown_Hall/scripts.inc
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
.set LOCALID_EXPERT_M, 4
.set LOCALID_TWIN, 5
.set LOCALID_SCHOOL_KID_M, 7
.set LOCALID_PSYCHIC_M, 8

DewfordTown_Hall_MapScripts::
.byte 0

Expand Down Expand Up @@ -55,7 +50,7 @@ DewfordTown_Hall_EventScript_ExpertM::
call Common_EventScript_BufferTrendyPhrase
msgbox DewfordTown_Hall_Text_TVShowAboutTrend, MSGBOX_DEFAULT
closemessage
applymovement LOCALID_EXPERT_M, Common_Movement_WalkInPlaceFasterUp
applymovement LOCALID_DEWFORD_HALL_EXPERT_M, Common_Movement_WalkInPlaceFasterUp
waitmovement 0
release
end
Expand All @@ -66,7 +61,7 @@ DewfordTown_Hall_EventScript_Twin::
call Common_EventScript_BufferTrendyPhrase
msgbox DewfordTown_Hall_Text_IsTrendMorePopularAcrossSea, MSGBOX_DEFAULT
closemessage
applymovement LOCALID_TWIN, Common_Movement_WalkInPlaceFasterUp
applymovement LOCALID_DEWFORD_HALL_TWIN, Common_Movement_WalkInPlaceFasterUp
waitmovement 0
release
end
Expand Down Expand Up @@ -191,7 +186,7 @@ DewfordTown_Hall_EventScript_DontMovePlayer1::
return

DewfordTown_Hall_EventScript_DebateReact1::
applymovement LOCALID_PSYCHIC_M, DewfordTown_Hall_Movement_PsychicWalkInPlaceLeft
applymovement LOCALID_DEWFORD_HALL_PSYCHIC_M, DewfordTown_Hall_Movement_PsychicWalkInPlaceLeft
waitmovement 0
goto_if_eq VAR_0x8008, 0, DewfordTown_Hall_EventScript_PlayerReactWest
goto_if_eq VAR_0x8008, 1, DewfordTown_Hall_EventScript_DontMovePlayer2
Expand All @@ -207,7 +202,7 @@ DewfordTown_Hall_EventScript_DontMovePlayer2::
return

DewfordTown_Hall_EventScript_DebateReact2::
applymovement LOCALID_SCHOOL_KID_M, DewfordTown_Hall_Movement_SchoolKidWalkInPlaceRight
applymovement LOCALID_DEWFORD_HALL_SCHOOL_KID_M, DewfordTown_Hall_Movement_SchoolKidWalkInPlaceRight
waitmovement 0
goto_if_eq VAR_0x8008, 0, DewfordTown_Hall_EventScript_PlayerReactNorthSouth
goto_if_eq VAR_0x8008, 1, DewfordTown_Hall_EventScript_PlayerReactEast
Expand Down
Loading

0 comments on commit cb66ea6

Please sign in to comment.