diff --git a/Makefile b/Makefile index 6d66c34d65cc..9320b98d485f 100644 --- a/Makefile +++ b/Makefile @@ -281,7 +281,8 @@ generated: $(AUTO_GEN_TARGETS) %.rl: % ; $(GFX) $< $@ clean-generated: - -rm -f $(AUTO_GEN_TARGETS) + @rm -f $(AUTO_GEN_TARGETS) + @echo "rm -f " ifeq ($(MODERN),0) $(C_BUILDDIR)/libc.o: CC1 := $(TOOLS_DIR)/agbcc/bin/old_agbcc$(EXE) diff --git a/asm/macros/event.inc b/asm/macros/event.inc index b91ac682107c..7b9f39d5f841 100644 --- a/asm/macros/event.inc +++ b/asm/macros/event.inc @@ -604,10 +604,10 @@ .endm @ Blocks script execution until the movements being applied to the specified (localId) object finish. - @ If localId is 0, then the id of the last-moved object will be used instead. If the specified object - @ is not currently being manipulated with applymovement, then this command does nothing. + @ If localId is LOCALID_NONE (0), then the id of the last-moved object will be used instead. + @ If the specified object is not currently being manipulated with applymovement, then this command does nothing. @ If no map is specified, then the current map is used. - .macro waitmovement localId:req, map + .macro waitmovement localId=LOCALID_NONE, map .ifb \map .byte 0x51 .2byte \localId diff --git a/data/event_scripts.s b/data/event_scripts.s index 55720a6addf2..24d0d16b73dc 100644 --- a/data/event_scripts.s +++ b/data/event_scripts.s @@ -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 @@ -784,11 +784,11 @@ RusturfTunnel_EventScript_SetRusturfTunnelOpen:: EventScript_UnusedBoardFerry:: delay 30 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 - showobjectat OBJ_EVENT_ID_PLAYER, 0 + showobjectat LOCALID_PLAYER, 0 delay 30 - applymovement OBJ_EVENT_ID_PLAYER, Movement_UnusedBoardFerry + applymovement LOCALID_PLAYER, Movement_UnusedBoardFerry waitmovement 0 delay 30 return @@ -801,7 +801,7 @@ Common_EventScript_FerryDepartIsland:: call_if_eq VAR_FACING, DIR_SOUTH, Ferry_EventScript_DepartIslandSouth call_if_eq VAR_FACING, DIR_WEST, Ferry_EventScript_DepartIslandWest delay 30 - hideobjectat OBJ_EVENT_ID_PLAYER, 0 + hideobjectat LOCALID_PLAYER, 0 call Common_EventScript_FerryDepart return diff --git a/data/maps/AquaHideout_B2F/map.json b/data/maps/AquaHideout_B2F/map.json index bc58b8d6be9e..fb8bf6ed3645 100644 --- a/data/maps/AquaHideout_B2F/map.json +++ b/data/maps/AquaHideout_B2F/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_AQUA_HIDEOUT_MATT", "graphics_id": "OBJ_EVENT_GFX_AQUA_MEMBER_M", "x": 23, "y": 19, @@ -54,6 +55,7 @@ "flag": "FLAG_ITEM_AQUA_HIDEOUT_B2F_NEST_BALL" }, { + "local_id": "LOCALID_AQUA_HIDEOUT_SUBMARINE", "graphics_id": "OBJ_EVENT_GFX_SUBMARINE_SHADOW", "x": 19, "y": 20, diff --git a/data/maps/AquaHideout_B2F/scripts.inc b/data/maps/AquaHideout_B2F/scripts.inc index 7dc34676b3bf..dab7a4d5366b 100644 --- a/data/maps/AquaHideout_B2F/scripts.inc +++ b/data/maps/AquaHideout_B2F/scripts.inc @@ -1,6 +1,3 @@ -.set LOCALID_MATT, 1 -.set LOCALID_SUBMARINE, 4 - AquaHideout_B2F_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, AquaHideout_B2F_OnTransition .byte 0 @@ -15,7 +12,7 @@ AquaHideout_B2F_EventScript_PreventMattNoticing:: AquaHideout_B2F_EventScript_MattNoticePlayer:: lockall - setvar VAR_0x8008, LOCALID_MATT + setvar VAR_0x8008, LOCALID_AQUA_HIDEOUT_MATT playse SE_PIN applymovement VAR_0x8008, Common_Movement_ExclamationMark waitmovement 0 @@ -32,8 +29,8 @@ AquaHideout_B2F_EventScript_Matt:: end AquaHideout_B2F_EventScript_SubmarineEscape:: - setvar VAR_0x8008, LOCALID_MATT - setvar VAR_0x8009, LOCALID_SUBMARINE + setvar VAR_0x8008, LOCALID_AQUA_HIDEOUT_MATT + setvar VAR_0x8009, LOCALID_AQUA_HIDEOUT_SUBMARINE applymovement VAR_0x8008, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 delay 20 diff --git a/data/maps/BattleFrontier_BattleArenaBattleRoom/map.json b/data/maps/BattleFrontier_BattleArenaBattleRoom/map.json index b7b4e168a677..6aa89f90555c 100644 --- a/data/maps/BattleFrontier_BattleArenaBattleRoom/map.json +++ b/data/maps/BattleFrontier_BattleArenaBattleRoom/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_ARENA_BATTLE_BLACK_BELT_1", "graphics_id": "OBJ_EVENT_GFX_BLACK_BELT", "x": 5, "y": 3, @@ -28,6 +29,7 @@ "flag": "0" }, { + "local_id": "LOCALID_ARENA_BATTLE_BLACK_BELT_2", "graphics_id": "OBJ_EVENT_GFX_BLACK_BELT", "x": 10, "y": 3, @@ -41,6 +43,7 @@ "flag": "0" }, { + "local_id": "LOCALID_ARENA_BATTLE_BLACK_BELT_3", "graphics_id": "OBJ_EVENT_GFX_BLACK_BELT", "x": 5, "y": 9, @@ -54,6 +57,7 @@ "flag": "0" }, { + "local_id": "LOCALID_ARENA_BATTLE_BLACK_BELT_4", "graphics_id": "OBJ_EVENT_GFX_BLACK_BELT", "x": 10, "y": 9, @@ -67,6 +71,7 @@ "flag": "0" }, { + "local_id": "LOCALID_ARENA_BATTLE_ATTENDANT", "graphics_id": "OBJ_EVENT_GFX_BLACK_BELT", "x": 4, "y": 5, @@ -93,6 +98,7 @@ "flag": "0" }, { + "local_id": "LOCALID_ARENA_BATTLE_OPPONENT", "graphics_id": "OBJ_EVENT_GFX_VAR_0", "x": 15, "y": 6, @@ -106,6 +112,7 @@ "flag": "0" }, { + "local_id": "LOCALID_ARENA_BATTLE_PLAYER", "graphics_id": "OBJ_EVENT_GFX_VAR_1", "x": 0, "y": 6, @@ -119,6 +126,7 @@ "flag": "0" }, { + "local_id": "LOCALID_ARENA_BATTLE_ANNOUNCER", "graphics_id": "OBJ_EVENT_GFX_BLACK_BELT", "x": 7, "y": 4, diff --git a/data/maps/BattleFrontier_BattleArenaBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleArenaBattleRoom/scripts.inc index 844ec070a60a..1dec6328d6e9 100644 --- a/data/maps/BattleFrontier_BattleArenaBattleRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattleArenaBattleRoom/scripts.inc @@ -1,12 +1,7 @@ -.set LOCALID_BLACK_BELT_1, 1 -.set LOCALID_BLACK_BELT_2, 2 -.set LOCALID_BLACK_BELT_3, 3 -.set LOCALID_BLACK_BELT_4, 4 -.set LOCALID_ATTENDANT, 5 -.set LOCALID_OPPONENT, 7 -.set LOCALID_PLAYER, 8 -.set LOCALID_ANNOUNCER, 9 - +@ On this map the player will automatically walk into the room, but the camera is supposed to remain still. +@ To do this GF sets the player (LOCALID_PLAYER) invisible and creates a fake player object (LOCALID_ARENA_BATTLE_PLAYER). +@ The graphics of this fake player object are represented with VAR_OBJ_GFX_ID_1. +@ The graphics of the opponent are represented with VAR_OBJ_GFX_ID_0, which will ultimately be set by tower_setopponent. BattleFrontier_BattleArenaBattleRoom_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, BattleFrontier_BattleArenaBattleRoom_OnTransition map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattleArenaBattleRoom_OnFrame @@ -14,9 +9,6 @@ BattleFrontier_BattleArenaBattleRoom_MapScripts:: map_script MAP_SCRIPT_ON_RESUME, BattleFrontier_BattleArenaBattleRoom_OnResume .byte 0 - @ On this map the player (OBJ_EVENT_ID_PLAYER) is hidden - @ The player is represented instead by LOCALID_PLAYER, which has the gfx id VAR_OBJ_GFX_ID_1 - BattleFrontier_BattleArenaBattleRoom_OnResume: special OffsetCameraForBattle end @@ -46,47 +38,47 @@ BattleFrontier_BattleArenaBattleRoom_OnFrame: BattleFrontier_BattleArenaBattleRoom_EventScript_EnterRoom:: lockall - showobjectat LOCALID_PLAYER, MAP_BATTLE_FRONTIER_BATTLE_ARENA_BATTLE_ROOM - applymovement LOCALID_PLAYER, BattleFrontier_BattleArenaBattleRoom_Movement_PlayerEnter + showobjectat LOCALID_ARENA_BATTLE_PLAYER, MAP_BATTLE_FRONTIER_BATTLE_ARENA_BATTLE_ROOM + applymovement LOCALID_ARENA_BATTLE_PLAYER, BattleFrontier_BattleArenaBattleRoom_Movement_PlayerEnter waitmovement 0 frontier_get FRONTIER_DATA_BATTLE_NUM goto_if_eq VAR_RESULT, 0, BattleFrontier_BattleArenaBattleRoom_EventScript_AnnounceTrainers - applymovement LOCALID_ATTENDANT, BattleFrontier_BattleArenaBattleRoom_Movement_WalkInPlaceDown - applymovement LOCALID_PLAYER, BattleFrontier_BattleArenaBattleRoom_Movement_WalkInPlaceLeft + applymovement LOCALID_ARENA_BATTLE_ATTENDANT, BattleFrontier_BattleArenaBattleRoom_Movement_WalkInPlaceDown + applymovement LOCALID_ARENA_BATTLE_PLAYER, BattleFrontier_BattleArenaBattleRoom_Movement_WalkInPlaceLeft setvar VAR_TEMP_2, 1 frontier_set FRONTIER_DATA_RECORD_DISABLED, TRUE goto BattleFrontier_BattleArenaBattleRoom_EventScript_AskReadyForOpponent BattleFrontier_BattleArenaBattleRoom_EventScript_AnnounceTrainers:: tower_setopponent - addobject LOCALID_OPPONENT - applymovement LOCALID_OPPONENT, BattleFrontier_BattleArenaBattleRoom_Movement_OpponentEnter + addobject LOCALID_ARENA_BATTLE_OPPONENT + applymovement LOCALID_ARENA_BATTLE_OPPONENT, BattleFrontier_BattleArenaBattleRoom_Movement_OpponentEnter waitmovement 0 - applymovement LOCALID_ANNOUNCER, BattleFrontier_BattleArenaBattleRoom_Movement_JumpInPlaceDown + applymovement LOCALID_ARENA_BATTLE_ANNOUNCER, BattleFrontier_BattleArenaBattleRoom_Movement_JumpInPlaceDown playse SE_M_BELLY_DRUM waitse waitmovement 0 msgbox BattleFrontier_BattleArenaBattleRoom_Text_PlayerStepForward, MSGBOX_DEFAULT closemessage - applymovement LOCALID_PLAYER, BattleFrontier_BattleArenaBattleRoom_Movement_PlayerStepForward + applymovement LOCALID_ARENA_BATTLE_PLAYER, BattleFrontier_BattleArenaBattleRoom_Movement_PlayerStepForward waitmovement 0 - applymovement LOCALID_ANNOUNCER, BattleFrontier_BattleArenaBattleRoom_Movement_JumpInPlaceDown + applymovement LOCALID_ARENA_BATTLE_ANNOUNCER, BattleFrontier_BattleArenaBattleRoom_Movement_JumpInPlaceDown playse SE_M_BELLY_DRUM waitse waitmovement 0 arena_gettrainername msgbox BattleFrontier_BattleArenaBattleRoom_Text_OpponentStepForward, MSGBOX_DEFAULT closemessage - applymovement LOCALID_OPPONENT, BattleFrontier_BattleArenaBattleRoom_Movement_OpponentStepForward + applymovement LOCALID_ARENA_BATTLE_OPPONENT, BattleFrontier_BattleArenaBattleRoom_Movement_OpponentStepForward waitmovement 0 - applymovement LOCALID_ANNOUNCER, BattleFrontier_BattleArenaBattleRoom_Movement_JumpInPlaceDown + applymovement LOCALID_ARENA_BATTLE_ANNOUNCER, BattleFrontier_BattleArenaBattleRoom_Movement_JumpInPlaceDown playse SE_M_BELLY_DRUM waitse waitmovement 0 msgbox BattleFrontier_BattleArenaBattleRoom_Text_SetKOTourneyBegin, MSGBOX_DEFAULT closemessage - applymovement LOCALID_PLAYER, BattleFrontier_BattleArenaBattleRoom_Movement_PlayerStepForward - applymovement LOCALID_OPPONENT, BattleFrontier_BattleArenaBattleRoom_Movement_OpponentStepForward + applymovement LOCALID_ARENA_BATTLE_PLAYER, BattleFrontier_BattleArenaBattleRoom_Movement_PlayerStepForward + applymovement LOCALID_ARENA_BATTLE_OPPONENT, BattleFrontier_BattleArenaBattleRoom_Movement_OpponentStepForward waitmovement 0 palace_getopponentintro msgbox gStringVar4, MSGBOX_DEFAULT @@ -95,11 +87,11 @@ BattleFrontier_BattleArenaBattleRoom_EventScript_AnnounceTrainers:: switch VAR_RESULT case 1, BattleFrontier_BattleArenaBattleRoom_EventScript_DefeatedOpponent BattleFrontier_BattleArenaBattleRoom_EventScript_DeclareOpponentWinner:: - applymovement LOCALID_ANNOUNCER, BattleFrontier_BattleArenaBattleRoom_Movement_JumpInPlaceDown - applymovement LOCALID_BLACK_BELT_1, BattleFrontier_BattleArenaBattleRoom_Movement_JumpInPlaceDown - applymovement LOCALID_BLACK_BELT_2, BattleFrontier_BattleArenaBattleRoom_Movement_JumpInPlaceDown - applymovement LOCALID_BLACK_BELT_3, BattleFrontier_BattleArenaBattleRoom_Movement_JumpInPlaceUp - applymovement LOCALID_BLACK_BELT_4, BattleFrontier_BattleArenaBattleRoom_Movement_JumpInPlaceUp + applymovement LOCALID_ARENA_BATTLE_ANNOUNCER, BattleFrontier_BattleArenaBattleRoom_Movement_JumpInPlaceDown + applymovement LOCALID_ARENA_BATTLE_BLACK_BELT_1, BattleFrontier_BattleArenaBattleRoom_Movement_JumpInPlaceDown + applymovement LOCALID_ARENA_BATTLE_BLACK_BELT_2, BattleFrontier_BattleArenaBattleRoom_Movement_JumpInPlaceDown + applymovement LOCALID_ARENA_BATTLE_BLACK_BELT_3, BattleFrontier_BattleArenaBattleRoom_Movement_JumpInPlaceUp + applymovement LOCALID_ARENA_BATTLE_BLACK_BELT_4, BattleFrontier_BattleArenaBattleRoom_Movement_JumpInPlaceUp playse SE_M_SNORE waitse waitmovement 0 @@ -117,12 +109,12 @@ BattleFrontier_BattleArenaBattleRoom_EventScript_DefeatedOpponent:: frontier_set FRONTIER_DATA_BATTLE_NUM, VAR_RESULT switch VAR_RESULT case 7, BattleFrontier_BattleArenaBattleRoom_EventScript_ReturnToLobbyWon - applymovement LOCALID_PLAYER, BattleFrontier_BattleArenaBattleRoom_Movement_PlayerWalkBackToLine - applymovement LOCALID_OPPONENT, BattleFrontier_BattleArenaBattleRoom_Movement_OpponentExit + applymovement LOCALID_ARENA_BATTLE_PLAYER, BattleFrontier_BattleArenaBattleRoom_Movement_PlayerWalkBackToLine + applymovement LOCALID_ARENA_BATTLE_OPPONENT, BattleFrontier_BattleArenaBattleRoom_Movement_OpponentExit waitmovement 0 - removeobject LOCALID_OPPONENT - applymovement LOCALID_ATTENDANT, BattleFrontier_BattleArenaBattleRoom_Movement_WalkInPlaceDown - applymovement LOCALID_PLAYER, BattleFrontier_BattleArenaBattleRoom_Movement_WalkInPlaceLeft + removeobject LOCALID_ARENA_BATTLE_OPPONENT + applymovement LOCALID_ARENA_BATTLE_ATTENDANT, BattleFrontier_BattleArenaBattleRoom_Movement_WalkInPlaceDown + applymovement LOCALID_ARENA_BATTLE_PLAYER, BattleFrontier_BattleArenaBattleRoom_Movement_WalkInPlaceLeft waitmovement 0 msgbox BattleFrontier_BattleArenaBattleRoom_Text_MonsWillBeRestored, MSGBOX_DEFAULT special LoadPlayerParty @@ -191,8 +183,8 @@ BattleFrontier_BattleArenaBattleRoom_EventScript_AskRetireChallenge:: BattleFrontier_BattleArenaBattleRoom_EventScript_ContinueChallenge:: closemessage - applymovement LOCALID_PLAYER, BattleFrontier_BattleArenaBattleRoom_Movement_WalkInPlaceRight - applymovement LOCALID_ATTENDANT, BattleFrontier_BattleArenaBattleRoom_Movement_WalkInPlaceRight + applymovement LOCALID_ARENA_BATTLE_PLAYER, BattleFrontier_BattleArenaBattleRoom_Movement_WalkInPlaceRight + applymovement LOCALID_ARENA_BATTLE_ATTENDANT, BattleFrontier_BattleArenaBattleRoom_Movement_WalkInPlaceRight waitmovement 0 goto BattleFrontier_BattleArenaBattleRoom_EventScript_AnnounceTrainers waitstate @@ -269,27 +261,27 @@ BattleFrontier_BattleArenaBattleRoom_EventScript_AskReadyForTycoonNoRecord:: BattleFrontier_BattleArenaBattleRoom_EventScript_BattleGreta:: call BattleFrontier_EventScript_SetBrainObjectGfx - applymovement LOCALID_PLAYER, BattleFrontier_BattleArenaBattleRoom_Movement_WalkInPlaceRight - applymovement LOCALID_ATTENDANT, BattleFrontier_BattleArenaBattleRoom_Movement_WalkInPlaceRight + applymovement LOCALID_ARENA_BATTLE_PLAYER, BattleFrontier_BattleArenaBattleRoom_Movement_WalkInPlaceRight + applymovement LOCALID_ARENA_BATTLE_ATTENDANT, BattleFrontier_BattleArenaBattleRoom_Movement_WalkInPlaceRight waitmovement 0 - applymovement LOCALID_ANNOUNCER, BattleFrontier_BattleArenaBattleRoom_Movement_JumpInPlaceDown + applymovement LOCALID_ARENA_BATTLE_ANNOUNCER, BattleFrontier_BattleArenaBattleRoom_Movement_JumpInPlaceDown playse SE_M_BELLY_DRUM waitse waitmovement 0 msgbox BattleFrontier_BattleArenaBattleRoom_Text_PlayerStepForward, MSGBOX_DEFAULT closemessage - applymovement LOCALID_PLAYER, BattleFrontier_BattleArenaBattleRoom_Movement_PlayerStepForwardLong + applymovement LOCALID_ARENA_BATTLE_PLAYER, BattleFrontier_BattleArenaBattleRoom_Movement_PlayerStepForwardLong waitmovement 0 - applymovement LOCALID_ANNOUNCER, BattleFrontier_BattleArenaBattleRoom_Movement_JumpInPlaceDown + applymovement LOCALID_ARENA_BATTLE_ANNOUNCER, BattleFrontier_BattleArenaBattleRoom_Movement_JumpInPlaceDown playse SE_M_BELLY_DRUM waitse waitmovement 0 msgbox BattleFrontier_BattleArenaBattleRoom_Text_MakeWayForGreta, MSGBOX_DEFAULT closemessage - addobject LOCALID_OPPONENT - applymovement LOCALID_OPPONENT, BattleFrontier_BattleArenaBattleRoom_Movement_GretaEnter + addobject LOCALID_ARENA_BATTLE_OPPONENT + applymovement LOCALID_ARENA_BATTLE_OPPONENT, BattleFrontier_BattleArenaBattleRoom_Movement_GretaEnter waitmovement 0 - applymovement LOCALID_OPPONENT, BattleFrontier_BattleArenaBattleRoom_Movement_OpponentStepForward + applymovement LOCALID_ARENA_BATTLE_OPPONENT, BattleFrontier_BattleArenaBattleRoom_Movement_OpponentStepForward waitmovement 0 switch VAR_TEMP_F case FRONTIER_BRAIN_GOLD, BattleFrontier_BattleArenaBattleRoom_EventScript_IntroGretaGold @@ -300,11 +292,11 @@ BattleFrontier_BattleArenaBattleRoom_EventScript_BattleGreta:: msgbox BattleFrontier_BattleArenaBattleRoom_Text_GretaYoureChallenger, MSGBOX_DEFAULT closemessage frontier_set FRONTIER_DATA_HEARD_BRAIN_SPEECH - applymovement LOCALID_OPPONENT, BattleFrontier_BattleArenaBattleRoom_Movement_GretaLookAroundPlayer + applymovement LOCALID_ARENA_BATTLE_OPPONENT, BattleFrontier_BattleArenaBattleRoom_Movement_GretaLookAroundPlayer waitmovement 0 msgbox BattleFrontier_BattleArenaBattleRoom_Text_IsThatRight, MSGBOX_DEFAULT closemessage - applymovement LOCALID_OPPONENT, BattleFrontier_BattleArenaBattleRoom_Movement_GretaWalkBackToCenter + applymovement LOCALID_ARENA_BATTLE_OPPONENT, BattleFrontier_BattleArenaBattleRoom_Movement_GretaWalkBackToCenter waitmovement 0 msgbox BattleFrontier_BattleArenaBattleRoom_Text_YouLookWeakTakeThingsEasy, MSGBOX_DEFAULT BattleFrontier_BattleArenaBattleRoom_EventScript_BattleGretaSilver:: @@ -317,7 +309,7 @@ BattleFrontier_BattleArenaBattleRoom_EventScript_DefeatedGretaSilver:: call BattleFrontier_BattleArenaBattleRoom_EventScript_DeclarePlayerWinner frontier_getsymbols goto_if_ne VAR_RESULT, 0, BattleFrontier_BattleArenaBattleRoom_EventScript_ReturnToLobbyWon - applymovement LOCALID_OPPONENT, BattleFrontier_BattleArenaBattleRoom_Movement_OpponentStepForwardLong + applymovement LOCALID_ARENA_BATTLE_OPPONENT, BattleFrontier_BattleArenaBattleRoom_Movement_OpponentStepForwardLong waitmovement 0 msgbox BattleFrontier_BattleArenaBattleRoom_Text_GretaYoureToughAfterAll, MSGBOX_DEFAULT playfanfare MUS_OBTAIN_SYMBOL @@ -334,11 +326,11 @@ BattleFrontier_BattleArenaBattleRoom_EventScript_IntroGretaGold:: msgbox BattleFrontier_BattleArenaBattleRoom_Text_GretaLookingForwardToSeeingAgain, MSGBOX_DEFAULT closemessage frontier_set FRONTIER_DATA_HEARD_BRAIN_SPEECH - applymovement LOCALID_OPPONENT, BattleFrontier_BattleArenaBattleRoom_Movement_GretaLookAroundPlayer + applymovement LOCALID_ARENA_BATTLE_OPPONENT, BattleFrontier_BattleArenaBattleRoom_Movement_GretaLookAroundPlayer waitmovement 0 msgbox BattleFrontier_BattleArenaBattleRoom_Text_SoAreYouReady, MSGBOX_DEFAULT closemessage - applymovement LOCALID_OPPONENT, BattleFrontier_BattleArenaBattleRoom_Movement_GretaWalkBackToCenter + applymovement LOCALID_ARENA_BATTLE_OPPONENT, BattleFrontier_BattleArenaBattleRoom_Movement_GretaWalkBackToCenter waitmovement 0 msgbox BattleFrontier_BattleArenaBattleRoom_Text_WontAllowHalfheartedEffort, MSGBOX_DEFAULT BattleFrontier_BattleArenaBattleRoom_EventScript_BattleGretaGold:: @@ -351,7 +343,7 @@ BattleFrontier_BattleArenaBattleRoom_EventScript_DefeatedGretaGold:: call BattleFrontier_BattleArenaBattleRoom_EventScript_DeclarePlayerWinner frontier_getsymbols goto_if_eq VAR_RESULT, 2, BattleFrontier_BattleArenaBattleRoom_EventScript_ReturnToLobbyWon - applymovement LOCALID_OPPONENT, BattleFrontier_BattleArenaBattleRoom_Movement_OpponentStepForwardLong + applymovement LOCALID_ARENA_BATTLE_OPPONENT, BattleFrontier_BattleArenaBattleRoom_Movement_OpponentStepForwardLong waitmovement 0 msgbox BattleFrontier_BattleArenaBattleRoom_Text_GretaBlownAway, MSGBOX_DEFAULT playfanfare MUS_OBTAIN_SYMBOL @@ -382,11 +374,11 @@ BattleFrontier_BattleArenaBattleRoom_EventScript_DoArenaBattle:: return BattleFrontier_BattleArenaBattleRoom_EventScript_DeclarePlayerWinner:: - applymovement LOCALID_ANNOUNCER, BattleFrontier_BattleArenaBattleRoom_Movement_JumpInPlaceDown - applymovement LOCALID_BLACK_BELT_1, BattleFrontier_BattleArenaBattleRoom_Movement_JumpInPlaceDown - applymovement LOCALID_BLACK_BELT_2, BattleFrontier_BattleArenaBattleRoom_Movement_JumpInPlaceDown - applymovement LOCALID_BLACK_BELT_3, BattleFrontier_BattleArenaBattleRoom_Movement_JumpInPlaceUp - applymovement LOCALID_BLACK_BELT_4, BattleFrontier_BattleArenaBattleRoom_Movement_JumpInPlaceUp + applymovement LOCALID_ARENA_BATTLE_ANNOUNCER, BattleFrontier_BattleArenaBattleRoom_Movement_JumpInPlaceDown + applymovement LOCALID_ARENA_BATTLE_BLACK_BELT_1, BattleFrontier_BattleArenaBattleRoom_Movement_JumpInPlaceDown + applymovement LOCALID_ARENA_BATTLE_BLACK_BELT_2, BattleFrontier_BattleArenaBattleRoom_Movement_JumpInPlaceDown + applymovement LOCALID_ARENA_BATTLE_BLACK_BELT_3, BattleFrontier_BattleArenaBattleRoom_Movement_JumpInPlaceUp + applymovement LOCALID_ARENA_BATTLE_BLACK_BELT_4, BattleFrontier_BattleArenaBattleRoom_Movement_JumpInPlaceUp playse SE_BANG waitse waitmovement 0 @@ -469,10 +461,10 @@ BattleFrontier_BattleArenaBattleRoom_OnWarp: .2byte 0 BattleFrontier_BattleArenaBattleRoom_EventScript_SetUpRoomObjects:: - hideobjectat LOCALID_PLAYER, MAP_BATTLE_FRONTIER_BATTLE_ARENA_BATTLE_ROOM - removeobject LOCALID_OPPONENT + hideobjectat LOCALID_ARENA_BATTLE_PLAYER, MAP_BATTLE_FRONTIER_BATTLE_ARENA_BATTLE_ROOM + removeobject LOCALID_ARENA_BATTLE_OPPONENT call BattleFrontier_BattleDomeBattleRoom_EventScript_SetPlayerGfx - applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattleDomeBattleRoom_Movement_SetInvisible + applymovement LOCALID_PLAYER, BattleFrontier_BattleDomeBattleRoom_Movement_SetInvisible setvar VAR_TEMP_1, 1 end diff --git a/data/maps/BattleFrontier_BattleArenaCorridor/map.json b/data/maps/BattleFrontier_BattleArenaCorridor/map.json index dbf609325005..6ec197aba693 100644 --- a/data/maps/BattleFrontier_BattleArenaCorridor/map.json +++ b/data/maps/BattleFrontier_BattleArenaCorridor/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_ARENA_CORRIDOR_ATTENDANT", "graphics_id": "OBJ_EVENT_GFX_BLACK_BELT", "x": 9, "y": 12, diff --git a/data/maps/BattleFrontier_BattleArenaCorridor/scripts.inc b/data/maps/BattleFrontier_BattleArenaCorridor/scripts.inc index 7086819569b9..9b0a1d55ac8b 100644 --- a/data/maps/BattleFrontier_BattleArenaCorridor/scripts.inc +++ b/data/maps/BattleFrontier_BattleArenaCorridor/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_ATTENDANT, 1 - BattleFrontier_BattleArenaCorridor_MapScripts:: map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattleArenaCorridor_OnFrame .byte 0 @@ -11,15 +9,15 @@ BattleFrontier_BattleArenaCorridor_OnFrame: BattleFrontier_BattleArenaCorridor_EventScript_WalkToBattleRoom:: delay 16 setvar VAR_TEMP_0, 1 - applymovement LOCALID_ATTENDANT, BattleFrontier_BattleArenaCorridor_Movement_AttendantWalkToDoor - applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattleArenaCorridor_Movement_PlayerWalkToDoor + applymovement LOCALID_ARENA_CORRIDOR_ATTENDANT, BattleFrontier_BattleArenaCorridor_Movement_AttendantWalkToDoor + applymovement LOCALID_PLAYER, BattleFrontier_BattleArenaCorridor_Movement_PlayerWalkToDoor waitmovement 0 - applymovement LOCALID_ATTENDANT, BattleFrontier_BattleArenaCorridor_Movement_AttendantFacePlayer + applymovement LOCALID_ARENA_CORRIDOR_ATTENDANT, BattleFrontier_BattleArenaCorridor_Movement_AttendantFacePlayer waitmovement 0 msgbox BattleFrontier_BattleArenaCorridor_Text_PleaseStepIn, MSGBOX_SIGN - applymovement LOCALID_ATTENDANT, BattleFrontier_BattleArenaCorridor_Movement_AttendantMoveOutOfWay + applymovement LOCALID_ARENA_CORRIDOR_ATTENDANT, BattleFrontier_BattleArenaCorridor_Movement_AttendantMoveOutOfWay waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattleArenaCorridor_Movement_PlayerEnterDoor + applymovement LOCALID_PLAYER, BattleFrontier_BattleArenaCorridor_Movement_PlayerEnterDoor waitmovement 0 setvar VAR_0x8006, 0 warp MAP_BATTLE_FRONTIER_BATTLE_ARENA_BATTLE_ROOM, 7, 5 diff --git a/data/maps/BattleFrontier_BattleArenaLobby/map.json b/data/maps/BattleFrontier_BattleArenaLobby/map.json index 210da8118c30..0985255d9c44 100644 --- a/data/maps/BattleFrontier_BattleArenaLobby/map.json +++ b/data/maps/BattleFrontier_BattleArenaLobby/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_ARENA_ATTENDANT", "graphics_id": "OBJ_EVENT_GFX_BLACK_BELT", "x": 7, "y": 7, diff --git a/data/maps/BattleFrontier_BattleArenaLobby/scripts.inc b/data/maps/BattleFrontier_BattleArenaLobby/scripts.inc index 5d9ee507ec85..ec655f8424af 100644 --- a/data/maps/BattleFrontier_BattleArenaLobby/scripts.inc +++ b/data/maps/BattleFrontier_BattleArenaLobby/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_ATTENDANT, 1 - BattleFrontier_BattleArenaLobby_MapScripts:: map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattleArenaLobby_OnFrame map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, BattleFrontier_BattleArenaLobby_OnWarp @@ -11,7 +9,7 @@ BattleFrontier_BattleArenaLobby_OnWarp: BattleFrontier_BattleArenaLobby_EventScript_TurnPlayerNorth:: setvar VAR_TEMP_1, 1 - turnobject OBJ_EVENT_ID_PLAYER, DIR_NORTH + turnobject LOCALID_PLAYER, DIR_NORTH end BattleFrontier_BattleArenaLobby_OnFrame: @@ -201,13 +199,13 @@ BattleFrontier_BattleArenaLobby_EventScript_EndCancelChallenge:: end BattleFrontier_BattleArenaLobby_EventScript_WalkToDoorLv50:: - applymovement LOCALID_ATTENDANT, BattleFrontier_BattleArenaLobby_Movement_AttendantWalkToLeftDoor - applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattleArenaLobby_Movement_PlayerWalkToLeftDoor + applymovement LOCALID_ARENA_ATTENDANT, BattleFrontier_BattleArenaLobby_Movement_AttendantWalkToLeftDoor + applymovement LOCALID_PLAYER, BattleFrontier_BattleArenaLobby_Movement_PlayerWalkToLeftDoor waitmovement 0 opendoor 2, 2 waitdooranim - applymovement LOCALID_ATTENDANT, BattleFrontier_BattleArenaLobby_Movement_AttendantEnterDoor - applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattleArenaLobby_Movement_PlayerEnterDoor + applymovement LOCALID_ARENA_ATTENDANT, BattleFrontier_BattleArenaLobby_Movement_AttendantEnterDoor + applymovement LOCALID_PLAYER, BattleFrontier_BattleArenaLobby_Movement_PlayerEnterDoor waitmovement 0 closedoor 2, 2 waitdooranim @@ -250,13 +248,13 @@ BattleFrontier_BattleArenaLobby_Movement_PlayerEnterDoor: step_end BattleFrontier_BattleArenaLobby_EventScript_WalkToDoorLvOpen:: - applymovement LOCALID_ATTENDANT, BattleFrontier_BattleArenaLobby_Movement_AttendantWalkToRightDoor - applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattleArenaLobby_Movement_PlayerWalkToRightDoor + applymovement LOCALID_ARENA_ATTENDANT, BattleFrontier_BattleArenaLobby_Movement_AttendantWalkToRightDoor + applymovement LOCALID_PLAYER, BattleFrontier_BattleArenaLobby_Movement_PlayerWalkToRightDoor waitmovement 0 opendoor 11, 2 waitdooranim - applymovement LOCALID_ATTENDANT, BattleFrontier_BattleArenaLobby_Movement_AttendantEnterDoor - applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattleArenaLobby_Movement_PlayerEnterDoor + applymovement LOCALID_ARENA_ATTENDANT, BattleFrontier_BattleArenaLobby_Movement_AttendantEnterDoor + applymovement LOCALID_PLAYER, BattleFrontier_BattleArenaLobby_Movement_PlayerEnterDoor waitmovement 0 closedoor 11, 2 waitdooranim diff --git a/data/maps/BattleFrontier_BattleDomeBattleRoom/map.json b/data/maps/BattleFrontier_BattleDomeBattleRoom/map.json index c2b427cbe335..b4407e55d6a4 100644 --- a/data/maps/BattleFrontier_BattleDomeBattleRoom/map.json +++ b/data/maps/BattleFrontier_BattleDomeBattleRoom/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_DOME_ANNOUNCER", "graphics_id": "OBJ_EVENT_GFX_REPORTER_M", "x": 5, "y": 4, @@ -28,6 +29,7 @@ "flag": "0" }, { + "local_id": "LOCALID_DOME_AUDIENCE_TWIN", "graphics_id": "OBJ_EVENT_GFX_TWIN", "x": 7, "y": 2, @@ -80,6 +82,7 @@ "flag": "0" }, { + "local_id": "LOCALID_DOME_AUDIENCE_WALKING", "graphics_id": "OBJ_EVENT_GFX_MAN_1", "x": 4, "y": 2, @@ -119,6 +122,7 @@ "flag": "0" }, { + "local_id": "LOCALID_DOME_REFEREE", "graphics_id": "OBJ_EVENT_GFX_MAN_2", "x": 0, "y": 4, @@ -171,6 +175,7 @@ "flag": "0" }, { + "local_id": "LOCALID_DOME_PLAYER", "graphics_id": "OBJ_EVENT_GFX_VAR_1", "x": 4, "y": 9, @@ -197,6 +202,7 @@ "flag": "0" }, { + "local_id": "LOCALID_DOME_OPPONENT", "graphics_id": "OBJ_EVENT_GFX_VAR_0", "x": 11, "y": 6, diff --git a/data/maps/BattleFrontier_BattleDomeBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleDomeBattleRoom/scripts.inc index def903b1dfeb..44ddc0c62b85 100644 --- a/data/maps/BattleFrontier_BattleDomeBattleRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattleDomeBattleRoom/scripts.inc @@ -1,9 +1,7 @@ -.set LOCALID_ANNOUNCER, 1 -.set LOCALID_AUDIENCE_TWIN, 2 -.set LOCALID_AUDIENCE_WALKING, 6 -.set LOCALID_REFEREE, 9 -.set LOCALID_PLAYER, 13 -.set LOCALID_OPPONENT, 15 +@ On this map the player will automatically walk into the room, but the camera is supposed to remain still. +@ To do this GF sets the player (LOCALID_PLAYER) invisible and creates a fake player object (LOCALID_DOME_PLAYER). +@ The graphics of this fake player object are represented with VAR_OBJ_GFX_ID_1. +@ The graphics of the opponent are represented with VAR_OBJ_GFX_ID_0, which will ultimately be set by dome_setopponentgfx. .set NO_DRAW, 0 .set DRAW_TRAINER, 1 @@ -46,20 +44,20 @@ BattleFrontier_BattleDomeBattleRoom_EventScript_EnterRoom:: lockall call BattleFrontier_BattleDomeBattleRoom_EventScript_GetRoundNum call_if_eq VAR_RESULT, DOME_ROUND1, BattleFrontier_BattleDomeBattleRoom_EventScript_TryDoAudienceMemberWalkToSeat - applymovement LOCALID_ANNOUNCER, Common_Movement_WalkInPlaceDown + applymovement LOCALID_DOME_ANNOUNCER, Common_Movement_WalkInPlaceDown waitmovement 0 call BattleFrontier_BattleDomeBattleRoom_EventScript_AnnouncePlayer msgbox BattleFrontier_BattleDomeBattleRoom_Text_PlayerHasEnteredDome, MSGBOX_DEFAULT closemessage - showobjectat LOCALID_PLAYER, MAP_BATTLE_FRONTIER_BATTLE_DOME_BATTLE_ROOM + showobjectat LOCALID_DOME_PLAYER, MAP_BATTLE_FRONTIER_BATTLE_DOME_BATTLE_ROOM goto_if_ne VAR_TEMP_F, DOME_FINAL, BattleFrontier_BattleDomeBattleRoom_EventScript_PlayerEnter goto_if_ne VAR_TEMP_E, FRONTIER_BRAIN_NOT_READY, BattleFrontier_BattleDomeBattleRoom_EventScript_PlayerEnterForTucker BattleFrontier_BattleDomeBattleRoom_EventScript_PlayerEnter:: - applymovement LOCALID_PLAYER, BattleFrontier_BattleDomeBattleRoom_Movement_PlayerEnter + applymovement LOCALID_DOME_PLAYER, BattleFrontier_BattleDomeBattleRoom_Movement_PlayerEnter goto BattleFrontier_BattleDomeBattleRoom_EventScript_AudienceReactToPlayer BattleFrontier_BattleDomeBattleRoom_EventScript_PlayerEnterForTucker:: - applymovement LOCALID_PLAYER, BattleFrontier_BattleDomeBattleRoom_Movement_PlayerEnterForTucker + applymovement LOCALID_DOME_PLAYER, BattleFrontier_BattleDomeBattleRoom_Movement_PlayerEnterForTucker BattleFrontier_BattleDomeBattleRoom_EventScript_AudienceReactToPlayer:: playse SE_M_ENCORE2 call BattleFrontier_BattleDomeBattleRoom_EventScript_AudienceLookAround @@ -70,8 +68,8 @@ BattleFrontier_BattleDomeBattleRoom_EventScript_BattleOpponent:: dome_getopponentname msgbox BattleFrontier_BattleDomeBattleRoom_Text_PlayerVersusTrainer, MSGBOX_DEFAULT closemessage - applymovement LOCALID_PLAYER, BattleFrontier_BattleDomeBattleRoom_Movement_PlayerStepForward - applymovement LOCALID_OPPONENT, BattleFrontier_BattleDomeBattleRoom_Movement_OpponentStepForward + applymovement LOCALID_DOME_PLAYER, BattleFrontier_BattleDomeBattleRoom_Movement_PlayerStepForward + applymovement LOCALID_DOME_OPPONENT, BattleFrontier_BattleDomeBattleRoom_Movement_OpponentStepForward waitmovement 0 tower_getopponentintro 0 msgbox gStringVar4, MSGBOX_DEFAULT @@ -90,19 +88,19 @@ BattleFrontier_BattleDomeBattleRoom_EventScript_Draw:: playse SE_M_ENCORE2 call BattleFrontier_BattleDomeBattleRoom_EventScript_AudienceLookAround delay 60 - applymovement LOCALID_REFEREE, BattleFrontier_BattleDomeBattleRoom_Movement_RefereeEnter + applymovement LOCALID_DOME_REFEREE, BattleFrontier_BattleDomeBattleRoom_Movement_RefereeEnter waitmovement 0 - applymovement LOCALID_ANNOUNCER, BattleFrontier_BattleDomeBattleRoom_Movement_AnnouncerFaceLeft + applymovement LOCALID_DOME_ANNOUNCER, BattleFrontier_BattleDomeBattleRoom_Movement_AnnouncerFaceLeft waitmovement 0 delay 180 - applymovement LOCALID_REFEREE, BattleFrontier_BattleDomeBattleRoom_Movement_RefereeExit + applymovement LOCALID_DOME_REFEREE, BattleFrontier_BattleDomeBattleRoom_Movement_RefereeExit waitmovement 0 goto_if_eq VAR_TEMP_2, DRAW_TUCKER, BattleFrontier_BattleDomeBattleRoom_EventScript_LostToOpponent @ Tucker always wins on a draw dome_compareseeds switch VAR_RESULT case 1, BattleFrontier_BattleDomeBattleRoom_EventScript_DefeatedOpponent BattleFrontier_BattleDomeBattleRoom_EventScript_LostToOpponent:: - applymovement LOCALID_ANNOUNCER, Common_Movement_WalkInPlaceDown + applymovement LOCALID_DOME_ANNOUNCER, Common_Movement_WalkInPlaceDown waitmovement 0 dome_getopponentname call_if_eq VAR_TEMP_2, NO_DRAW, BattleFrontier_BattleDomeBattleRoom_EventScript_OpponentWon @@ -135,7 +133,7 @@ BattleFrontier_BattleDomeBattleRoom_EventScript_TuckerWonDraw:: return BattleFrontier_BattleDomeBattleRoom_EventScript_DefeatedOpponent:: - applymovement LOCALID_ANNOUNCER, Common_Movement_WalkInPlaceDown + applymovement LOCALID_DOME_ANNOUNCER, Common_Movement_WalkInPlaceDown waitmovement 0 call_if_eq VAR_TEMP_2, NO_DRAW, BattleFrontier_BattleDomeBattleRoom_EventScript_PlayerWon call_if_eq VAR_TEMP_2, DRAW_TRAINER, BattleFrontier_BattleDomeBattleRoom_EventScript_PlayerWonDraw @@ -154,7 +152,7 @@ BattleFrontier_BattleDomeBattleRoom_EventScript_DefeatedOpponent:: waitstate BattleFrontier_BattleDomeBattleRoom_EventScript_WonTourney:: - applymovement LOCALID_PLAYER, BattleFrontier_BattleDomeBattleRoom_Movement_PlayerApproachAudience + applymovement LOCALID_DOME_PLAYER, BattleFrontier_BattleDomeBattleRoom_Movement_PlayerApproachAudience waitmovement 0 frontier_get FRONTIER_DATA_LVL_MODE switch VAR_RESULT @@ -340,9 +338,9 @@ BattleFrontier_BattleDomeBattleRoom_EventScript_AnnounceTuckerGold:: msgbox BattleFrontier_BattleDomeBattleRoom_Text_LegendHasReturnedDomeAceTucker, MSGBOX_DEFAULT BattleFrontier_BattleDomeBattleRoom_EventScript_TuckerEnter:: closemessage - applymovement LOCALID_AUDIENCE_TWIN, BattleFrontier_BattleDomeBattleRoom_Movement_AudienceTwinJump - applymovement LOCALID_ANNOUNCER, BattleFrontier_BattleDomeBattleRoom_Movement_AnnouncerMoveForTuckerEntrance - applymovement LOCALID_OPPONENT, BattleFrontier_BattleDomeBattleRoom_Movement_TuckerEnterAndDance + applymovement LOCALID_DOME_AUDIENCE_TWIN, BattleFrontier_BattleDomeBattleRoom_Movement_AudienceTwinJump + applymovement LOCALID_DOME_ANNOUNCER, BattleFrontier_BattleDomeBattleRoom_Movement_AnnouncerMoveForTuckerEntrance + applymovement LOCALID_DOME_OPPONENT, BattleFrontier_BattleDomeBattleRoom_Movement_TuckerEnterAndDance playse SE_M_ENCORE2 call BattleFrontier_BattleDomeBattleRoom_EventScript_AudienceLookAround waitse @@ -384,7 +382,7 @@ BattleFrontier_BattleDomeBattleRoom_EventScript_BattleTuckerSilver:: frontier_getsymbols goto_if_ne VAR_RESULT, 0, BattleFrontier_BattleDomeBattleRoom_EventScript_WonTourney closemessage - applymovement LOCALID_OPPONENT, BattleFrontier_BattleDomeBattleRoom_Movement_TuckerApproachPlayer + applymovement LOCALID_DOME_OPPONENT, BattleFrontier_BattleDomeBattleRoom_Movement_TuckerApproachPlayer waitmovement 0 msgbox BattleFrontier_BattleDomeBattleRoom_Text_SeeYourFrontierPass, MSGBOX_DEFAULT playfanfare MUS_OBTAIN_SYMBOL @@ -412,7 +410,7 @@ BattleFrontier_BattleDomeBattleRoom_EventScript_BattleTuckerGold:: frontier_getsymbols goto_if_eq VAR_RESULT, 2, BattleFrontier_BattleDomeBattleRoom_EventScript_WonTourney closemessage - applymovement LOCALID_OPPONENT, BattleFrontier_BattleDomeBattleRoom_Movement_TuckerApproachPlayer + applymovement LOCALID_DOME_OPPONENT, BattleFrontier_BattleDomeBattleRoom_Movement_TuckerApproachPlayer waitmovement 0 msgbox BattleFrontier_BattleDomeBattleRoom_Text_NeverLostWhenPowerUnleashed, MSGBOX_DEFAULT playfanfare MUS_OBTAIN_SYMBOL @@ -426,8 +424,8 @@ BattleFrontier_BattleDomeBattleRoom_EventScript_BattleTuckerGold:: BattleFrontier_BattleDomeBattleRoom_EventScript_DoTuckerBattle:: msgbox BattleFrontier_BattleDomeBattleRoom_Text_PlayerVersusTucker, MSGBOX_DEFAULT closemessage - applymovement LOCALID_PLAYER, BattleFrontier_BattleDomeBattleRoom_Movement_PlayerStepForward2 - applymovement LOCALID_OPPONENT, BattleFrontier_BattleDomeBattleRoom_Movement_TuckerStepForward + applymovement LOCALID_DOME_PLAYER, BattleFrontier_BattleDomeBattleRoom_Movement_PlayerStepForward2 + applymovement LOCALID_DOME_OPPONENT, BattleFrontier_BattleDomeBattleRoom_Movement_TuckerStepForward waitmovement 0 call BattleFrontier_BattleDomeBattleRoom_EventScript_DoDomeBattle return @@ -462,21 +460,21 @@ BattleFrontier_BattleDomeBattleRoom_OnWarp: .2byte 0 BattleFrontier_BattleDomeBattleRoom_EventScript_SetUpObjects:: - hideobjectat LOCALID_PLAYER, MAP_BATTLE_FRONTIER_BATTLE_DOME_BATTLE_ROOM + hideobjectat LOCALID_DOME_PLAYER, MAP_BATTLE_FRONTIER_BATTLE_DOME_BATTLE_ROOM call BattleFrontier_BattleDomeBattleRoom_EventScript_AddAudience call BattleFrontier_BattleDomeBattleRoom_EventScript_SetPlayerGfx setvar VAR_TEMP_1, 1 - applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattleDomeBattleRoom_Movement_SetInvisible + applymovement LOCALID_PLAYER, BattleFrontier_BattleDomeBattleRoom_Movement_SetInvisible frontier_get FRONTIER_DATA_BATTLE_NUM goto_if_ne VAR_RESULT, DOME_FINAL, BattleFrontier_BattleDomeBattleRoom_EventScript_EndSetUpObjects frontier_getbrainstatus copyvar VAR_TEMP_E, VAR_RESULT goto_if_eq VAR_RESULT, FRONTIER_BRAIN_NOT_READY, BattleFrontier_BattleDomeBattleRoom_EventScript_EndSetUpObjects call BattleFrontier_EventScript_SetBrainObjectGfx - setobjectxyperm LOCALID_OPPONENT, 13, 9 - removeobject LOCALID_OPPONENT - addobject LOCALID_OPPONENT - applymovement LOCALID_OPPONENT, BattleFrontier_BattleDomeBattleRoom_Movement_SetInvisibleFacingUp + setobjectxyperm LOCALID_DOME_OPPONENT, 13, 9 + removeobject LOCALID_DOME_OPPONENT + addobject LOCALID_DOME_OPPONENT + applymovement LOCALID_DOME_OPPONENT, BattleFrontier_BattleDomeBattleRoom_Movement_SetInvisibleFacingUp BattleFrontier_BattleDomeBattleRoom_EventScript_EndSetUpObjects:: end @@ -869,13 +867,13 @@ BattleFrontier_BattleDomeBattleRoom_EventScript_SetWalkingAudienceMemberPos:: random 2 copyvar VAR_TEMP_D, VAR_RESULT goto_if_eq VAR_TEMP_D, 0, Common_EventScript_NopReturn - setobjectxyperm LOCALID_AUDIENCE_WALKING, 2, 0 - setobjectmovementtype LOCALID_AUDIENCE_WALKING, MOVEMENT_TYPE_FACE_RIGHT + setobjectxyperm LOCALID_DOME_AUDIENCE_WALKING, 2, 0 + setobjectmovementtype LOCALID_DOME_AUDIENCE_WALKING, MOVEMENT_TYPE_FACE_RIGHT return BattleFrontier_BattleDomeBattleRoom_EventScript_TryDoAudienceMemberWalkToSeat:: goto_if_eq VAR_TEMP_D, 0, Common_EventScript_NopReturn - applymovement LOCALID_AUDIENCE_WALKING, BattleFrontier_BattleDomeBattleRoom_Movement_AudienceMemberWalkToSeat + applymovement LOCALID_DOME_AUDIENCE_WALKING, BattleFrontier_BattleDomeBattleRoom_Movement_AudienceMemberWalkToSeat return BattleFrontier_BattleDomeBattleRoom_Movement_AudienceTwinJump: diff --git a/data/maps/BattleFrontier_BattleDomeCorridor/map.json b/data/maps/BattleFrontier_BattleDomeCorridor/map.json index 5a68af443c41..bb2088e7fc21 100644 --- a/data/maps/BattleFrontier_BattleDomeCorridor/map.json +++ b/data/maps/BattleFrontier_BattleDomeCorridor/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_DOME_CORRIDOR_ATTENDANT", "graphics_id": "OBJ_EVENT_GFX_TEALA", "x": 23, "y": 5, diff --git a/data/maps/BattleFrontier_BattleDomeCorridor/scripts.inc b/data/maps/BattleFrontier_BattleDomeCorridor/scripts.inc index d286dc8681fa..6eca8152470b 100644 --- a/data/maps/BattleFrontier_BattleDomeCorridor/scripts.inc +++ b/data/maps/BattleFrontier_BattleDomeCorridor/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_ATTENDANT, 1 - BattleFrontier_BattleDomeCorridor_MapScripts:: map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattleDomeCorridor_OnFrame .byte 0 @@ -13,26 +11,26 @@ BattleFrontier_BattleDomeCorridor_EventScript_EnterCorridor:: setvar VAR_TEMP_0, 1 frontier_get FRONTIER_DATA_LVL_MODE goto_if_eq VAR_RESULT, FRONTIER_LVL_OPEN, BattleFrontier_BattleDomeCorridor_EventScript_WalkToBattleRoomLvOpen - applymovement LOCALID_ATTENDANT, BattleFrontier_BattleDomeCorridor_Movement_AttendantWalkToDoorLv50 - applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattleDomeCorridor_Movement_PlayerWalkToDoorLv50 + applymovement LOCALID_DOME_CORRIDOR_ATTENDANT, BattleFrontier_BattleDomeCorridor_Movement_AttendantWalkToDoorLv50 + applymovement LOCALID_PLAYER, BattleFrontier_BattleDomeCorridor_Movement_PlayerWalkToDoorLv50 waitmovement 0 opendoor 13, 3 waitdooranim - applymovement LOCALID_ATTENDANT, BattleFrontier_BattleDomeCorridor_Movement_AttendantEnterDoorLv50 - applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattleDomeCorridor_Movement_PlayerEnterDoorLv50 + applymovement LOCALID_DOME_CORRIDOR_ATTENDANT, BattleFrontier_BattleDomeCorridor_Movement_AttendantEnterDoorLv50 + applymovement LOCALID_PLAYER, BattleFrontier_BattleDomeCorridor_Movement_PlayerEnterDoorLv50 waitmovement 0 closedoor 13, 3 waitdooranim goto BattleFrontier_BattleDomeCorridor_EventScript_WarpToPreBattleRoom BattleFrontier_BattleDomeCorridor_EventScript_WalkToBattleRoomLvOpen:: - applymovement LOCALID_ATTENDANT, BattleFrontier_BattleDomeCorridor_Movement_AttendantWalkToDoorLvOpen - applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattleDomeCorridor_Movement_PlayerWalkToDoorLvOpen + applymovement LOCALID_DOME_CORRIDOR_ATTENDANT, BattleFrontier_BattleDomeCorridor_Movement_AttendantWalkToDoorLvOpen + applymovement LOCALID_PLAYER, BattleFrontier_BattleDomeCorridor_Movement_PlayerWalkToDoorLvOpen waitmovement 0 opendoor 37, 3 waitdooranim - applymovement LOCALID_ATTENDANT, BattleFrontier_BattleDomeCorridor_Movement_AttendantEnterDoorLvOpen - applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattleDomeCorridor_Movement_PlayerEnterDoorLvOpen + applymovement LOCALID_DOME_CORRIDOR_ATTENDANT, BattleFrontier_BattleDomeCorridor_Movement_AttendantEnterDoorLvOpen + applymovement LOCALID_PLAYER, BattleFrontier_BattleDomeCorridor_Movement_PlayerEnterDoorLvOpen waitmovement 0 closedoor 37, 3 waitdooranim diff --git a/data/maps/BattleFrontier_BattleDomeLobby/map.json b/data/maps/BattleFrontier_BattleDomeLobby/map.json index d47bb0f2b42c..283379b0be79 100644 --- a/data/maps/BattleFrontier_BattleDomeLobby/map.json +++ b/data/maps/BattleFrontier_BattleDomeLobby/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_DOME_ATTENDANT_SINGLES", "graphics_id": "OBJ_EVENT_GFX_TEALA", "x": 5, "y": 10, @@ -80,6 +81,7 @@ "flag": "0" }, { + "local_id": "LOCALID_DOME_ATTENDANT_DOUBLES", "graphics_id": "OBJ_EVENT_GFX_TEALA", "x": 17, "y": 10, diff --git a/data/maps/BattleFrontier_BattleDomeLobby/scripts.inc b/data/maps/BattleFrontier_BattleDomeLobby/scripts.inc index 9801b19fe5b8..9bb2914ca383 100644 --- a/data/maps/BattleFrontier_BattleDomeLobby/scripts.inc +++ b/data/maps/BattleFrontier_BattleDomeLobby/scripts.inc @@ -1,6 +1,3 @@ -.set LOCALID_ATTENDANT_SINGLES, 1 -.set LOCALID_ATTENDANT_DOUBLES, 6 - BattleFrontier_BattleDomeLobby_MapScripts:: map_script MAP_SCRIPT_ON_RESUME, BattleFrontier_BattleDomeLobby_OnResume map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattleDomeLobby_OnFrame @@ -17,7 +14,7 @@ BattleFrontier_BattleDomeLobby_OnWarp: BattleFrontier_BattleDomeLobby_EventScript_TurnPlayerNorth:: setvar VAR_TEMP_1, 1 - turnobject OBJ_EVENT_ID_PLAYER, DIR_NORTH + turnobject LOCALID_PLAYER, DIR_NORTH end BattleFrontier_BattleDomeLobby_OnFrame: @@ -231,14 +228,14 @@ BattleFrontier_BattleDomeLobby_EventScript_EndCancelChallenge:: BattleFrontier_BattleDomeLobby_EventScript_WalkToDoor:: call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES, BattleFrontier_BattleDomeLobby_EventScript_SinglesAttendantWalkToDoor call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES, BattleFrontier_BattleDomeLobby_EventScript_DoublesAttendantWalkToDoor - applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattleDomeLobby_Movement_WalkToDoor + applymovement LOCALID_PLAYER, BattleFrontier_BattleDomeLobby_Movement_WalkToDoor waitmovement 0 call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES, BattleFrontier_BattleDomeLobby_EventScript_OpenSinglesDoor call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES, BattleFrontier_BattleDomeLobby_EventScript_OpenDoublesDoor waitdooranim call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES, BattleFrontier_BattleDomeLobby_EventScript_SinglesAttendantEnterDoor call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES, BattleFrontier_BattleDomeLobby_EventScript_DoublesAttendantEnterDoor - applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattleDomeLobby_Movement_PlayerEnterDoor + applymovement LOCALID_PLAYER, BattleFrontier_BattleDomeLobby_Movement_PlayerEnterDoor waitmovement 0 call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES, BattleFrontier_BattleDomeLobby_EventScript_CloseSinglesDoor call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES, BattleFrontier_BattleDomeLobby_EventScript_CloseDoublesDoor @@ -246,19 +243,19 @@ BattleFrontier_BattleDomeLobby_EventScript_WalkToDoor:: return BattleFrontier_BattleDomeLobby_EventScript_SinglesAttendantWalkToDoor:: - applymovement LOCALID_ATTENDANT_SINGLES, BattleFrontier_BattleDomeLobby_Movement_WalkToDoor + applymovement LOCALID_DOME_ATTENDANT_SINGLES, BattleFrontier_BattleDomeLobby_Movement_WalkToDoor return BattleFrontier_BattleDomeLobby_EventScript_DoublesAttendantWalkToDoor:: - applymovement LOCALID_ATTENDANT_DOUBLES, BattleFrontier_BattleDomeLobby_Movement_WalkToDoor + applymovement LOCALID_DOME_ATTENDANT_DOUBLES, BattleFrontier_BattleDomeLobby_Movement_WalkToDoor return BattleFrontier_BattleDomeLobby_EventScript_SinglesAttendantEnterDoor:: - applymovement LOCALID_ATTENDANT_SINGLES, BattleFrontier_BattleDomeLobby_Movement_AttendantEnterDoor + applymovement LOCALID_DOME_ATTENDANT_SINGLES, BattleFrontier_BattleDomeLobby_Movement_AttendantEnterDoor return BattleFrontier_BattleDomeLobby_EventScript_DoublesAttendantEnterDoor:: - applymovement LOCALID_ATTENDANT_DOUBLES, BattleFrontier_BattleDomeLobby_Movement_AttendantEnterDoor + applymovement LOCALID_DOME_ATTENDANT_DOUBLES, BattleFrontier_BattleDomeLobby_Movement_AttendantEnterDoor return BattleFrontier_BattleDomeLobby_EventScript_WelcomeSingles:: diff --git a/data/maps/BattleFrontier_BattleDomePreBattleRoom/map.json b/data/maps/BattleFrontier_BattleDomePreBattleRoom/map.json index a175248ab2ef..5c5b891797eb 100644 --- a/data/maps/BattleFrontier_BattleDomePreBattleRoom/map.json +++ b/data/maps/BattleFrontier_BattleDomePreBattleRoom/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_DOME_PRE_BATTLE_ATTENDANT", "graphics_id": "OBJ_EVENT_GFX_TEALA", "x": 5, "y": 2, diff --git a/data/maps/BattleFrontier_BattleDomePreBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleDomePreBattleRoom/scripts.inc index 6ca4296cc0d1..e06284c2caaf 100644 --- a/data/maps/BattleFrontier_BattleDomePreBattleRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattleDomePreBattleRoom/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_ATTENDANT, 1 - BattleFrontier_BattleDomePreBattleRoom_MapScripts:: map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattleDomePreBattleRoom_OnFrame map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, BattleFrontier_BattleDomePreBattleRoom_OnWarp @@ -11,7 +9,7 @@ BattleFrontier_BattleDomePreBattleRoom_OnWarp: BattleFrontier_BattleDomePreBattleRoom_EventScript_TurnPlayerNorth:: setvar VAR_TEMP_1, 1 - turnobject OBJ_EVENT_ID_PLAYER, DIR_NORTH + turnobject LOCALID_PLAYER, DIR_NORTH end BattleFrontier_BattleDomePreBattleRoom_OnFrame: @@ -22,7 +20,7 @@ BattleFrontier_BattleDomePreBattleRoom_EventScript_EnterRoom:: goto_if_eq VAR_0x8006, 1, BattleFrontier_BattleDomePreBattleRoom_EventScript_ReturnFromBattle frontier_set FRONTIER_DATA_RECORD_DISABLED, TRUE setvar VAR_TEMP_0, 1 - applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattleDomePreBattleRoom_Movement_PlayerEnter + applymovement LOCALID_PLAYER, BattleFrontier_BattleDomePreBattleRoom_Movement_PlayerEnter waitmovement 0 lockall BattleFrontier_BattleDomePreBattleRoom_EventScript_AskReadyForNextRound:: @@ -150,13 +148,13 @@ BattleFrontier_BattleDomePreBattleRoom_EventScript_ContinueChallenge:: dome_setopponent msgbox BattleFrontier_BattleDomePreBattleRoom_Text_RightThisWay, MSGBOX_DEFAULT closemessage - applymovement LOCALID_ATTENDANT, BattleFrontier_BattleDomePreBattleRoom_Movement_AttendantMoveAside + applymovement LOCALID_DOME_PRE_BATTLE_ATTENDANT, BattleFrontier_BattleDomePreBattleRoom_Movement_AttendantMoveAside waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattleDomePreBattleRoom_Movement_PlayerWalkToDoor + applymovement LOCALID_PLAYER, BattleFrontier_BattleDomePreBattleRoom_Movement_PlayerWalkToDoor waitmovement 0 opendoor 5, 1 waitdooranim - applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattleDomePreBattleRoom_Movement_PlayerEnterDoor + applymovement LOCALID_PLAYER, BattleFrontier_BattleDomePreBattleRoom_Movement_PlayerEnterDoor waitmovement 0 closedoor 5, 1 waitdooranim diff --git a/data/maps/BattleFrontier_BattleFactoryBattleRoom/map.json b/data/maps/BattleFrontier_BattleFactoryBattleRoom/map.json index ef68f89ecb63..dca5284cae79 100644 --- a/data/maps/BattleFrontier_BattleFactoryBattleRoom/map.json +++ b/data/maps/BattleFrontier_BattleFactoryBattleRoom/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_FACTORY_BATTLE_SCIENTIST_1", "graphics_id": "OBJ_EVENT_GFX_SCIENTIST_1", "x": 0, "y": 6, @@ -28,6 +29,7 @@ "flag": "0" }, { + "local_id": "LOCALID_FACTORY_BATTLE_OPPONENT", "graphics_id": "OBJ_EVENT_GFX_VAR_0", "x": 7, "y": 4, @@ -41,6 +43,7 @@ "flag": "0" }, { + "local_id": "LOCALID_FACTORY_BATTLE_SCIENTIST_2", "graphics_id": "OBJ_EVENT_GFX_SCIENTIST_1", "x": 0, "y": 4, @@ -54,6 +57,7 @@ "flag": "0" }, { + "local_id": "LOCALID_FACTORY_BATTLE_SCIENTIST_3", "graphics_id": "OBJ_EVENT_GFX_SCIENTIST_1", "x": 0, "y": 8, @@ -67,6 +71,7 @@ "flag": "0" }, { + "local_id": "LOCALID_FACTORY_BATTLE_SCIENTIST_4", "graphics_id": "OBJ_EVENT_GFX_SCIENTIST_1", "x": 12, "y": 4, @@ -80,6 +85,7 @@ "flag": "0" }, { + "local_id": "LOCALID_FACTORY_BATTLE_SCIENTIST_5", "graphics_id": "OBJ_EVENT_GFX_SCIENTIST_1", "x": 12, "y": 6, @@ -93,6 +99,7 @@ "flag": "0" }, { + "local_id": "LOCALID_FACTORY_BATTLE_SCIENTIST_6", "graphics_id": "OBJ_EVENT_GFX_SCIENTIST_1", "x": 12, "y": 8, @@ -106,6 +113,7 @@ "flag": "0" }, { + "local_id": "LOCALID_FACTORY_BATTLE_PLAYER", "graphics_id": "OBJ_EVENT_GFX_VAR_F", "x": 5, "y": 11, diff --git a/data/maps/BattleFrontier_BattleFactoryBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleFactoryBattleRoom/scripts.inc index cf44e3118e90..e6da4070f7b2 100644 --- a/data/maps/BattleFrontier_BattleFactoryBattleRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattleFactoryBattleRoom/scripts.inc @@ -1,11 +1,7 @@ -.set LOCALID_SCIENTIST_1, 1 -.set LOCALID_OPPONENT, 2 -.set LOCALID_SCIENTIST_2, 3 -.set LOCALID_SCIENTIST_3, 4 -.set LOCALID_SCIENTIST_4, 5 -.set LOCALID_SCIENTIST_5, 6 -.set LOCALID_SCIENTIST_6, 7 -.set LOCALID_PLAYER, 8 +@ On this map the player will automatically walk into the room, but the camera is supposed to remain still. +@ To do this GF sets the player (LOCALID_PLAYER) invisible and creates a fake player object (LOCALID_FACTORY_BATTLE_PLAYER). +@ The graphics of this fake player object are represented with VAR_OBJ_GFX_ID_F. +@ The graphics of the opponent are represented with VAR_OBJ_GFX_ID_0, which will ultimately be set by factory_setopponentgfx. BattleFrontier_BattleFactoryBattleRoom_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, BattleFrontier_BattleFactoryBattleRoom_OnTransition @@ -13,9 +9,6 @@ BattleFrontier_BattleFactoryBattleRoom_MapScripts:: map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattleFactoryBattleRoom_OnFrame .byte 0 - @ On this map the player (OBJ_EVENT_ID_PLAYER) is hidden - @ The player is represented instead by LOCALID_PLAYER, which has the gfx id VAR_OBJ_GFX_ID_F - BattleFrontier_BattleFactoryBattleRoom_OnTransition: frontier_settrainers checkplayergender @@ -28,7 +21,7 @@ BattleFrontier_BattleFactoryBattleRoom_OnTransition: BattleFrontier_BattleFactoryBattleRoom_EventScript_SetUpFactoryHeadObj:: call BattleFrontier_EventScript_SetBrainObjectGfx - setobjectxyperm LOCALID_OPPONENT, 7, 9 + setobjectxyperm LOCALID_FACTORY_BATTLE_OPPONENT, 7, 9 end BattleFrontier_BattleFactoryBattleRoom_OnWarp: @@ -37,9 +30,9 @@ BattleFrontier_BattleFactoryBattleRoom_OnWarp: BattleFrontier_BattleFactoryBattleRoom_EventScript_HideObjects:: setvar VAR_TEMP_1, 1 - hideobjectat OBJ_EVENT_ID_PLAYER, MAP_BATTLE_FRONTIER_BATTLE_FACTORY_BATTLE_ROOM + hideobjectat LOCALID_PLAYER, MAP_BATTLE_FRONTIER_BATTLE_FACTORY_BATTLE_ROOM goto_if_ne VAR_TEMP_F, FRONTIER_BRAIN_NOT_READY, BattleFrontier_BattleFactoryBattleRoom_EventScript_EndHideObjects - hideobjectat LOCALID_OPPONENT, MAP_BATTLE_FRONTIER_BATTLE_FACTORY_BATTLE_ROOM + hideobjectat LOCALID_FACTORY_BATTLE_OPPONENT, MAP_BATTLE_FRONTIER_BATTLE_FACTORY_BATTLE_ROOM BattleFrontier_BattleFactoryBattleRoom_EventScript_EndHideObjects:: end @@ -58,9 +51,9 @@ BattleFrontier_BattleFactoryBattleRoom_OnFrame: BattleFrontier_BattleFactoryBattleRoom_EventScript_EnterRoomFactoryHeadBattle:: msgbox BattleFrontier_BattleFactoryBattleRoom_Text_GetAMoveOn, MSGBOX_DEFAULT closemessage - applymovement LOCALID_OPPONENT, BattleFrontier_BattleFactoryBattleRoom_Movement_NolandMoveToBattle + applymovement LOCALID_FACTORY_BATTLE_OPPONENT, BattleFrontier_BattleFactoryBattleRoom_Movement_NolandMoveToBattle + applymovement LOCALID_FACTORY_BATTLE_PLAYER, BattleFrontier_BattleFactoryBattleRoom_Movement_PlayerEnterRoom applymovement LOCALID_PLAYER, BattleFrontier_BattleFactoryBattleRoom_Movement_PlayerEnterRoom - applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattleFactoryBattleRoom_Movement_PlayerEnterRoom waitmovement 0 call BattleFrontier_BattleFactoryBattleRoom_EventScript_ScientistsFaceBattle goto BattleFrontier_BattleFactoryBattleRoom_EventScript_BattleOpponent @@ -68,15 +61,15 @@ BattleFrontier_BattleFactoryBattleRoom_EventScript_EnterRoomFactoryHeadBattle:: BattleFrontier_BattleFactoryBattleRoom_EventScript_EnterRoom:: goto_if_ne VAR_TEMP_F, FRONTIER_BRAIN_NOT_READY, BattleFrontier_BattleFactoryBattleRoom_EventScript_EnterRoomFactoryHeadBattle + applymovement LOCALID_FACTORY_BATTLE_PLAYER, BattleFrontier_BattleFactoryBattleRoom_Movement_PlayerEnterRoom applymovement LOCALID_PLAYER, BattleFrontier_BattleFactoryBattleRoom_Movement_PlayerEnterRoom - applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattleFactoryBattleRoom_Movement_PlayerEnterRoom waitmovement 0 call BattleFrontier_BattleFactoryBattleRoom_EventScript_ScientistsFaceBattle factory_setopponentgfx - removeobject LOCALID_OPPONENT - setobjectxyperm LOCALID_OPPONENT, 7, 1 - addobject LOCALID_OPPONENT - applymovement LOCALID_OPPONENT, BattleFrontier_BattleFactoryBattleRoom_Movement_OpponentEnter + removeobject LOCALID_FACTORY_BATTLE_OPPONENT + setobjectxyperm LOCALID_FACTORY_BATTLE_OPPONENT, 7, 1 + addobject LOCALID_FACTORY_BATTLE_OPPONENT + applymovement LOCALID_FACTORY_BATTLE_OPPONENT, BattleFrontier_BattleFactoryBattleRoom_Movement_OpponentEnter waitmovement 0 BattleFrontier_BattleFactoryBattleRoom_EventScript_BattleOpponent:: goto_if_ne VAR_TEMP_F, FRONTIER_BRAIN_NOT_READY, BattleFrontier_BattleFactoryBattleRoom_EventScript_BattleNoland @@ -138,7 +131,7 @@ BattleFrontier_BattleFactoryBattleRoom_EventScript_DefeatedNolandSilver:: goto_if_ne VAR_RESULT, 0, BattleFrontier_BattleFactoryBattleRoom_EventScript_DefeatedNoland msgbox BattleFrontier_BattleFactoryBattleRoom_Text_NolandLetsSeeFrontierPass, MSGBOX_DEFAULT closemessage - applymovement LOCALID_PLAYER, BattleFrontier_BattleFactoryBattleRoom_Movement_PlayerApproachNoland + applymovement LOCALID_FACTORY_BATTLE_PLAYER, BattleFrontier_BattleFactoryBattleRoom_Movement_PlayerApproachNoland waitmovement 0 playfanfare MUS_OBTAIN_SYMBOL message BattleFrontier_BattleFactoryBattleRoom_Text_ReceivedKnowledgeSymbol @@ -164,7 +157,7 @@ BattleFrontier_BattleFactoryBattleRoom_EventScript_DefeatedNolandGold:: goto_if_eq VAR_RESULT, 2, BattleFrontier_BattleFactoryBattleRoom_EventScript_DefeatedNoland msgbox BattleFrontier_BattleFactoryBattleRoom_Text_OutOfMyLeagueLetsSeePass, MSGBOX_DEFAULT waitmessage - applymovement LOCALID_PLAYER, BattleFrontier_BattleFactoryBattleRoom_Movement_PlayerApproachNoland + applymovement LOCALID_FACTORY_BATTLE_PLAYER, BattleFrontier_BattleFactoryBattleRoom_Movement_PlayerApproachNoland waitmovement 0 playfanfare MUS_OBTAIN_SYMBOL message BattleFrontier_BattleFactoryBattleRoom_Text_KnowledgeSymbolTookGoldenShine @@ -241,12 +234,12 @@ BattleFrontier_BattleFactoryBattleRoom_EventScript_WarpToLobbyDoubles:: end BattleFrontier_BattleFactoryBattleRoom_EventScript_ScientistsFaceBattle:: - applymovement LOCALID_SCIENTIST_1, Common_Movement_WalkInPlaceFasterRight - applymovement LOCALID_SCIENTIST_2, Common_Movement_WalkInPlaceFasterRight - applymovement LOCALID_SCIENTIST_3, Common_Movement_WalkInPlaceFasterRight - applymovement LOCALID_SCIENTIST_4, Common_Movement_WalkInPlaceFasterLeft - applymovement LOCALID_SCIENTIST_5, Common_Movement_WalkInPlaceFasterLeft - applymovement LOCALID_SCIENTIST_6, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_FACTORY_BATTLE_SCIENTIST_1, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_FACTORY_BATTLE_SCIENTIST_2, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_FACTORY_BATTLE_SCIENTIST_3, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_FACTORY_BATTLE_SCIENTIST_4, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_FACTORY_BATTLE_SCIENTIST_5, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_FACTORY_BATTLE_SCIENTIST_6, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 return diff --git a/data/maps/BattleFrontier_BattleFactoryLobby/map.json b/data/maps/BattleFrontier_BattleFactoryLobby/map.json index 15d395fd830c..1375c5f2b552 100644 --- a/data/maps/BattleFrontier_BattleFactoryLobby/map.json +++ b/data/maps/BattleFrontier_BattleFactoryLobby/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_FACTORY_ATTENDANT_SINGLES", "graphics_id": "OBJ_EVENT_GFX_SCIENTIST_1", "x": 4, "y": 7, @@ -80,6 +81,7 @@ "flag": "0" }, { + "local_id": "LOCALID_FACTORY_ATTENDANT_DOUBLES", "graphics_id": "OBJ_EVENT_GFX_SCIENTIST_1", "x": 14, "y": 7, diff --git a/data/maps/BattleFrontier_BattleFactoryLobby/scripts.inc b/data/maps/BattleFrontier_BattleFactoryLobby/scripts.inc index be9caa0cd7f2..e60e73056595 100644 --- a/data/maps/BattleFrontier_BattleFactoryLobby/scripts.inc +++ b/data/maps/BattleFrontier_BattleFactoryLobby/scripts.inc @@ -1,6 +1,3 @@ -.set LOCALID_ATTENDANT_SINGLES, 1 -.set LOCALID_ATTENDANT_DOUBLES, 6 - BattleFrontier_BattleFactoryLobby_MapScripts:: map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattleFactoryLobby_OnFrame map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, BattleFrontier_BattleFactoryLobby_OnWarp @@ -12,7 +9,7 @@ BattleFrontier_BattleFactoryLobby_OnWarp: BattleFrontier_BattleFactoryLobby_EventScript_TurnPlayerNorth:: setvar VAR_TEMP_1, 1 - turnobject OBJ_EVENT_ID_PLAYER, DIR_NORTH + turnobject LOCALID_PLAYER, DIR_NORTH end BattleFrontier_BattleFactoryLobby_OnFrame: @@ -170,7 +167,7 @@ BattleFrontier_BattleFactoryLobby_EventScript_EnterChallenge:: call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES, BattleFrontier_BattleFactoryLobby_EventScript_TalkedToSinglesAttendant call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES, BattleFrontier_BattleFactoryLobby_EventScript_TalkedToDoublesAttendant applymovement VAR_LAST_TALKED, BattleFrontier_BattleFactoryLobby_Movement_AttendantEnterDoor - applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattleFactoryLobby_Movement_PlayerEnterDoor + applymovement LOCALID_PLAYER, BattleFrontier_BattleFactoryLobby_Movement_PlayerEnterDoor waitmovement 0 warp MAP_BATTLE_FRONTIER_BATTLE_FACTORY_PRE_BATTLE_ROOM, 8, 13 setvar VAR_TEMP_CHALLENGE_STATUS, 0 @@ -178,11 +175,11 @@ BattleFrontier_BattleFactoryLobby_EventScript_EnterChallenge:: end BattleFrontier_BattleFactoryLobby_EventScript_TalkedToSinglesAttendant:: - setvar VAR_LAST_TALKED, LOCALID_ATTENDANT_SINGLES + setvar VAR_LAST_TALKED, LOCALID_FACTORY_ATTENDANT_SINGLES return BattleFrontier_BattleFactoryLobby_EventScript_TalkedToDoublesAttendant:: - setvar VAR_LAST_TALKED, LOCALID_ATTENDANT_DOUBLES + setvar VAR_LAST_TALKED, LOCALID_FACTORY_ATTENDANT_DOUBLES return BattleFrontier_BattleFactoryLobby_EventScript_ExplainChallenge:: diff --git a/data/maps/BattleFrontier_BattleFactoryPreBattleRoom/map.json b/data/maps/BattleFrontier_BattleFactoryPreBattleRoom/map.json index cf4ea2a6b40c..9add31441fd8 100644 --- a/data/maps/BattleFrontier_BattleFactoryPreBattleRoom/map.json +++ b/data/maps/BattleFrontier_BattleFactoryPreBattleRoom/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_FACTORY_PRE_BATTLE_ATTENDANT", "graphics_id": "OBJ_EVENT_GFX_SCIENTIST_1", "x": 8, "y": 12, diff --git a/data/maps/BattleFrontier_BattleFactoryPreBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleFactoryPreBattleRoom/scripts.inc index d54cf83570e9..07962bed2a9d 100644 --- a/data/maps/BattleFrontier_BattleFactoryPreBattleRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattleFactoryPreBattleRoom/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_ATTENDANT, 1 - BattleFrontier_BattleFactoryPreBattleRoom_MapScripts:: map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattleFactoryPreBattleRoom_OnFrame map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, BattleFrontier_BattleFactoryPreBattleRoom_OnWarp @@ -12,10 +10,10 @@ BattleFrontier_BattleFactoryPreBattleRoom_OnWarp: BattleFrontier_BattleFactoryPreBattleRoom_EventScript_SetUpObjects:: setvar VAR_TEMP_1, 1 goto_if_ne VAR_0x8006, 1, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_TurnPlayerNorth - setobjectxy LOCALID_ATTENDANT, 8, 7 - turnobject LOCALID_ATTENDANT, DIR_SOUTH + setobjectxy LOCALID_FACTORY_PRE_BATTLE_ATTENDANT, 8, 7 + turnobject LOCALID_FACTORY_PRE_BATTLE_ATTENDANT, DIR_SOUTH BattleFrontier_BattleFactoryPreBattleRoom_EventScript_TurnPlayerNorth:: - turnobject OBJ_EVENT_ID_PLAYER, DIR_NORTH + turnobject LOCALID_PLAYER, DIR_NORTH end BattleFrontier_BattleFactoryPreBattleRoom_OnFrame: @@ -25,8 +23,8 @@ BattleFrontier_BattleFactoryPreBattleRoom_OnFrame: BattleFrontier_BattleFactoryPreBattleRoom_EventScript_EnterRoom:: goto_if_eq VAR_0x8006, 1, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_ReturnToRoomFromBattle setvar VAR_TEMP_0, 1 - applymovement LOCALID_ATTENDANT, BattleFrontier_BattleFactoryPreBattleRoom_Movement_AttendantEnterRoom - applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattleFactoryPreBattleRoom_Movement_PlayerEnterRoom + applymovement LOCALID_FACTORY_PRE_BATTLE_ATTENDANT, BattleFrontier_BattleFactoryPreBattleRoom_Movement_AttendantEnterRoom + applymovement LOCALID_PLAYER, BattleFrontier_BattleFactoryPreBattleRoom_Movement_PlayerEnterRoom waitmovement 0 goto_if_eq VAR_0x8006, 2, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_ResumeChallenge factory_generaterentalmons @@ -66,11 +64,11 @@ BattleFrontier_BattleFactoryPreBattleRoom_EventScript_ReturnToRoomFromBattle:: waitse msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_WaitFewMoments, MSGBOX_DEFAULT closemessage - applymovement LOCALID_ATTENDANT, BattleFrontier_BattleFactoryPreBattleRoom_Movement_AttendantMoveToReceiveCall + applymovement LOCALID_FACTORY_PRE_BATTLE_ATTENDANT, BattleFrontier_BattleFactoryPreBattleRoom_Movement_AttendantMoveToReceiveCall waitmovement 0 msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_UnderstoodSirWillDo, MSGBOX_DEFAULT closemessage - applymovement LOCALID_ATTENDANT, BattleFrontier_BattleFactoryPreBattleRoom_Movement_AttendantReturnToPlayer + applymovement LOCALID_FACTORY_PRE_BATTLE_ATTENDANT, BattleFrontier_BattleFactoryPreBattleRoom_Movement_AttendantReturnToPlayer waitmovement 0 msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_MessageFromHeadComeRightNow, MSGBOX_DEFAULT closemessage @@ -378,13 +376,13 @@ BattleFrontier_BattleFactoryPreBattleRoom_EventScript_AskSwapBeforeHead:: case MULTI_B_PRESSED, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_EnterBattleRoom BattleFrontier_BattleFactoryPreBattleRoom_EventScript_WalkToBattleRoomLv50:: - applymovement LOCALID_ATTENDANT, BattleFrontier_BattleFactoryPreBattleRoom_Movement_GuideWalkToBattleRoomLv50 - applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattleFactoryPreBattleRoom_Movement_PlayerWalkToBattleRoomLv50 + applymovement LOCALID_FACTORY_PRE_BATTLE_ATTENDANT, BattleFrontier_BattleFactoryPreBattleRoom_Movement_GuideWalkToBattleRoomLv50 + applymovement LOCALID_PLAYER, BattleFrontier_BattleFactoryPreBattleRoom_Movement_PlayerWalkToBattleRoomLv50 return BattleFrontier_BattleFactoryPreBattleRoom_EventScript_WalkToBattleRoomLvOpen:: - applymovement LOCALID_ATTENDANT, BattleFrontier_BattleFactoryPreBattleRoom_Movement_GuideWalkToBattleRoomLvOpen - applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattleFactoryPreBattleRoom_Movement_PlayerWalkToBattleRoomLvOpen + applymovement LOCALID_FACTORY_PRE_BATTLE_ATTENDANT, BattleFrontier_BattleFactoryPreBattleRoom_Movement_GuideWalkToBattleRoomLvOpen + applymovement LOCALID_PLAYER, BattleFrontier_BattleFactoryPreBattleRoom_Movement_PlayerWalkToBattleRoomLvOpen return BattleFrontier_BattleFactoryPreBattleRoom_Movement_PlayerEnterRoom: diff --git a/data/maps/BattleFrontier_BattlePalaceBattleRoom/map.json b/data/maps/BattleFrontier_BattlePalaceBattleRoom/map.json index a0d00b5c0117..e344c99951cf 100644 --- a/data/maps/BattleFrontier_BattlePalaceBattleRoom/map.json +++ b/data/maps/BattleFrontier_BattlePalaceBattleRoom/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_PALACE_BATTLE_PLAYER", "graphics_id": "OBJ_EVENT_GFX_VAR_1", "x": 1, "y": 9, @@ -28,6 +29,7 @@ "flag": "0" }, { + "local_id": "LOCALID_PALACE_BATTLE_OPPONENT", "graphics_id": "OBJ_EVENT_GFX_VAR_0", "x": 13, "y": 1, @@ -41,6 +43,7 @@ "flag": "0" }, { + "local_id": "LOCALID_PALACE_BATTLE_ATTENDANT", "graphics_id": "OBJ_EVENT_GFX_EXPERT_M", "x": 1, "y": 4, @@ -54,6 +57,7 @@ "flag": "0" }, { + "local_id": "LOCALID_PALACE_DUSCLOPS", "graphics_id": "OBJ_EVENT_GFX_DUSCLOPS", "x": 13, "y": 1, @@ -67,6 +71,7 @@ "flag": "0" }, { + "local_id": "LOCALID_PALACE_AZURILL", "graphics_id": "OBJ_EVENT_GFX_AZURILL", "x": 13, "y": 1, diff --git a/data/maps/BattleFrontier_BattlePalaceBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattlePalaceBattleRoom/scripts.inc index 2e9366d44b88..7223b14f3d09 100644 --- a/data/maps/BattleFrontier_BattlePalaceBattleRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattlePalaceBattleRoom/scripts.inc @@ -1,8 +1,7 @@ -.set LOCALID_PLAYER, 1 -.set LOCALID_OPPONENT, 2 -.set LOCALID_ATTENDANT, 3 -.set LOCALID_DUSCLOPS, 4 -.set LOCALID_AZURILL, 5 +@ On this map the player will automatically walk into the room, but the camera is supposed to remain still. +@ To do this GF sets the player (LOCALID_PLAYER) invisible and creates a fake player object (LOCALID_PALACE_BATTLE_PLAYER). +@ The graphics of this fake player object are represented with VAR_OBJ_GFX_ID_1. +@ The graphics of the opponent are represented with VAR_OBJ_GFX_ID_0, which will ultimately be set by tower_setopponent. BattleFrontier_BattlePalaceBattleRoom_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, BattleFrontier_BattlePalaceBattleRoom_OnTransition @@ -10,10 +9,6 @@ BattleFrontier_BattlePalaceBattleRoom_MapScripts:: map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, BattleFrontier_BattlePalaceBattleRoom_OnWarp .byte 0 - @ On this map the player (OBJ_EVENT_ID_PLAYER) is hidden - @ The player is represented instead by LOCALID_PLAYER, which has the gfx id VAR_OBJ_GFX_ID_0 - @ The opponent is represented by LOCALID_OPPONENT, which has the gfx id VAR_OBJ_GFX_ID_1 - BattleFrontier_BattlePalaceBattleRoom_OnTransition: frontier_settrainers call BattleFrontier_BattlePalaceBattleRoom_EventScript_SetPlayerGfx @@ -41,23 +36,23 @@ BattleFrontier_BattlePalaceBattleRoom_OnFrame: .2byte 0 BattleFrontier_BattlePalaceBattleRoom_EventScript_EnterRoom:: - showobjectat LOCALID_PLAYER, MAP_BATTLE_FRONTIER_BATTLE_PALACE_BATTLE_ROOM + showobjectat LOCALID_PALACE_BATTLE_PLAYER, MAP_BATTLE_FRONTIER_BATTLE_PALACE_BATTLE_ROOM frontier_get FRONTIER_DATA_BATTLE_NUM goto_if_eq VAR_RESULT, 0, BattleFrontier_BattlePalaceBattleRoom_EventScript_BeginChallenge - applymovement LOCALID_PLAYER, BattleFrontier_BattlePalaceBattleRoom_Movement_PlayerReturnToChallenge + applymovement LOCALID_PALACE_BATTLE_PLAYER, BattleFrontier_BattlePalaceBattleRoom_Movement_PlayerReturnToChallenge waitmovement 0 - applymovement LOCALID_ATTENDANT, BattleFrontier_BattlePalaceBattleRoom_Movement_FaceDown + applymovement LOCALID_PALACE_BATTLE_ATTENDANT, BattleFrontier_BattlePalaceBattleRoom_Movement_FaceDown setvar VAR_TEMP_2, 1 frontier_set FRONTIER_DATA_RECORD_DISABLED, TRUE goto BattleFrontier_BattlePalaceBattleRoom_EventScript_AskReadyForOpponent BattleFrontier_BattlePalaceBattleRoom_EventScript_BeginChallenge:: - applymovement LOCALID_PLAYER, BattleFrontier_BattlePalaceBattleRoom_Movement_PlayerEnterRoom + applymovement LOCALID_PALACE_BATTLE_PLAYER, BattleFrontier_BattlePalaceBattleRoom_Movement_PlayerEnterRoom waitmovement 0 BattleFrontier_BattlePalaceBattleRoom_EventScript_NextOpponentEnter:: tower_setopponent - addobject LOCALID_OPPONENT - applymovement LOCALID_OPPONENT, BattleFrontier_BattlePalaceBattleRoom_Movement_OpponentEnter + addobject LOCALID_PALACE_BATTLE_OPPONENT + applymovement LOCALID_PALACE_BATTLE_OPPONENT, BattleFrontier_BattlePalaceBattleRoom_Movement_OpponentEnter waitmovement 0 palace_getopponentintro msgbox gStringVar4, MSGBOX_DEFAULT @@ -76,11 +71,11 @@ BattleFrontier_BattlePalaceBattleRoom_EventScript_DefeatedOpponent:: frontier_set FRONTIER_DATA_BATTLE_NUM, VAR_RESULT switch VAR_RESULT case 7, BattleFrontier_BattlePalaceBattleRoom_EventScript_WarpToLobbyWon - applymovement LOCALID_OPPONENT, BattleFrontier_BattlePalaceBattleRoom_Movement_OpponentExit + applymovement LOCALID_PALACE_BATTLE_OPPONENT, BattleFrontier_BattlePalaceBattleRoom_Movement_OpponentExit waitmovement 0 - removeobject LOCALID_OPPONENT - applymovement LOCALID_PLAYER, BattleFrontier_BattlePalaceBattleRoom_Movement_FaceUp - applymovement LOCALID_ATTENDANT, BattleFrontier_BattlePalaceBattleRoom_Movement_FaceDown + removeobject LOCALID_PALACE_BATTLE_OPPONENT + applymovement LOCALID_PALACE_BATTLE_PLAYER, BattleFrontier_BattlePalaceBattleRoom_Movement_FaceUp + applymovement LOCALID_PALACE_BATTLE_ATTENDANT, BattleFrontier_BattlePalaceBattleRoom_Movement_FaceDown waitmovement 0 msgbox BattleFrontier_BattlePalaceBattleRoom_Text_LetMeRestoreYourMons, MSGBOX_DEFAULT special LoadPlayerParty @@ -148,8 +143,8 @@ BattleFrontier_BattlePalaceBattleRoom_EventScript_AskRetireChallenge:: case MULTI_B_PRESSED, BattleFrontier_BattlePalaceBattleRoom_EventScript_AskReadyForOpponent BattleFrontier_BattlePalaceBattleRoom_EventScript_ContinueChallenge:: - applymovement LOCALID_PLAYER, BattleFrontier_BattlePalaceBattleRoom_Movement_FaceRight - applymovement LOCALID_ATTENDANT, BattleFrontier_BattlePalaceBattleRoom_Movement_FaceRight + applymovement LOCALID_PALACE_BATTLE_PLAYER, BattleFrontier_BattlePalaceBattleRoom_Movement_FaceRight + applymovement LOCALID_PALACE_BATTLE_ATTENDANT, BattleFrontier_BattlePalaceBattleRoom_Movement_FaceRight closemessage goto BattleFrontier_BattlePalaceBattleRoom_EventScript_NextOpponentEnter @@ -196,16 +191,16 @@ BattleFrontier_BattlePalaceBattleRoom_EventScript_BattleSpenser:: call BattleFrontier_EventScript_SetBrainObjectGfx msgbox BattleFrontier_BattlePalaceBattleRoom_Text_AnnounceArrivalOfSpenser, MSGBOX_DEFAULT closemessage - applymovement LOCALID_PLAYER, BattleFrontier_BattlePalaceBattleRoom_Movement_FaceRight - applymovement LOCALID_ATTENDANT, BattleFrontier_BattlePalaceBattleRoom_Movement_FaceRight - setobjectxyperm LOCALID_OPPONENT, 15, 1 - addobject LOCALID_OPPONENT - hideobjectat LOCALID_OPPONENT, MAP_BATTLE_FRONTIER_BATTLE_PALACE_BATTLE_ROOM - setobjectxy LOCALID_OPPONENT, 13, 1 - setobjectxyperm LOCALID_OPPONENT, 13, 1 - applymovement LOCALID_DUSCLOPS, BattleFrontier_BattlePalaceBattleRoom_Movement_DusclopsEnter - applymovement LOCALID_AZURILL, BattleFrontier_BattlePalaceBattleRoom_Movement_AzurillEnter - applymovement LOCALID_OPPONENT, BattleFrontier_BattlePalaceBattleRoom_Movement_SpenserEnter + applymovement LOCALID_PALACE_BATTLE_PLAYER, BattleFrontier_BattlePalaceBattleRoom_Movement_FaceRight + applymovement LOCALID_PALACE_BATTLE_ATTENDANT, BattleFrontier_BattlePalaceBattleRoom_Movement_FaceRight + setobjectxyperm LOCALID_PALACE_BATTLE_OPPONENT, 15, 1 + addobject LOCALID_PALACE_BATTLE_OPPONENT + hideobjectat LOCALID_PALACE_BATTLE_OPPONENT, MAP_BATTLE_FRONTIER_BATTLE_PALACE_BATTLE_ROOM + setobjectxy LOCALID_PALACE_BATTLE_OPPONENT, 13, 1 + setobjectxyperm LOCALID_PALACE_BATTLE_OPPONENT, 13, 1 + applymovement LOCALID_PALACE_DUSCLOPS, BattleFrontier_BattlePalaceBattleRoom_Movement_DusclopsEnter + applymovement LOCALID_PALACE_AZURILL, BattleFrontier_BattlePalaceBattleRoom_Movement_AzurillEnter + applymovement LOCALID_PALACE_BATTLE_OPPONENT, BattleFrontier_BattlePalaceBattleRoom_Movement_SpenserEnter waitmovement 0 switch VAR_TEMP_F case FRONTIER_BRAIN_GOLD, BattleFrontier_BattlePalaceBattleRoom_EventScript_IntroSpenserGold @@ -226,18 +221,18 @@ BattleFrontier_BattlePalaceBattleRoom_EventScript_DefeatedSpenserSilver:: frontier_getsymbols goto_if_ne VAR_RESULT, 0, BattleFrontier_BattlePalaceBattleRoom_EventScript_WarpToLobbyWon msgbox BattleFrontier_BattlePalaceBattleRoom_Text_SpenserPostSilverBattle, MSGBOX_DEFAULT - applymovement LOCALID_PLAYER, BattleFrontier_BattlePalaceBattleRoom_Movement_FaceUp - applymovement LOCALID_ATTENDANT, BattleFrontier_BattlePalaceBattleRoom_Movement_FaceDown + applymovement LOCALID_PALACE_BATTLE_PLAYER, BattleFrontier_BattlePalaceBattleRoom_Movement_FaceUp + applymovement LOCALID_PALACE_BATTLE_ATTENDANT, BattleFrontier_BattlePalaceBattleRoom_Movement_FaceDown msgbox BattleFrontier_BattlePalaceBattleRoom_Text_LetsSeeFrontierPass, MSGBOX_DEFAULT playfanfare MUS_OBTAIN_SYMBOL message BattleFrontier_BattlePalaceBattleRoom_Text_ReceivedSpiritsSymbol waitmessage waitfanfare frontier_givesymbol - applymovement LOCALID_OPPONENT, Common_Movement_WalkInPlaceLeft + applymovement LOCALID_PALACE_BATTLE_OPPONENT, Common_Movement_WalkInPlaceLeft waitmovement 0 - applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterRight - applymovement LOCALID_ATTENDANT, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_PALACE_BATTLE_PLAYER, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_PALACE_BATTLE_ATTENDANT, Common_Movement_WalkInPlaceFasterRight waitmovement 0 msgbox BattleFrontier_BattlePalaceBattleRoom_Text_SpenserAwaitNextTime, MSGBOX_DEFAULT goto BattleFrontier_BattlePalaceBattleRoom_EventScript_WarpToLobbyWon @@ -258,18 +253,18 @@ BattleFrontier_BattlePalaceBattleRoom_EventScript_DefeatedSpenserGold:: frontier_getsymbols goto_if_eq VAR_RESULT, 2, BattleFrontier_BattlePalaceBattleRoom_EventScript_WarpToLobbyWon msgbox BattleFrontier_BattlePalaceBattleRoom_Text_SpenserYourTeamIsAdmirable, MSGBOX_DEFAULT - applymovement LOCALID_PLAYER, BattleFrontier_BattlePalaceBattleRoom_Movement_FaceUp - applymovement LOCALID_ATTENDANT, BattleFrontier_BattlePalaceBattleRoom_Movement_FaceDown + applymovement LOCALID_PALACE_BATTLE_PLAYER, BattleFrontier_BattlePalaceBattleRoom_Movement_FaceUp + applymovement LOCALID_PALACE_BATTLE_ATTENDANT, BattleFrontier_BattlePalaceBattleRoom_Movement_FaceDown msgbox BattleFrontier_BattlePalaceBattleRoom_Text_HurryWithFrontierPass, MSGBOX_DEFAULT playfanfare MUS_OBTAIN_SYMBOL message BattleFrontier_BattlePalaceBattleRoom_Text_SpiritsSymbolTookGoldenShine waitmessage waitfanfare frontier_givesymbol - applymovement LOCALID_OPPONENT, Common_Movement_WalkInPlaceLeft + applymovement LOCALID_PALACE_BATTLE_OPPONENT, Common_Movement_WalkInPlaceLeft waitmovement 0 - applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterRight - applymovement LOCALID_ATTENDANT, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_PALACE_BATTLE_PLAYER, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_PALACE_BATTLE_ATTENDANT, Common_Movement_WalkInPlaceFasterRight waitmovement 0 msgbox BattleFrontier_BattlePalaceBattleRoom_Text_SpenserComeSeeMeAgain, MSGBOX_DEFAULT goto BattleFrontier_BattlePalaceBattleRoom_EventScript_WarpToLobbyWon @@ -293,13 +288,13 @@ BattleFrontier_BattlePalaceBattleRoom_OnWarp: .2byte 0 BattleFrontier_BattlePalaceBattleRoom_EventScript_SetUpRoomObjects:: - hideobjectat LOCALID_PLAYER, MAP_BATTLE_FRONTIER_BATTLE_PALACE_BATTLE_ROOM + hideobjectat LOCALID_PALACE_BATTLE_PLAYER, MAP_BATTLE_FRONTIER_BATTLE_PALACE_BATTLE_ROOM call BattleFrontier_BattlePalaceBattleRoom_EventScript_SetPlayerGfx setvar VAR_TEMP_1, 1 - applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattlePalaceBattleRoom_Movement_SetInvisible - removeobject LOCALID_OPPONENT - applymovement LOCALID_DUSCLOPS, BattleFrontier_BattlePalaceBattleRoom_Movement_SetInvisible - applymovement LOCALID_AZURILL, BattleFrontier_BattlePalaceBattleRoom_Movement_SetInvisible + applymovement LOCALID_PLAYER, BattleFrontier_BattlePalaceBattleRoom_Movement_SetInvisible + removeobject LOCALID_PALACE_BATTLE_OPPONENT + applymovement LOCALID_PALACE_DUSCLOPS, BattleFrontier_BattlePalaceBattleRoom_Movement_SetInvisible + applymovement LOCALID_PALACE_AZURILL, BattleFrontier_BattlePalaceBattleRoom_Movement_SetInvisible end BattleFrontier_BattlePalaceBattleRoom_EventScript_ReadyFor2ndOpponent:: diff --git a/data/maps/BattleFrontier_BattlePalaceCorridor/map.json b/data/maps/BattleFrontier_BattlePalaceCorridor/map.json index e96f6d9e8310..477ecc7c8d2e 100644 --- a/data/maps/BattleFrontier_BattlePalaceCorridor/map.json +++ b/data/maps/BattleFrontier_BattlePalaceCorridor/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_PALACE_CORRIDOR_ATTENDANT", "graphics_id": "OBJ_EVENT_GFX_EXPERT_M", "x": 8, "y": 12, diff --git a/data/maps/BattleFrontier_BattlePalaceCorridor/scripts.inc b/data/maps/BattleFrontier_BattlePalaceCorridor/scripts.inc index ad2a2ee9f5b7..08d5a07a5ac3 100644 --- a/data/maps/BattleFrontier_BattlePalaceCorridor/scripts.inc +++ b/data/maps/BattleFrontier_BattlePalaceCorridor/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_ATTENDANT, 1 - BattleFrontier_BattlePalaceCorridor_MapScripts:: map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattlePalaceCorridor_OnFrame .byte 0 @@ -10,8 +8,8 @@ BattleFrontier_BattlePalaceCorridor_OnFrame: BattleFrontier_BattlePalaceCorridor_EventScript_WalkThroughCorridor:: delay 16 - applymovement LOCALID_ATTENDANT, BattleFrontier_BattlePalaceCorridor_Movement_EnterCorridor - applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattlePalaceCorridor_Movement_EnterCorridor + applymovement LOCALID_PALACE_CORRIDOR_ATTENDANT, BattleFrontier_BattlePalaceCorridor_Movement_EnterCorridor + applymovement LOCALID_PLAYER, BattleFrontier_BattlePalaceCorridor_Movement_EnterCorridor waitmovement 0 lockall palace_getcomment @@ -23,26 +21,26 @@ BattleFrontier_BattlePalaceCorridor_EventScript_WalkThroughCorridor:: closemessage frontier_get FRONTIER_DATA_LVL_MODE goto_if_eq VAR_RESULT, FRONTIER_LVL_OPEN, BattleFrontier_BattlePalaceCorridor_EventScript_WalkToOpenBattleRoom - applymovement LOCALID_ATTENDANT, BattleFrontier_BattlePalaceCorridor_Movement_AttendantWalkTo50BattleRoom - applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattlePalaceCorridor_Movement_PlayerWalkTo50BattleRoom + applymovement LOCALID_PALACE_CORRIDOR_ATTENDANT, BattleFrontier_BattlePalaceCorridor_Movement_AttendantWalkTo50BattleRoom + applymovement LOCALID_PLAYER, BattleFrontier_BattlePalaceCorridor_Movement_PlayerWalkTo50BattleRoom waitmovement 0 opendoor 6, 3 waitdooranim - applymovement LOCALID_ATTENDANT, BattleFrontier_BattlePalaceCorridor_Movement_AttendantEnterBattleRoom - applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattlePalaceCorridor_Movement_PlayerEnterBattleRoom + applymovement LOCALID_PALACE_CORRIDOR_ATTENDANT, BattleFrontier_BattlePalaceCorridor_Movement_AttendantEnterBattleRoom + applymovement LOCALID_PLAYER, BattleFrontier_BattlePalaceCorridor_Movement_PlayerEnterBattleRoom waitmovement 0 closedoor 6, 3 waitdooranim goto BattleFrontier_BattlePalaceCorridor_EventScript_WarpToBattleRoom BattleFrontier_BattlePalaceCorridor_EventScript_WalkToOpenBattleRoom:: - applymovement LOCALID_ATTENDANT, BattleFrontier_BattlePalaceCorridor_Movement_AttendantWalkToOpenBattleRoom - applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattlePalaceCorridor_Movement_PlayerWalkToOpenBattleRoom + applymovement LOCALID_PALACE_CORRIDOR_ATTENDANT, BattleFrontier_BattlePalaceCorridor_Movement_AttendantWalkToOpenBattleRoom + applymovement LOCALID_PLAYER, BattleFrontier_BattlePalaceCorridor_Movement_PlayerWalkToOpenBattleRoom waitmovement 0 opendoor 10, 3 waitdooranim - applymovement LOCALID_ATTENDANT, BattleFrontier_BattlePalaceCorridor_Movement_AttendantEnterBattleRoom - applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattlePalaceCorridor_Movement_PlayerEnterBattleRoom + applymovement LOCALID_PALACE_CORRIDOR_ATTENDANT, BattleFrontier_BattlePalaceCorridor_Movement_AttendantEnterBattleRoom + applymovement LOCALID_PLAYER, BattleFrontier_BattlePalaceCorridor_Movement_PlayerEnterBattleRoom waitmovement 0 closedoor 10, 3 waitdooranim diff --git a/data/maps/BattleFrontier_BattlePalaceLobby/map.json b/data/maps/BattleFrontier_BattlePalaceLobby/map.json index 7c8ee0cd134c..90ac895fa482 100644 --- a/data/maps/BattleFrontier_BattlePalaceLobby/map.json +++ b/data/maps/BattleFrontier_BattlePalaceLobby/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_PALACE_ATTENDANT_SINGLES", "graphics_id": "OBJ_EVENT_GFX_EXPERT_M", "x": 5, "y": 6, @@ -80,6 +81,7 @@ "flag": "0" }, { + "local_id": "LOCALID_PALACE_ATTENDANT_DOUBLES", "graphics_id": "OBJ_EVENT_GFX_EXPERT_M", "x": 19, "y": 6, diff --git a/data/maps/BattleFrontier_BattlePalaceLobby/scripts.inc b/data/maps/BattleFrontier_BattlePalaceLobby/scripts.inc index e38ec6f7db72..2816718c64a0 100644 --- a/data/maps/BattleFrontier_BattlePalaceLobby/scripts.inc +++ b/data/maps/BattleFrontier_BattlePalaceLobby/scripts.inc @@ -1,6 +1,3 @@ -.set LOCALID_ATTENDANT_SINGLES, 1 -.set LOCALID_ATTENDANT_DOUBLES, 6 - BattleFrontier_BattlePalaceLobby_MapScripts:: map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattlePalaceLobby_OnFrame map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, BattleFrontier_BattlePalaceLobby_OnWarp @@ -12,7 +9,7 @@ BattleFrontier_BattlePalaceLobby_OnWarp: BattleFrontier_BattlePalaceLobby_EventScript_TurnPlayerNorth:: setvar VAR_TEMP_1, 1 - turnobject OBJ_EVENT_ID_PLAYER, DIR_NORTH + turnobject LOCALID_PLAYER, DIR_NORTH end BattleFrontier_BattlePalaceLobby_OnFrame: @@ -241,13 +238,13 @@ BattleFrontier_BattlePalaceLobby_EventScript_WalkToDoor:: call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES, BattleFrontier_BattlePalaceLobby_EventScript_TalkedToSinglesAttendant call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES, BattleFrontier_BattlePalaceLobby_EventScript_TalkedToDoublesAttendant applymovement VAR_LAST_TALKED, BattleFrontier_BattlePalaceLobby_Movement_WalkToDoor - applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattlePalaceLobby_Movement_WalkToDoor + applymovement LOCALID_PLAYER, BattleFrontier_BattlePalaceLobby_Movement_WalkToDoor waitmovement 0 call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES, BattleFrontier_BattlePalaceLobby_EventScript_OpenSinglesHallDoor call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES, BattleFrontier_BattlePalaceLobby_EventScript_OpenDoublesHallDoor waitdooranim applymovement VAR_LAST_TALKED, BattleFrontier_BattlePalaceLobby_Movement_AttendantEnterDoor - applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattlePalaceLobby_Movement_PlayerEnterDoor + applymovement LOCALID_PLAYER, BattleFrontier_BattlePalaceLobby_Movement_PlayerEnterDoor waitmovement 0 call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES, BattleFrontier_BattlePalaceLobby_EventScript_CloseSinglesHallDoor call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES, BattleFrontier_BattlePalaceLobby_EventScript_CloseDoublesHallDoor @@ -255,11 +252,11 @@ BattleFrontier_BattlePalaceLobby_EventScript_WalkToDoor:: return BattleFrontier_BattlePalaceLobby_EventScript_TalkedToSinglesAttendant:: - setvar VAR_LAST_TALKED, LOCALID_ATTENDANT_SINGLES + setvar VAR_LAST_TALKED, LOCALID_PALACE_ATTENDANT_SINGLES return BattleFrontier_BattlePalaceLobby_EventScript_TalkedToDoublesAttendant:: - setvar VAR_LAST_TALKED, LOCALID_ATTENDANT_DOUBLES + setvar VAR_LAST_TALKED, LOCALID_PALACE_ATTENDANT_DOUBLES return BattleFrontier_BattlePalaceLobby_EventScript_OpenSinglesHallDoor:: diff --git a/data/maps/BattleFrontier_BattlePikeCorridor/map.json b/data/maps/BattleFrontier_BattlePikeCorridor/map.json index 1a5faadeab67..c5f407e8a944 100644 --- a/data/maps/BattleFrontier_BattlePikeCorridor/map.json +++ b/data/maps/BattleFrontier_BattlePikeCorridor/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_PIKE_CORRIDOR_ATTENDANT", "graphics_id": "OBJ_EVENT_GFX_LINK_RECEPTIONIST", "x": 6, "y": 6, diff --git a/data/maps/BattleFrontier_BattlePikeCorridor/scripts.inc b/data/maps/BattleFrontier_BattlePikeCorridor/scripts.inc index fe2c6ed00f50..5d2db019ce88 100644 --- a/data/maps/BattleFrontier_BattlePikeCorridor/scripts.inc +++ b/data/maps/BattleFrontier_BattlePikeCorridor/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_ATTENDANT, 1 - BattleFrontier_BattlePikeCorridor_MapScripts:: map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattlePikeCorridor_OnFrame map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, BattleFrontier_BattlePikeCorridor_OnWarp @@ -14,14 +12,14 @@ BattleFrontier_BattlePikeCorridor_EventScript_EnterCorridor:: frontier_set FRONTIER_DATA_BATTLE_NUM, 1 pike_cleartrainerids pike_nohealing TRUE - applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattlePikeCorridor_Movement_PlayerEnterCorridor - applymovement LOCALID_ATTENDANT, BattleFrontier_BattlePikeCorridor_Movement_AttendantEnterCorridor + applymovement LOCALID_PLAYER, BattleFrontier_BattlePikeCorridor_Movement_PlayerEnterCorridor + applymovement LOCALID_PIKE_CORRIDOR_ATTENDANT, BattleFrontier_BattlePikeCorridor_Movement_AttendantEnterCorridor waitmovement 0 lockall msgbox BattleFrontier_BattlePikeCorridor_Text_YourChallengeHasBegun, MSGBOX_DEFAULT closemessage releaseall - applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattlePikeCorridor_Movement_PlayerExitCorridor + applymovement LOCALID_PLAYER, BattleFrontier_BattlePikeCorridor_Movement_PlayerExitCorridor waitmovement 0 frontier_set FRONTIER_DATA_CHALLENGE_STATUS, 99 call BattleFrontier_BattlePike_EventScript_CloseCurtain @@ -35,7 +33,7 @@ BattleFrontier_BattlePikeCorridor_OnWarp: BattleFrontier_BattlePikeCorridor_EventScript_TurnPlayerNorth:: setvar VAR_TEMP_1, 1 - turnobject OBJ_EVENT_ID_PLAYER, DIR_NORTH + turnobject LOCALID_PLAYER, DIR_NORTH end BattleFrontier_BattlePikeCorridor_Movement_PlayerEnterCorridor: diff --git a/data/maps/BattleFrontier_BattlePikeLobby/map.json b/data/maps/BattleFrontier_BattlePikeLobby/map.json index 0faca2e94fa7..038a3c59bbb4 100644 --- a/data/maps/BattleFrontier_BattlePikeLobby/map.json +++ b/data/maps/BattleFrontier_BattlePikeLobby/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_PIKE_LOBBY_ATTENDANT", "graphics_id": "OBJ_EVENT_GFX_LINK_RECEPTIONIST", "x": 5, "y": 5, diff --git a/data/maps/BattleFrontier_BattlePikeLobby/scripts.inc b/data/maps/BattleFrontier_BattlePikeLobby/scripts.inc index faba545f0e94..ef6869f2c056 100644 --- a/data/maps/BattleFrontier_BattlePikeLobby/scripts.inc +++ b/data/maps/BattleFrontier_BattlePikeLobby/scripts.inc @@ -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 @@ -18,7 +16,7 @@ BattleFrontier_BattlePikeLobby_OnWarp: BattleFrontier_BattlePikeLobby_EventScript_TurnPlayerNorth:: setvar VAR_TEMP_1, 1 - turnobject OBJ_EVENT_ID_PLAYER, DIR_NORTH + turnobject LOCALID_PLAYER, DIR_NORTH end BattleFrontier_BattlePikeLobby_EventScript_GetChallengeStatus:: @@ -198,8 +196,8 @@ BattleFrontier_BattlePikeLobby_EventScript_ShowResults:: end BattleFrontier_BattlePikeLobby_EventScript_WalkToCorridor:: - applymovement LOCALID_ATTENDANT, BattleFrontier_BattlePikeLobby_Movement_AttendantWalkToCorridor - applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattlePikeLobby_Movement_PlayerWalkToCorridor + applymovement LOCALID_PIKE_LOBBY_ATTENDANT, BattleFrontier_BattlePikeLobby_Movement_AttendantWalkToCorridor + applymovement LOCALID_PLAYER, BattleFrontier_BattlePikeLobby_Movement_PlayerWalkToCorridor waitmovement 0 return diff --git a/data/maps/BattleFrontier_BattlePikeRoomFinal/map.json b/data/maps/BattleFrontier_BattlePikeRoomFinal/map.json index 5a53ad19c997..e1b1008a03d7 100644 --- a/data/maps/BattleFrontier_BattlePikeRoomFinal/map.json +++ b/data/maps/BattleFrontier_BattlePikeRoomFinal/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_PIKE_FINAL_ROOM_ATTENDANT", "graphics_id": "OBJ_EVENT_GFX_LINK_RECEPTIONIST", "x": 2, "y": 4, diff --git a/data/maps/BattleFrontier_BattlePikeRoomFinal/scripts.inc b/data/maps/BattleFrontier_BattlePikeRoomFinal/scripts.inc index e0246ed57de7..e847f1f6af20 100644 --- a/data/maps/BattleFrontier_BattlePikeRoomFinal/scripts.inc +++ b/data/maps/BattleFrontier_BattlePikeRoomFinal/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_ATTENDANT, 1 - BattleFrontier_BattlePikeRoomFinal_MapScripts:: map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattlePikeRoomFinal_OnFrame map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, BattleFrontier_BattlePikeRoomFinal_OnWarp @@ -11,7 +9,7 @@ BattleFrontier_BattlePikeRoomFinal_OnFrame: BattleFrontier_BattlePikeRoomFinal_EventScript_EnterRoom:: delay 16 - applymovement LOCALID_ATTENDANT, BattleFrontier_BattlePikeRoomFinal_Movement_AttendantApproachPlayer + applymovement LOCALID_PIKE_FINAL_ROOM_ATTENDANT, BattleFrontier_BattlePikeRoomFinal_Movement_AttendantApproachPlayer waitmovement 0 frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_WON lockall @@ -33,7 +31,7 @@ BattleFrontier_BattlePikeRoomFinal_OnWarp: BattleFrontier_BattlePikeRoomFinal_EventScript_TurnPlayerNorth:: setvar VAR_TEMP_4, 1 - turnobject OBJ_EVENT_ID_PLAYER, DIR_NORTH + turnobject LOCALID_PLAYER, DIR_NORTH end BattleFrontier_BattlePikeRoomFinal_Text_CongratsThisWayPlease: diff --git a/data/maps/BattleFrontier_BattlePikeRoomNormal/map.json b/data/maps/BattleFrontier_BattlePikeRoomNormal/map.json index 82414ac6a303..a75c5de15f0b 100644 --- a/data/maps/BattleFrontier_BattlePikeRoomNormal/map.json +++ b/data/maps/BattleFrontier_BattlePikeRoomNormal/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_PIKE_ROOM_NPC_1", "graphics_id": "OBJ_EVENT_GFX_VAR_0", "x": 4, "y": 4, @@ -28,6 +29,7 @@ "flag": "0" }, { + "local_id": "LOCALID_PIKE_ROOM_NPC_2", "graphics_id": "OBJ_EVENT_GFX_VAR_1", "x": 3, "y": 4, diff --git a/data/maps/BattleFrontier_BattlePikeRoomNormal/scripts.inc b/data/maps/BattleFrontier_BattlePikeRoomNormal/scripts.inc index 45f042e4f8fb..44da68a6d79c 100644 --- a/data/maps/BattleFrontier_BattlePikeRoomNormal/scripts.inc +++ b/data/maps/BattleFrontier_BattlePikeRoomNormal/scripts.inc @@ -1,8 +1,3 @@ -@ Objects in this room are set dynamically with OBJ_EVENT_GFX_VAR_0 and OBJ_EVENT_GFX_VAR_1 -@ Note: LOCALIDs shared with data/scripts/battle_pike.inc -.equ LOCALID_OBJ_0, 1 -.equ LOCALID_OBJ_1, 2 - BattleFrontier_BattlePikeRoomNormal_MapScripts:: map_script MAP_SCRIPT_ON_RESUME, BattleFrontier_BattlePikeRoom_OnResume map_script MAP_SCRIPT_ON_TRANSITION, BattleFrontier_BattlePikeRoom_OnTransition @@ -29,7 +24,7 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_EnterRoom:: BattleFrontier_BattlePikeRoomNormal_EventScript_EnterSingleBattleRoom:: lockall delay 16 - applymovement LOCALID_OBJ_0, BattleFrontier_BattlePikeRoomNormal_Movement_ApproachPlayer + applymovement LOCALID_PIKE_ROOM_NPC_1, BattleFrontier_BattlePikeRoomNormal_Movement_ApproachPlayer waitmovement 0 pike_gettrainerintro 0 msgbox gStringVar4, MSGBOX_DEFAULT @@ -49,7 +44,7 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_WarpToLobbyLost:: end BattleFrontier_BattlePikeRoomNormal_EventScript_WonSingleBattle:: - applymovement LOCALID_OBJ_0, BattleFrontier_BattlePikeRoomNormal_Movement_NPCExit + applymovement LOCALID_PIKE_ROOM_NPC_1, BattleFrontier_BattlePikeRoomNormal_Movement_NPCExit waitmovement 0 end @@ -59,7 +54,7 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_EnterHardBattleRoom:: msgbox BattleFrontier_BattlePikeRoomNormal_Text_BattleSomewhatToughTrainer, MSGBOX_DEFAULT waitmessage closemessage - applymovement LOCALID_OBJ_0, BattleFrontier_BattlePikeRoomNormal_Movement_ApproachPlayer + applymovement LOCALID_PIKE_ROOM_NPC_1, BattleFrontier_BattlePikeRoomNormal_Movement_ApproachPlayer waitmovement 0 pike_gettrainerintro 0 msgbox gStringVar4, MSGBOX_DEFAULT @@ -76,9 +71,9 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_EnterHardBattleRoom:: end BattleFrontier_BattlePikeRoomNormal_EventScript_WonHardBattle:: - applymovement LOCALID_OBJ_0, BattleFrontier_BattlePikeRoomNormal_Movement_NPCExit + applymovement LOCALID_PIKE_ROOM_NPC_1, BattleFrontier_BattlePikeRoomNormal_Movement_NPCExit waitmovement 0 - applymovement LOCALID_OBJ_1, BattleFrontier_BattlePikeRoomNormal_Movement_HealNPCApproachPlayer + applymovement LOCALID_PIKE_ROOM_NPC_2, BattleFrontier_BattlePikeRoomNormal_Movement_HealNPCApproachPlayer waitmovement 0 lock faceplayer @@ -89,14 +84,14 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_WonHardBattle:: msgbox BattleFrontier_BattlePikeRoomNormal_Text_EnjoyRestOfChallenge2, MSGBOX_DEFAULT closemessage release - applymovement LOCALID_OBJ_1, BattleFrontier_BattlePikeRoomNormal_Movement_NPCExit + applymovement LOCALID_PIKE_ROOM_NPC_2, BattleFrontier_BattlePikeRoomNormal_Movement_NPCExit waitmovement 0 end BattleFrontier_BattlePikeRoomNormal_EventScript_EnterBrainRoom:: delay 22 lockall - applymovement LOCALID_OBJ_1, BattleFrontier_BattlePikeRoomNormal_Movement_PreQueenHealNPCApproachPlayer + applymovement LOCALID_PIKE_ROOM_NPC_2, BattleFrontier_BattlePikeRoomNormal_Movement_PreQueenHealNPCApproachPlayer waitmovement 0 pike_prequeenheal switch VAR_RESULT @@ -108,8 +103,8 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_LucyEnter:: msgbox BattleFrontier_BattlePikeRoomNormal_Text_ShallFetchOurMaster, MSGBOX_DEFAULT closemessage special SpawnCameraObject - applymovement OBJ_EVENT_ID_CAMERA, BattleFrontier_BattlePikeRoomNormal_Movement_CameraPanUp - applymovement LOCALID_OBJ_1, BattleFrontier_BattlePikeRoomNormal_Movement_HealNPCExitForLucy + applymovement LOCALID_CAMERA, BattleFrontier_BattlePikeRoomNormal_Movement_CameraPanUp + applymovement LOCALID_PIKE_ROOM_NPC_2, BattleFrontier_BattlePikeRoomNormal_Movement_HealNPCExitForLucy waitmovement 0 playse SE_PIKE_CURTAIN_CLOSE call BattleFrontier_BattlePikeRoomNormal_EventScript_SetCurtainTilesLittleClosed @@ -123,13 +118,13 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_LucyEnter:: playse SE_PIKE_CURTAIN_OPEN delay 65 call BattleFrontier_BattlePikeRoomNormal_EventScript_SetCurtainTilesMostlyClosed - showobjectat LOCALID_OBJ_0, MAP_BATTLE_FRONTIER_BATTLE_PIKE_ROOM_NORMAL + showobjectat LOCALID_PIKE_ROOM_NPC_1, MAP_BATTLE_FRONTIER_BATTLE_PIKE_ROOM_NORMAL delay 4 call BattleFrontier_BattlePikeRoomNormal_EventScript_SetCurtainTilesLittleClosed delay 4 call BattleFrontier_BattlePikeRoomNormal_EventScript_SetCurtainTilesOpen waitse - applymovement LOCALID_OBJ_0, BattleFrontier_BattlePikeRoomNormal_Movement_LucyEnter + applymovement LOCALID_PIKE_ROOM_NPC_1, BattleFrontier_BattlePikeRoomNormal_Movement_LucyEnter waitmovement 0 pike_getbrainstatus switch VAR_RESULT @@ -187,9 +182,9 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_DefeatedLucyGold:: end BattleFrontier_BattlePikeRoomNormal_EventScript_DefeatedLucy:: - applymovement LOCALID_OBJ_0, BattleFrontier_BattlePikeRoomNormal_Movement_LucyMoveAside + applymovement LOCALID_PIKE_ROOM_NPC_1, BattleFrontier_BattlePikeRoomNormal_Movement_LucyMoveAside waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattlePikeRoomNormal_Movement_PlayerWalkUp2 + applymovement LOCALID_PLAYER, BattleFrontier_BattlePikeRoomNormal_Movement_PlayerWalkUp2 waitmovement 0 pike_get PIKE_DATA_WIN_STREAK addvar VAR_RESULT, 1 @@ -220,7 +215,7 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_PreQueenHealTwoMons:: BattleFrontier_BattlePikeRoomNormal_EventScript_EnterFullHealRoom:: lockall delay 16 - applymovement LOCALID_OBJ_0, BattleFrontier_BattlePikeRoomNormal_Movement_ApproachPlayer + applymovement LOCALID_PIKE_ROOM_NPC_1, BattleFrontier_BattlePikeRoomNormal_Movement_ApproachPlayer waitmovement 0 message BattleFrontier_BattlePikeRoomNormal_Text_WillRestoreToFullHealth waitmessage @@ -229,7 +224,7 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_EnterFullHealRoom:: special HealPlayerParty msgbox BattleFrontier_BattlePikeRoomNormal_Text_EnjoyRestOfChallenge, MSGBOX_DEFAULT closemessage - applymovement LOCALID_OBJ_0, BattleFrontier_BattlePikeRoomNormal_Movement_NPCExit + applymovement LOCALID_PIKE_ROOM_NPC_1, BattleFrontier_BattlePikeRoomNormal_Movement_NPCExit waitmovement 0 releaseall end @@ -237,22 +232,22 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_EnterFullHealRoom:: BattleFrontier_BattlePikeRoomNormal_EventScript_EnterDoubleBattleRoom:: lockall delay 16 - applymovement LOCALID_OBJ_0, BattleFrontier_BattlePikeRoomNormal_Movement_Trainer1WalkRight - applymovement LOCALID_OBJ_1, BattleFrontier_BattlePikeRoomNormal_Movement_Trainer2WalkLeft + applymovement LOCALID_PIKE_ROOM_NPC_1, BattleFrontier_BattlePikeRoomNormal_Movement_Trainer1WalkRight + applymovement LOCALID_PIKE_ROOM_NPC_2, BattleFrontier_BattlePikeRoomNormal_Movement_Trainer2WalkLeft waitmovement 0 - applymovement LOCALID_OBJ_0, BattleFrontier_BattlePikeRoomNormal_Movement_DoubleTrainersWalkDown - applymovement LOCALID_OBJ_1, BattleFrontier_BattlePikeRoomNormal_Movement_DoubleTrainersWalkDown + applymovement LOCALID_PIKE_ROOM_NPC_1, BattleFrontier_BattlePikeRoomNormal_Movement_DoubleTrainersWalkDown + applymovement LOCALID_PIKE_ROOM_NPC_2, BattleFrontier_BattlePikeRoomNormal_Movement_DoubleTrainersWalkDown waitmovement 0 - applymovement LOCALID_OBJ_0, BattleFrontier_BattlePikeRoomNormal_Movement_Trainer1FacePlayer - applymovement LOCALID_OBJ_1, BattleFrontier_BattlePikeRoomNormal_Movement_Trainer2FacePlayer + applymovement LOCALID_PIKE_ROOM_NPC_1, BattleFrontier_BattlePikeRoomNormal_Movement_Trainer1FacePlayer + applymovement LOCALID_PIKE_ROOM_NPC_2, BattleFrontier_BattlePikeRoomNormal_Movement_Trainer2FacePlayer waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattlePikeRoomNormal_Movement_PlayerFaceTrainer1 + applymovement LOCALID_PLAYER, BattleFrontier_BattlePikeRoomNormal_Movement_PlayerFaceTrainer1 waitmovement 0 pike_gettrainerintro 0 msgbox gStringVar4, MSGBOX_DEFAULT closemessage delay 16 - applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattlePikeRoomNormal_Movement_PlayerFaceTrainer2 + applymovement LOCALID_PLAYER, BattleFrontier_BattlePikeRoomNormal_Movement_PlayerFaceTrainer2 waitmovement 0 pike_gettrainerintro 1 msgbox gStringVar4, MSGBOX_DEFAULT @@ -267,20 +262,20 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_EnterDoubleBattleRoom:: end BattleFrontier_BattlePikeRoomNormal_EventScript_WonDoubleBattle:: - applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattlePikeRoomNormal_Movement_PlayerFaceTrainer2 + applymovement LOCALID_PLAYER, BattleFrontier_BattlePikeRoomNormal_Movement_PlayerFaceTrainer2 waitmovement 0 - applymovement LOCALID_OBJ_0, BattleFrontier_BattlePikeRoomNormal_Movement_Trainer1Exit + applymovement LOCALID_PIKE_ROOM_NPC_1, BattleFrontier_BattlePikeRoomNormal_Movement_Trainer1Exit waitmovement 0 - applymovement LOCALID_OBJ_1, BattleFrontier_BattlePikeRoomNormal_Movement_Trainer2Exit + applymovement LOCALID_PIKE_ROOM_NPC_2, BattleFrontier_BattlePikeRoomNormal_Movement_Trainer2Exit waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattlePikeRoomNormal_Movement_PlayerFaceUp + applymovement LOCALID_PLAYER, BattleFrontier_BattlePikeRoomNormal_Movement_PlayerFaceUp waitmovement 0 end BattleFrontier_BattlePikeRoomNormal_EventScript_EnterStatusRoom:: lockall message BattleFrontier_BattlePikeRoomNormal_Text_WatchOut - applymovement LOCALID_OBJ_1, BattleFrontier_BattlePikeRoomNormal_Movement_MonApproachPlayer + applymovement LOCALID_PIKE_ROOM_NPC_2, BattleFrontier_BattlePikeRoomNormal_Movement_MonApproachPlayer waitmovement 0 pike_getstatusmon copyvar VAR_0x8004, VAR_RESULT @@ -304,9 +299,9 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_KirliaAttack:: call_if_eq VAR_RESULT, PIKE_STATUS_SLEEP, BattleFrontier_BattlePikeRoomNormal_EventScript_KirliaUsedHypnosis pike_flashscreen waitstate - applymovement LOCALID_OBJ_0, BattleFrontier_BattlePikeRoomNormal_Movement_NPCApproachMon + applymovement LOCALID_PIKE_ROOM_NPC_1, BattleFrontier_BattlePikeRoomNormal_Movement_NPCApproachMon waitmovement 0 - applymovement LOCALID_OBJ_1, BattleFrontier_BattlePikeRoomNormal_Movement_MonFaceNPC + applymovement LOCALID_PIKE_ROOM_NPC_2, BattleFrontier_BattlePikeRoomNormal_Movement_MonFaceNPC waitmovement 0 waitse playmoncry SPECIES_KIRLIA, CRY_MODE_NORMAL @@ -316,8 +311,8 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_KirliaAttack:: playmoncry SPECIES_KIRLIA, CRY_MODE_NORMAL waitmoncry closemessage - applymovement LOCALID_OBJ_1, BattleFrontier_BattlePikeRoomNormal_Movement_MonMoveAside - applymovement LOCALID_OBJ_0, BattleFrontier_BattlePikeRoomNormal_Movement_StatusNPCApproachPlayer + applymovement LOCALID_PIKE_ROOM_NPC_2, BattleFrontier_BattlePikeRoomNormal_Movement_MonMoveAside + applymovement LOCALID_PIKE_ROOM_NPC_1, BattleFrontier_BattlePikeRoomNormal_Movement_StatusNPCApproachPlayer waitmovement 0 msgbox BattleFrontier_BattlePikeRoomNormal_Text_ApologizeForKirlia, MSGBOX_DEFAULT return @@ -333,9 +328,9 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_DusclopsAttack:: call_if_eq VAR_RESULT, PIKE_STATUS_BURN, BattleFrontier_BattlePikeRoomNormal_EventScript_DusclopsUsedWillOWisp pike_flashscreen waitstate - applymovement LOCALID_OBJ_0, BattleFrontier_BattlePikeRoomNormal_Movement_NPCApproachMon + applymovement LOCALID_PIKE_ROOM_NPC_1, BattleFrontier_BattlePikeRoomNormal_Movement_NPCApproachMon waitmovement 0 - applymovement LOCALID_OBJ_1, BattleFrontier_BattlePikeRoomNormal_Movement_MonFaceNPC + applymovement LOCALID_PIKE_ROOM_NPC_2, BattleFrontier_BattlePikeRoomNormal_Movement_MonFaceNPC waitmovement 0 waitse playmoncry SPECIES_DUSCLOPS, CRY_MODE_NORMAL @@ -345,8 +340,8 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_DusclopsAttack:: playmoncry SPECIES_DUSCLOPS, CRY_MODE_NORMAL waitmoncry closemessage - applymovement LOCALID_OBJ_1, BattleFrontier_BattlePikeRoomNormal_Movement_MonMoveAside - applymovement LOCALID_OBJ_0, BattleFrontier_BattlePikeRoomNormal_Movement_StatusNPCApproachPlayer + applymovement LOCALID_PIKE_ROOM_NPC_2, BattleFrontier_BattlePikeRoomNormal_Movement_MonMoveAside + applymovement LOCALID_PIKE_ROOM_NPC_1, BattleFrontier_BattlePikeRoomNormal_Movement_StatusNPCApproachPlayer waitmovement 0 msgbox BattleFrontier_BattlePikeRoomNormal_Text_ApologizeForDusclops, MSGBOX_DEFAULT return @@ -383,7 +378,7 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_DusclopsUsedWillOWisp:: BattleFrontier_BattlePikeRoomNormal_EventScript_DoPikeQueenBattle:: closemessage - applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattlePikeRoomNormal_Movement_PlayerWalkUp2 + applymovement LOCALID_PLAYER, BattleFrontier_BattlePikeRoomNormal_Movement_PlayerWalkUp2 waitmovement 0 setvar VAR_0x8004, SPECIAL_BATTLE_PIKE_SINGLE setvar VAR_0x8005, 0 @@ -562,7 +557,7 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_HealNPC:: msgbox BattleFrontier_BattlePikeRoomNormal_Text_BestOfLuckFarewell, MSGBOX_DEFAULT closemessage release - applymovement LOCALID_OBJ_0, BattleFrontier_BattlePikeRoomNormal_Movement_HealNPCExit + applymovement LOCALID_PIKE_ROOM_NPC_1, BattleFrontier_BattlePikeRoomNormal_Movement_HealNPCExit waitmovement 0 end @@ -587,7 +582,7 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_StatusMon:: msgbox BattleFrontier_BattlePikeRoomNormal_Text_Silence, MSGBOX_DEFAULT closemessage release - applymovement LOCALID_OBJ_1, BattleFrontier_BattlePikeRoomNormal_Movement_MonFaceRight + applymovement LOCALID_PIKE_ROOM_NPC_2, BattleFrontier_BattlePikeRoomNormal_Movement_MonFaceRight waitmovement 0 end diff --git a/data/maps/BattleFrontier_BattlePikeRoomWildMons/scripts.inc b/data/maps/BattleFrontier_BattlePikeRoomWildMons/scripts.inc index 19926b9675e3..9059ee43878f 100644 --- a/data/maps/BattleFrontier_BattlePikeRoomWildMons/scripts.inc +++ b/data/maps/BattleFrontier_BattlePikeRoomWildMons/scripts.inc @@ -26,7 +26,7 @@ BattleFrontier_BattlePikeRoomWildMons_OnWarp: BattleFrontier_BattlePikeRoomWildMons_EventScript_TurnPlayerNorth:: setvar VAR_TEMP_4, 1 - turnobject OBJ_EVENT_ID_PLAYER, DIR_NORTH + turnobject LOCALID_PLAYER, DIR_NORTH end BattleFrontier_BattlePikeRoomWildMons_OnResume: diff --git a/data/maps/BattleFrontier_BattlePikeThreePathRoom/map.json b/data/maps/BattleFrontier_BattlePikeThreePathRoom/map.json index 536e02a89807..9f2000ef1eba 100644 --- a/data/maps/BattleFrontier_BattlePikeThreePathRoom/map.json +++ b/data/maps/BattleFrontier_BattlePikeThreePathRoom/map.json @@ -28,6 +28,7 @@ "flag": "0" }, { + "local_id": "LOCALID_PIKE_HINT_GIVER", "graphics_id": "OBJ_EVENT_GFX_LINK_RECEPTIONIST", "x": 8, "y": 5, diff --git a/data/maps/BattleFrontier_BattlePikeThreePathRoom/scripts.inc b/data/maps/BattleFrontier_BattlePikeThreePathRoom/scripts.inc index 3547871444ab..1baed386ba0e 100644 --- a/data/maps/BattleFrontier_BattlePikeThreePathRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattlePikeThreePathRoom/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_HINT_GIVER, 2 - BattleFrontier_BattlePikeThreePathRoom_MapScripts:: map_script MAP_SCRIPT_ON_RESUME, BattleFrontier_BattlePikeRoom_OnResume map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattlePikeThreePathRoom_OnFrame @@ -20,7 +18,7 @@ BattleFrontier_BattlePikeThreePathRoom_OnWarp: BattleFrontier_BattlePikeThreePathRoom_EventScript_TurnPlayerNorth:: setvar VAR_TEMP_4, 1 - turnobject OBJ_EVENT_ID_PLAYER, DIR_NORTH + turnobject LOCALID_PLAYER, DIR_NORTH end BattleFrontier_BattlePikeThreePathRoom_EventScript_GetChallengeStatus:: @@ -160,12 +158,12 @@ BattleFrontier_BattlePikeThreePathRoom_EventScript_SetPikeQueenHint:: end BattleFrontier_BattlePikeThreePathRoom_EventScript_GivePikeQueenHint:: - applymovement LOCALID_HINT_GIVER, BattleFrontier_BattlePikeThreePathRoom_Movement_HintGiverApproachPlayer + applymovement LOCALID_PIKE_HINT_GIVER, BattleFrontier_BattlePikeThreePathRoom_Movement_HintGiverApproachPlayer waitmovement 0 lockall msgbox BattleFrontier_BattlePikeThreePathRoom_Text_TerrifyingEvent, MSGBOX_DEFAULT releaseall - applymovement LOCALID_HINT_GIVER, BattleFrontier_BattlePikeThreePathRoom_Movement_HintGiverReturnToPos + applymovement LOCALID_PIKE_HINT_GIVER, BattleFrontier_BattlePikeThreePathRoom_Movement_HintGiverReturnToPos waitmovement 0 setvar VAR_TEMP_5, 255 end diff --git a/data/maps/BattleFrontier_BattlePyramidLobby/map.json b/data/maps/BattleFrontier_BattlePyramidLobby/map.json index 4652af27470b..4913cdb9531d 100644 --- a/data/maps/BattleFrontier_BattlePyramidLobby/map.json +++ b/data/maps/BattleFrontier_BattlePyramidLobby/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_PYRAMID_LOBBY_ATTENDANT", "graphics_id": "OBJ_EVENT_GFX_HIKER", "x": 7, "y": 12, @@ -28,6 +29,7 @@ "flag": "0" }, { + "local_id": "LOCALID_PYRAMID_LOBBY_HINT_GIVER", "graphics_id": "OBJ_EVENT_GFX_HEX_MANIAC", "x": 14, "y": 13, diff --git a/data/maps/BattleFrontier_BattlePyramidLobby/scripts.inc b/data/maps/BattleFrontier_BattlePyramidLobby/scripts.inc index 25f5dc2b0445..8fabf8bc134a 100644 --- a/data/maps/BattleFrontier_BattlePyramidLobby/scripts.inc +++ b/data/maps/BattleFrontier_BattlePyramidLobby/scripts.inc @@ -1,6 +1,3 @@ -.set LOCALID_ATTENDANT, 1 -.set LOCALID_HINT_GIVER, 2 - BattleFrontier_BattlePyramidLobby_MapScripts:: map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattlePyramidLobby_OnFrame map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, BattleFrontier_BattleDomeLobby_OnWarp @@ -13,7 +10,7 @@ BattleFrontier_BattlePyramidLobby_OnWarp: BattleFrontier_BattlePyramidLobby_EventScript_TurnPlayerNorth: setvar VAR_TEMP_1, 1 - turnobject OBJ_EVENT_ID_PLAYER, DIR_NORTH + turnobject LOCALID_PLAYER, DIR_NORTH end BattleFrontier_BattlePyramidLobby_OnFrame: @@ -204,7 +201,7 @@ BattleFrontier_BattlePyramidLobby_EventScript_EndCancelChallenge:: BattleFrontier_BattlePyramidLobby_EventScript_HintGiver:: lockall - applymovement LOCALID_HINT_GIVER, Common_Movement_FacePlayer + applymovement LOCALID_PYRAMID_LOBBY_HINT_GIVER, Common_Movement_FacePlayer waitmovement 0 msgbox BattleFrontier_BattlePyramidLobby_Text_TellYouWhatMisfortunesAwait, MSGBOX_DEFAULT call BattleFrontier_BattlePyramidLobby_EventScript_GiveHint @@ -366,8 +363,8 @@ BattleFrontier_BattlePyramidLobby_EventScript_ShowResults:: end BattleFrontier_BattlePyramidLobby_EventScript_WalkToPanelAndReceiveBag:: - applymovement LOCALID_ATTENDANT, BattleFrontier_BattlePyramidLobby_Movement_AttendantWalkToPanel - applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattlePyramidLobby_Movement_PlayerWalkToPanel + applymovement LOCALID_PYRAMID_LOBBY_ATTENDANT, BattleFrontier_BattlePyramidLobby_Movement_AttendantWalkToPanel + applymovement LOCALID_PLAYER, BattleFrontier_BattlePyramidLobby_Movement_PlayerWalkToPanel waitmovement 0 msgbox BattleFrontier_BattlePyramidLobby_Text_WeWillHoldBagForSafekeeping, MSGBOX_DEFAULT pyramid_get PYRAMID_DATA_WIN_STREAK @@ -384,9 +381,9 @@ BattleFrontier_BattlePyramidLobby_EventScript_ReceiveBattleBag:: waitse msgbox BattleFrontier_BattlePyramidLobby_Text_StepOnFloorPanel, MSGBOX_DEFAULT closemessage - applymovement LOCALID_ATTENDANT, BattleFrontier_BattlePyramidLobby_Movement_AttendantMoveAside + applymovement LOCALID_PYRAMID_LOBBY_ATTENDANT, BattleFrontier_BattlePyramidLobby_Movement_AttendantMoveAside waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattlePyramidLobby_Movement_PlayerStepOnPanel + applymovement LOCALID_PLAYER, BattleFrontier_BattlePyramidLobby_Movement_PlayerStepOnPanel waitmovement 0 return diff --git a/data/maps/BattleFrontier_BattlePyramidTop/map.json b/data/maps/BattleFrontier_BattlePyramidTop/map.json index 4299f318347d..570fd27c8d51 100644 --- a/data/maps/BattleFrontier_BattlePyramidTop/map.json +++ b/data/maps/BattleFrontier_BattlePyramidTop/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_PYRAMID_TOP_ATTENDANT", "graphics_id": "OBJ_EVENT_GFX_HIKER", "x": 17, "y": 11, @@ -28,6 +29,7 @@ "flag": "0" }, { + "local_id": "LOCALID_BRANDON", "graphics_id": "OBJ_EVENT_GFX_BRANDON", "x": 17, "y": 7, diff --git a/data/maps/BattleFrontier_BattlePyramidTop/scripts.inc b/data/maps/BattleFrontier_BattlePyramidTop/scripts.inc index fa5763527163..3bf7b7b17e60 100644 --- a/data/maps/BattleFrontier_BattlePyramidTop/scripts.inc +++ b/data/maps/BattleFrontier_BattlePyramidTop/scripts.inc @@ -1,6 +1,3 @@ -.set LOCALID_ATTENDANT, 1 -.set LOCALID_BRANDON, 2 - BattleFrontier_BattlePyramidTop_MapScripts:: map_script MAP_SCRIPT_ON_RESUME, BattleFrontier_BattlePyramidTop_OnResume map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattlePyramidTop_OnFrame @@ -19,7 +16,7 @@ BattleFrontier_BattlePyramidTop_OnWarp: BattleFrontier_BattlePyramidTop_EventScript_SetUpObjects:: setvar VAR_TEMP_1, 1 - turnobject OBJ_EVENT_ID_PLAYER, DIR_NORTH + turnobject LOCALID_PLAYER, DIR_NORTH goto_if_ne VAR_TEMP_C, 0, BattleFrontier_BattlePyramidTop_EventScript_EndSetUpObjects setobjectxyperm LOCALID_BRANDON, 0, 0 BattleFrontier_BattlePyramidTop_EventScript_EndSetUpObjects:: @@ -73,11 +70,11 @@ BattleFrontier_BattlePyramidTop_EventScript_Attendant:: goto_if_ne VAR_TEMP_C, FRONTIER_BRAIN_NOT_READY, BattleFrontier_BattlePyramidTop_EventScript_BrandonHereMoveAside msgbox BattleFrontier_BattlePyramidTop_Text_ReachedSummitUpYouGo, MSGBOX_DEFAULT closemessage - applymovement LOCALID_ATTENDANT, BattleFrontier_BattlePyramidTop_Movement_AttendantMoveAside + applymovement LOCALID_PYRAMID_TOP_ATTENDANT, BattleFrontier_BattlePyramidTop_Movement_AttendantMoveAside waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattlePyramidTop_Movement_PlayerClimbToTop + applymovement LOCALID_PLAYER, BattleFrontier_BattlePyramidTop_Movement_PlayerClimbToTop waitmovement 0 - applymovement LOCALID_ATTENDANT, BattleFrontier_BattlePyramidTop_Movement_AttendantBlockPath + applymovement LOCALID_PYRAMID_TOP_ATTENDANT, BattleFrontier_BattlePyramidTop_Movement_AttendantBlockPath waitmovement 0 message BattleFrontier_BattlePyramidTop_Text_PlayerConqueredPyramid waitmessage @@ -97,7 +94,7 @@ BattleFrontier_BattlePyramidTop_EventScript_StepForwardWhenReady:: BattleFrontier_BattlePyramidTop_EventScript_BrandonHereMoveAside:: msgbox BattleFrontier_BattlePyramidTop_Text_ChiefBeatYouHere, MSGBOX_DEFAULT - applymovement LOCALID_ATTENDANT, BattleFrontier_BattlePyramidTop_Movement_AttendantMoveAside + applymovement LOCALID_PYRAMID_TOP_ATTENDANT, BattleFrontier_BattlePyramidTop_Movement_AttendantMoveAside setvar VAR_TEMP_D, 1 closemessage end @@ -111,7 +108,7 @@ BattleFrontier_BattlePyramidTop_EventScript_BattleBrandon:: frontier_get FRONTIER_DATA_HEARD_BRAIN_SPEECH goto_if_ne VAR_RESULT, FALSE, BattleFrontier_BattlePyramidTop_EventScript_BrandonHeardSilverSpeech special SpawnCameraObject - applymovement OBJ_EVENT_ID_CAMERA, BattleFrontier_BattlePyramidTop_Movement_CameraPanUp + applymovement LOCALID_CAMERA, BattleFrontier_BattlePyramidTop_Movement_CameraPanUp waitmovement 0 msgbox BattleFrontier_BattlePyramidTop_Text_ExplorationsAreGrandestAdventure, MSGBOX_DEFAULT closemessage @@ -148,7 +145,7 @@ BattleFrontier_BattlePyramidTop_EventScript_BrandonIntroGold:: frontier_get FRONTIER_DATA_HEARD_BRAIN_SPEECH goto_if_ne VAR_RESULT, FALSE, BattleFrontier_BattlePyramidTop_EventScript_BrandonHeardGoldSpeech special SpawnCameraObject - applymovement OBJ_EVENT_ID_CAMERA, BattleFrontier_BattlePyramidTop_Movement_CameraPanUp + applymovement LOCALID_CAMERA, BattleFrontier_BattlePyramidTop_Movement_CameraPanUp waitmovement 0 msgbox BattleFrontier_BattlePyramidTop_Text_BrandonYouveReturned, MSGBOX_DEFAULT closemessage diff --git a/data/maps/BattleFrontier_BattleTowerBattleRoom/map.json b/data/maps/BattleFrontier_BattleTowerBattleRoom/map.json index 1018ebb6d9d0..5798ab56674c 100644 --- a/data/maps/BattleFrontier_BattleTowerBattleRoom/map.json +++ b/data/maps/BattleFrontier_BattleTowerBattleRoom/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_TOWER_BATTLE_OPPONENT", "graphics_id": "OBJ_EVENT_GFX_VAR_0", "x": 5, "y": 1, @@ -28,6 +29,7 @@ "flag": "FLAG_HIDE_BATTLE_TOWER_OPPONENT" }, { + "local_id": "LOCALID_TOWER_BATTLE_ATTENDANT_1", "graphics_id": "OBJ_EVENT_GFX_TEALA", "x": 1, "y": 7, @@ -41,6 +43,7 @@ "flag": "0" }, { + "local_id": "LOCALID_TOWER_BATTLE_ATTENDANT_2", "graphics_id": "OBJ_EVENT_GFX_TEALA", "x": 4, "y": 8, diff --git a/data/maps/BattleFrontier_BattleTowerBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleTowerBattleRoom/scripts.inc index 9b466af3bc1d..bfa94f04b80a 100644 --- a/data/maps/BattleFrontier_BattleTowerBattleRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattleTowerBattleRoom/scripts.inc @@ -1,7 +1,3 @@ -.set LOCALID_OPPONENT, 1 -.set LOCALID_ATTENDANT_1, 2 -.set LOCALID_ATTENDANT_2, 3 - BattleFrontier_BattleTowerBattleRoom_MapScripts:: map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattleTowerBattleRoom_OnFrame map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, BattleFrontier_BattleTowerBattleRoom_OnWarp @@ -13,7 +9,7 @@ BattleFrontier_BattleTowerBattleRoom_OnWarp: BattleFrontier_BattleTowerBattleRoom_EventScript_SetUpObjects:: setvar VAR_TEMP_1, 1 - applymovement LOCALID_ATTENDANT_2, BattleFrontier_BattleTowerBattleRoom_Movement_SetInvisible + applymovement LOCALID_TOWER_BATTLE_ATTENDANT_2, BattleFrontier_BattleTowerBattleRoom_Movement_SetInvisible end BattleFrontier_BattleTowerBattleRoom_OnFrame: @@ -22,13 +18,13 @@ BattleFrontier_BattleTowerBattleRoom_OnFrame: BattleFrontier_BattleTowerBattleRoom_EventScript_EnterRoom:: setvar VAR_TEMP_0, 1 - applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattleTowerBattleRoom_Movement_PlayerEnter + applymovement LOCALID_PLAYER, BattleFrontier_BattleTowerBattleRoom_Movement_PlayerEnter waitmovement 0 frontier_get FRONTIER_DATA_BATTLE_NUM goto_if_eq VAR_RESULT, 0, BattleFrontier_BattleTowerBattleRoom_EventScript_OpponentEnter - applymovement LOCALID_ATTENDANT_1, BattleFrontier_BattleTowerBattleRoom_Movement_AttendantApproachPlayer + applymovement LOCALID_TOWER_BATTLE_ATTENDANT_1, BattleFrontier_BattleTowerBattleRoom_Movement_AttendantApproachPlayer waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattleTowerBattleRoom_Movement_PlayerFaceAttendant + applymovement LOCALID_PLAYER, BattleFrontier_BattleTowerBattleRoom_Movement_PlayerFaceAttendant waitmovement 0 setvar VAR_TEMP_2, 1 frontier_set FRONTIER_DATA_RECORD_DISABLED, TRUE @@ -36,8 +32,8 @@ BattleFrontier_BattleTowerBattleRoom_EventScript_EnterRoom:: BattleFrontier_BattleTowerBattleRoom_EventScript_OpponentEnter:: tower_setopponent - addobject LOCALID_OPPONENT - applymovement LOCALID_OPPONENT, BattleFrontier_BattleTowerBattleRoom_Movement_OpponentEnter + addobject LOCALID_TOWER_BATTLE_OPPONENT + applymovement LOCALID_TOWER_BATTLE_OPPONENT, BattleFrontier_BattleTowerBattleRoom_Movement_OpponentEnter waitmovement 0 tower_getopponentintro 0 msgbox gStringVar4, MSGBOX_DEFAULT @@ -57,14 +53,14 @@ BattleFrontier_BattleTowerBattleRoom_EventScript_DefeatedOpponent:: tower_setbattlewon switch VAR_RESULT case 7, BattleFrontier_BattleTowerBattleRoom_EventScript_WarpToLobbyWon - applymovement LOCALID_OPPONENT, BattleFrontier_BattleTowerBattleRoom_Movement_OpponentExit + applymovement LOCALID_TOWER_BATTLE_OPPONENT, BattleFrontier_BattleTowerBattleRoom_Movement_OpponentExit waitmovement 0 - removeobject LOCALID_OPPONENT + removeobject LOCALID_TOWER_BATTLE_OPPONENT frontier_getbrainstatus call_if_ne VAR_RESULT, FRONTIER_BRAIN_NOT_READY, BattleFrontier_BattleTowerBattleRoom_EventScript_SecondAttendantEnter - applymovement LOCALID_ATTENDANT_1, BattleFrontier_BattleTowerBattleRoom_Movement_AttendantApproachPlayer + applymovement LOCALID_TOWER_BATTLE_ATTENDANT_1, BattleFrontier_BattleTowerBattleRoom_Movement_AttendantApproachPlayer waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattleTowerBattleRoom_Movement_PlayerFaceAttendant + applymovement LOCALID_PLAYER, BattleFrontier_BattleTowerBattleRoom_Movement_PlayerFaceAttendant waitmovement 0 msgbox BattleFrontier_BattleTowerBattleRoom_Text_RestoreMonsToFullHealth, MSGBOX_DEFAULT playfanfare MUS_HEAL @@ -125,9 +121,9 @@ BattleFrontier_BattleTowerBattleRoom_EventScript_AskRetireChallenge:: BattleFrontier_BattleTowerBattleRoom_EventScript_ContinueChallenge:: closemessage - applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattleTowerBattleRoom_Movement_PlayerFaceBattle + applymovement LOCALID_PLAYER, BattleFrontier_BattleTowerBattleRoom_Movement_PlayerFaceBattle waitmovement 0 - applymovement LOCALID_ATTENDANT_1, BattleFrontier_BattleTowerBattleRoom_Movement_AttendantReturnToPos + applymovement LOCALID_TOWER_BATTLE_ATTENDANT_1, BattleFrontier_BattleTowerBattleRoom_Movement_AttendantReturnToPos waitmovement 0 goto BattleFrontier_BattleTowerBattleRoom_EventScript_OpponentEnter @@ -193,19 +189,19 @@ BattleFrontier_EventScript_IncrementWinStreak:: return BattleFrontier_BattleTowerBattleRoom_EventScript_SecondAttendantEnter:: - applymovement LOCALID_ATTENDANT_2, BattleFrontier_BattleTowerBattleRoom_Movement_SecondAttendantEnter + applymovement LOCALID_TOWER_BATTLE_ATTENDANT_2, BattleFrontier_BattleTowerBattleRoom_Movement_SecondAttendantEnter waitmovement 0 - applymovement LOCALID_ATTENDANT_2, Common_Movement_WalkInPlaceLeft + applymovement LOCALID_TOWER_BATTLE_ATTENDANT_2, Common_Movement_WalkInPlaceLeft waitmovement 0 playse SE_PIN - applymovement LOCALID_ATTENDANT_1, Common_Movement_ExclamationMark + applymovement LOCALID_TOWER_BATTLE_ATTENDANT_1, Common_Movement_ExclamationMark waitmovement 0 - applymovement LOCALID_ATTENDANT_1, Common_Movement_Delay48 + applymovement LOCALID_TOWER_BATTLE_ATTENDANT_1, Common_Movement_Delay48 waitmovement 0 - applymovement LOCALID_ATTENDANT_2, BattleFrontier_BattleTowerBattleRoom_Movement_SecondAttendantDelay - applymovement LOCALID_ATTENDANT_1, BattleFrontier_BattleTowerBattleRoom_Movement_AttendantFaceSecondAttendant + applymovement LOCALID_TOWER_BATTLE_ATTENDANT_2, BattleFrontier_BattleTowerBattleRoom_Movement_SecondAttendantDelay + applymovement LOCALID_TOWER_BATTLE_ATTENDANT_1, BattleFrontier_BattleTowerBattleRoom_Movement_AttendantFaceSecondAttendant waitmovement 0 - applymovement LOCALID_ATTENDANT_2, BattleFrontier_BattleTowerBattleRoom_Movement_SecondAttendantExit + applymovement LOCALID_TOWER_BATTLE_ATTENDANT_2, BattleFrontier_BattleTowerBattleRoom_Movement_SecondAttendantExit waitmovement 0 return @@ -237,12 +233,12 @@ BattleFrontier_BattleTowerBattleRoom_EventScript_AskReadyForMaidenNoRecord:: BattleFrontier_BattleTowerBattleRoom_EventScript_BattleAnabel:: call BattleFrontier_EventScript_SetBrainObjectGfx closemessage - applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattleTowerBattleRoom_Movement_PlayerFaceBattle + applymovement LOCALID_PLAYER, BattleFrontier_BattleTowerBattleRoom_Movement_PlayerFaceBattle waitmovement 0 - applymovement LOCALID_ATTENDANT_1, BattleFrontier_BattleTowerBattleRoom_Movement_AttendantReturnToPos + applymovement LOCALID_TOWER_BATTLE_ATTENDANT_1, BattleFrontier_BattleTowerBattleRoom_Movement_AttendantReturnToPos waitmovement 0 - addobject LOCALID_OPPONENT - applymovement LOCALID_OPPONENT, BattleFrontier_BattleTowerBattleRoom_Movement_AnabelEnter + addobject LOCALID_TOWER_BATTLE_OPPONENT + applymovement LOCALID_TOWER_BATTLE_OPPONENT, BattleFrontier_BattleTowerBattleRoom_Movement_AnabelEnter waitmovement 0 switch VAR_TEMP_F case FRONTIER_BRAIN_GOLD, BattleFrontier_BattleTowerBattleRoom_EventScript_AnabelGoldIntro diff --git a/data/maps/BattleFrontier_BattleTowerCorridor/map.json b/data/maps/BattleFrontier_BattleTowerCorridor/map.json index 10d5ca7f71d3..e521df1ca3e6 100644 --- a/data/maps/BattleFrontier_BattleTowerCorridor/map.json +++ b/data/maps/BattleFrontier_BattleTowerCorridor/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_TOWER_CORRIDOR_ATTENDANT", "graphics_id": "OBJ_EVENT_GFX_TEALA", "x": 9, "y": 2, diff --git a/data/maps/BattleFrontier_BattleTowerCorridor/scripts.inc b/data/maps/BattleFrontier_BattleTowerCorridor/scripts.inc index d0f3d487a8c3..9974510b1bd3 100644 --- a/data/maps/BattleFrontier_BattleTowerCorridor/scripts.inc +++ b/data/maps/BattleFrontier_BattleTowerCorridor/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_ATTENDANT, 1 - BattleFrontier_BattleTowerCorridor_MapScripts:: map_script MAP_SCRIPT_ON_LOAD, BattleFrontier_BattleTowerCorridor_OnLoad map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattleTowerCorridor_OnFrame @@ -23,14 +21,14 @@ BattleFrontier_BattleTowerCorridor_OnFrame: BattleFrontier_BattleTowerCorridor_EventScript_EnterCorridor:: setvar VAR_TEMP_0, 1 goto_if_eq VAR_0x8006, 1, BattleFrontier_BattleTowerCorridor_EventScript_WalkToFarDoor - applymovement LOCALID_ATTENDANT, BattleFrontier_BattleTowerCorridor_Movement_AttendantWalkToDoor - applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattleTowerCorridor_Movement_PlayerWalkToDoor + applymovement LOCALID_TOWER_CORRIDOR_ATTENDANT, BattleFrontier_BattleTowerCorridor_Movement_AttendantWalkToDoor + applymovement LOCALID_PLAYER, BattleFrontier_BattleTowerCorridor_Movement_PlayerWalkToDoor waitmovement 0 goto BattleFrontier_BattleTowerCorridor_EventScript_WarpToBattleRoom BattleFrontier_BattleTowerCorridor_EventScript_WalkToFarDoor:: - applymovement LOCALID_ATTENDANT, BattleFrontier_BattleTowerCorridor_Movement_AttendantWalkToFarDoor - applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattleTowerCorridor_Movement_PlayerWalkToFarDoor + applymovement LOCALID_TOWER_CORRIDOR_ATTENDANT, BattleFrontier_BattleTowerCorridor_Movement_AttendantWalkToFarDoor + applymovement LOCALID_PLAYER, BattleFrontier_BattleTowerCorridor_Movement_PlayerWalkToFarDoor waitmovement 0 BattleFrontier_BattleTowerCorridor_EventScript_WarpToBattleRoom:: diff --git a/data/maps/BattleFrontier_BattleTowerElevator/map.json b/data/maps/BattleFrontier_BattleTowerElevator/map.json index f74dce23362e..d925ca2fc37d 100644 --- a/data/maps/BattleFrontier_BattleTowerElevator/map.json +++ b/data/maps/BattleFrontier_BattleTowerElevator/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_TOWER_ELEVATOR_ATTENDANT", "graphics_id": "OBJ_EVENT_GFX_TEALA", "x": 1, "y": 5, diff --git a/data/maps/BattleFrontier_BattleTowerElevator/scripts.inc b/data/maps/BattleFrontier_BattleTowerElevator/scripts.inc index 06f4ff0a70c9..a26376eebecb 100644 --- a/data/maps/BattleFrontier_BattleTowerElevator/scripts.inc +++ b/data/maps/BattleFrontier_BattleTowerElevator/scripts.inc @@ -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 @@ -11,16 +9,16 @@ BattleFrontier_BattleTowerElevator_OnFrame: BattleFrontier_BattleTowerElevator_EventScript_EnterElevator:: setvar VAR_TEMP_0, 1 - applymovement LOCALID_ATTENDANT, BattleFrontier_BattleTowerElevator_Movement_AttendantEnter - applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattleTowerElevator_Movement_PlayerEnter + applymovement LOCALID_TOWER_ELEVATOR_ATTENDANT, BattleFrontier_BattleTowerElevator_Movement_AttendantEnter + applymovement LOCALID_PLAYER, BattleFrontier_BattleTowerElevator_Movement_PlayerEnter waitmovement 0 special BufferBattleTowerElevatorFloors waitse special MoveElevator waitstate delay 48 - applymovement LOCALID_ATTENDANT, BattleFrontier_BattleTowerElevator_Movement_AttendantExit - applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattleTowerElevator_Movement_PlayerExit + applymovement LOCALID_TOWER_ELEVATOR_ATTENDANT, BattleFrontier_BattleTowerElevator_Movement_AttendantExit + applymovement LOCALID_PLAYER, BattleFrontier_BattleTowerElevator_Movement_PlayerExit waitmovement 0 call BattleFrontier_BattleTowerElevator_EventScript_WarpToNextRoom end @@ -83,6 +81,6 @@ BattleFrontier_BattleTowerElevator_OnWarp: BattleFrontier_BattleTowerElevator_EventScript_TurnPlayerNorth:: setvar VAR_TEMP_1, 1 - turnobject OBJ_EVENT_ID_PLAYER, DIR_NORTH + turnobject LOCALID_PLAYER, DIR_NORTH end diff --git a/data/maps/BattleFrontier_BattleTowerLobby/map.json b/data/maps/BattleFrontier_BattleTowerLobby/map.json index d672f07189fb..b5c95b22bf0f 100644 --- a/data/maps/BattleFrontier_BattleTowerLobby/map.json +++ b/data/maps/BattleFrontier_BattleTowerLobby/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_TOWER_ATTENDANT_SINGLES", "graphics_id": "OBJ_EVENT_GFX_TEALA", "x": 6, "y": 5, @@ -67,6 +68,7 @@ "flag": "0" }, { + "local_id": "LOCALID_TOWER_LOBBY_REPORTER", "graphics_id": "OBJ_EVENT_GFX_REPORTER_F", "x": 11, "y": 9, @@ -80,6 +82,7 @@ "flag": "FLAG_HIDE_BATTLE_TOWER_REPORTER" }, { + "local_id": "LOCALID_APPRENTICE", "graphics_id": "OBJ_EVENT_GFX_VAR_0", "x": 1, "y": 5, @@ -93,6 +96,7 @@ "flag": "FLAG_HIDE_APPRENTICE" }, { + "local_id": "LOCALID_TOWER_ATTENDANT_DOUBLES", "graphics_id": "OBJ_EVENT_GFX_TEALA", "x": 10, "y": 5, @@ -106,6 +110,7 @@ "flag": "0" }, { + "local_id": "LOCALID_TOWER_ATTENDANT_MULTIS", "graphics_id": "OBJ_EVENT_GFX_TEALA", "x": 14, "y": 5, @@ -119,6 +124,7 @@ "flag": "0" }, { + "local_id": "LOCALID_TOWER_ATTENDANT_LINK_MULTIS", "graphics_id": "OBJ_EVENT_GFX_TEALA", "x": 18, "y": 5, diff --git a/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc b/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc index a216055b5b72..d23f5296d654 100644 --- a/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc +++ b/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc @@ -1,10 +1,3 @@ -.set LOCALID_ATTENDANT_SINGLES, 1 -.set LOCALID_ATTENDANT_DOUBLES, 7 -.set LOCALID_ATTENDANT_MULTIS, 8 -.set LOCALID_ATTENDANT_LINK_MULTIS, 9 - -@ Note: LOCALID_BATTLE_TOWER_LOBBY_REPORTER is a local id for this map used elsewhere. It's defined in event_objects.h - BattleFrontier_BattleTowerLobby_MapScripts:: map_script MAP_SCRIPT_ON_RESUME, BattleFrontier_BattleTowerLobby_OnResume map_script MAP_SCRIPT_ON_TRANSITION, BattleFrontier_BattleTowerLobby_OnTransition @@ -37,7 +30,7 @@ BattleFrontier_BattleTowerLobby_OnWarp: BattleFrontier_BattleTowerLobby_EventScript_PlayerFaceNorth:: setvar VAR_TEMP_1, 1 - turnobject OBJ_EVENT_ID_PLAYER, DIR_NORTH + turnobject LOCALID_PLAYER, DIR_NORTH end BattleFrontier_BattleTowerLobby_OnFrame: @@ -621,12 +614,12 @@ BattleFrontier_BattleTowerLobby_EventScript_WalkToElevator:: call BattleFrontier_BattleTowerLobby_EventScript_SetAttendantTalkedTo call BattleFrontier_BattleTowerLobby_EventScript_GetDoorXCoord applymovement VAR_LAST_TALKED, BattleFrontier_BattleTowerLobby_Movement_WalkToElevator - applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattleTowerLobby_Movement_WalkToElevator + applymovement LOCALID_PLAYER, BattleFrontier_BattleTowerLobby_Movement_WalkToElevator waitmovement 0 opendoor VAR_0x8004, 1 waitdooranim applymovement VAR_LAST_TALKED, BattleFrontier_BattleTowerLobby_Movement_AttendantEnterElevator - applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattleTowerLobby_Movement_PlayerEnterElevator + applymovement LOCALID_PLAYER, BattleFrontier_BattleTowerLobby_Movement_PlayerEnterElevator waitmovement 0 closedoor VAR_0x8004, 1 waitdooranim @@ -690,19 +683,19 @@ BattleFrontier_BattleTowerLobby_EventScript_SetAttendantTalkedTo:: return BattleFrontier_BattleTowerLobby_EventScript_TalkedToSinglesAttendant:: - setvar VAR_LAST_TALKED, LOCALID_ATTENDANT_SINGLES + setvar VAR_LAST_TALKED, LOCALID_TOWER_ATTENDANT_SINGLES return BattleFrontier_BattleTowerLobby_EventScript_TalkedToDoublesAttendant:: - setvar VAR_LAST_TALKED, LOCALID_ATTENDANT_DOUBLES + setvar VAR_LAST_TALKED, LOCALID_TOWER_ATTENDANT_DOUBLES return BattleFrontier_BattleTowerLobby_EventScript_TalkedToMultisAttendant:: - setvar VAR_LAST_TALKED, LOCALID_ATTENDANT_MULTIS + setvar VAR_LAST_TALKED, LOCALID_TOWER_ATTENDANT_MULTIS return BattleFrontier_BattleTowerLobby_EventScript_TalkedToLinkMultisAttendant:: - setvar VAR_LAST_TALKED, LOCALID_ATTENDANT_LINK_MULTIS + setvar VAR_LAST_TALKED, LOCALID_TOWER_ATTENDANT_LINK_MULTIS return BattleFrontier_BattleTowerLobby_EventScript_GetDoorXCoord:: diff --git a/data/maps/BattleFrontier_BattleTowerMultiBattleRoom/map.json b/data/maps/BattleFrontier_BattleTowerMultiBattleRoom/map.json index e48bcefd1b05..eebfd53c4752 100644 --- a/data/maps/BattleFrontier_BattleTowerMultiBattleRoom/map.json +++ b/data/maps/BattleFrontier_BattleTowerMultiBattleRoom/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_TOWER_MULTI_BATTLE_OPPONENT_1", "graphics_id": "OBJ_EVENT_GFX_VAR_0", "x": 5, "y": 1, @@ -28,6 +29,7 @@ "flag": "FLAG_HIDE_BATTLE_TOWER_OPPONENT" }, { + "local_id": "LOCALID_TOWER_MULTI_BATTLE_ATTENDANT_1", "graphics_id": "OBJ_EVENT_GFX_TEALA", "x": 1, "y": 4, @@ -41,6 +43,7 @@ "flag": "0" }, { + "local_id": "LOCALID_TOWER_MULTI_BATTLE_ATTENDANT_2", "graphics_id": "OBJ_EVENT_GFX_TEALA", "x": 1, "y": 5, @@ -54,6 +57,7 @@ "flag": "0" }, { + "local_id": "LOCALID_TOWER_MULTI_BATTLE_OPPONENT_2", "graphics_id": "OBJ_EVENT_GFX_VAR_1", "x": 4, "y": 1, @@ -67,6 +71,7 @@ "flag": "FLAG_HIDE_BATTLE_TOWER_OPPONENT" }, { + "local_id": "LOCALID_TOWER_MULTI_BATTLE_PLAYER", "graphics_id": "OBJ_EVENT_GFX_VAR_F", "x": 4, "y": 8, @@ -80,6 +85,7 @@ "flag": "0" }, { + "local_id": "LOCALID_TOWER_MULTI_BATTLE_PARTNER", "graphics_id": "OBJ_EVENT_GFX_VAR_E", "x": 5, "y": 8, diff --git a/data/maps/BattleFrontier_BattleTowerMultiBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleTowerMultiBattleRoom/scripts.inc index e1cb64dda002..bc5dda9fff22 100644 --- a/data/maps/BattleFrontier_BattleTowerMultiBattleRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattleTowerMultiBattleRoom/scripts.inc @@ -1,9 +1,8 @@ -.set LOCALID_OPPONENT_1, 1 -.set LOCALID_ATTENDANT_1, 2 -.set LOCALID_ATTENDANT_2, 3 -.set LOCALID_OPPONENT_2, 4 -.set LOCALID_PLAYER, 5 -.set LOCALID_PARTNER, 6 +@ On this map the player will automatically walk into the room, but the camera is supposed to remain still. +@ To do this GF sets the player (LOCALID_PLAYER) invisible and creates a fake player object (LOCALID_TOWER_MULTI_BATTLE_PLAYER). +@ The graphics of this fake player object are represented with VAR_OBJ_GFX_ID_F. +@ The graphics of the partner are represented with VAR_OBJ_GFX_ID_E, which will ultimately be set by tower_setpartnergfx. +@ The graphics of the opponents are represented with VAR_OBJ_GFX_ID_0 and OBJ_EVENT_GFX_VAR_1, which will ultimately be set by tower_setopponent. BattleFrontier_BattleTowerMultiBattleRoom_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, BattleFrontier_BattleTowerMultiBattleRoom_OnTransition @@ -11,10 +10,6 @@ BattleFrontier_BattleTowerMultiBattleRoom_MapScripts:: map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattleTowerMultiBattleRoom_OnFrame .byte 0 - @ On this map the player (OBJ_EVENT_ID_PLAYER) is hidden - @ The player is represented instead by LOCALID_PLAYER, which has the gfx id VAR_OBJ_GFX_ID_F - @ The multi partner is represented by LOCALID_PARTNER, which has the gfx id VAR_OBJ_GFX_ID_E - BattleFrontier_BattleTowerMultiBattleRoom_OnTransition: call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_MULTIS, BattleFrontier_BattleTowerMultiBattleRoom_EventScript_SetObjGfx call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_LINK_MULTIS, BattleFrontier_BattleTowerMultiBattleRoom_EventScript_SetLinkPlayerGfx @@ -40,7 +35,7 @@ BattleFrontier_BattleTowerMultiBattleRoom_OnWarp: .2byte 0 BattleFrontier_BattleTowerMultiBattleRoom_EventScript_HidePlayerObj:: - hideobjectat OBJ_EVENT_ID_PLAYER, MAP_BATTLE_FRONTIER_BATTLE_TOWER_MULTI_BATTLE_ROOM + hideobjectat LOCALID_PLAYER, MAP_BATTLE_FRONTIER_BATTLE_TOWER_MULTI_BATTLE_ROOM end BattleFrontier_BattleTowerMultiBattleRoom_OnFrame: @@ -49,36 +44,36 @@ BattleFrontier_BattleTowerMultiBattleRoom_OnFrame: BattleFrontier_BattleTowerMultiBattleRoom_EventScript_EnterRoom:: setvar VAR_TEMP_0, 1 - applymovement LOCALID_PLAYER, BattleFrontier_BattleTowerMultiBattleRoom_Movement_PlayerEnterRoom - applymovement LOCALID_PARTNER, BattleFrontier_BattleTowerMultiBattleRoom_Movement_PartnerEnterRoom + applymovement LOCALID_TOWER_MULTI_BATTLE_PLAYER, BattleFrontier_BattleTowerMultiBattleRoom_Movement_PlayerEnterRoom + applymovement LOCALID_TOWER_MULTI_BATTLE_PARTNER, BattleFrontier_BattleTowerMultiBattleRoom_Movement_PartnerEnterRoom waitmovement 0 frontier_get FRONTIER_DATA_BATTLE_NUM goto_if_eq VAR_RESULT, 0, BattleFrontier_BattleTowerMultiBattleRoom_EventScript_OpponentsEnter - applymovement LOCALID_ATTENDANT_1, BattleFrontier_BattleTowerMultiBattleRoom_Movement_AttendantApproachPlayer - applymovement LOCALID_ATTENDANT_2, BattleFrontier_BattleTowerMultiBattleRoom_Movement_AttendantApproachPlayer + applymovement LOCALID_TOWER_MULTI_BATTLE_ATTENDANT_1, BattleFrontier_BattleTowerMultiBattleRoom_Movement_AttendantApproachPlayer + applymovement LOCALID_TOWER_MULTI_BATTLE_ATTENDANT_2, BattleFrontier_BattleTowerMultiBattleRoom_Movement_AttendantApproachPlayer waitmovement 0 - applymovement LOCALID_PLAYER, BattleFrontier_BattleTowerMultiBattleRoom_Movement_FaceAttendant - applymovement LOCALID_PARTNER, BattleFrontier_BattleTowerMultiBattleRoom_Movement_FaceAttendant + applymovement LOCALID_TOWER_MULTI_BATTLE_PLAYER, BattleFrontier_BattleTowerMultiBattleRoom_Movement_FaceAttendant + applymovement LOCALID_TOWER_MULTI_BATTLE_PARTNER, BattleFrontier_BattleTowerMultiBattleRoom_Movement_FaceAttendant waitmovement 0 frontier_set FRONTIER_DATA_RECORD_DISABLED, TRUE goto BattleFrontier_BattleTowerMultiBattleRoom_EventScript_AskReadyForOpponents BattleFrontier_BattleTowerMultiBattleRoom_EventScript_OpponentsEnter:: tower_setopponent - addobject LOCALID_OPPONENT_1 - addobject LOCALID_OPPONENT_2 - applymovement LOCALID_OPPONENT_1, BattleFrontier_BattleTowerMultiBattleRoom_Movement_Opponent1Enter - applymovement LOCALID_OPPONENT_2, BattleFrontier_BattleTowerMultiBattleRoom_Movement_Opponent2Enter + addobject LOCALID_TOWER_MULTI_BATTLE_OPPONENT_1 + addobject LOCALID_TOWER_MULTI_BATTLE_OPPONENT_2 + applymovement LOCALID_TOWER_MULTI_BATTLE_OPPONENT_1, BattleFrontier_BattleTowerMultiBattleRoom_Movement_Opponent1Enter + applymovement LOCALID_TOWER_MULTI_BATTLE_OPPONENT_2, BattleFrontier_BattleTowerMultiBattleRoom_Movement_Opponent2Enter waitmovement 0 goto_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_LINK_MULTIS, BattleFrontier_BattleTowerMultiBattleRoom_EventScript_DoOpponentIntrosLink tower_getopponentintro 0 delay 15 - applymovement LOCALID_OPPONENT_1, BattleFrontier_BattleTowerMultiBattleRoom_Movement_WalkInPlaceLeft + applymovement LOCALID_TOWER_MULTI_BATTLE_OPPONENT_1, BattleFrontier_BattleTowerMultiBattleRoom_Movement_WalkInPlaceLeft waitmovement 0 msgbox gStringVar4, MSGBOX_DEFAULT waitmessage tower_getopponentintro 1 - applymovement LOCALID_OPPONENT_2, BattleFrontier_BattleTowerMultiBattleRoom_Movement_WalkInPlaceLeft + applymovement LOCALID_TOWER_MULTI_BATTLE_OPPONENT_2, BattleFrontier_BattleTowerMultiBattleRoom_Movement_WalkInPlaceLeft waitmovement 0 msgbox gStringVar4, MSGBOX_DEFAULT waitmessage @@ -87,13 +82,13 @@ BattleFrontier_BattleTowerMultiBattleRoom_EventScript_OpponentsEnter:: BattleFrontier_BattleTowerMultiBattleRoom_EventScript_DoOpponentIntrosLink:: tower_getopponentintro 0 delay 15 - applymovement LOCALID_OPPONENT_1, BattleFrontier_BattleTowerMultiBattleRoom_Movement_WalkInPlaceLeft + applymovement LOCALID_TOWER_MULTI_BATTLE_OPPONENT_1, BattleFrontier_BattleTowerMultiBattleRoom_Movement_WalkInPlaceLeft waitmovement 0 messageautoscroll gStringVar4 waitmessage delay 48 tower_getopponentintro 1 - applymovement LOCALID_OPPONENT_2, BattleFrontier_BattleTowerMultiBattleRoom_Movement_WalkInPlaceLeft + applymovement LOCALID_TOWER_MULTI_BATTLE_OPPONENT_2, BattleFrontier_BattleTowerMultiBattleRoom_Movement_WalkInPlaceLeft waitmovement 0 messageautoscroll gStringVar4 waitmessage @@ -114,16 +109,16 @@ BattleFrontier_BattleTowerMultiBattleRoom_EventScript_DefeatedOpponents:: tower_setbattlewon switch VAR_RESULT case 7, BattleFrontier_BattleTowerMultiBattleRoom_EventScript_WarpToLobbyWon - applymovement LOCALID_OPPONENT_2, BattleFrontier_BattleTowerMultiBattleRoom_Movement_Opponent2Exit - applymovement LOCALID_OPPONENT_1, BattleFrontier_BattleTowerMultiBattleRoom_Movement_Opponent1Exit + applymovement LOCALID_TOWER_MULTI_BATTLE_OPPONENT_2, BattleFrontier_BattleTowerMultiBattleRoom_Movement_Opponent2Exit + applymovement LOCALID_TOWER_MULTI_BATTLE_OPPONENT_1, BattleFrontier_BattleTowerMultiBattleRoom_Movement_Opponent1Exit waitmovement 0 - removeobject LOCALID_OPPONENT_1 - removeobject LOCALID_OPPONENT_2 - applymovement LOCALID_ATTENDANT_1, BattleFrontier_BattleTowerMultiBattleRoom_Movement_AttendantApproachPlayer - applymovement LOCALID_ATTENDANT_2, BattleFrontier_BattleTowerMultiBattleRoom_Movement_AttendantApproachPlayer + removeobject LOCALID_TOWER_MULTI_BATTLE_OPPONENT_1 + removeobject LOCALID_TOWER_MULTI_BATTLE_OPPONENT_2 + applymovement LOCALID_TOWER_MULTI_BATTLE_ATTENDANT_1, BattleFrontier_BattleTowerMultiBattleRoom_Movement_AttendantApproachPlayer + applymovement LOCALID_TOWER_MULTI_BATTLE_ATTENDANT_2, BattleFrontier_BattleTowerMultiBattleRoom_Movement_AttendantApproachPlayer waitmovement 0 - applymovement LOCALID_PLAYER, BattleFrontier_BattleTowerMultiBattleRoom_Movement_FaceAttendant - applymovement LOCALID_PARTNER, BattleFrontier_BattleTowerMultiBattleRoom_Movement_FaceAttendant + applymovement LOCALID_TOWER_MULTI_BATTLE_PLAYER, BattleFrontier_BattleTowerMultiBattleRoom_Movement_FaceAttendant + applymovement LOCALID_TOWER_MULTI_BATTLE_PARTNER, BattleFrontier_BattleTowerMultiBattleRoom_Movement_FaceAttendant waitmovement 0 goto_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_LINK_MULTIS, BattleFrontier_BattleTowerMultiBattleRoom_EventScript_RetorePartyMsgLink msgbox BattleFrontier_BattleTowerBattleRoom_Text_RestoreMonsToFullHealth, MSGBOX_DEFAULT @@ -194,11 +189,11 @@ BattleFrontier_BattleTowerMultiBattleRoom_EventScript_AskRetireChallenge:: BattleFrontier_BattleTowerMultiBattleRoom_EventScript_ContinueChallenge:: closemessage clearflag FLAG_TEMP_2 - applymovement LOCALID_PLAYER, BattleFrontier_BattleTowerMultiBattleRoom_Movement_FaceBattle - applymovement LOCALID_PARTNER, BattleFrontier_BattleTowerMultiBattleRoom_Movement_FaceBattle + applymovement LOCALID_TOWER_MULTI_BATTLE_PLAYER, BattleFrontier_BattleTowerMultiBattleRoom_Movement_FaceBattle + applymovement LOCALID_TOWER_MULTI_BATTLE_PARTNER, BattleFrontier_BattleTowerMultiBattleRoom_Movement_FaceBattle waitmovement 0 - applymovement LOCALID_ATTENDANT_1, BattleFrontier_BattleTowerMultiBattleRoom_Movement_AttendantReturnToPos - applymovement LOCALID_ATTENDANT_2, BattleFrontier_BattleTowerMultiBattleRoom_Movement_AttendantReturnToPos + applymovement LOCALID_TOWER_MULTI_BATTLE_ATTENDANT_1, BattleFrontier_BattleTowerMultiBattleRoom_Movement_AttendantReturnToPos + applymovement LOCALID_TOWER_MULTI_BATTLE_ATTENDANT_2, BattleFrontier_BattleTowerMultiBattleRoom_Movement_AttendantReturnToPos waitmovement 0 goto BattleFrontier_BattleTowerMultiBattleRoom_EventScript_OpponentsEnter end diff --git a/data/maps/BattleFrontier_BattleTowerMultiCorridor/map.json b/data/maps/BattleFrontier_BattleTowerMultiCorridor/map.json index 36b4ecd46e59..51d962dbe8ea 100644 --- a/data/maps/BattleFrontier_BattleTowerMultiCorridor/map.json +++ b/data/maps/BattleFrontier_BattleTowerMultiCorridor/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_TOWER_MULTI_CORRIDOR_PLAYER", "graphics_id": "OBJ_EVENT_GFX_VAR_F", "x": 1, "y": 1, @@ -28,6 +29,7 @@ "flag": "0" }, { + "local_id": "LOCALID_TOWER_MULTI_CORRIDOR_ATTENDANT_1", "graphics_id": "OBJ_EVENT_GFX_TEALA", "x": 14, "y": 3, @@ -41,6 +43,7 @@ "flag": "0" }, { + "local_id": "LOCALID_TOWER_MULTI_CORRIDOR_ATTENDANT_2", "graphics_id": "OBJ_EVENT_GFX_TEALA", "x": 1, "y": 3, @@ -54,6 +57,7 @@ "flag": "0" }, { + "local_id": "LOCALID_TOWER_MULTI_CORRIDOR_PARTNER", "graphics_id": "OBJ_EVENT_GFX_VAR_E", "x": 14, "y": 1, diff --git a/data/maps/BattleFrontier_BattleTowerMultiCorridor/scripts.inc b/data/maps/BattleFrontier_BattleTowerMultiCorridor/scripts.inc index b36d2e6fd3ee..57dcd82d2565 100644 --- a/data/maps/BattleFrontier_BattleTowerMultiCorridor/scripts.inc +++ b/data/maps/BattleFrontier_BattleTowerMultiCorridor/scripts.inc @@ -1,7 +1,7 @@ -.set LOCALID_PLAYER, 1 -.set LOCALID_ATTENDANT_1, 2 -.set LOCALID_ATTENDANT_2, 3 -.set LOCALID_PARTNER, 4 +@ On this map the player will automatically walk into the room, but the camera is supposed to remain still. +@ To do this GF sets the player (LOCALID_PLAYER) invisible and creates a fake player object (LOCALID_TOWER_MULTI_CORRIDOR_PLAYER). +@ The graphics of this fake player object are represented with VAR_OBJ_GFX_ID_F. +@ The graphics of the partner are represented with VAR_OBJ_GFX_ID_E, which will ultimately be set by tower_setpartnergfx. BattleFrontier_BattleTowerMultiCorridor_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, BattleFrontier_BattleTowerMultiCorridor_OnTransition @@ -9,10 +9,6 @@ BattleFrontier_BattleTowerMultiCorridor_MapScripts:: map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattleTowerMultiCorridor_OnFrame .byte 0 - @ On this map the player (OBJ_EVENT_ID_PLAYER) is hidden - @ The player is represented instead by LOCALID_PLAYER, and has the gfx id VAR_OBJ_GFX_ID_F - @ The multi partner is represented by LOCALID_PARTNER, and has the gfx id VAR_OBJ_GFX_ID_E - BattleFrontier_BattleTowerMultiCorridor_OnTransition: call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_MULTIS, BattleFrontier_BattleTowerMultiCorridor_EventScript_SetObjGfx call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_LINK_MULTIS, BattleFrontier_BattleTowerMultiCorridor_EventScript_SetLinkPlayerGfx @@ -38,9 +34,9 @@ BattleFrontier_BattleTowerMultiCorridor_OnWarp: .2byte 0 BattleFrontier_BattleTowerMultiCorridor_EventScript_SetUpObjects:: - hideobjectat OBJ_EVENT_ID_PLAYER, MAP_BATTLE_FRONTIER_BATTLE_TOWER_MULTI_CORRIDOR hideobjectat LOCALID_PLAYER, MAP_BATTLE_FRONTIER_BATTLE_TOWER_MULTI_CORRIDOR - hideobjectat LOCALID_PARTNER, MAP_BATTLE_FRONTIER_BATTLE_TOWER_MULTI_CORRIDOR + hideobjectat LOCALID_TOWER_MULTI_CORRIDOR_PLAYER, MAP_BATTLE_FRONTIER_BATTLE_TOWER_MULTI_CORRIDOR + hideobjectat LOCALID_TOWER_MULTI_CORRIDOR_PARTNER, MAP_BATTLE_FRONTIER_BATTLE_TOWER_MULTI_CORRIDOR special OffsetCameraForBattle end @@ -56,10 +52,10 @@ BattleFrontier_BattleTowerMultiCorridor_EventScript_EnterCorridor:: opendoor 1, 1 waitdooranim clearflag FLAG_ENABLE_MULTI_CORRIDOR_DOOR - showobjectat LOCALID_PLAYER, MAP_BATTLE_FRONTIER_BATTLE_TOWER_MULTI_CORRIDOR - showobjectat LOCALID_PARTNER, MAP_BATTLE_FRONTIER_BATTLE_TOWER_MULTI_CORRIDOR - applymovement LOCALID_PLAYER, BattleFrontier_BattleTowerMultiCorridor_Movement_ExitElevator - applymovement LOCALID_PARTNER, BattleFrontier_BattleTowerMultiCorridor_Movement_ExitElevator + showobjectat LOCALID_TOWER_MULTI_CORRIDOR_PLAYER, MAP_BATTLE_FRONTIER_BATTLE_TOWER_MULTI_CORRIDOR + showobjectat LOCALID_TOWER_MULTI_CORRIDOR_PARTNER, MAP_BATTLE_FRONTIER_BATTLE_TOWER_MULTI_CORRIDOR + applymovement LOCALID_TOWER_MULTI_CORRIDOR_PLAYER, BattleFrontier_BattleTowerMultiCorridor_Movement_ExitElevator + applymovement LOCALID_TOWER_MULTI_CORRIDOR_PARTNER, BattleFrontier_BattleTowerMultiCorridor_Movement_ExitElevator waitmovement 0 setflag FLAG_ENABLE_MULTI_CORRIDOR_DOOR setvar VAR_0x8004, 14 @ x coord of far door, used by DrawDoor @@ -67,21 +63,21 @@ BattleFrontier_BattleTowerMultiCorridor_EventScript_EnterCorridor:: closedoor 1, 1 waitdooranim clearflag FLAG_ENABLE_MULTI_CORRIDOR_DOOR - applymovement LOCALID_PLAYER, BattleFrontier_BattleTowerMultiCorridor_Movement_PlayerWalkToDoor - applymovement LOCALID_PARTNER, BattleFrontier_BattleTowerMultiCorridor_Movement_PartnerWalkToDoor - applymovement LOCALID_ATTENDANT_2, BattleFrontier_BattleTowerMultiCorridor_Movement_PlayerAttendantWalkToDoor - applymovement LOCALID_ATTENDANT_1, BattleFrontier_BattleTowerMultiCorridor_Movement_PartnerAttendantWalkToDoor + applymovement LOCALID_TOWER_MULTI_CORRIDOR_PLAYER, BattleFrontier_BattleTowerMultiCorridor_Movement_PlayerWalkToDoor + applymovement LOCALID_TOWER_MULTI_CORRIDOR_PARTNER, BattleFrontier_BattleTowerMultiCorridor_Movement_PartnerWalkToDoor + applymovement LOCALID_TOWER_MULTI_CORRIDOR_ATTENDANT_2, BattleFrontier_BattleTowerMultiCorridor_Movement_PlayerAttendantWalkToDoor + applymovement LOCALID_TOWER_MULTI_CORRIDOR_ATTENDANT_1, BattleFrontier_BattleTowerMultiCorridor_Movement_PartnerAttendantWalkToDoor waitmovement 0 delay 40 - applymovement LOCALID_ATTENDANT_2, Common_Movement_WalkInPlaceFasterUp - applymovement LOCALID_ATTENDANT_1, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_TOWER_MULTI_CORRIDOR_ATTENDANT_2, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_TOWER_MULTI_CORRIDOR_ATTENDANT_1, Common_Movement_WalkInPlaceFasterUp waitmovement 0 opendoor 7, 1 waitdooranim - applymovement LOCALID_ATTENDANT_2, BattleFrontier_BattleTowerMultiCorridor_Movement_AttendantEnterDoor - applymovement LOCALID_ATTENDANT_1, BattleFrontier_BattleTowerMultiCorridor_Movement_AttendantEnterDoor - applymovement LOCALID_PLAYER, BattleFrontier_BattleTowerMultiCorridor_Movement_TrainerEnterDoor - applymovement LOCALID_PARTNER, BattleFrontier_BattleTowerMultiCorridor_Movement_TrainerEnterDoor + applymovement LOCALID_TOWER_MULTI_CORRIDOR_ATTENDANT_2, BattleFrontier_BattleTowerMultiCorridor_Movement_AttendantEnterDoor + applymovement LOCALID_TOWER_MULTI_CORRIDOR_ATTENDANT_1, BattleFrontier_BattleTowerMultiCorridor_Movement_AttendantEnterDoor + applymovement LOCALID_TOWER_MULTI_CORRIDOR_PLAYER, BattleFrontier_BattleTowerMultiCorridor_Movement_TrainerEnterDoor + applymovement LOCALID_TOWER_MULTI_CORRIDOR_PARTNER, BattleFrontier_BattleTowerMultiCorridor_Movement_TrainerEnterDoor waitmovement 0 closedoor 7, 1 waitdooranim diff --git a/data/maps/BattleFrontier_BattleTowerMultiPartnerRoom/map.json b/data/maps/BattleFrontier_BattleTowerMultiPartnerRoom/map.json index c48458344f35..687099d5605e 100644 --- a/data/maps/BattleFrontier_BattleTowerMultiPartnerRoom/map.json +++ b/data/maps/BattleFrontier_BattleTowerMultiPartnerRoom/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_TOWER_PARTNER_ROOM_ATTENDANT", "graphics_id": "OBJ_EVENT_GFX_TEALA", "x": 11, "y": 2, diff --git a/data/maps/BattleFrontier_BattleTowerMultiPartnerRoom/scripts.inc b/data/maps/BattleFrontier_BattleTowerMultiPartnerRoom/scripts.inc index b9fc7d554342..6cd428c8ed16 100644 --- a/data/maps/BattleFrontier_BattleTowerMultiPartnerRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattleTowerMultiPartnerRoom/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_ATTENDANT, 1 - BattleFrontier_BattleTowerMultiPartnerRoom_MapScripts:: map_script MAP_SCRIPT_ON_RESUME, BattleFrontier_BattleTowerMultiPartnerRoom_OnResume map_script MAP_SCRIPT_ON_TRANSITION, BattleFrontier_BattleTowerMultiPartnerRoom_OnTransition @@ -35,7 +33,7 @@ BattleFrontier_BattleTowerMultiPartnerRoom_EventScript_ChosePartner:: setvar VAR_OBJ_GFX_ID_7, OBJ_EVENT_GFX_BOY_1 setvar VAR_TEMP_1, 1 setvar VAR_TEMP_3, 1 - setobjectxyperm LOCALID_ATTENDANT, 10, 2 + setobjectxyperm LOCALID_TOWER_PARTNER_ROOM_ATTENDANT, 10, 2 end BattleFrontier_BattleTowerMultiPartnerRoom_OnWarp: @@ -43,7 +41,7 @@ BattleFrontier_BattleTowerMultiPartnerRoom_OnWarp: .2byte 0 BattleFrontier_BattleTowerMultiPartnerRoom_EventScript_TurnPlayerNorth:: - turnobject OBJ_EVENT_ID_PLAYER, DIR_NORTH + turnobject LOCALID_PLAYER, DIR_NORTH end BattleFrontier_BattleTowerMultiPartnerRoom_OnFrame: @@ -59,12 +57,12 @@ BattleFrontier_BattleTowerMultiPartnerRoom_EventScript_ExitRoom:: BattleFrontier_BattleTowerMultiPartnerRoom_EventScript_EnterRoom:: lockall - applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattleTowerMultiPartnerRoom_Movement_PlayerEnterRoom + applymovement LOCALID_PLAYER, BattleFrontier_BattleTowerMultiPartnerRoom_Movement_PlayerEnterRoom waitmovement 0 - applymovement LOCALID_ATTENDANT, BattleFrontier_BattleTowerMultiPartnerRoom_Movement_AttendantBlockExit + applymovement LOCALID_TOWER_PARTNER_ROOM_ATTENDANT, BattleFrontier_BattleTowerMultiPartnerRoom_Movement_AttendantBlockExit waitmovement 0 - copyobjectxytoperm LOCALID_ATTENDANT - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp + copyobjectxytoperm LOCALID_TOWER_PARTNER_ROOM_ATTENDANT + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 msgbox BattleFrontier_BattleTowerMultiPartnerRoom_Text_PleaseFindPartner, MSGBOX_DEFAULT special HealPlayerParty @@ -100,7 +98,7 @@ BattleFrontier_BattleTowerMultiPartnerRoom_EventScript_QuitChallenge:: BattleFrontier_BattleTowerMultiPartnerRoom_EventScript_EnterElevator:: msgbox BattleFrontier_BattleTowerMultiPartnerRoom_Text_ThankYouForChoosingPartner, MSGBOX_DEFAULT closemessage - applymovement LOCALID_ATTENDANT, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_TOWER_PARTNER_ROOM_ATTENDANT, Common_Movement_WalkInPlaceFasterUp waitmovement 0 opendoor 10, 1 waitdooranim @@ -113,22 +111,22 @@ BattleFrontier_BattleTowerMultiPartnerRoom_EventScript_EnterElevator:: end BattleFrontier_BattleTowerMultiPartnerRoom_EventScript_MoveToElevator:: - applymovement LOCALID_ATTENDANT, BattleFrontier_BattleTowerMultiPartnerRoom_Movement_AttendantEnterElevator - applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattleTowerMultiPartnerRoom_Movement_PlayerEnterElevator + applymovement LOCALID_TOWER_PARTNER_ROOM_ATTENDANT, BattleFrontier_BattleTowerMultiPartnerRoom_Movement_AttendantEnterElevator + applymovement LOCALID_PLAYER, BattleFrontier_BattleTowerMultiPartnerRoom_Movement_PlayerEnterElevator waitmovement 0 return @ Unused BattleFrontier_BattleTowerMultiPartnerRoom_EventScript_MoveToElevatorEast: - applymovement LOCALID_ATTENDANT, BattleFrontier_BattleTowerMultiPartnerRoom_Movement_AttendantEnterElevator - applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattleTowerMultiPartnerRoom_Movement_PlayerEnterElevatorEast + applymovement LOCALID_TOWER_PARTNER_ROOM_ATTENDANT, BattleFrontier_BattleTowerMultiPartnerRoom_Movement_AttendantEnterElevator + applymovement LOCALID_PLAYER, BattleFrontier_BattleTowerMultiPartnerRoom_Movement_PlayerEnterElevatorEast waitmovement 0 return @ Unused BattleFrontier_BattleTowerMultiPartnerRoom_EventScript_MoveToElevatorWest: - applymovement LOCALID_ATTENDANT, BattleFrontier_BattleTowerMultiPartnerRoom_Movement_AttendantEnterElevator - applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattleTowerMultiPartnerRoom_Movement_PlayerEneterElevatorWest + applymovement LOCALID_TOWER_PARTNER_ROOM_ATTENDANT, BattleFrontier_BattleTowerMultiPartnerRoom_Movement_AttendantEnterElevator + applymovement LOCALID_PLAYER, BattleFrontier_BattleTowerMultiPartnerRoom_Movement_PlayerEneterElevatorWest waitmovement 0 return diff --git a/data/maps/BattleFrontier_Mart/map.json b/data/maps/BattleFrontier_Mart/map.json index 28261958ab33..1f182365e1f8 100644 --- a/data/maps/BattleFrontier_Mart/map.json +++ b/data/maps/BattleFrontier_Mart/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_FRONTIER_MART_CLERK", "graphics_id": "OBJ_EVENT_GFX_MART_EMPLOYEE", "x": 1, "y": 3, @@ -28,6 +29,7 @@ "flag": "0" }, { + "local_id": "LOCALID_FRONTIER_MART_OLD_WOMAN", "graphics_id": "OBJ_EVENT_GFX_OLD_WOMAN", "x": 5, "y": 4, diff --git a/data/maps/BattleFrontier_Mart/scripts.inc b/data/maps/BattleFrontier_Mart/scripts.inc index 6afe6a0186b0..e019d4ecc905 100644 --- a/data/maps/BattleFrontier_Mart/scripts.inc +++ b/data/maps/BattleFrontier_Mart/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_OLD_WOMAN, 2 - BattleFrontier_Mart_MapScripts:: .byte 0 @@ -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 diff --git a/data/maps/BattleFrontier_OutsideEast/map.json b/data/maps/BattleFrontier_OutsideEast/map.json index 959244d82b78..06cbfe2d36f1 100644 --- a/data/maps/BattleFrontier_OutsideEast/map.json +++ b/data/maps/BattleFrontier_OutsideEast/map.json @@ -190,6 +190,7 @@ "flag": "0" }, { + "local_id": "LOCALID_FRONTIER_SUDOWOODO", "graphics_id": "OBJ_EVENT_GFX_SUDOWOODO", "x": 54, "y": 62, diff --git a/data/maps/BattleFrontier_OutsideEast/scripts.inc b/data/maps/BattleFrontier_OutsideEast/scripts.inc index e8eec6f1606b..ba9abd8d5dda 100644 --- a/data/maps/BattleFrontier_OutsideEast/scripts.inc +++ b/data/maps/BattleFrontier_OutsideEast/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_SUDOWOODO, 14 - BattleFrontier_OutsideEast_MapScripts:: map_script MAP_SCRIPT_ON_RESUME, BattleFrontier_OutsideEast_OnResume map_script MAP_SCRIPT_ON_TRANSITION, BattleFrontier_OutsideEast_OnTransition @@ -108,7 +106,7 @@ BattleFrontier_OutsideEast_EventScript_Sudowoodo:: faceplayer waitse playse SE_SUDOWOODO_SHAKE - applymovement LOCALID_SUDOWOODO, BattleFrontier_OutsideEast_Movement_SudowoodoShake + applymovement LOCALID_FRONTIER_SUDOWOODO, BattleFrontier_OutsideEast_Movement_SudowoodoShake waitmovement 0 release end @@ -120,7 +118,7 @@ BattleFrontier_OutsideEast_EventScript_WaterSudowoodo:: waitstate waitse playse SE_SUDOWOODO_SHAKE - applymovement LOCALID_SUDOWOODO, BattleFrontier_OutsideEast_Movement_SudowoodoShake + applymovement LOCALID_FRONTIER_SUDOWOODO, BattleFrontier_OutsideEast_Movement_SudowoodoShake waitmovement 0 msgbox gText_Sudowoodo_Attacked, MSGBOX_DEFAULT closemessage @@ -128,7 +126,7 @@ BattleFrontier_OutsideEast_EventScript_WaterSudowoodo:: playmoncry SPECIES_SUDOWOODO, CRY_MODE_ENCOUNTER delay 40 waitmoncry - setvar VAR_LAST_TALKED, LOCALID_SUDOWOODO + setvar VAR_LAST_TALKED, LOCALID_FRONTIER_SUDOWOODO setwildbattle SPECIES_SUDOWOODO, 40 setflag FLAG_SYS_CTRL_OBJ_DELETE dowildbattle diff --git a/data/maps/BattleFrontier_OutsideWest/map.json b/data/maps/BattleFrontier_OutsideWest/map.json index bcf579cf1d6e..a77f6ac57866 100644 --- a/data/maps/BattleFrontier_OutsideWest/map.json +++ b/data/maps/BattleFrontier_OutsideWest/map.json @@ -34,6 +34,7 @@ "flag": "0" }, { + "local_id": "LOCALID_FRONTIER_SS_TIDAL", "graphics_id": "OBJ_EVENT_GFX_SS_TIDAL", "x": 20, "y": 70, @@ -47,6 +48,7 @@ "flag": "0" }, { + "local_id": "LOCALID_FRONTIER_FERRY_ATTENDANT", "graphics_id": "OBJ_EVENT_GFX_BEAUTY", "x": 19, "y": 68, @@ -125,6 +127,7 @@ "flag": "0" }, { + "local_id": "LOCALID_FRONTIER_MANIAC_1", "graphics_id": "OBJ_EVENT_GFX_MANIAC", "x": 13, "y": 44, @@ -138,6 +141,7 @@ "flag": "0" }, { + "local_id": "LOCALID_FRONTIER_MANIAC_2", "graphics_id": "OBJ_EVENT_GFX_MANIAC", "x": 14, "y": 44, @@ -164,6 +168,7 @@ "flag": "0" }, { + "local_id": "LOCALID_FRONTIER_GIRL", "graphics_id": "OBJ_EVENT_GFX_GIRL_1", "x": 38, "y": 27, @@ -190,6 +195,7 @@ "flag": "0" }, { + "local_id": "LOCALID_FRONTIER_CAMPER", "graphics_id": "OBJ_EVENT_GFX_CAMPER", "x": 9, "y": 47, @@ -242,6 +248,7 @@ "flag": "0" }, { + "local_id": "LOCALID_FRONTIER_FISHERMAN_2", "graphics_id": "OBJ_EVENT_GFX_FISHERMAN", "x": 42, "y": 48, @@ -307,6 +314,7 @@ "flag": "0" }, { + "local_id": "LOCALID_FRONTIER_MAN_4", "graphics_id": "OBJ_EVENT_GFX_MAN_4", "x": 8, "y": 5, diff --git a/data/maps/BattleFrontier_OutsideWest/scripts.inc b/data/maps/BattleFrontier_OutsideWest/scripts.inc index 5ca5cb9fbb5c..378c1d662436 100644 --- a/data/maps/BattleFrontier_OutsideWest/scripts.inc +++ b/data/maps/BattleFrontier_OutsideWest/scripts.inc @@ -1,12 +1,3 @@ -.set LOCALID_SS_TIDAL, 2 -.set LOCALID_FERRY_ATTENDANT, 3 -.set LOCALID_MANIAC_1, 9 -.set LOCALID_MANIAC_2, 10 -.set LOCALID_GIRL, 12 -.set LOCALID_CAMPER, 14 -.set LOCALID_FISHERMAN_2, 18 -.set LOCALID_MAN_4, 23 - BattleFrontier_OutsideWest_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, BattleFrontier_OutsideWest_OnTransition .byte 0 @@ -72,8 +63,8 @@ BattleFrontier_OutsideWest_EventScript_BoardFerry:: applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceFasterDown waitmovement 0 delay 30 - hideobjectat LOCALID_FERRY_ATTENDANT, MAP_BATTLE_FRONTIER_OUTSIDE_WEST - setvar VAR_0x8004, LOCALID_SS_TIDAL + hideobjectat LOCALID_FRONTIER_FERRY_ATTENDANT, MAP_BATTLE_FRONTIER_OUTSIDE_WEST + setvar VAR_0x8004, LOCALID_FRONTIER_SS_TIDAL call Common_EventScript_FerryDepartIsland return @@ -113,7 +104,7 @@ BattleFrontier_OutsideWest_EventScript_Fisherman2:: faceplayer message BattleFrontier_OutsideWest_Text_GotSeasickOnWayHere waitmessage - applymovement LOCALID_FISHERMAN_2, Common_Movement_FaceAwayPlayer + applymovement LOCALID_FRONTIER_FISHERMAN_2, Common_Movement_FaceAwayPlayer waitmovement 0 waitbuttonpress release @@ -134,16 +125,16 @@ BattleFrontier_OutsideWest_EventScript_Maniac2:: end BattleFrontier_OutsideWest_EventScript_FactoryChallengersTalk:: - applymovement LOCALID_MANIAC_1, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_FRONTIER_MANIAC_1, Common_Movement_WalkInPlaceFasterRight waitmovement 0 msgbox BattleFrontier_OutsideWest_Text_SureWeCanChallengeWithNoMons, MSGBOX_DEFAULT - applymovement LOCALID_MANIAC_2, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_FRONTIER_MANIAC_2, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 msgbox BattleFrontier_OutsideWest_Text_BigGuySaidIllLendYouMons, MSGBOX_DEFAULT closemessage delay 25 - applymovement LOCALID_MANIAC_1, Common_Movement_WalkInPlaceFasterUp - applymovement LOCALID_MANIAC_2, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_FRONTIER_MANIAC_1, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_FRONTIER_MANIAC_2, Common_Movement_WalkInPlaceFasterUp waitmovement 0 release end @@ -161,7 +152,7 @@ BattleFrontier_OutsideWest_EventScript_Camper:: end BattleFrontier_OutsideWest_EventScript_CamperFaceFactory:: - applymovement LOCALID_CAMPER, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_FRONTIER_CAMPER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 return @@ -182,22 +173,22 @@ BattleFrontier_OutsideWest_EventScript_Girl:: end BattleFrontier_OutsideWest_EventScript_GirlShudderNorth:: - applymovement LOCALID_GIRL, BattleFrontier_OutsideWest_Movement_GirlShudderNorth + applymovement LOCALID_FRONTIER_GIRL, BattleFrontier_OutsideWest_Movement_GirlShudderNorth waitmovement 0 return BattleFrontier_OutsideWest_EventScript_GirlShudderSouth:: - applymovement LOCALID_GIRL, BattleFrontier_OutsideWest_Movement_GirlShudderSouth + applymovement LOCALID_FRONTIER_GIRL, BattleFrontier_OutsideWest_Movement_GirlShudderSouth waitmovement 0 return BattleFrontier_OutsideWest_EventScript_GirlShudderWest:: - applymovement LOCALID_GIRL, BattleFrontier_OutsideWest_Movement_GirlShudderWest + applymovement LOCALID_FRONTIER_GIRL, BattleFrontier_OutsideWest_Movement_GirlShudderWest waitmovement 0 return BattleFrontier_OutsideWest_EventScript_GirlShudderEast:: - applymovement LOCALID_GIRL, BattleFrontier_OutsideWest_Movement_GirlShudderEast + applymovement LOCALID_FRONTIER_GIRL, BattleFrontier_OutsideWest_Movement_GirlShudderEast waitmovement 0 return @@ -298,7 +289,7 @@ BattleFrontier_OutsideWest_EventScript_Man4:: faceplayer msgbox BattleFrontier_OutsideWest_Text_FansOverThereUsedToBeTrainers, MSGBOX_DEFAULT closemessage - applymovement LOCALID_MAN_4, Common_Movement_FaceOriginalDirection + applymovement LOCALID_FRONTIER_MAN_4, Common_Movement_FaceOriginalDirection waitmovement 0 release end diff --git a/data/maps/BattleFrontier_PokemonCenter_1F/map.json b/data/maps/BattleFrontier_PokemonCenter_1F/map.json index b993e92777ed..b44bd4b379a4 100644 --- a/data/maps/BattleFrontier_PokemonCenter_1F/map.json +++ b/data/maps/BattleFrontier_PokemonCenter_1F/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_FRONTIER_NURSE", "graphics_id": "OBJ_EVENT_GFX_NURSE", "x": 7, "y": 2, diff --git a/data/maps/BattleFrontier_PokemonCenter_1F/scripts.inc b/data/maps/BattleFrontier_PokemonCenter_1F/scripts.inc index 44806858fbe0..02201af8e562 100644 --- a/data/maps/BattleFrontier_PokemonCenter_1F/scripts.inc +++ b/data/maps/BattleFrontier_PokemonCenter_1F/scripts.inc @@ -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 @@ -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 diff --git a/data/maps/BattleFrontier_ReceptionGate/map.json b/data/maps/BattleFrontier_ReceptionGate/map.json index 12a178198db3..8f92c5e94ba1 100644 --- a/data/maps/BattleFrontier_ReceptionGate/map.json +++ b/data/maps/BattleFrontier_ReceptionGate/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_FRONTIER_RECEPTION_GREETER", "graphics_id": "OBJ_EVENT_GFX_TEALA", "x": 0, "y": 11, @@ -28,6 +29,7 @@ "flag": "0" }, { + "local_id": "LOCALID_FRONTIER_RECEPTION_GUIDE", "graphics_id": "OBJ_EVENT_GFX_TEALA", "x": 8, "y": 11, @@ -54,6 +56,7 @@ "flag": "0" }, { + "local_id": "LOCALID_FRONTIER_RECEPTION_SCOTT", "graphics_id": "OBJ_EVENT_GFX_SCOTT", "x": 4, "y": 5, diff --git a/data/maps/BattleFrontier_ReceptionGate/scripts.inc b/data/maps/BattleFrontier_ReceptionGate/scripts.inc index 151bc665b5cf..78ebdcd0d2fa 100644 --- a/data/maps/BattleFrontier_ReceptionGate/scripts.inc +++ b/data/maps/BattleFrontier_ReceptionGate/scripts.inc @@ -1,7 +1,3 @@ -.set LOCALID_GREETER, 1 -.set LOCALID_GUIDE, 2 -.set LOCALID_SCOTT, 4 - BattleFrontier_ReceptionGate_MapScripts:: map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_ReceptionGate_OnFrame map_script MAP_SCRIPT_ON_TRANSITION, BattleFrontier_ReceptionGate_OnTransition @@ -19,13 +15,13 @@ BattleFrontier_ReceptionGate_EventScript_FirstTimeEntering:: lockall setvar VAR_HAS_ENTERED_BATTLE_FRONTIER, 1 playse SE_PIN - applymovement LOCALID_GREETER, Common_Movement_ExclamationMark + applymovement LOCALID_FRONTIER_RECEPTION_GREETER, Common_Movement_ExclamationMark waitmovement 0 - applymovement LOCALID_GREETER, Common_Movement_Delay48 + applymovement LOCALID_FRONTIER_RECEPTION_GREETER, Common_Movement_Delay48 waitmovement 0 msgbox BattleFrontier_ReceptionGate_Text_FirstTimeHereThisWay, MSGBOX_DEFAULT closemessage - applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_ReceptionGate_Movement_PlayerApproachCounter + applymovement LOCALID_PLAYER, BattleFrontier_ReceptionGate_Movement_PlayerApproachCounter waitmovement 0 goto BattleFrontier_ReceptionGate_EventScript_ScottScene end @@ -42,27 +38,27 @@ BattleFrontier_ReceptionGate_EventScript_ScottScene:: msgbox BattleFrontier_ReceptionGate_Text_EnjoyBattleFrontier, MSGBOX_DEFAULT msgbox BattleFrontier_ReceptionGate_Text_IfItIsntPlayerYouCame, MSGBOX_DEFAULT closemessage - applymovement LOCALID_GREETER, Common_Movement_WalkInPlaceFasterUp - applymovement LOCALID_GUIDE, Common_Movement_WalkInPlaceFasterUp - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_FRONTIER_RECEPTION_GREETER, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_FRONTIER_RECEPTION_GUIDE, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 playse SE_PIN - applymovement LOCALID_GREETER, Common_Movement_ExclamationMark - applymovement LOCALID_GUIDE, Common_Movement_ExclamationMark - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_ExclamationMark + applymovement LOCALID_FRONTIER_RECEPTION_GREETER, Common_Movement_ExclamationMark + applymovement LOCALID_FRONTIER_RECEPTION_GUIDE, Common_Movement_ExclamationMark + applymovement LOCALID_PLAYER, Common_Movement_ExclamationMark waitmovement 0 msgbox BattleFrontier_ReceptionGate_Text_OhMrScottGoodDay, MSGBOX_DEFAULT closemessage - applymovement LOCALID_GREETER, BattleFrontier_ReceptionGate_Movement_GreeterFaceScott - applymovement LOCALID_GUIDE, BattleFrontier_ReceptionGate_Movement_FacilityGuideFaceScott - applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_ReceptionGate_Movement_PlayerFaceScott - applymovement LOCALID_SCOTT, BattleFrontier_ReceptionGate_Movement_ScottEnter + applymovement LOCALID_FRONTIER_RECEPTION_GREETER, BattleFrontier_ReceptionGate_Movement_GreeterFaceScott + applymovement LOCALID_FRONTIER_RECEPTION_GUIDE, BattleFrontier_ReceptionGate_Movement_FacilityGuideFaceScott + applymovement LOCALID_PLAYER, BattleFrontier_ReceptionGate_Movement_PlayerFaceScott + applymovement LOCALID_FRONTIER_RECEPTION_SCOTT, BattleFrontier_ReceptionGate_Movement_ScottEnter waitmovement 0 msgbox BattleFrontier_ReceptionGate_Text_ScottGreatToSeeYouHere, MSGBOX_DEFAULT closemessage - applymovement LOCALID_SCOTT, BattleFrontier_ReceptionGate_Movement_ScottExit + applymovement LOCALID_FRONTIER_RECEPTION_SCOTT, BattleFrontier_ReceptionGate_Movement_ScottExit waitmovement 0 - removeobject LOCALID_SCOTT + removeobject LOCALID_FRONTIER_RECEPTION_SCOTT releaseall end diff --git a/data/maps/BattleFrontier_ScottsHouse/map.json b/data/maps/BattleFrontier_ScottsHouse/map.json index 7a6de715ab62..60d7f4ccfc10 100644 --- a/data/maps/BattleFrontier_ScottsHouse/map.json +++ b/data/maps/BattleFrontier_ScottsHouse/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_SCOTTS_HOUSE_SCOTT", "graphics_id": "OBJ_EVENT_GFX_SCOTT", "x": 2, "y": 3, diff --git a/data/maps/BattleFrontier_ScottsHouse/scripts.inc b/data/maps/BattleFrontier_ScottsHouse/scripts.inc index affd05d3492b..8a818222b70d 100644 --- a/data/maps/BattleFrontier_ScottsHouse/scripts.inc +++ b/data/maps/BattleFrontier_ScottsHouse/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_SCOTT, 1 - BattleFrontier_ScottsHouse_MapScripts:: .byte 0 @@ -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 @@ -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 diff --git a/data/maps/BirthIsland_Exterior/map.json b/data/maps/BirthIsland_Exterior/map.json index 3c5cc874cbfc..996fc0ca141d 100644 --- a/data/maps/BirthIsland_Exterior/map.json +++ b/data/maps/BirthIsland_Exterior/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_BIRTH_ISLAND_EXTERIOR_ROCK", "graphics_id": "OBJ_EVENT_GFX_DEOXYS_TRIANGLE", "x": 15, "y": 12, @@ -28,6 +29,7 @@ "flag": "FLAG_HIDE_BIRTH_ISLAND_DEOXYS_TRIANGLE" }, { + "local_id": "LOCALID_BIRTH_ISLAND_DEOXYS", "graphics_id": "OBJ_EVENT_GFX_DEOXYS", "x": 15, "y": 3, diff --git a/data/maps/BirthIsland_Exterior/scripts.inc b/data/maps/BirthIsland_Exterior/scripts.inc index 0322c17c2708..7b09cb5f04dc 100644 --- a/data/maps/BirthIsland_Exterior/scripts.inc +++ b/data/maps/BirthIsland_Exterior/scripts.inc @@ -1,7 +1,3 @@ -.set LOCALID_DEOXYS, 2 - -@ Note: LOCALID_BIRTH_ISLAND_EXTERIOR_ROCK is a local id for this map used elsewhere. It's defined in event_objects.h - BirthIsland_Exterior_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, BirthIsland_Exterior_OnTransition map_script MAP_SCRIPT_ON_RESUME, BirthIsland_Exterior_OnResume @@ -39,7 +35,7 @@ BirthIsland_Exterior_OnResume: BirthIsland_Exterior_EventScript_TryRemoveDeoxys:: specialvar VAR_RESULT, GetBattleOutcome goto_if_ne VAR_RESULT, B_OUTCOME_CAUGHT, Common_EventScript_NopReturn - removeobject LOCALID_DEOXYS + removeobject LOCALID_BIRTH_ISLAND_DEOXYS return BirthIsland_Exterior_EventScript_Triangle:: @@ -77,14 +73,14 @@ BirthIsland_Exterior_EventScript_Deoxys:: dofieldeffect FLDEFF_DESTROY_DEOXYS_ROCK playbgm MUS_RG_ENCOUNTER_DEOXYS, FALSE waitfieldeffect FLDEFF_DESTROY_DEOXYS_ROCK - addobject LOCALID_DEOXYS - applymovement LOCALID_DEOXYS, BirthIsland_Exterior_Movement_DeoxysApproach + addobject LOCALID_BIRTH_ISLAND_DEOXYS + applymovement LOCALID_BIRTH_ISLAND_DEOXYS, BirthIsland_Exterior_Movement_DeoxysApproach waitmovement 0 waitse playmoncry SPECIES_DEOXYS, CRY_MODE_ENCOUNTER delay 40 waitmoncry - setvar VAR_LAST_TALKED, LOCALID_DEOXYS + setvar VAR_LAST_TALKED, LOCALID_BIRTH_ISLAND_DEOXYS seteventmon SPECIES_DEOXYS, 30 setflag FLAG_SYS_CTRL_OBJ_DELETE special BattleSetup_StartLegendaryBattle diff --git a/data/maps/BirthIsland_Harbor/map.json b/data/maps/BirthIsland_Harbor/map.json index cce96bfc138f..93f399963e5d 100644 --- a/data/maps/BirthIsland_Harbor/map.json +++ b/data/maps/BirthIsland_Harbor/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_BIRTH_ISLAND_SAILOR", "graphics_id": "OBJ_EVENT_GFX_SAILOR", "x": 8, "y": 5, @@ -28,6 +29,7 @@ "flag": "0" }, { + "local_id": "LOCALID_BIRTH_ISLAND_SS_TIDAL", "graphics_id": "OBJ_EVENT_GFX_SS_TIDAL", "x": 8, "y": 7, diff --git a/data/maps/BirthIsland_Harbor/scripts.inc b/data/maps/BirthIsland_Harbor/scripts.inc index e91238cbdcae..988d11716bc1 100644 --- a/data/maps/BirthIsland_Harbor/scripts.inc +++ b/data/maps/BirthIsland_Harbor/scripts.inc @@ -1,6 +1,3 @@ -.set LOCALID_SAILOR, 1 -.set LOCALID_SS_TIDAL, 2 - BirthIsland_Harbor_MapScripts:: .byte 0 @@ -14,8 +11,8 @@ BirthIsland_Harbor_EventScript_Sailor:: applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceFasterDown waitmovement 0 delay 30 - hideobjectat LOCALID_SAILOR, MAP_BIRTH_ISLAND_HARBOR - setvar VAR_0x8004, LOCALID_SS_TIDAL + hideobjectat LOCALID_BIRTH_ISLAND_SAILOR, MAP_BIRTH_ISLAND_HARBOR + setvar VAR_0x8004, LOCALID_BIRTH_ISLAND_SS_TIDAL call Common_EventScript_FerryDepartIsland warp MAP_LILYCOVE_CITY_HARBOR, 8, 11 waitstate diff --git a/data/maps/CaveOfOrigin_B1F/map.json b/data/maps/CaveOfOrigin_B1F/map.json index 166f79998b4c..575670532359 100644 --- a/data/maps/CaveOfOrigin_B1F/map.json +++ b/data/maps/CaveOfOrigin_B1F/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_CAVE_OF_ORIGIN_WALLACE", "graphics_id": "OBJ_EVENT_GFX_WALLACE", "x": 9, "y": 13, diff --git a/data/maps/CaveOfOrigin_B1F/scripts.inc b/data/maps/CaveOfOrigin_B1F/scripts.inc index 11ca66aab07a..14dda1ad82d5 100644 --- a/data/maps/CaveOfOrigin_B1F/scripts.inc +++ b/data/maps/CaveOfOrigin_B1F/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_WALLACE, 1 - CaveOfOrigin_B1F_MapScripts:: .byte 0 @@ -8,16 +6,16 @@ CaveOfOrigin_B1F_EventScript_Wallace:: faceplayer msgbox CaveOfOrigin_B1F_Text_WallaceStory, MSGBOX_DEFAULT closemessage - applymovement LOCALID_WALLACE, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_CAVE_OF_ORIGIN_WALLACE, Common_Movement_WalkInPlaceFasterUp waitmovement 0 delay 60 playse SE_PIN - applymovement LOCALID_WALLACE, Common_Movement_ExclamationMark + applymovement LOCALID_CAVE_OF_ORIGIN_WALLACE, Common_Movement_ExclamationMark waitmovement 0 - applymovement LOCALID_WALLACE, Common_Movement_Delay48 + applymovement LOCALID_CAVE_OF_ORIGIN_WALLACE, Common_Movement_Delay48 waitmovement 0 delay 30 - applymovement LOCALID_WALLACE, Common_Movement_FacePlayer + applymovement LOCALID_CAVE_OF_ORIGIN_WALLACE, Common_Movement_FacePlayer waitmovement 0 message CaveOfOrigin_B1F_Text_WhereIsRayquaza waitmessage @@ -55,7 +53,7 @@ CaveOfOrigin_B1F_EventScript_AtSkyPillar:: fadescreenspeed FADE_TO_BLACK, 4 setflag FLAG_WALLACE_GOES_TO_SKY_PILLAR setvar VAR_SOOTOPOLIS_CITY_STATE, 3 - removeobject LOCALID_WALLACE + removeobject LOCALID_CAVE_OF_ORIGIN_WALLACE clearflag FLAG_HIDE_SKY_PILLAR_WALLACE fadescreen FADE_FROM_BLACK release diff --git a/data/maps/ContestHall/map.json b/data/maps/ContestHall/map.json index 842c57968d30..2d5c0b7c0c4d 100644 --- a/data/maps/ContestHall/map.json +++ b/data/maps/ContestHall/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_CONTEST_MC", "graphics_id": "OBJ_EVENT_GFX_WOMAN_3", "x": 6, "y": 4, @@ -28,6 +29,7 @@ "flag": "0" }, { + "local_id": "LOCALID_CONTEST_JUDGE", "graphics_id": "OBJ_EVENT_GFX_CONTEST_JUDGE", "x": 7, "y": 4, @@ -41,6 +43,7 @@ "flag": "0" }, { + "local_id": "LOCALID_CONTESTANT_1", "graphics_id": "OBJ_EVENT_GFX_VAR_0", "x": 4, "y": 7, @@ -54,6 +57,7 @@ "flag": "0" }, { + "local_id": "LOCALID_CONTESTANT_2", "graphics_id": "OBJ_EVENT_GFX_VAR_1", "x": 6, "y": 7, @@ -67,6 +71,7 @@ "flag": "0" }, { + "local_id": "LOCALID_CONTESTANT_3", "graphics_id": "OBJ_EVENT_GFX_VAR_2", "x": 8, "y": 7, @@ -80,6 +85,7 @@ "flag": "0" }, { + "local_id": "LOCALID_CONTEST_AUDIENCE_1", "graphics_id": "OBJ_EVENT_GFX_VAR_4", "x": 2, "y": 6, @@ -93,6 +99,7 @@ "flag": "0" }, { + "local_id": "LOCALID_CONTEST_AUDIENCE_3", "graphics_id": "OBJ_EVENT_GFX_VAR_6", "x": 4, "y": 2, @@ -106,6 +113,7 @@ "flag": "0" }, { + "local_id": "LOCALID_CONTEST_AUDIENCE_4", "graphics_id": "OBJ_EVENT_GFX_VAR_7", "x": 5, "y": 2, @@ -119,6 +127,7 @@ "flag": "0" }, { + "local_id": "LOCALID_CONTEST_AUDIENCE_5", "graphics_id": "OBJ_EVENT_GFX_VAR_8", "x": 9, "y": 2, @@ -132,6 +141,7 @@ "flag": "0" }, { + "local_id": "LOCALID_CONTEST_AUDIENCE_6", "graphics_id": "OBJ_EVENT_GFX_VAR_9", "x": 10, "y": 2, @@ -145,6 +155,7 @@ "flag": "0" }, { + "local_id": "LOCALID_CONTEST_AUDIENCE_7", "graphics_id": "OBJ_EVENT_GFX_VAR_A", "x": 12, "y": 5, @@ -158,6 +169,7 @@ "flag": "0" }, { + "local_id": "LOCALID_CONTEST_AUDIENCE_2", "graphics_id": "OBJ_EVENT_GFX_VAR_5", "x": 2, "y": 5, @@ -171,6 +183,7 @@ "flag": "0" }, { + "local_id": "LOCALID_CONTEST_POKEBALL", "graphics_id": "OBJ_EVENT_GFX_ITEM_BALL", "x": 7, "y": 5, @@ -184,6 +197,7 @@ "flag": "FLAG_HIDE_CONTEST_POKE_BALL" }, { + "local_id": "LOCALID_CONTESTANT_4", "graphics_id": "OBJ_EVENT_GFX_VAR_3", "x": 10, "y": 7, @@ -197,6 +211,7 @@ "flag": "0" }, { + "local_id": "LOCALID_CONTEST_ARTIST", "graphics_id": "OBJ_EVENT_GFX_ARTIST", "x": 12, "y": 6, diff --git a/data/maps/ContestHall/scripts.inc b/data/maps/ContestHall/scripts.inc index 7ca6a57f69d7..f0c807e7b452 100644 --- a/data/maps/ContestHall/scripts.inc +++ b/data/maps/ContestHall/scripts.inc @@ -69,7 +69,7 @@ ContestHall_EventScript_Contest:: ContestHall_EventScript_SetContestObjects:: special LoadLinkContestPlayerPalettes - hideobjectat OBJ_EVENT_ID_PLAYER, MAP_LITTLEROOT_TOWN + hideobjectat LOCALID_PLAYER, MAP_LITTLEROOT_TOWN call ContestHall_EventScript_CreateAudience end diff --git a/data/maps/DesertUnderpass/map.json b/data/maps/DesertUnderpass/map.json index 152d32a79470..386c28b2af54 100644 --- a/data/maps/DesertUnderpass/map.json +++ b/data/maps/DesertUnderpass/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_UNDERPASS_FOSSIL", "graphics_id": "OBJ_EVENT_GFX_FOSSIL", "x": 132, "y": 10, diff --git a/data/maps/DesertUnderpass/scripts.inc b/data/maps/DesertUnderpass/scripts.inc index 518d9888329e..a241724e51e4 100644 --- a/data/maps/DesertUnderpass/scripts.inc +++ b/data/maps/DesertUnderpass/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_FOSSIL, 1 - DesertUnderpass_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, DesertUnderpass_OnTransition .byte 0 @@ -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 diff --git a/data/maps/DewfordTown/map.json b/data/maps/DewfordTown/map.json index 26551e4efe95..ec2e8795610d 100644 --- a/data/maps/DewfordTown/map.json +++ b/data/maps/DewfordTown/map.json @@ -39,6 +39,7 @@ "flag": "0" }, { + "local_id": "LOCALID_DEWFORD_BRINEY", "graphics_id": "OBJ_EVENT_GFX_EXPERT_M", "x": 12, "y": 9, @@ -65,6 +66,7 @@ "flag": "0" }, { + "local_id": "LOCALID_DEWFORD_BOAT", "graphics_id": "OBJ_EVENT_GFX_MR_BRINEYS_BOAT", "x": 12, "y": 8, diff --git a/data/maps/DewfordTown/scripts.inc b/data/maps/DewfordTown/scripts.inc index 1250c2d7670d..40873ff668f6 100644 --- a/data/maps/DewfordTown/scripts.inc +++ b/data/maps/DewfordTown/scripts.inc @@ -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 @@ -123,30 +111,30 @@ DewfordTown_EventScript_FishingNotSoGood:: DewfordTown_EventScript_SailToPetalburg:: call EventScript_BackupMrBrineyLocation - setobjectsubpriority LOCALID_BRINEY_DEWFORD, MAP_DEWFORD_TOWN, 0 - setobjectsubpriority OBJ_EVENT_ID_PLAYER, MAP_DEWFORD_TOWN, 0 - applymovement LOCALID_BRINEY_DEWFORD, DewfordTown_Movement_BrineyBoardBoat + setobjectsubpriority LOCALID_DEWFORD_BRINEY, MAP_DEWFORD_TOWN, 0 + setobjectsubpriority LOCALID_PLAYER, MAP_DEWFORD_TOWN, 0 + applymovement LOCALID_DEWFORD_BRINEY, DewfordTown_Movement_BrineyBoardBoat waitmovement 0 - removeobject LOCALID_BRINEY_DEWFORD - applymovement OBJ_EVENT_ID_PLAYER, DewfordTown_Movement_PlayerBoardBoat + removeobject LOCALID_DEWFORD_BRINEY + applymovement LOCALID_PLAYER, DewfordTown_Movement_PlayerBoardBoat waitmovement 0 - hideobjectat OBJ_EVENT_ID_PLAYER, MAP_DEWFORD_TOWN + hideobjectat LOCALID_PLAYER, MAP_DEWFORD_TOWN call Common_EventScript_PlayBrineysBoatMusic - applymovement LOCALID_BOAT_DEWFORD, DewfordTown_Movement_SailToPetalburg - applymovement OBJ_EVENT_ID_PLAYER, DewfordTown_Movement_SailToPetalburg + applymovement LOCALID_DEWFORD_BOAT, DewfordTown_Movement_SailToPetalburg + applymovement LOCALID_PLAYER, DewfordTown_Movement_SailToPetalburg waitmovement 0 - showobjectat OBJ_EVENT_ID_PLAYER, MAP_ROUTE104 + showobjectat LOCALID_PLAYER, MAP_ROUTE104 call Common_EventScript_StopBrineysBoatMusic - applymovement OBJ_EVENT_ID_PLAYER, DewfordTown_Movement_ExitBoatPetalburg + applymovement LOCALID_PLAYER, DewfordTown_Movement_ExitBoatPetalburg waitmovement 0 - showobjectat OBJ_EVENT_ID_PLAYER, MAP_ROUTE104 + showobjectat LOCALID_PLAYER, MAP_ROUTE104 clearflag FLAG_HIDE_BRINEYS_HOUSE_MR_BRINEY 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 + resetobjectsubpriority LOCALID_PLAYER, MAP_DEWFORD_TOWN warp MAP_ROUTE104_MR_BRINEYS_HOUSE, 5, 4 copyvar VAR_BRINEY_LOCATION, VAR_0x8008 waitstate @@ -155,39 +143,39 @@ DewfordTown_EventScript_SailToPetalburg:: DewfordTown_EventScript_SailToSlateport:: call EventScript_BackupMrBrineyLocation - setobjectsubpriority LOCALID_BRINEY_DEWFORD, MAP_DEWFORD_TOWN, 0 - setobjectsubpriority OBJ_EVENT_ID_PLAYER, MAP_DEWFORD_TOWN, 1 - applymovement LOCALID_BRINEY_DEWFORD, DewfordTown_Movement_BrineyBoardBoat + setobjectsubpriority LOCALID_DEWFORD_BRINEY, MAP_DEWFORD_TOWN, 0 + setobjectsubpriority LOCALID_PLAYER, MAP_DEWFORD_TOWN, 1 + applymovement LOCALID_DEWFORD_BRINEY, DewfordTown_Movement_BrineyBoardBoat waitmovement 0 - removeobject LOCALID_BRINEY_DEWFORD - applymovement OBJ_EVENT_ID_PLAYER, DewfordTown_Movement_PlayerBoardBoat + removeobject LOCALID_DEWFORD_BRINEY + applymovement LOCALID_PLAYER, DewfordTown_Movement_PlayerBoardBoat waitmovement 0 - hideobjectat OBJ_EVENT_ID_PLAYER, MAP_DEWFORD_TOWN + hideobjectat LOCALID_PLAYER, MAP_DEWFORD_TOWN call Common_EventScript_PlayBrineysBoatMusic - applymovement LOCALID_BOAT_DEWFORD, DewfordTown_Movement_SailToSlateport - applymovement OBJ_EVENT_ID_PLAYER, DewfordTown_Movement_SailToSlateport + applymovement LOCALID_DEWFORD_BOAT, DewfordTown_Movement_SailToSlateport + applymovement LOCALID_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 + showobjectat LOCALID_PLAYER, MAP_ROUTE109 + applymovement LOCALID_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_PLAYER, MAP_DEWFORD_TOWN + resetobjectsubpriority LOCALID_ROUTE109_BRINEY, MAP_ROUTE109 + copyobjectxytoperm LOCALID_ROUTE109_BRINEY release end diff --git a/data/maps/DewfordTown_Hall/map.json b/data/maps/DewfordTown_Hall/map.json index 9489a3d1eee2..c253d16a6184 100644 --- a/data/maps/DewfordTown_Hall/map.json +++ b/data/maps/DewfordTown_Hall/map.json @@ -54,6 +54,7 @@ "flag": "0" }, { + "local_id": "LOCALID_DEWFORD_HALL_EXPERT_M", "graphics_id": "OBJ_EVENT_GFX_EXPERT_M", "x": 9, "y": 3, @@ -67,6 +68,7 @@ "flag": "0" }, { + "local_id": "LOCALID_DEWFORD_HALL_TWIN", "graphics_id": "OBJ_EVENT_GFX_TWIN", "x": 5, "y": 2, @@ -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, @@ -106,6 +109,7 @@ "flag": "0" }, { + "local_id": "LOCALID_DEWFORD_HALL_PSYCHIC_M", "graphics_id": "OBJ_EVENT_GFX_PSYCHIC_M", "x": 15, "y": 3, diff --git a/data/maps/DewfordTown_Hall/scripts.inc b/data/maps/DewfordTown_Hall/scripts.inc index 1472bebb243b..87fa85440d1c 100644 --- a/data/maps/DewfordTown_Hall/scripts.inc +++ b/data/maps/DewfordTown_Hall/scripts.inc @@ -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 @@ -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 @@ -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 @@ -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 @@ -199,7 +194,7 @@ DewfordTown_Hall_EventScript_DebateReact1:: DewfordTown_Hall_EventScript_PlayerReactWest:: goto_if_eq VAR_FACING, DIR_EAST, DewfordTown_Hall_EventScript_DontMovePlayer1 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterRight waitmovement 0 return @@ -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 @@ -219,18 +214,18 @@ DewfordTown_Hall_EventScript_PlayerReactNorthSouth:: return DewfordTown_Hall_EventScript_PlayerWalkInPlaceUp:: - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 return DewfordTown_Hall_EventScript_PlayerWalkInPlaceDown:: - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterDown + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterDown waitmovement 0 return DewfordTown_Hall_EventScript_PlayerReactEast:: goto_if_eq VAR_FACING, DIR_WEST, DewfordTown_Hall_EventScript_DontMovePlayer1 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 return diff --git a/data/maps/DewfordTown_PokemonCenter_1F/map.json b/data/maps/DewfordTown_PokemonCenter_1F/map.json index 5e5c7b93e41f..49934408397b 100644 --- a/data/maps/DewfordTown_PokemonCenter_1F/map.json +++ b/data/maps/DewfordTown_PokemonCenter_1F/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_DEWFORD_NURSE", "graphics_id": "OBJ_EVENT_GFX_NURSE", "x": 7, "y": 2, diff --git a/data/maps/DewfordTown_PokemonCenter_1F/scripts.inc b/data/maps/DewfordTown_PokemonCenter_1F/scripts.inc index dbd9e1c8d211..0fb429b992c0 100644 --- a/data/maps/DewfordTown_PokemonCenter_1F/scripts.inc +++ b/data/maps/DewfordTown_PokemonCenter_1F/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_NURSE, 1 - DewfordTown_PokemonCenter_1F_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, DewfordTown_PokemonCenter_1F_OnTransition map_script MAP_SCRIPT_ON_RESUME, CableClub_OnResume @@ -11,7 +9,7 @@ DewfordTown_PokemonCenter_1F_OnTransition: end DewfordTown_PokemonCenter_1F_EventScript_Nurse:: - setvar VAR_0x800B, LOCALID_NURSE + setvar VAR_0x800B, LOCALID_DEWFORD_NURSE call Common_EventScript_PkmnCenterNurse waitmessage waitbuttonpress diff --git a/data/maps/EverGrandeCity_ChampionsRoom/map.json b/data/maps/EverGrandeCity_ChampionsRoom/map.json index 305a1f16f7cf..abd9c2e6cff2 100644 --- a/data/maps/EverGrandeCity_ChampionsRoom/map.json +++ b/data/maps/EverGrandeCity_ChampionsRoom/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_CHAMPIONS_ROOM_WALLACE", "graphics_id": "OBJ_EVENT_GFX_WALLACE", "x": 6, "y": 5, @@ -28,6 +29,7 @@ "flag": "0" }, { + "local_id": "LOCALID_CHAMPIONS_ROOM_RIVAL", "graphics_id": "OBJ_EVENT_GFX_VAR_0", "x": 6, "y": 12, @@ -41,6 +43,7 @@ "flag": "FLAG_HIDE_CHAMPIONS_ROOM_RIVAL" }, { + "local_id": "LOCALID_CHAMPIONS_ROOM_BIRCH", "graphics_id": "OBJ_EVENT_GFX_PROF_BIRCH", "x": 6, "y": 12, diff --git a/data/maps/EverGrandeCity_ChampionsRoom/scripts.inc b/data/maps/EverGrandeCity_ChampionsRoom/scripts.inc index f9723ffa0f4b..dd41b8461781 100644 --- a/data/maps/EverGrandeCity_ChampionsRoom/scripts.inc +++ b/data/maps/EverGrandeCity_ChampionsRoom/scripts.inc @@ -1,7 +1,3 @@ -.set LOCALID_WALLACE, 1 -.set LOCALID_RIVAL, 2 -.set LOCALID_BIRCH, 3 - EverGrandeCity_ChampionsRoom_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, EverGrandeCity_ChampionsRoom_OnTransition map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, EverGrandeCity_ChampionsRoom_OnWarp @@ -17,7 +13,7 @@ EverGrandeCity_ChampionsRoom_OnWarp: .2byte 0 EverGrandeCity_ChampionsRoom_EventScript_PlayerTurnNorth:: - turnobject OBJ_EVENT_ID_PLAYER, DIR_NORTH + turnobject LOCALID_PLAYER, DIR_NORTH end EverGrandeCity_ChampionsRoom_OnFrame: @@ -26,10 +22,10 @@ EverGrandeCity_ChampionsRoom_OnFrame: EverGrandeCity_ChampionsRoom_EventScript_EnterRoom:: lockall - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkUp4 + applymovement LOCALID_PLAYER, Common_Movement_WalkUp4 waitmovement 0 delay 40 - applymovement OBJ_EVENT_ID_PLAYER, EverGrandeCity_ChampionsRoom_Movement_PlayerApproachWallace + applymovement LOCALID_PLAYER, EverGrandeCity_ChampionsRoom_Movement_PlayerApproachWallace waitmovement 0 setvar VAR_TEMP_1, 1 goto EverGrandeCity_ChampionsRoom_EventScript_Wallace @@ -59,7 +55,7 @@ EverGrandeCity_ChampionsRoom_EventScript_Defeated:: checkplayergender call_if_eq VAR_RESULT, MALE, EverGrandeCity_ChampionsRoom_EventScript_PlayMayMusic call_if_eq VAR_RESULT, FEMALE, EverGrandeCity_ChampionsRoom_EventScript_PlayBrendanMusic - addobject LOCALID_RIVAL + addobject LOCALID_CHAMPIONS_ROOM_RIVAL call EverGrandeCity_ChampionsRoom_EventScript_RivalApproachPlayer checkplayergender goto_if_eq VAR_RESULT, MALE, EverGrandeCity_ChampionsRoom_EventScript_MayAdvice @@ -78,9 +74,9 @@ EverGrandeCity_ChampionsRoom_EventScript_MayAdvice:: msgbox EverGrandeCity_ChampionsRoom_Text_MayAdvice, MSGBOX_DEFAULT delay 40 playse SE_PIN - applymovement LOCALID_RIVAL, Common_Movement_ExclamationMark + applymovement LOCALID_CHAMPIONS_ROOM_RIVAL, Common_Movement_ExclamationMark waitmovement 0 - applymovement LOCALID_RIVAL, Common_Movement_Delay48 + applymovement LOCALID_CHAMPIONS_ROOM_RIVAL, Common_Movement_Delay48 waitmovement 0 call EverGrandeCity_ChampionsRoom_EventScript_RivalLookBackAndForth msgbox EverGrandeCity_ChampionsRoom_Text_MayItsAlreadyOver, MSGBOX_DEFAULT @@ -91,9 +87,9 @@ EverGrandeCity_ChampionsRoom_EventScript_BrendanAdvice:: msgbox EverGrandeCity_ChampionsRoom_Text_BrendanAdvice, MSGBOX_DEFAULT delay 40 playse SE_PIN - applymovement LOCALID_RIVAL, Common_Movement_ExclamationMark + applymovement LOCALID_CHAMPIONS_ROOM_RIVAL, Common_Movement_ExclamationMark waitmovement 0 - applymovement LOCALID_RIVAL, Common_Movement_Delay48 + applymovement LOCALID_CHAMPIONS_ROOM_RIVAL, Common_Movement_Delay48 waitmovement 0 call EverGrandeCity_ChampionsRoom_EventScript_RivalLookBackAndForth msgbox EverGrandeCity_ChampionsRoom_Text_BrendanYouveWon, MSGBOX_DEFAULT @@ -102,37 +98,37 @@ EverGrandeCity_ChampionsRoom_EventScript_BrendanAdvice:: EverGrandeCity_ChampionsRoom_EventScript_BirchArrivesExitForHoF:: closemessage - addobject LOCALID_BIRCH - applymovement LOCALID_BIRCH, EverGrandeCity_ChampionsRoom_Movement_BirchArrives + addobject LOCALID_CHAMPIONS_ROOM_BIRCH + applymovement LOCALID_CHAMPIONS_ROOM_BIRCH, EverGrandeCity_ChampionsRoom_Movement_BirchArrives waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterRight waitmovement 0 msgbox EverGrandeCity_ChampionsRoom_Text_BirchArriveRatePokedex, MSGBOX_DEFAULT call ProfBirch_EventScript_RatePokedex msgbox EverGrandeCity_ChampionsRoom_Text_BirchCongratulations, MSGBOX_DEFAULT - applymovement LOCALID_WALLACE, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_CHAMPIONS_ROOM_WALLACE, Common_Movement_WalkInPlaceFasterUp waitmovement 0 delay 20 - applymovement LOCALID_WALLACE, Common_Movement_WalkInPlaceFasterDown + applymovement LOCALID_CHAMPIONS_ROOM_WALLACE, Common_Movement_WalkInPlaceFasterDown waitmovement 0 msgbox EverGrandeCity_ChampionsRoom_Text_WallaceComeWithMe, MSGBOX_DEFAULT closemessage delay 30 - applymovement LOCALID_WALLACE, EverGrandeCity_ChampionsRoom_Movement_WallaceExitStart - applymovement OBJ_EVENT_ID_PLAYER, EverGrandeCity_ChampionsRoom_Movement_PlayerExitStart - applymovement LOCALID_BIRCH, Common_Movement_WalkInPlaceFasterUp - applymovement LOCALID_RIVAL, EverGrandeCity_ChampionsRoom_Movement_RivalFollows + applymovement LOCALID_CHAMPIONS_ROOM_WALLACE, EverGrandeCity_ChampionsRoom_Movement_WallaceExitStart + applymovement LOCALID_PLAYER, EverGrandeCity_ChampionsRoom_Movement_PlayerExitStart + applymovement LOCALID_CHAMPIONS_ROOM_BIRCH, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_CHAMPIONS_ROOM_RIVAL, EverGrandeCity_ChampionsRoom_Movement_RivalFollows waitmovement 0 delay 20 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterDown + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterDown waitmovement 0 msgbox EverGrandeCity_ChampionsRoom_Text_WallaceWaitOutside, MSGBOX_DEFAULT checkplayergender call_if_eq VAR_RESULT, MALE, EverGrandeCity_ChampionsRoom_EventScript_MayCongratulations call_if_eq VAR_RESULT, FEMALE, EverGrandeCity_ChampionsRoom_EventScript_BrendanCongratulations closemessage - applymovement LOCALID_WALLACE, EverGrandeCity_ChampionsRoom_Movement_WallaceExit - applymovement OBJ_EVENT_ID_PLAYER, EverGrandeCity_ChampionsRoom_Movement_PlayerExit + applymovement LOCALID_CHAMPIONS_ROOM_WALLACE, EverGrandeCity_ChampionsRoom_Movement_WallaceExit + applymovement LOCALID_PLAYER, EverGrandeCity_ChampionsRoom_Movement_PlayerExit waitmovement 0 setflag FLAG_HIDE_PETALBURG_GYM_GREETER warp MAP_EVER_GRANDE_CITY_HALL_OF_FAME, 7, 16 @@ -149,14 +145,14 @@ EverGrandeCity_ChampionsRoom_EventScript_BrendanCongratulations:: return EverGrandeCity_ChampionsRoom_EventScript_RivalApproachPlayer:: - applymovement LOCALID_RIVAL, EverGrandeCity_ChampionsRoom_Movement_RivalApproachPlayer + applymovement LOCALID_CHAMPIONS_ROOM_RIVAL, EverGrandeCity_ChampionsRoom_Movement_RivalApproachPlayer waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 return EverGrandeCity_ChampionsRoom_EventScript_RivalLookBackAndForth:: - applymovement LOCALID_RIVAL, EverGrandeCity_ChampionsRoom_Movement_RivalLookBackAndForth + applymovement LOCALID_CHAMPIONS_ROOM_RIVAL, EverGrandeCity_ChampionsRoom_Movement_RivalLookBackAndForth waitmovement 0 return diff --git a/data/maps/EverGrandeCity_DrakesRoom/scripts.inc b/data/maps/EverGrandeCity_DrakesRoom/scripts.inc index 80b1f568c837..c7b4e55f9e3a 100644 --- a/data/maps/EverGrandeCity_DrakesRoom/scripts.inc +++ b/data/maps/EverGrandeCity_DrakesRoom/scripts.inc @@ -10,7 +10,7 @@ EverGrandeCity_DrakesRoom_OnWarp: .2byte 0 EverGrandeCity_DrakesRoom_EventScript_PlayerTurnNorth:: - turnobject OBJ_EVENT_ID_PLAYER, DIR_NORTH + turnobject LOCALID_PLAYER, DIR_NORTH end EverGrandeCity_DrakesRoom_OnFrame: diff --git a/data/maps/EverGrandeCity_GlaciasRoom/scripts.inc b/data/maps/EverGrandeCity_GlaciasRoom/scripts.inc index b2d556448c82..5e70c86cf3c5 100644 --- a/data/maps/EverGrandeCity_GlaciasRoom/scripts.inc +++ b/data/maps/EverGrandeCity_GlaciasRoom/scripts.inc @@ -9,7 +9,7 @@ EverGrandeCity_GlaciasRoom_OnWarp: .2byte 0 EverGrandeCity_GlaciasRoom_EventScript_PlayerTurnNorth:: - turnobject OBJ_EVENT_ID_PLAYER, DIR_NORTH + turnobject LOCALID_PLAYER, DIR_NORTH end EverGrandeCity_GlaciasRoom_OnFrame: diff --git a/data/maps/EverGrandeCity_Hall1/scripts.inc b/data/maps/EverGrandeCity_Hall1/scripts.inc index 0d4b524c8379..51c030ee4eb2 100644 --- a/data/maps/EverGrandeCity_Hall1/scripts.inc +++ b/data/maps/EverGrandeCity_Hall1/scripts.inc @@ -7,6 +7,6 @@ EverGrandeCity_Hall1_OnWarp: .2byte 0 EverGrandeCity_Hall1_EventScript_TurnPlayerNorth:: - turnobject OBJ_EVENT_ID_PLAYER, DIR_NORTH + turnobject LOCALID_PLAYER, DIR_NORTH end diff --git a/data/maps/EverGrandeCity_Hall2/scripts.inc b/data/maps/EverGrandeCity_Hall2/scripts.inc index b81df8b405ca..847ffcd44f69 100644 --- a/data/maps/EverGrandeCity_Hall2/scripts.inc +++ b/data/maps/EverGrandeCity_Hall2/scripts.inc @@ -7,6 +7,6 @@ EverGrandeCity_Hall2_OnWarp: .2byte 0 EverGrandeCity_Hall2_EventScript_TurnPlayerNorth:: - turnobject OBJ_EVENT_ID_PLAYER, DIR_NORTH + turnobject LOCALID_PLAYER, DIR_NORTH end diff --git a/data/maps/EverGrandeCity_Hall3/scripts.inc b/data/maps/EverGrandeCity_Hall3/scripts.inc index 4f9245f64678..ad188078c617 100644 --- a/data/maps/EverGrandeCity_Hall3/scripts.inc +++ b/data/maps/EverGrandeCity_Hall3/scripts.inc @@ -7,6 +7,6 @@ EverGrandeCity_Hall3_OnWarp: .2byte 0 EverGrandeCity_Hall3_EventScript_TurnPlayerNorth:: - turnobject OBJ_EVENT_ID_PLAYER, DIR_NORTH + turnobject LOCALID_PLAYER, DIR_NORTH end diff --git a/data/maps/EverGrandeCity_Hall4/scripts.inc b/data/maps/EverGrandeCity_Hall4/scripts.inc index 3d9ab4603bdd..290a8e0f73d2 100644 --- a/data/maps/EverGrandeCity_Hall4/scripts.inc +++ b/data/maps/EverGrandeCity_Hall4/scripts.inc @@ -7,6 +7,6 @@ EverGrandeCity_Hall4_OnWarp: .2byte 0 EverGrandeCity_Hall4_EventScript_TurnPlayerNorth:: - turnobject OBJ_EVENT_ID_PLAYER, DIR_NORTH + turnobject LOCALID_PLAYER, DIR_NORTH end diff --git a/data/maps/EverGrandeCity_Hall5/scripts.inc b/data/maps/EverGrandeCity_Hall5/scripts.inc index 9781d114f429..b99b25f2b2a7 100644 --- a/data/maps/EverGrandeCity_Hall5/scripts.inc +++ b/data/maps/EverGrandeCity_Hall5/scripts.inc @@ -7,6 +7,6 @@ EverGrandeCity_Hall5_OnWarp: .2byte 0 EverGrandeCity_Hall5_EventScript_TurnPlayerNorth:: - turnobject OBJ_EVENT_ID_PLAYER, DIR_NORTH + turnobject LOCALID_PLAYER, DIR_NORTH end diff --git a/data/maps/EverGrandeCity_HallOfFame/map.json b/data/maps/EverGrandeCity_HallOfFame/map.json index 82219dfd43c6..5f3f30c27d4c 100644 --- a/data/maps/EverGrandeCity_HallOfFame/map.json +++ b/data/maps/EverGrandeCity_HallOfFame/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_HALL_OF_FAME_WALLACE", "graphics_id": "OBJ_EVENT_GFX_WALLACE", "x": 6, "y": 16, diff --git a/data/maps/EverGrandeCity_HallOfFame/scripts.inc b/data/maps/EverGrandeCity_HallOfFame/scripts.inc index 92b01af9700a..5abb3d407f9f 100644 --- a/data/maps/EverGrandeCity_HallOfFame/scripts.inc +++ b/data/maps/EverGrandeCity_HallOfFame/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_WALLACE, 1 - EverGrandeCity_HallOfFame_MapScripts:: map_script MAP_SCRIPT_ON_FRAME_TABLE, EverGrandeCity_HallOfFame_OnFrame map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, EverGrandeCity_HallOfFame_OnWarp @@ -10,7 +8,7 @@ EverGrandeCity_HallOfFame_OnWarp: .2byte 0 EverGrandeCity_HallOfFame_EventScript_TurnPlayerNorth:: - turnobject OBJ_EVENT_ID_PLAYER, DIR_NORTH + turnobject LOCALID_PLAYER, DIR_NORTH end EverGrandeCity_HallOfFame_OnFrame: @@ -19,25 +17,25 @@ EverGrandeCity_HallOfFame_OnFrame: EverGrandeCity_HallOfFame_EventScript_EnterHallOfFame:: lockall - applymovement LOCALID_WALLACE, EverGrandeCity_HallOfFame_Movement_WalkIntoHallOfFame1 - applymovement OBJ_EVENT_ID_PLAYER, EverGrandeCity_HallOfFame_Movement_WalkIntoHallOfFame1 + applymovement LOCALID_HALL_OF_FAME_WALLACE, EverGrandeCity_HallOfFame_Movement_WalkIntoHallOfFame1 + applymovement LOCALID_PLAYER, EverGrandeCity_HallOfFame_Movement_WalkIntoHallOfFame1 waitmovement 0 - applymovement LOCALID_WALLACE, Common_Movement_WalkInPlaceFasterRight - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_HALL_OF_FAME_WALLACE, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 msgbox EverGrandeCity_HallOfFame_Text_HereWeHonorLeagueChampions, MSGBOX_DEFAULT closemessage - applymovement LOCALID_WALLACE, EverGrandeCity_HallOfFame_Movement_WalkIntoHallOfFame2 - applymovement OBJ_EVENT_ID_PLAYER, EverGrandeCity_HallOfFame_Movement_WalkIntoHallOfFame2 + applymovement LOCALID_HALL_OF_FAME_WALLACE, EverGrandeCity_HallOfFame_Movement_WalkIntoHallOfFame2 + applymovement LOCALID_PLAYER, EverGrandeCity_HallOfFame_Movement_WalkIntoHallOfFame2 waitmovement 0 delay 20 - applymovement LOCALID_WALLACE, Common_Movement_WalkInPlaceFasterRight - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_HALL_OF_FAME_WALLACE, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 msgbox EverGrandeCity_HallOfFame_Text_LetsRecordYouAndYourPartnersNames, MSGBOX_DEFAULT closemessage - applymovement LOCALID_WALLACE, Common_Movement_WalkInPlaceFasterUp - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_HALL_OF_FAME_WALLACE, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 delay 20 dofieldeffect FLDEFF_HALL_OF_FAME_RECORD diff --git a/data/maps/EverGrandeCity_PhoebesRoom/scripts.inc b/data/maps/EverGrandeCity_PhoebesRoom/scripts.inc index ed272eb90198..4a6582f4987b 100644 --- a/data/maps/EverGrandeCity_PhoebesRoom/scripts.inc +++ b/data/maps/EverGrandeCity_PhoebesRoom/scripts.inc @@ -9,7 +9,7 @@ EverGrandeCity_PhoebesRoom_OnWarp: .2byte 0 EverGrandeCity_PhoebesRoom_EventScript_PlayerTurnNorth:: - turnobject OBJ_EVENT_ID_PLAYER, DIR_NORTH + turnobject LOCALID_PLAYER, DIR_NORTH end EverGrandeCity_PhoebesRoom_OnFrame: diff --git a/data/maps/EverGrandeCity_PokemonCenter_1F/map.json b/data/maps/EverGrandeCity_PokemonCenter_1F/map.json index a146dc11a267..b74207871d90 100644 --- a/data/maps/EverGrandeCity_PokemonCenter_1F/map.json +++ b/data/maps/EverGrandeCity_PokemonCenter_1F/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_EVER_GRANDE_NURSE", "graphics_id": "OBJ_EVENT_GFX_NURSE", "x": 7, "y": 2, @@ -54,6 +55,7 @@ "flag": "0" }, { + "local_id": "LOCALID_EVER_GRANDE_SCOTT", "graphics_id": "OBJ_EVENT_GFX_SCOTT", "x": 9, "y": 4, diff --git a/data/maps/EverGrandeCity_PokemonCenter_1F/scripts.inc b/data/maps/EverGrandeCity_PokemonCenter_1F/scripts.inc index ec45732e8c31..0bdd84765886 100644 --- a/data/maps/EverGrandeCity_PokemonCenter_1F/scripts.inc +++ b/data/maps/EverGrandeCity_PokemonCenter_1F/scripts.inc @@ -1,6 +1,3 @@ -.set LOCALID_NURSE, 1 -.set LOCALID_SCOTT, 4 - EverGrandeCity_PokemonCenter_1F_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, EverGrandeCity_PokemonCenter_1F_OnTransition map_script MAP_SCRIPT_ON_RESUME, CableClub_OnResume @@ -17,7 +14,7 @@ EverGrandeCity_PokemonCenter_1F_EventScript_TryShowScott:: return EverGrandeCity_PokemonCenter_1F_EventScript_Nurse:: - setvar VAR_0x800B, LOCALID_NURSE + setvar VAR_0x800B, LOCALID_EVER_GRANDE_NURSE call Common_EventScript_PkmnCenterNurse waitmessage waitbuttonpress @@ -44,17 +41,17 @@ EverGrandeCity_PokemonCenter_1F_EventScript_Scott:: setflag FLAG_MET_SCOTT_IN_EVERGRANDE playse SE_EXIT waitse - removeobject LOCALID_SCOTT + removeobject LOCALID_EVER_GRANDE_SCOTT release end EverGrandeCity_PokemonCenter_1F_EventScript_ScottExitNorth:: - applymovement LOCALID_SCOTT, EverGrandeCity_PokemonCenter_1F_Movement_ScottExitNorth + applymovement LOCALID_EVER_GRANDE_SCOTT, EverGrandeCity_PokemonCenter_1F_Movement_ScottExitNorth waitmovement 0 return EverGrandeCity_PokemonCenter_1F_EventScript_ScottExit:: - applymovement LOCALID_SCOTT, EverGrandeCity_PokemonCenter_1F_Movement_ScottExit + applymovement LOCALID_EVER_GRANDE_SCOTT, EverGrandeCity_PokemonCenter_1F_Movement_ScottExit waitmovement 0 return diff --git a/data/maps/EverGrandeCity_PokemonLeague_1F/map.json b/data/maps/EverGrandeCity_PokemonLeague_1F/map.json index 6dd97c0b7256..e599b815b60c 100644 --- a/data/maps/EverGrandeCity_PokemonLeague_1F/map.json +++ b/data/maps/EverGrandeCity_PokemonLeague_1F/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_LEAGUE_NURSE", "graphics_id": "OBJ_EVENT_GFX_NURSE", "x": 3, "y": 2, @@ -41,6 +42,7 @@ "flag": "0" }, { + "local_id": "LOCALID_LEAGUE_GUARD_1", "graphics_id": "OBJ_EVENT_GFX_MAN_3", "x": 8, "y": 2, @@ -54,6 +56,7 @@ "flag": "0" }, { + "local_id": "LOCALID_LEAGUE_GUARD_2", "graphics_id": "OBJ_EVENT_GFX_MAN_3", "x": 11, "y": 2, diff --git a/data/maps/EverGrandeCity_PokemonLeague_1F/scripts.inc b/data/maps/EverGrandeCity_PokemonLeague_1F/scripts.inc index c13e71697586..d5e6ffe7d0d2 100644 --- a/data/maps/EverGrandeCity_PokemonLeague_1F/scripts.inc +++ b/data/maps/EverGrandeCity_PokemonLeague_1F/scripts.inc @@ -1,7 +1,3 @@ -.set LOCALID_NURSE, 1 -.set LOCALID_GUARD_1, 3 -.set LOCALID_GUARD_2, 4 - EverGrandeCity_PokemonLeague_1F_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, EverGrandeCity_PokemonLeague_1F_OnTransition map_script MAP_SCRIPT_ON_RESUME, CableClub_OnResume @@ -14,12 +10,12 @@ EverGrandeCity_PokemonLeague_1F_OnTransition: end EverGrandeCity_PokemonLeague_1F_EventScript_GuardsBlockDoor:: - setobjectxyperm LOCALID_GUARD_1, 9, 2 - setobjectxyperm LOCALID_GUARD_2, 10, 2 + setobjectxyperm LOCALID_LEAGUE_GUARD_1, 9, 2 + setobjectxyperm LOCALID_LEAGUE_GUARD_2, 10, 2 return EverGrandeCity_PokemonLeague_1F_EventScript_Nurse:: - setvar VAR_0x800B, LOCALID_NURSE + setvar VAR_0x800B, LOCALID_LEAGUE_NURSE call Common_EventScript_PkmnCenterNurse waitmessage waitbuttonpress @@ -62,8 +58,8 @@ EverGrandeCity_PokemonLeague_1F_EventScript_DoorGuard:: delay 120 goto_if_unset FLAG_BADGE06_GET, EverGrandeCity_PokemonLeague_1F_EventScript_NotAllBadges closemessage - applymovement LOCALID_GUARD_1, EverGrandeCity_PokemonLeague_1F_Movement_LeftGuardOutOfWay - applymovement LOCALID_GUARD_2, EverGrandeCity_PokemonLeague_1F_Movement_RightGuardOutOfWay + applymovement LOCALID_LEAGUE_GUARD_1, EverGrandeCity_PokemonLeague_1F_Movement_LeftGuardOutOfWay + applymovement LOCALID_LEAGUE_GUARD_2, EverGrandeCity_PokemonLeague_1F_Movement_RightGuardOutOfWay waitmovement 0 delay 10 playfanfare MUS_OBTAIN_BADGE @@ -71,19 +67,19 @@ EverGrandeCity_PokemonLeague_1F_EventScript_DoorGuard:: waitmessage waitfanfare closemessage - copyobjectxytoperm LOCALID_GUARD_1 - copyobjectxytoperm LOCALID_GUARD_2 + copyobjectxytoperm LOCALID_LEAGUE_GUARD_1 + copyobjectxytoperm LOCALID_LEAGUE_GUARD_2 setflag FLAG_ENTERED_ELITE_FOUR releaseall end EverGrandeCity_PokemonLeague_1F_EventScript_PlayerMoveToFrontFromRight:: - applymovement OBJ_EVENT_ID_PLAYER, EverGrandeCity_PokemonLeague_1F_Movement_MoveToFrontFromRight + applymovement LOCALID_PLAYER, EverGrandeCity_PokemonLeague_1F_Movement_MoveToFrontFromRight waitmovement 0 return EverGrandeCity_PokemonLeague_1F_EventScript_PlayerMoveToFrontFromLeft:: - applymovement OBJ_EVENT_ID_PLAYER, EverGrandeCity_PokemonLeague_1F_Movement_MoveToFrontFromLeft + applymovement LOCALID_PLAYER, EverGrandeCity_PokemonLeague_1F_Movement_MoveToFrontFromLeft waitmovement 0 return diff --git a/data/maps/EverGrandeCity_SidneysRoom/scripts.inc b/data/maps/EverGrandeCity_SidneysRoom/scripts.inc index 03b4a4e03b49..ac26aa754ce2 100644 --- a/data/maps/EverGrandeCity_SidneysRoom/scripts.inc +++ b/data/maps/EverGrandeCity_SidneysRoom/scripts.inc @@ -28,7 +28,7 @@ EverGrandeCity_SidneysRoom_OnWarp: .2byte 0 EverGrandeCity_SidneysRoom_EventScript_PlayerTurnNorth:: - turnobject OBJ_EVENT_ID_PLAYER, DIR_NORTH + turnobject LOCALID_PLAYER, DIR_NORTH end EverGrandeCity_SidneysRoom_OnFrame: diff --git a/data/maps/FallarborTown_BattleTentBattleRoom/map.json b/data/maps/FallarborTown_BattleTentBattleRoom/map.json index 7b702dc0e524..a03588eca676 100644 --- a/data/maps/FallarborTown_BattleTentBattleRoom/map.json +++ b/data/maps/FallarborTown_BattleTentBattleRoom/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_FALLARBOR_TENT_BATTLE_PLAYER", "graphics_id": "OBJ_EVENT_GFX_VAR_1", "x": 4, "y": 8, @@ -28,6 +29,7 @@ "flag": "0" }, { + "local_id": "LOCALID_FALLARBOR_TENT_BATTLE_ATTENDANT", "graphics_id": "OBJ_EVENT_GFX_BLACK_BELT", "x": 3, "y": 2, @@ -41,6 +43,7 @@ "flag": "0" }, { + "local_id": "LOCALID_FALLARBOR_TENT_BATTLE_OPPONENT", "graphics_id": "OBJ_EVENT_GFX_VAR_0", "x": 5, "y": 1, diff --git a/data/maps/FallarborTown_BattleTentBattleRoom/scripts.inc b/data/maps/FallarborTown_BattleTentBattleRoom/scripts.inc index 707995daeb13..4c064c5856af 100644 --- a/data/maps/FallarborTown_BattleTentBattleRoom/scripts.inc +++ b/data/maps/FallarborTown_BattleTentBattleRoom/scripts.inc @@ -1,17 +1,13 @@ -.set LOCALID_PLAYER, 1 -.set LOCALID_ATTENDANT, 2 -.set LOCALID_OPPONENT, 3 - +@ On this map the player will automatically walk into the room, but the camera is supposed to remain still. +@ To do this GF sets the player (LOCALID_PLAYER) invisible and creates a fake player object (LOCALID_FALLARBOR_TENT_BATTLE_PLAYER). +@ The graphics of this fake player object are represented with VAR_OBJ_GFX_ID_1. +@ The graphics of the opponent are represented with VAR_OBJ_GFX_ID_0, which will ultimately be set by tower_setopponent. FallarborTown_BattleTentBattleRoom_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, FallarborTown_BattleTentBattleRoom_OnTransition map_script MAP_SCRIPT_ON_FRAME_TABLE, FallarborTown_BattleTentBattleRoom_OnFrame map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, FallarborTown_BattleTentBattleRoom_OnWarp .byte 0 - @ On this map the player (OBJ_EVENT_ID_PLAYER) is hidden - @ The player is represented instead by object event 1, which has the gfx id VAR_OBJ_GFX_ID_1 - @ The opponent is represented by object event 3, which has the gfx id VAR_OBJ_GFX_ID_0 - FallarborTown_BattleTentBattleRoom_OnTransition: call FallarborTown_BattleTentBattleRoom_EventScript_SetPlayerGfx end @@ -38,17 +34,17 @@ FallarborTown_BattleTentBattleRoom_OnFrame: FallarborTown_BattleTentBattleRoom_EventScript_EnterRoom:: lockall - showobjectat LOCALID_PLAYER, MAP_FALLARBOR_TOWN_BATTLE_TENT_BATTLE_ROOM - applymovement LOCALID_PLAYER, FallarborTown_BattleTentBattleRoom_Movement_PlayerEnter + showobjectat LOCALID_FALLARBOR_TENT_BATTLE_PLAYER, MAP_FALLARBOR_TOWN_BATTLE_TENT_BATTLE_ROOM + applymovement LOCALID_FALLARBOR_TENT_BATTLE_PLAYER, FallarborTown_BattleTentBattleRoom_Movement_PlayerEnter waitmovement 0 frontier_get FRONTIER_DATA_BATTLE_NUM goto_if_ne VAR_RESULT, 0, FallarborTown_BattleTentBattleRoom_EventScript_ResumeChallenge FallarborTown_BattleTentBattleRoom_EventScript_NextOpponentEnter:: tower_setopponent - addobject LOCALID_OPPONENT - applymovement LOCALID_OPPONENT, FallarborTown_BattleTentBattleRoom_Movement_OpponentEnter + addobject LOCALID_FALLARBOR_TENT_BATTLE_OPPONENT + applymovement LOCALID_FALLARBOR_TENT_BATTLE_OPPONENT, FallarborTown_BattleTentBattleRoom_Movement_OpponentEnter waitmovement 0 - applymovement LOCALID_ATTENDANT, FallarborTown_BattleTentBattleRoom_Movement_AttendantJump + applymovement LOCALID_FALLARBOR_TENT_BATTLE_ATTENDANT, FallarborTown_BattleTentBattleRoom_Movement_AttendantJump playse SE_M_BELLY_DRUM waitse waitmovement 0 @@ -59,7 +55,7 @@ FallarborTown_BattleTentBattleRoom_EventScript_NextOpponentEnter:: call BattleFrontier_BattleArenaBattleRoom_EventScript_DoArenaBattle switch VAR_RESULT case 1, FallarborTown_BattleTentBattleRoom_EventScript_DefeatedOpponent - applymovement LOCALID_ATTENDANT, FallarborTown_BattleTentBattleRoom_Movement_AttendantJump + applymovement LOCALID_FALLARBOR_TENT_BATTLE_ATTENDANT, FallarborTown_BattleTentBattleRoom_Movement_AttendantJump playse SE_M_SNORE waitse waitmovement 0 @@ -72,7 +68,7 @@ FallarborTown_BattleTentBattleRoom_EventScript_WarpToLobbyLost:: waitstate FallarborTown_BattleTentBattleRoom_EventScript_DefeatedOpponent:: - applymovement LOCALID_ATTENDANT, FallarborTown_BattleTentBattleRoom_Movement_AttendantJump + applymovement LOCALID_FALLARBOR_TENT_BATTLE_ATTENDANT, FallarborTown_BattleTentBattleRoom_Movement_AttendantJump playse SE_BANG waitse waitmovement 0 @@ -84,12 +80,12 @@ FallarborTown_BattleTentBattleRoom_EventScript_IncrementBattleNum:: frontier_set FRONTIER_DATA_BATTLE_NUM, VAR_RESULT switch VAR_RESULT case 3, FallarborTown_BattleTentBattleRoom_EventScript_WarpToLobbyWon - applymovement LOCALID_OPPONENT, FallarborTown_BattleTentBattleRoom_Movement_OpponentExit + applymovement LOCALID_FALLARBOR_TENT_BATTLE_OPPONENT, FallarborTown_BattleTentBattleRoom_Movement_OpponentExit waitmovement 0 - removeobject LOCALID_OPPONENT - applymovement LOCALID_ATTENDANT, FallarborTown_BattleTentBattleRoom_Movement_AttendantApproachPlayer + removeobject LOCALID_FALLARBOR_TENT_BATTLE_OPPONENT + applymovement LOCALID_FALLARBOR_TENT_BATTLE_ATTENDANT, FallarborTown_BattleTentBattleRoom_Movement_AttendantApproachPlayer waitmovement 0 - applymovement LOCALID_PLAYER, FallarborTown_BattleTentBattleRoom_Movement_PlayerFaceAttendant + applymovement LOCALID_FALLARBOR_TENT_BATTLE_PLAYER, FallarborTown_BattleTentBattleRoom_Movement_PlayerFaceAttendant waitmovement 0 msgbox BattleFrontier_BattleArenaBattleRoom_Text_MonsWillBeRestored, MSGBOX_DEFAULT special LoadPlayerParty @@ -126,9 +122,9 @@ FallarborTown_BattleTentBattleRoom_EventScript_AskRetireChallenge:: FallarborTown_BattleTentBattleRoom_EventScript_ContinueChallenge:: closemessage - applymovement LOCALID_ATTENDANT, FallarborTown_BattleTentBattleRoom_Movement_AttendantReturnToPos + applymovement LOCALID_FALLARBOR_TENT_BATTLE_ATTENDANT, FallarborTown_BattleTentBattleRoom_Movement_AttendantReturnToPos waitmovement 0 - applymovement LOCALID_PLAYER, FallarborTown_BattleTentBattleRoom_Movement_PlayerFaceBattle + applymovement LOCALID_FALLARBOR_TENT_BATTLE_PLAYER, FallarborTown_BattleTentBattleRoom_Movement_PlayerFaceBattle waitmovement 0 goto FallarborTown_BattleTentBattleRoom_EventScript_NextOpponentEnter waitstate @@ -168,9 +164,9 @@ FallarborTown_BattleTentBattleRoom_EventScript_PauseChallenge:: end FallarborTown_BattleTentBattleRoom_EventScript_ResumeChallenge:: - applymovement LOCALID_ATTENDANT, FallarborTown_BattleTentBattleRoom_Movement_AttendantApproachPlayer + applymovement LOCALID_FALLARBOR_TENT_BATTLE_ATTENDANT, FallarborTown_BattleTentBattleRoom_Movement_AttendantApproachPlayer waitmovement 0 - applymovement LOCALID_PLAYER, FallarborTown_BattleTentBattleRoom_Movement_PlayerFaceAttendant + applymovement LOCALID_FALLARBOR_TENT_BATTLE_PLAYER, FallarborTown_BattleTentBattleRoom_Movement_PlayerFaceAttendant waitmovement 0 goto FallarborTown_BattleTentBattleRoom_EventScript_AskContinueChallenge end @@ -234,9 +230,9 @@ FallarborTown_BattleTentBattleRoom_OnWarp: .2byte 0 FallarborTown_BattleTentBattleRoom_EventScript_SetUpObjects:: - hideobjectat OBJ_EVENT_ID_PLAYER, MAP_FALLARBOR_TOWN_BATTLE_TENT_BATTLE_ROOM hideobjectat LOCALID_PLAYER, MAP_FALLARBOR_TOWN_BATTLE_TENT_BATTLE_ROOM - removeobject LOCALID_OPPONENT + hideobjectat LOCALID_FALLARBOR_TENT_BATTLE_PLAYER, MAP_FALLARBOR_TOWN_BATTLE_TENT_BATTLE_ROOM + removeobject LOCALID_FALLARBOR_TENT_BATTLE_OPPONENT setvar VAR_TEMP_1, 1 end diff --git a/data/maps/FallarborTown_BattleTentCorridor/map.json b/data/maps/FallarborTown_BattleTentCorridor/map.json index c086a3288053..111889fe0710 100644 --- a/data/maps/FallarborTown_BattleTentCorridor/map.json +++ b/data/maps/FallarborTown_BattleTentCorridor/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_FALLARBOR_TENT_CORRIDOR_ATTENDANT", "graphics_id": "OBJ_EVENT_GFX_BLACK_BELT", "x": 2, "y": 6, diff --git a/data/maps/FallarborTown_BattleTentCorridor/scripts.inc b/data/maps/FallarborTown_BattleTentCorridor/scripts.inc index 023dc919f823..685ffc5a5aa1 100644 --- a/data/maps/FallarborTown_BattleTentCorridor/scripts.inc +++ b/data/maps/FallarborTown_BattleTentCorridor/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_ATTENDANT, 1 - FallarborTown_BattleTentCorridor_MapScripts:: map_script MAP_SCRIPT_ON_FRAME_TABLE, FallarborTown_BattleTentCorridor_OnFrame .byte 0 @@ -11,13 +9,13 @@ FallarborTown_BattleTentCorridor_OnFrame: FallarborTown_BattleTentCorridor_EventScript_EnterCorridor:: lockall setvar VAR_TEMP_0, 1 - applymovement LOCALID_ATTENDANT, FallarborTown_BattleTentCorridor_Movement_WalkToDoor - applymovement OBJ_EVENT_ID_PLAYER, FallarborTown_BattleTentCorridor_Movement_WalkToDoor + applymovement LOCALID_FALLARBOR_TENT_CORRIDOR_ATTENDANT, FallarborTown_BattleTentCorridor_Movement_WalkToDoor + applymovement LOCALID_PLAYER, FallarborTown_BattleTentCorridor_Movement_WalkToDoor waitmovement 0 opendoor 2, 1 waitdooranim - applymovement LOCALID_ATTENDANT, FallarborTown_BattleTentCorridor_Movement_AttendantEnterDoor - applymovement OBJ_EVENT_ID_PLAYER, FallarborTown_BattleTentCorridor_Movement_PlayerEnterDoor + applymovement LOCALID_FALLARBOR_TENT_CORRIDOR_ATTENDANT, FallarborTown_BattleTentCorridor_Movement_AttendantEnterDoor + applymovement LOCALID_PLAYER, FallarborTown_BattleTentCorridor_Movement_PlayerEnterDoor waitmovement 0 closedoor 2, 1 waitdooranim diff --git a/data/maps/FallarborTown_BattleTentLobby/map.json b/data/maps/FallarborTown_BattleTentLobby/map.json index b8f274df31cd..16a0b81dfa47 100644 --- a/data/maps/FallarborTown_BattleTentLobby/map.json +++ b/data/maps/FallarborTown_BattleTentLobby/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_FALLARBOR_TENT_ATTENDANT", "graphics_id": "OBJ_EVENT_GFX_BLACK_BELT", "x": 6, "y": 5, diff --git a/data/maps/FallarborTown_BattleTentLobby/scripts.inc b/data/maps/FallarborTown_BattleTentLobby/scripts.inc index 8f705075c779..edd6cd8d9125 100644 --- a/data/maps/FallarborTown_BattleTentLobby/scripts.inc +++ b/data/maps/FallarborTown_BattleTentLobby/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_ATTENDANT, 1 - FallarborTown_BattleTentLobby_MapScripts:: map_script MAP_SCRIPT_ON_FRAME_TABLE, FallarborTown_BattleTentLobby_OnFrame map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, FallarborTown_BattleTentLobby_OnWarp @@ -11,7 +9,7 @@ FallarborTown_BattleTentLobby_OnWarp: FallarborTown_BattleTentLobby_EventScript_TurnPlayerNorth:: setvar VAR_TEMP_1, 1 - turnobject OBJ_EVENT_ID_PLAYER, DIR_NORTH + turnobject LOCALID_PLAYER, DIR_NORTH end FallarborTown_BattleTentLobby_OnFrame: @@ -191,13 +189,13 @@ FallarborTown_BattleTentLobby_EventScript_EndCancelChallenge:: end FallarborTown_BattleTentLobby_EventScript_WalkToDoor:: - applymovement LOCALID_ATTENDANT, FallarborTown_BattleTentLobby_Movement_AttendantWalkToDoor - applymovement OBJ_EVENT_ID_PLAYER, FallarborTown_BattleTentLobby_Movement_PlayerWalkToDoor + applymovement LOCALID_FALLARBOR_TENT_ATTENDANT, FallarborTown_BattleTentLobby_Movement_AttendantWalkToDoor + applymovement LOCALID_PLAYER, FallarborTown_BattleTentLobby_Movement_PlayerWalkToDoor waitmovement 0 opendoor 6, 1 waitdooranim - applymovement LOCALID_ATTENDANT, FallarborTown_BattleTentLobby_Movement_AttendantEnterDoor - applymovement OBJ_EVENT_ID_PLAYER, FallarborTown_BattleTentLobby_Movement_PlayerEnterDoor + applymovement LOCALID_FALLARBOR_TENT_ATTENDANT, FallarborTown_BattleTentLobby_Movement_AttendantEnterDoor + applymovement LOCALID_PLAYER, FallarborTown_BattleTentLobby_Movement_PlayerEnterDoor waitmovement 0 closedoor 6, 1 waitdooranim diff --git a/data/maps/FallarborTown_Mart/map.json b/data/maps/FallarborTown_Mart/map.json index c72605a36dc8..b4e45605777a 100644 --- a/data/maps/FallarborTown_Mart/map.json +++ b/data/maps/FallarborTown_Mart/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_FALLARBOR_MART_CLERK", "graphics_id": "OBJ_EVENT_GFX_MART_EMPLOYEE", "x": 1, "y": 3, diff --git a/data/maps/FallarborTown_MoveRelearnersHouse/map.json b/data/maps/FallarborTown_MoveRelearnersHouse/map.json index 94796772004d..9cde3440cbe7 100644 --- a/data/maps/FallarborTown_MoveRelearnersHouse/map.json +++ b/data/maps/FallarborTown_MoveRelearnersHouse/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_MOVE_RELEARNER", "graphics_id": "OBJ_EVENT_GFX_FAT_MAN", "x": 4, "y": 4, diff --git a/data/maps/FallarborTown_MoveRelearnersHouse/scripts.inc b/data/maps/FallarborTown_MoveRelearnersHouse/scripts.inc index f17754328da2..8dd70b9b0490 100644 --- a/data/maps/FallarborTown_MoveRelearnersHouse/scripts.inc +++ b/data/maps/FallarborTown_MoveRelearnersHouse/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_MOVE_RELEARNER, 1 - FallarborTown_MoveRelearnersHouse_MapScripts:: .byte 0 diff --git a/data/maps/FallarborTown_PokemonCenter_1F/map.json b/data/maps/FallarborTown_PokemonCenter_1F/map.json index 0c3dd726df4b..b3ca4a253ec5 100644 --- a/data/maps/FallarborTown_PokemonCenter_1F/map.json +++ b/data/maps/FallarborTown_PokemonCenter_1F/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_FALLARBOR_NURSE", "graphics_id": "OBJ_EVENT_GFX_NURSE", "x": 7, "y": 2, @@ -54,6 +55,7 @@ "flag": "0" }, { + "local_id": "LOCALID_FALLARBOR_LANETTE", "graphics_id": "OBJ_EVENT_GFX_WOMAN_2", "x": 10, "y": 2, diff --git a/data/maps/FallarborTown_PokemonCenter_1F/scripts.inc b/data/maps/FallarborTown_PokemonCenter_1F/scripts.inc index bc9e7c25f8b0..c9d4c04fa8dd 100644 --- a/data/maps/FallarborTown_PokemonCenter_1F/scripts.inc +++ b/data/maps/FallarborTown_PokemonCenter_1F/scripts.inc @@ -1,6 +1,3 @@ -.set LOCALID_NURSE, 1 -.set LOCALID_LANETTE, 4 - FallarborTown_PokemonCenter_1F_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, FallarborTown_PokemonCenter_1F_OnTransition map_script MAP_SCRIPT_ON_RESUME, CableClub_OnResume @@ -12,7 +9,7 @@ FallarborTown_PokemonCenter_1F_OnTransition: end FallarborTown_PokemonCenter_1F_EventScript_Nurse:: - setvar VAR_0x800B, LOCALID_NURSE + setvar VAR_0x800B, LOCALID_FALLARBOR_NURSE call Common_EventScript_PkmnCenterNurse waitmessage waitbuttonpress @@ -38,20 +35,20 @@ FallarborTown_PokemonCenter_1F_EventScript_Lanette:: end FallarborTown_PokemonCenter_1F_EventScript_LanetteExitNorth:: - applymovement LOCALID_LANETTE, FallarborTown_PokemonCenter_1F_Movement_LanetteExitNorth + applymovement LOCALID_FALLARBOR_LANETTE, FallarborTown_PokemonCenter_1F_Movement_LanetteExitNorth waitmovement 0 goto FallarborTown_PokemonCenter_1F_EventScript_LanetteExited end FallarborTown_PokemonCenter_1F_EventScript_LanetteExitWest:: - applymovement LOCALID_LANETTE, FallarborTown_PokemonCenter_1F_Movement_LanetteExitWest + applymovement LOCALID_FALLARBOR_LANETTE, FallarborTown_PokemonCenter_1F_Movement_LanetteExitWest waitmovement 0 goto FallarborTown_PokemonCenter_1F_EventScript_LanetteExited end FallarborTown_PokemonCenter_1F_EventScript_LanetteExited:: playse SE_SLIDING_DOOR - removeobject LOCALID_LANETTE + removeobject LOCALID_FALLARBOR_LANETTE clearflag FLAG_HIDE_LANETTES_HOUSE_LANETTE release end diff --git a/data/maps/FarawayIsland_Entrance/map.json b/data/maps/FarawayIsland_Entrance/map.json index bd42f1295397..bf3ea1d8631b 100644 --- a/data/maps/FarawayIsland_Entrance/map.json +++ b/data/maps/FarawayIsland_Entrance/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_FARAWAY_ISLAND_SAILOR", "graphics_id": "OBJ_EVENT_GFX_SAILOR", "x": 13, "y": 39, @@ -28,6 +29,7 @@ "flag": "0" }, { + "local_id": "LOCALID_FARAWAY_ISLAND_SS_TIDAL", "graphics_id": "OBJ_EVENT_GFX_SS_TIDAL", "x": 13, "y": 41, diff --git a/data/maps/FarawayIsland_Entrance/scripts.inc b/data/maps/FarawayIsland_Entrance/scripts.inc index 504b0dc6a60f..13d37f471058 100644 --- a/data/maps/FarawayIsland_Entrance/scripts.inc +++ b/data/maps/FarawayIsland_Entrance/scripts.inc @@ -1,6 +1,3 @@ -.set LOCALID_SAILOR, 1 -.set LOCALID_SS_TIDAL, 2 - FarawayIsland_Entrance_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, FarawayIsland_Entrance_OnTransition .byte 0 @@ -29,8 +26,8 @@ FarawayIsland_Entrance_EventScript_Sailor:: applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceFasterDown waitmovement 0 delay 30 - hideobjectat LOCALID_SAILOR, MAP_FARAWAY_ISLAND_ENTRANCE - setvar VAR_0x8004, LOCALID_SS_TIDAL + hideobjectat LOCALID_FARAWAY_ISLAND_SAILOR, MAP_FARAWAY_ISLAND_ENTRANCE + setvar VAR_0x8004, LOCALID_FARAWAY_ISLAND_SS_TIDAL call Common_EventScript_FerryDepartIsland warp MAP_LILYCOVE_CITY_HARBOR, 8, 11 waitstate diff --git a/data/maps/FarawayIsland_Interior/map.json b/data/maps/FarawayIsland_Interior/map.json index 14850995ca66..53be2ae914ab 100644 --- a/data/maps/FarawayIsland_Interior/map.json +++ b/data/maps/FarawayIsland_Interior/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_FARAWAY_ISLAND_MEW", "graphics_id": "OBJ_EVENT_GFX_MEW", "x": 13, "y": 17, diff --git a/data/maps/FarawayIsland_Interior/scripts.inc b/data/maps/FarawayIsland_Interior/scripts.inc index d3d519ed1511..fe6d35df8a3a 100644 --- a/data/maps/FarawayIsland_Interior/scripts.inc +++ b/data/maps/FarawayIsland_Interior/scripts.inc @@ -1,5 +1,3 @@ -@ Note: LOCALID_FARAWAY_ISLAND_MEW is a local id for this map used elsewhere. It's defined in event_objects.h - FarawayIsland_Interior_MapScripts:: map_script MAP_SCRIPT_ON_RESUME, FarawayIsland_Interior_OnResume map_script MAP_SCRIPT_ON_TRANSITION, FarawayIsland_Interior_OnTransition diff --git a/data/maps/FortreeCity_House4/map.json b/data/maps/FortreeCity_House4/map.json index 8123d2c4d705..778f0d74656b 100644 --- a/data/maps/FortreeCity_House4/map.json +++ b/data/maps/FortreeCity_House4/map.json @@ -41,6 +41,7 @@ "flag": "0" }, { + "local_id": "LOCALID_FORTREE_HOUSE_WINGULL", "graphics_id": "OBJ_EVENT_GFX_WINGULL", "x": 2, "y": 3, diff --git a/data/maps/FortreeCity_House4/scripts.inc b/data/maps/FortreeCity_House4/scripts.inc index ed9167417376..8b104945715e 100644 --- a/data/maps/FortreeCity_House4/scripts.inc +++ b/data/maps/FortreeCity_House4/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_WINGULL, 3 - FortreeCity_House4_MapScripts:: .byte 0 @@ -16,9 +14,9 @@ FortreeCity_House4_EventScript_Boy:: closemessage setflag FLAG_WINGULL_SENT_ON_ERRAND clearflag FLAG_HIDE_MOSSDEEP_CITY_HOUSE_2_WINGULL - applymovement LOCALID_WINGULL, FortreeCity_House4_Movement_WingullExit + applymovement LOCALID_FORTREE_HOUSE_WINGULL, FortreeCity_House4_Movement_WingullExit waitmovement 0 - removeobject LOCALID_WINGULL + removeobject LOCALID_FORTREE_HOUSE_WINGULL releaseall end diff --git a/data/maps/FortreeCity_Mart/map.json b/data/maps/FortreeCity_Mart/map.json index 27a82e69f372..8620c4786371 100644 --- a/data/maps/FortreeCity_Mart/map.json +++ b/data/maps/FortreeCity_Mart/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_FORTREE_MART_CLERK", "graphics_id": "OBJ_EVENT_GFX_MART_EMPLOYEE", "x": 1, "y": 3, diff --git a/data/maps/FortreeCity_PokemonCenter_1F/map.json b/data/maps/FortreeCity_PokemonCenter_1F/map.json index e28907ad4b90..6b64978d158c 100644 --- a/data/maps/FortreeCity_PokemonCenter_1F/map.json +++ b/data/maps/FortreeCity_PokemonCenter_1F/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_FORTREE_NURSE", "graphics_id": "OBJ_EVENT_GFX_NURSE", "x": 7, "y": 2, diff --git a/data/maps/FortreeCity_PokemonCenter_1F/scripts.inc b/data/maps/FortreeCity_PokemonCenter_1F/scripts.inc index d1ea3d864802..2cc62201e1a5 100644 --- a/data/maps/FortreeCity_PokemonCenter_1F/scripts.inc +++ b/data/maps/FortreeCity_PokemonCenter_1F/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_NURSE, 1 - FortreeCity_PokemonCenter_1F_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, FortreeCity_PokemonCenter_1F_OnTransition map_script MAP_SCRIPT_ON_RESUME, CableClub_OnResume @@ -10,7 +8,7 @@ FortreeCity_PokemonCenter_1F_OnTransition: end FortreeCity_PokemonCenter_1F_EventScript_Nurse:: - setvar VAR_0x800B, LOCALID_NURSE + setvar VAR_0x800B, LOCALID_FORTREE_NURSE call Common_EventScript_PkmnCenterNurse waitmessage waitbuttonpress diff --git a/data/maps/GraniteCave_StevensRoom/map.json b/data/maps/GraniteCave_StevensRoom/map.json index 280af56c8148..9529a999e2c4 100644 --- a/data/maps/GraniteCave_StevensRoom/map.json +++ b/data/maps/GraniteCave_StevensRoom/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_GRANITE_CAVE_STEVEN", "graphics_id": "OBJ_EVENT_GFX_STEVEN", "x": 7, "y": 8, diff --git a/data/maps/GraniteCave_StevensRoom/scripts.inc b/data/maps/GraniteCave_StevensRoom/scripts.inc index eb32c2629305..68d8b829dbc9 100644 --- a/data/maps/GraniteCave_StevensRoom/scripts.inc +++ b/data/maps/GraniteCave_StevensRoom/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_STEVEN, 1 - GraniteCave_StevensRoom_MapScripts:: .byte 0 @@ -29,24 +27,24 @@ GraniteCave_StevensRoom_EventScript_Steven:: call_if_eq VAR_FACING, DIR_WEST, GraniteCave_StevensRoom_EventScript_StevenExitWestEast call_if_eq VAR_FACING, DIR_EAST, GraniteCave_StevensRoom_EventScript_StevenExitWestEast playse SE_EXIT - removeobject LOCALID_STEVEN + removeobject LOCALID_GRANITE_CAVE_STEVEN release end GraniteCave_StevensRoom_EventScript_StevenExitNorth:: - applymovement LOCALID_STEVEN, GraniteCave_StevensRoom_Movement_StevenExit + applymovement LOCALID_GRANITE_CAVE_STEVEN, GraniteCave_StevensRoom_Movement_StevenExit waitmovement 0 return GraniteCave_StevensRoom_EventScript_StevenExitWestEast:: - applymovement OBJ_EVENT_ID_PLAYER, GraniteCave_StevensRoom_Movement_PlayerTurnTowardExit - applymovement LOCALID_STEVEN, GraniteCave_StevensRoom_Movement_StevenExit + applymovement LOCALID_PLAYER, GraniteCave_StevensRoom_Movement_PlayerTurnTowardExit + applymovement LOCALID_GRANITE_CAVE_STEVEN, GraniteCave_StevensRoom_Movement_StevenExit waitmovement 0 return GraniteCave_StevensRoom_EventScript_StevenExitSouth:: - applymovement OBJ_EVENT_ID_PLAYER, GraniteCave_StevensRoom_Movement_PlayerTurnTowardExit - applymovement LOCALID_STEVEN, GraniteCave_StevensRoom_Movement_StevenExitSouth + applymovement LOCALID_PLAYER, GraniteCave_StevensRoom_Movement_PlayerTurnTowardExit + applymovement LOCALID_GRANITE_CAVE_STEVEN, GraniteCave_StevensRoom_Movement_StevenExitSouth waitmovement 0 return diff --git a/data/maps/InsideOfTruck/map.json b/data/maps/InsideOfTruck/map.json index 4b027853ad33..f767ddf43fbc 100644 --- a/data/maps/InsideOfTruck/map.json +++ b/data/maps/InsideOfTruck/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_TRUCK_BOX_TOP", "graphics_id": "OBJ_EVENT_GFX_MOVING_BOX", "x": 0, "y": 0, @@ -28,6 +29,7 @@ "flag": "0" }, { + "local_id": "LOCALID_TRUCK_BOX_BOTTOM_L", "graphics_id": "OBJ_EVENT_GFX_MOVING_BOX", "x": 0, "y": 3, @@ -41,6 +43,7 @@ "flag": "0" }, { + "local_id": "LOCALID_TRUCK_BOX_BOTTOM_R", "graphics_id": "OBJ_EVENT_GFX_MOVING_BOX", "x": 2, "y": 3, diff --git a/data/maps/JaggedPass/map.json b/data/maps/JaggedPass/map.json index ba4cdf3e0e53..59d06635744a 100644 --- a/data/maps/JaggedPass/map.json +++ b/data/maps/JaggedPass/map.json @@ -67,6 +67,7 @@ "flag": "0" }, { + "local_id": "LOCALID_MAGMA_HIDEOUT_GUARD", "graphics_id": "OBJ_EVENT_GFX_MAGMA_MEMBER_M", "x": 16, "y": 19, diff --git a/data/maps/JaggedPass/scripts.inc b/data/maps/JaggedPass/scripts.inc index f969a4dec60d..76cd9527b16f 100644 --- a/data/maps/JaggedPass/scripts.inc +++ b/data/maps/JaggedPass/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_HIDEOUT_GUARD, 5 - JaggedPass_MapScripts:: map_script MAP_SCRIPT_ON_RESUME, JaggedPass_OnResume map_script MAP_SCRIPT_ON_TRANSITION, JaggedPass_OnTransition @@ -69,27 +67,27 @@ JaggedPass_EventScript_MagmaHideoutGuard:: goto_if_set FLAG_BEAT_MAGMA_GRUNT_JAGGED_PASS, JaggedPass_EventScript_GuardDefeated waitse playse SE_PIN - applymovement LOCALID_HIDEOUT_GUARD, Common_Movement_ExclamationMark + applymovement LOCALID_MAGMA_HIDEOUT_GUARD, Common_Movement_ExclamationMark waitmovement 0 - applymovement LOCALID_HIDEOUT_GUARD, Common_Movement_Delay48 + applymovement LOCALID_MAGMA_HIDEOUT_GUARD, Common_Movement_Delay48 waitmovement 0 - applymovement LOCALID_HIDEOUT_GUARD, Common_Movement_FacePlayer + applymovement LOCALID_MAGMA_HIDEOUT_GUARD, Common_Movement_FacePlayer waitmovement 0 msgbox JaggedPass_Text_GruntIntro, MSGBOX_DEFAULT closemessage trainerbattle_no_intro TRAINER_GRUNT_JAGGED_PASS, JaggedPass_Text_GruntDefeat setflag FLAG_BEAT_MAGMA_GRUNT_JAGGED_PASS - applymovement LOCALID_HIDEOUT_GUARD, Common_Movement_FaceOriginalDirection + applymovement LOCALID_MAGMA_HIDEOUT_GUARD, Common_Movement_FaceOriginalDirection waitmovement 0 releaseall end JaggedPass_EventScript_GuardDefeated:: - applymovement LOCALID_HIDEOUT_GUARD, Common_Movement_FacePlayer + applymovement LOCALID_MAGMA_HIDEOUT_GUARD, Common_Movement_FacePlayer waitmovement 0 msgbox JaggedPass_Text_GoWhereverYouWant, MSGBOX_DEFAULT closemessage - applymovement LOCALID_HIDEOUT_GUARD, Common_Movement_FaceOriginalDirection + applymovement LOCALID_MAGMA_HIDEOUT_GUARD, Common_Movement_FaceOriginalDirection waitmovement 0 releaseall end diff --git a/data/maps/LavaridgeTown/map.json b/data/maps/LavaridgeTown/map.json index 33c7ce3c08ca..f039af170cb9 100644 --- a/data/maps/LavaridgeTown/map.json +++ b/data/maps/LavaridgeTown/map.json @@ -99,6 +99,7 @@ "flag": "0" }, { + "local_id": "LOCALID_LAVARIDGE_RIVAL_ON_BIKE", "graphics_id": "OBJ_EVENT_GFX_VAR_3", "x": 6, "y": 16, @@ -112,6 +113,7 @@ "flag": "FLAG_HIDE_LAVARIDGE_TOWN_RIVAL_ON_BIKE" }, { + "local_id": "LOCALID_LAVARIDGE_RIVAL", "graphics_id": "OBJ_EVENT_GFX_VAR_0", "x": 12, "y": 15, diff --git a/data/maps/LavaridgeTown/scripts.inc b/data/maps/LavaridgeTown/scripts.inc index 3ce226c4c135..2ba3f1cb21cc 100644 --- a/data/maps/LavaridgeTown/scripts.inc +++ b/data/maps/LavaridgeTown/scripts.inc @@ -1,6 +1,3 @@ -.set LOCALID_RIVAL_ON_BIKE, 7 -.set LOCALID_RIVAL, 8 - LavaridgeTown_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, LavaridgeTown_OnTransition map_script MAP_SCRIPT_ON_FRAME_TABLE, LavaridgeTown_OnFrame @@ -26,9 +23,9 @@ LavaridgeTown_EventScript_CheckSetRivalPos:: return LavaridgeTown_EventScript_SetRivalPos:: - setobjectxyperm LOCALID_RIVAL, 11, 9 - setobjectxyperm LOCALID_RIVAL_ON_BIKE, 9, 8 - setobjectmovementtype LOCALID_RIVAL_ON_BIKE, MOVEMENT_TYPE_FACE_UP + setobjectxyperm LOCALID_LAVARIDGE_RIVAL, 11, 9 + setobjectxyperm LOCALID_LAVARIDGE_RIVAL_ON_BIKE, 9, 8 + setobjectmovementtype LOCALID_LAVARIDGE_RIVAL_ON_BIKE, MOVEMENT_TYPE_FACE_UP clearflag FLAG_HIDE_LAVARIDGE_TOWN_RIVAL return @@ -78,12 +75,12 @@ LavaridgeTown_EventScript_BrendanGiveGoGoggles:: LavaridgeTown_EventScript_RivalExit:: closemessage - removeobject LOCALID_RIVAL - addobject LOCALID_RIVAL_ON_BIKE + removeobject LOCALID_LAVARIDGE_RIVAL + addobject LOCALID_LAVARIDGE_RIVAL_ON_BIKE delay 30 call_if_eq VAR_0x8008, 9, LavaridgeTown_EventScript_RivalExit1 call_if_ne VAR_0x8008, 9, LavaridgeTown_EventScript_RivalExit2 - removeobject LOCALID_RIVAL_ON_BIKE + removeobject LOCALID_LAVARIDGE_RIVAL_ON_BIKE setvar VAR_LAVARIDGE_TOWN_STATE, 2 clearflag FLAG_HIDE_MAP_NAME_POPUP savebgm MUS_DUMMY @@ -100,52 +97,52 @@ LavaridgeTown_EventScript_PlayBrendanMusic:: return LavaridgeTown_EventScript_RivalNoticePlayer:: - applymovement LOCALID_RIVAL, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_LAVARIDGE_RIVAL, Common_Movement_WalkInPlaceFasterUp waitmovement 0 playse SE_PIN - applymovement LOCALID_RIVAL, Common_Movement_ExclamationMark + applymovement LOCALID_LAVARIDGE_RIVAL, Common_Movement_ExclamationMark waitmovement 0 - applymovement LOCALID_RIVAL, Common_Movement_Delay48 + applymovement LOCALID_LAVARIDGE_RIVAL, Common_Movement_Delay48 waitmovement 0 return LavaridgeTown_EventScript_RivalExitHerbShop:: opendoor 12, 15 waitdooranim - addobject LOCALID_RIVAL - applymovement LOCALID_RIVAL, LavaridgeTown_Movement_RivalExitHerbShop + addobject LOCALID_LAVARIDGE_RIVAL + applymovement LOCALID_LAVARIDGE_RIVAL, LavaridgeTown_Movement_RivalExitHerbShop waitmovement 0 closedoor 12, 15 waitdooranim - applymovement LOCALID_RIVAL, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_LAVARIDGE_RIVAL, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 playse SE_PIN - applymovement LOCALID_RIVAL, Common_Movement_ExclamationMark + applymovement LOCALID_LAVARIDGE_RIVAL, Common_Movement_ExclamationMark waitmovement 0 - applymovement LOCALID_RIVAL, Common_Movement_Delay48 + applymovement LOCALID_LAVARIDGE_RIVAL, Common_Movement_Delay48 waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterRight waitmovement 0 return LavaridgeTown_EventScript_RivalApproachPlayer1:: - applymovement LOCALID_RIVAL, LavaridgeTown_Movement_RivalApproachPlayer1 + applymovement LOCALID_LAVARIDGE_RIVAL, LavaridgeTown_Movement_RivalApproachPlayer1 waitmovement 0 return LavaridgeTown_EventScript_RivalApproachPlayer2:: - applymovement LOCALID_RIVAL, LavaridgeTown_Movement_RivalApproachPlayer2 + applymovement LOCALID_LAVARIDGE_RIVAL, LavaridgeTown_Movement_RivalApproachPlayer2 waitmovement 0 return LavaridgeTown_EventScript_RivalExit1:: - applymovement OBJ_EVENT_ID_PLAYER, LavaridgeTown_Movement_PlayerWatchRivalExit - applymovement LOCALID_RIVAL_ON_BIKE, LavaridgeTown_Movement_RivalExit1 + applymovement LOCALID_PLAYER, LavaridgeTown_Movement_PlayerWatchRivalExit + applymovement LOCALID_LAVARIDGE_RIVAL_ON_BIKE, LavaridgeTown_Movement_RivalExit1 waitmovement 0 return LavaridgeTown_EventScript_RivalExit2:: - applymovement LOCALID_RIVAL_ON_BIKE, LavaridgeTown_Movement_RivalExit2 + applymovement LOCALID_LAVARIDGE_RIVAL_ON_BIKE, LavaridgeTown_Movement_RivalExit2 waitmovement 0 return diff --git a/data/maps/LavaridgeTown_Gym_1F/map.json b/data/maps/LavaridgeTown_Gym_1F/map.json index dc30c6ea9c1d..5dc1ebeaa3a6 100644 --- a/data/maps/LavaridgeTown_Gym_1F/map.json +++ b/data/maps/LavaridgeTown_Gym_1F/map.json @@ -28,6 +28,7 @@ "flag": "0" }, { + "local_id": "LOCALID_COLE", "graphics_id": "OBJ_EVENT_GFX_MAN_5", "x": 3, "y": 14, @@ -41,6 +42,7 @@ "flag": "0" }, { + "local_id": "LOCALID_GERALD", "graphics_id": "OBJ_EVENT_GFX_MAN_3", "x": 2, "y": 15, @@ -54,6 +56,7 @@ "flag": "0" }, { + "local_id": "LOCALID_AXLE", "graphics_id": "OBJ_EVENT_GFX_MAN_5", "x": 3, "y": 10, @@ -67,6 +70,7 @@ "flag": "0" }, { + "local_id": "LOCALID_DANIELLE", "graphics_id": "OBJ_EVENT_GFX_GIRL_3", "x": 5, "y": 2, diff --git a/data/maps/LavaridgeTown_Gym_1F/scripts.inc b/data/maps/LavaridgeTown_Gym_1F/scripts.inc index b7db13f54a0e..e1b522214f29 100644 --- a/data/maps/LavaridgeTown_Gym_1F/scripts.inc +++ b/data/maps/LavaridgeTown_Gym_1F/scripts.inc @@ -1,8 +1,3 @@ -.set LOCALID_COLE, 2 -.set LOCALID_GERALD, 3 -.set LOCALID_AXLE, 4 -.set LOCALID_DANIELLE, 5 - LavaridgeTown_Gym_1F_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, LavaridgeTown_Gym_1F_OnTransition .byte 0 diff --git a/data/maps/LavaridgeTown_Gym_B1F/map.json b/data/maps/LavaridgeTown_Gym_B1F/map.json index b90802b17350..b7f29174c429 100644 --- a/data/maps/LavaridgeTown_Gym_B1F/map.json +++ b/data/maps/LavaridgeTown_Gym_B1F/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_JACE", "graphics_id": "OBJ_EVENT_GFX_MAN_5", "x": 4, "y": 18, @@ -28,6 +29,7 @@ "flag": "0" }, { + "local_id": "LOCALID_KEEGAN", "graphics_id": "OBJ_EVENT_GFX_MAN_5", "x": 3, "y": 6, @@ -41,6 +43,7 @@ "flag": "0" }, { + "local_id": "LOCALID_JEFF", "graphics_id": "OBJ_EVENT_GFX_MAN_5", "x": 13, "y": 17, @@ -54,6 +57,7 @@ "flag": "0" }, { + "local_id": "LOCALID_ELI", "graphics_id": "OBJ_EVENT_GFX_HIKER", "x": 4, "y": 16, diff --git a/data/maps/LavaridgeTown_Gym_B1F/scripts.inc b/data/maps/LavaridgeTown_Gym_B1F/scripts.inc index 3a9165bb1606..d6558a47a632 100644 --- a/data/maps/LavaridgeTown_Gym_B1F/scripts.inc +++ b/data/maps/LavaridgeTown_Gym_B1F/scripts.inc @@ -1,8 +1,3 @@ -.equ LOCALID_JACE, 1 -.equ LOCALID_KEEGAN, 2 -.equ LOCALID_JEFF, 3 -.equ LOCALID_ELI, 4 - LavaridgeTown_Gym_B1F_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, LavaridgeTown_Gym_B1F_OnTransition .byte 0 diff --git a/data/maps/LavaridgeTown_Mart/map.json b/data/maps/LavaridgeTown_Mart/map.json index 82078a38275a..0105c0d56038 100644 --- a/data/maps/LavaridgeTown_Mart/map.json +++ b/data/maps/LavaridgeTown_Mart/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_LAVARIDGE_MART_CLERK", "graphics_id": "OBJ_EVENT_GFX_MART_EMPLOYEE", "x": 1, "y": 3, diff --git a/data/maps/LavaridgeTown_PokemonCenter_1F/map.json b/data/maps/LavaridgeTown_PokemonCenter_1F/map.json index 8cbeae0923db..2d9372d1d19e 100644 --- a/data/maps/LavaridgeTown_PokemonCenter_1F/map.json +++ b/data/maps/LavaridgeTown_PokemonCenter_1F/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_LAVARIDGE_NURSE", "graphics_id": "OBJ_EVENT_GFX_NURSE", "x": 7, "y": 2, diff --git a/data/maps/LavaridgeTown_PokemonCenter_1F/scripts.inc b/data/maps/LavaridgeTown_PokemonCenter_1F/scripts.inc index 9ff72aa812c4..fa67064252a5 100644 --- a/data/maps/LavaridgeTown_PokemonCenter_1F/scripts.inc +++ b/data/maps/LavaridgeTown_PokemonCenter_1F/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_NURSE, 1 - LavaridgeTown_PokemonCenter_1F_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, LavaridgeTown_PokemonCenter_1F_OnTransition map_script MAP_SCRIPT_ON_RESUME, CableClub_OnResume @@ -11,7 +9,7 @@ LavaridgeTown_PokemonCenter_1F_OnTransition: end LavaridgeTown_PokemonCenter_1F_EventScript_Nurse:: - setvar VAR_0x800B, LOCALID_NURSE + setvar VAR_0x800B, LOCALID_LAVARIDGE_NURSE call Common_EventScript_PkmnCenterNurse waitmessage waitbuttonpress diff --git a/data/maps/LilycoveCity/map.json b/data/maps/LilycoveCity/map.json index 34bd8d133410..4115e31fe348 100644 --- a/data/maps/LilycoveCity/map.json +++ b/data/maps/LilycoveCity/map.json @@ -260,6 +260,7 @@ "flag": "0" }, { + "local_id": "LOCALID_LILYCOVE_WOMAN_1", "graphics_id": "OBJ_EVENT_GFX_WOMAN_3", "x": 41, "y": 25, @@ -273,6 +274,7 @@ "flag": "0" }, { + "local_id": "LOCALID_LILYCOVE_MAN_1", "graphics_id": "OBJ_EVENT_GFX_MAN_2", "x": 40, "y": 25, diff --git a/data/maps/LilycoveCity/scripts.inc b/data/maps/LilycoveCity/scripts.inc index 094592d64662..0424202355ec 100644 --- a/data/maps/LilycoveCity/scripts.inc +++ b/data/maps/LilycoveCity/scripts.inc @@ -1,6 +1,3 @@ -.set LOCALID_WOMAN_1, 19 -.set LOCALID_MAN_1, 20 - LilycoveCity_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, LilycoveCity_OnTransition map_script MAP_SCRIPT_ON_LOAD, LilycoveCity_OnLoad @@ -136,13 +133,13 @@ LilycoveCity_EventScript_FatMan:: LilycoveCity_EventScript_Man1:: lockall msgbox LilycoveCity_Text_JustArrivedAndSawRarePokemon, MSGBOX_NPC - applymovement LOCALID_MAN_1, Common_Movement_FaceOriginalDirection + applymovement LOCALID_LILYCOVE_MAN_1, Common_Movement_FaceOriginalDirection end LilycoveCity_EventScript_Woman1:: lockall msgbox LilycoveCity_Text_HoneymoonVowToSeeRarePokemon, MSGBOX_NPC - applymovement LOCALID_WOMAN_1, Common_Movement_FaceOriginalDirection + applymovement LOCALID_LILYCOVE_WOMAN_1, Common_Movement_FaceOriginalDirection end LilycoveCity_EventScript_CitySign:: diff --git a/data/maps/LilycoveCity_ContestHall/map.json b/data/maps/LilycoveCity_ContestHall/map.json index a55d214988de..9979ca34bcf8 100644 --- a/data/maps/LilycoveCity_ContestHall/map.json +++ b/data/maps/LilycoveCity_ContestHall/map.json @@ -54,6 +54,7 @@ "flag": "0" }, { + "local_id": "LOCALID_SMART_MC", "graphics_id": "OBJ_EVENT_GFX_WOMAN_3", "x": 12, "y": 22, @@ -67,6 +68,7 @@ "flag": "0" }, { + "local_id": "LOCALID_SMART_JUDGE", "graphics_id": "OBJ_EVENT_GFX_CONTEST_JUDGE", "x": 15, "y": 22, @@ -80,6 +82,7 @@ "flag": "0" }, { + "local_id": "LOCALID_SMART_CONTESTANT_1", "graphics_id": "OBJ_EVENT_GFX_BLACK_BELT", "x": 10, "y": 25, @@ -93,6 +96,7 @@ "flag": "0" }, { + "local_id": "LOCALID_SMART_CONTESTANT_2", "graphics_id": "OBJ_EVENT_GFX_EXPERT_M", "x": 12, "y": 25, @@ -106,6 +110,7 @@ "flag": "0" }, { + "local_id": "LOCALID_SMART_CONTESTANT_3", "graphics_id": "OBJ_EVENT_GFX_MANIAC", "x": 14, "y": 25, @@ -119,6 +124,7 @@ "flag": "0" }, { + "local_id": "LOCALID_SMART_CONTESTANT_4", "graphics_id": "OBJ_EVENT_GFX_LINK_RECEPTIONIST", "x": 16, "y": 25, @@ -145,6 +151,7 @@ "flag": "0" }, { + "local_id": "LOCALID_SMART_AUDIENCE_4", "graphics_id": "OBJ_EVENT_GFX_WOMAN_5", "x": 18, "y": 24, @@ -158,6 +165,7 @@ "flag": "0" }, { + "local_id": "LOCALID_SMART_AUDIENCE_2", "graphics_id": "OBJ_EVENT_GFX_BOY_1", "x": 8, "y": 22, @@ -171,6 +179,7 @@ "flag": "0" }, { + "local_id": "LOCALID_BEAUTY_MC", "graphics_id": "OBJ_EVENT_GFX_WOMAN_3", "x": 24, "y": 10, @@ -184,6 +193,7 @@ "flag": "0" }, { + "local_id": "LOCALID_BEAUTY_JUDGE", "graphics_id": "OBJ_EVENT_GFX_CONTEST_JUDGE", "x": 27, "y": 10, @@ -197,6 +207,7 @@ "flag": "0" }, { + "local_id": "LOCALID_BEAUTY_CONTESTANT_1", "graphics_id": "OBJ_EVENT_GFX_WOMAN_4", "x": 22, "y": 13, @@ -210,6 +221,7 @@ "flag": "0" }, { + "local_id": "LOCALID_BEAUTY_CONTESTANT_2", "graphics_id": "OBJ_EVENT_GFX_TWIN", "x": 24, "y": 13, @@ -223,6 +235,7 @@ "flag": "0" }, { + "local_id": "LOCALID_BEAUTY_CONTESTANT_3", "graphics_id": "OBJ_EVENT_GFX_PSYCHIC_M", "x": 26, "y": 13, @@ -236,6 +249,7 @@ "flag": "0" }, { + "local_id": "LOCALID_BEAUTY_CONTESTANT_4", "graphics_id": "OBJ_EVENT_GFX_POKEFAN_F", "x": 28, "y": 13, @@ -249,6 +263,7 @@ "flag": "0" }, { + "local_id": "LOCALID_BEAUTY_AUDIENCE_1", "graphics_id": "OBJ_EVENT_GFX_WOMAN_2", "x": 20, "y": 10, @@ -262,6 +277,7 @@ "flag": "0" }, { + "local_id": "LOCALID_BEAUTY_AUDIENCE_3", "graphics_id": "OBJ_EVENT_GFX_WOMAN_1", "x": 30, "y": 11, @@ -275,6 +291,7 @@ "flag": "0" }, { + "local_id": "LOCALID_BEAUTY_AUDIENCE_2", "graphics_id": "OBJ_EVENT_GFX_MAN_1", "x": 26, "y": 8, @@ -288,6 +305,7 @@ "flag": "0" }, { + "local_id": "LOCALID_SMART_AUDIENCE_3", "graphics_id": "OBJ_EVENT_GFX_CAMPER", "x": 13, "y": 20, @@ -301,6 +319,7 @@ "flag": "0" }, { + "local_id": "LOCALID_CUTE_MC", "graphics_id": "OBJ_EVENT_GFX_WOMAN_3", "x": 36, "y": 22, @@ -314,6 +333,7 @@ "flag": "0" }, { + "local_id": "LOCALID_CUTE_JUDGE", "graphics_id": "OBJ_EVENT_GFX_CONTEST_JUDGE", "x": 39, "y": 22, @@ -327,6 +347,7 @@ "flag": "0" }, { + "local_id": "LOCALID_CUTE_CONTESTANT_1", "graphics_id": "OBJ_EVENT_GFX_BOY_2", "x": 34, "y": 25, @@ -340,6 +361,7 @@ "flag": "0" }, { + "local_id": "LOCALID_CUTE_CONTESTANT_2", "graphics_id": "OBJ_EVENT_GFX_GIRL_2", "x": 36, "y": 25, @@ -353,6 +375,7 @@ "flag": "0" }, { + "local_id": "LOCALID_CUTE_CONTESTANT_3", "graphics_id": "OBJ_EVENT_GFX_BOY_3", "x": 38, "y": 25, @@ -366,6 +389,7 @@ "flag": "0" }, { + "local_id": "LOCALID_CUTE_CONTESTANT_4", "graphics_id": "OBJ_EVENT_GFX_EXPERT_F", "x": 40, "y": 25, @@ -379,6 +403,7 @@ "flag": "0" }, { + "local_id": "LOCALID_CUTE_AUDIENCE_1", "graphics_id": "OBJ_EVENT_GFX_WOMAN_2", "x": 32, "y": 23, @@ -392,6 +417,7 @@ "flag": "0" }, { + "local_id": "LOCALID_CUTE_AUDIENCE_3", "graphics_id": "OBJ_EVENT_GFX_MAN_1", "x": 37, "y": 20, @@ -405,6 +431,7 @@ "flag": "0" }, { + "local_id": "LOCALID_CUTE_AUDIENCE_2", "graphics_id": "OBJ_EVENT_GFX_LITTLE_GIRL", "x": 42, "y": 24, diff --git a/data/maps/LilycoveCity_ContestHall/scripts.inc b/data/maps/LilycoveCity_ContestHall/scripts.inc index 610611358d70..b1c59c892275 100644 --- a/data/maps/LilycoveCity_ContestHall/scripts.inc +++ b/data/maps/LilycoveCity_ContestHall/scripts.inc @@ -1,32 +1,7 @@ -@ VAR_LAST_TALKED would have made all these direct references unnecessary -.set LOCALID_SMART_MC, 4 -.set LOCALID_SMART_JUDGE, 5 -.set LOCALID_SMART_CONTESTANT_1, 6 -.set LOCALID_SMART_CONTESTANT_2, 7 -.set LOCALID_SMART_CONTESTANT_3, 8 -.set LOCALID_SMART_CONTESTANT_4, 9 -.set LOCALID_SMART_AUDIENCE_4, 11 -.set LOCALID_SMART_AUDIENCE_2, 12 -.set LOCALID_BEAUTY_MC, 13 -.set LOCALID_BEAUTY_JUDGE, 14 -.set LOCALID_BEAUTY_CONTESTANT_1, 15 -.set LOCALID_BEAUTY_CONTESTANT_2, 16 -.set LOCALID_BEAUTY_CONTESTANT_3, 17 -.set LOCALID_BEAUTY_CONTESTANT_4, 18 -.set LOCALID_BEAUTY_AUDIENCE_1, 19 -.set LOCALID_BEAUTY_AUDIENCE_3, 20 -.set LOCALID_BEAUTY_AUDIENCE_2, 21 -.set LOCALID_SMART_AUDIENCE_3, 22 -.set LOCALID_CUTE_MC, 23 -.set LOCALID_CUTE_JUDGE, 24 -.set LOCALID_CUTE_CONTESTANT_1, 25 -.set LOCALID_CUTE_CONTESTANT_2, 26 -.set LOCALID_CUTE_CONTESTANT_3, 27 -.set LOCALID_CUTE_CONTESTANT_4, 28 -.set LOCALID_CUTE_AUDIENCE_1, 29 -.set LOCALID_CUTE_AUDIENCE_3, 30 -.set LOCALID_CUTE_AUDIENCE_2, 31 - +@ All the LOCALID constants used in this file are essentially redundant. +@ They're all used to have the NPC the player talked to turn back so they're facing +@ their original direction (because they're watching/participating in the contests). +@ They could all be substituted for VAR_LAST_TALKED. LilycoveCity_ContestHall_MapScripts:: .byte 0 diff --git a/data/maps/LilycoveCity_ContestLobby/map.json b/data/maps/LilycoveCity_ContestLobby/map.json index 276b5a6c2c94..220a4f8300a2 100644 --- a/data/maps/LilycoveCity_ContestLobby/map.json +++ b/data/maps/LilycoveCity_ContestLobby/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_CONTEST_LOBBY_RECEPTIONIST", "graphics_id": "OBJ_EVENT_GFX_TEALA", "x": 14, "y": 2, @@ -28,6 +29,7 @@ "flag": "0" }, { + "local_id": "LOCALID_CONTEST_LOBBY_LINK_RECEPTIONIST", "graphics_id": "OBJ_EVENT_GFX_TEALA", "x": 15, "y": 2, @@ -41,6 +43,7 @@ "flag": "0" }, { + "local_id": "LOCALID_CONTEST_LOBBY_BLENDER_2_LEADER", "graphics_id": "OBJ_EVENT_GFX_MAN_4", "x": 26, "y": 9, @@ -54,6 +57,7 @@ "flag": "0" }, { + "local_id": "LOCALID_CONTEST_LOBBY_ARTIST", "graphics_id": "OBJ_EVENT_GFX_ARTIST", "x": 9, "y": 1, @@ -119,6 +123,7 @@ "flag": "FLAG_HIDE_LILYCOVE_CONTEST_HALL_REPORTER" }, { + "local_id": "LOCALID_CONTEST_LOBBY_BLENDER_3_PARTICIPANT_1", "graphics_id": "OBJ_EVENT_GFX_BOY_1", "x": 23, "y": 8, @@ -132,6 +137,7 @@ "flag": "0" }, { + "local_id": "LOCALID_CONTEST_LOBBY_BLENDER_2_PARTICIPANT", "graphics_id": "OBJ_EVENT_GFX_TWIN", "x": 28, "y": 9, @@ -145,6 +151,7 @@ "flag": "0" }, { + "local_id": "LOCALID_CONTEST_LOBBY_LINK_ARTIST", "graphics_id": "OBJ_EVENT_GFX_ARTIST", "x": 21, "y": 1, @@ -197,6 +204,7 @@ "flag": "0" }, { + "local_id": "LOCALID_CONTEST_LOBBY_BLENDER_3_LEADER", "graphics_id": "OBJ_EVENT_GFX_POKEFAN_F", "x": 22, "y": 9, @@ -210,6 +218,7 @@ "flag": "0" }, { + "local_id": "LOCALID_BLEND_MASTER", "graphics_id": "OBJ_EVENT_GFX_EXPERT_M", "x": 26, "y": 5, @@ -223,6 +232,7 @@ "flag": "FLAG_HIDE_LILYCOVE_CONTEST_HALL_BLEND_MASTER_REPLACEMENT" }, { + "local_id": "LOCALID_CONTEST_LOBBY_BLENDER_3_PARTICIPANT_2", "graphics_id": "OBJ_EVENT_GFX_GIRL_1", "x": 24, "y": 9, diff --git a/data/maps/LilycoveCity_ContestLobby/scripts.inc b/data/maps/LilycoveCity_ContestLobby/scripts.inc index fa884a0966aa..862a5ef37d7b 100644 --- a/data/maps/LilycoveCity_ContestLobby/scripts.inc +++ b/data/maps/LilycoveCity_ContestLobby/scripts.inc @@ -1,9 +1,3 @@ -@ Note: data/scripts/berry_blender.inc is for the same map, so shares local IDs -.set LOCALID_RECEPTIONIST, 1 -.set LOCALID_LINK_RECEPTIONIST, 2 -.set LOCALID_ARTIST, 4 -.set LOCALID_ARTIST_LINK, 11 - LilycoveCity_ContestLobby_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, LilycoveCity_ContestLobby_OnTransition map_script MAP_SCRIPT_ON_FRAME_TABLE, LilycoveCity_ContestLobby_OnFrame @@ -40,10 +34,10 @@ LilycoveCity_ContestLobby_EventScript_TryDoContestArtist:: LilycoveCity_ContestLobby_EventScript_ContestArtist:: lockall - addobject LOCALID_ARTIST - applymovement LOCALID_ARTIST, LilycoveCity_ContestLobby_Movement_ArtistApproachPlayer - waitmovement LOCALID_ARTIST - applymovement OBJ_EVENT_ID_PLAYER, LilycoveCity_ContestLobby_Movement_PlayerFaceArtist + addobject LOCALID_CONTEST_LOBBY_ARTIST + applymovement LOCALID_CONTEST_LOBBY_ARTIST, LilycoveCity_ContestLobby_Movement_ArtistApproachPlayer + waitmovement LOCALID_CONTEST_LOBBY_ARTIST + applymovement LOCALID_PLAYER, LilycoveCity_ContestLobby_Movement_PlayerFaceArtist waitmovement 0 msgbox LilycoveCity_ContestLobby_Text_YourPokemonSpurredMeToPaint, MSGBOX_DEFAULT lockall @@ -63,9 +57,9 @@ LilycoveCity_ContestLobby_EventScript_TakePaintingToMuseum:: setvar VAR_LILYCOVE_CONTEST_LOBBY_STATE, 0 specialvar VAR_RESULT, GiveMonArtistRibbon call_if_eq VAR_RESULT, TRUE, LilycoveCity_ContestLobby_EventScript_ReceivedArtistRibbon - applymovement LOCALID_ARTIST, LilycoveCity_ContestLobby_Movement_ArtistExit + applymovement LOCALID_CONTEST_LOBBY_ARTIST, LilycoveCity_ContestLobby_Movement_ArtistExit waitmovement 0 - removeobject LOCALID_ARTIST + removeobject LOCALID_CONTEST_LOBBY_ARTIST call LilycoveCity_ContestLobby_EventScript_UpdateMuseumPatrons call LilycoveCity_ContestLobby_EventScript_SetPaintingFlag releaseall @@ -76,22 +70,22 @@ LilycoveCity_ContestLobby_EventScript_ConfirmDontTakePainting:: goto_if_eq VAR_RESULT, YES, LilycoveCity_ContestLobby_EventScript_TakePaintingToMuseum msgbox LilycoveCity_ContestLobby_Text_FineThatsTheWayItIs, MSGBOX_DEFAULT closemessage - applymovement LOCALID_ARTIST, LilycoveCity_ContestLobby_Movement_ArtistExit + applymovement LOCALID_CONTEST_LOBBY_ARTIST, LilycoveCity_ContestLobby_Movement_ArtistExit waitmovement 0 setvar VAR_LILYCOVE_CONTEST_LOBBY_STATE, 0 - removeobject LOCALID_ARTIST + removeobject LOCALID_CONTEST_LOBBY_ARTIST releaseall end LilycoveCity_ContestLobby_EventScript_ReceivedArtistRibbon:: incrementgamestat GAME_STAT_RECEIVED_RIBBONS special BufferContestWinnerMonName - applymovement LOCALID_ARTIST, LilycoveCity_ContestLobby_Movement_ArtistBeginToExit + applymovement LOCALID_CONTEST_LOBBY_ARTIST, LilycoveCity_ContestLobby_Movement_ArtistBeginToExit waitmovement 0 playse SE_PIN - applymovement LOCALID_ARTIST, Common_Movement_ExclamationMark + applymovement LOCALID_CONTEST_LOBBY_ARTIST, Common_Movement_ExclamationMark waitmovement 0 - applymovement LOCALID_ARTIST, LilycoveCity_ContestLobby_Movement_ArtistReturnToPlayer + applymovement LOCALID_CONTEST_LOBBY_ARTIST, LilycoveCity_ContestLobby_Movement_ArtistReturnToPlayer waitmovement 0 msgbox LilycoveCity_ContestLobby_Text_TakeMementoOfPainting, MSGBOX_DEFAULT playfanfare MUS_OBTAIN_ITEM @@ -210,10 +204,10 @@ LilycoveCity_ContestLobby_EventScript_TryDoLinkContestArtist:: LilycoveCity_ContestLobby_EventScript_LinkContestArtist:: lockall - addobject LOCALID_ARTIST_LINK - applymovement LOCALID_ARTIST_LINK, LilycoveCity_ContestLobby_Movement_LinkArtistApproachPlayer - waitmovement LOCALID_ARTIST_LINK - applymovement OBJ_EVENT_ID_PLAYER, LilycoveCity_ContestLobby_Movement_PlayerFaceLinkArtist + addobject LOCALID_CONTEST_LOBBY_LINK_ARTIST + applymovement LOCALID_CONTEST_LOBBY_LINK_ARTIST, LilycoveCity_ContestLobby_Movement_LinkArtistApproachPlayer + waitmovement LOCALID_CONTEST_LOBBY_LINK_ARTIST + applymovement LOCALID_PLAYER, LilycoveCity_ContestLobby_Movement_PlayerFaceLinkArtist waitmovement 0 msgbox LilycoveCity_ContestLobby_Text_YourPokemonSpurredMeToPaint, MSGBOX_DEFAULT lockall @@ -231,9 +225,9 @@ LilycoveCity_ContestLobby_EventScript_TakePaintingToMuseumLink:: setvar VAR_LILYCOVE_CONTEST_LOBBY_STATE, 0 specialvar VAR_RESULT, GiveMonArtistRibbon call_if_eq VAR_RESULT, TRUE, LilycoveCity_ContestLobby_EventScript_ReceivedLinkArtistRibbon - applymovement LOCALID_ARTIST_LINK, LilycoveCity_ContestLobby_Movement_LinkArtistExit + applymovement LOCALID_CONTEST_LOBBY_LINK_ARTIST, LilycoveCity_ContestLobby_Movement_LinkArtistExit waitmovement 0 - removeobject LOCALID_ARTIST_LINK + removeobject LOCALID_CONTEST_LOBBY_LINK_ARTIST call LilycoveCity_ContestLobby_EventScript_UpdateMuseumPatrons call LilycoveCity_ContestLobby_EventScript_SetPaintingFlag releaseall @@ -244,10 +238,10 @@ LilycoveCity_ContestLobby_EventScript_ConfirmDontTakePaintingLink:: goto_if_eq VAR_RESULT, YES, LilycoveCity_ContestLobby_EventScript_TakePaintingToMuseumLink msgbox LilycoveCity_ContestLobby_Text_FineThatsTheWayItIs, MSGBOX_DEFAULT closemessage - applymovement LOCALID_ARTIST_LINK, LilycoveCity_ContestLobby_Movement_LinkArtistExit + applymovement LOCALID_CONTEST_LOBBY_LINK_ARTIST, LilycoveCity_ContestLobby_Movement_LinkArtistExit waitmovement 0 setvar VAR_LILYCOVE_CONTEST_LOBBY_STATE, 0 - removeobject LOCALID_ARTIST_LINK + removeobject LOCALID_CONTEST_LOBBY_LINK_ARTIST releaseall end @@ -255,12 +249,12 @@ LilycoveCity_ContestLobby_EventScript_ReceivedLinkArtistRibbon:: incrementgamestat GAME_STAT_RECEIVED_RIBBONS setflag FLAG_SYS_RIBBON_GET special BufferContestWinnerMonName - applymovement LOCALID_ARTIST_LINK, LilycoveCity_ContestLobby_Movement_LinkArtistBeginExit + applymovement LOCALID_CONTEST_LOBBY_LINK_ARTIST, LilycoveCity_ContestLobby_Movement_LinkArtistBeginExit waitmovement 0 playse SE_PIN - applymovement LOCALID_ARTIST_LINK, Common_Movement_ExclamationMark + applymovement LOCALID_CONTEST_LOBBY_LINK_ARTIST, Common_Movement_ExclamationMark waitmovement 0 - applymovement LOCALID_ARTIST_LINK, LilycoveCity_ContestLobby_Movement_LinkArtistReturnToPlayer + applymovement LOCALID_CONTEST_LOBBY_LINK_ARTIST, LilycoveCity_ContestLobby_Movement_LinkArtistReturnToPlayer waitmovement 0 msgbox LilycoveCity_ContestLobby_Text_TakeMementoOfPainting, MSGBOX_DEFAULT playfanfare MUS_OBTAIN_ITEM @@ -405,27 +399,27 @@ LilycoveCity_ContestLobby_EventScript_WarpToToughContestHall:: LilycoveCity_ContestLobby_EventScript_LeadToContestHall:: lockall - applymovement LOCALID_RECEPTIONIST, LilycoveCity_ContestLobby_Movement_ReceptionistApproachCounter + applymovement LOCALID_CONTEST_LOBBY_RECEPTIONIST, LilycoveCity_ContestLobby_Movement_ReceptionistApproachCounter waitmovement 0 playse SE_BRIDGE_WALK setmetatile 12, 2, METATILE_Contest_WallShadow, TRUE setmetatile 12, 3, METATILE_Contest_FloorShadow, TRUE special DrawWholeMapView - applymovement LOCALID_RECEPTIONIST, LilycoveCity_ContestLobby_Movement_ReceptionistExitCounter + applymovement LOCALID_CONTEST_LOBBY_RECEPTIONIST, LilycoveCity_ContestLobby_Movement_ReceptionistExitCounter waitmovement 0 playse SE_BRIDGE_WALK setmetatile 12, 2, METATILE_Contest_CounterFlap_Top, TRUE setmetatile 12, 3, METATILE_Contest_CounterFlap_Bottom, TRUE special DrawWholeMapView delay 20 - applymovement LOCALID_RECEPTIONIST, LilycoveCity_ContestLobby_Movement_ReceptionistFacePlayer + applymovement LOCALID_CONTEST_LOBBY_RECEPTIONIST, LilycoveCity_ContestLobby_Movement_ReceptionistFacePlayer waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, LilycoveCity_ContestLobby_Movement_PlayerApproachReceptionist + applymovement LOCALID_PLAYER, LilycoveCity_ContestLobby_Movement_PlayerApproachReceptionist waitmovement 0 msgbox LilycoveCity_ContestLobby_Text_ComeThroughHere, MSGBOX_DEFAULT closemessage - applymovement LOCALID_RECEPTIONIST, LilycoveCity_ContestLobby_Movement_ReceptionistWalkToContestHall - applymovement OBJ_EVENT_ID_PLAYER, LilycoveCity_ContestLobby_Movement_PlayerWalkToContestHall + applymovement LOCALID_CONTEST_LOBBY_RECEPTIONIST, LilycoveCity_ContestLobby_Movement_ReceptionistWalkToContestHall + applymovement LOCALID_PLAYER, LilycoveCity_ContestLobby_Movement_PlayerWalkToContestHall waitmovement 0 releaseall return @@ -896,30 +890,30 @@ LilycoveCity_ContestLobby_EventScript_LeadToLinkContestHall:: waitmessage delay 20 closemessage - applymovement LOCALID_LINK_RECEPTIONIST, LilycoveCity_ContestLobby_Movement_LinkReceptionistApproachCounter + applymovement LOCALID_CONTEST_LOBBY_LINK_RECEPTIONIST, LilycoveCity_ContestLobby_Movement_LinkReceptionistApproachCounter waitmovement 0 playse SE_BRIDGE_WALK setmetatile 17, 2, METATILE_Contest_WallShadow, TRUE setmetatile 17, 3, METATILE_Contest_FloorShadow, TRUE special DrawWholeMapView - applymovement LOCALID_LINK_RECEPTIONIST, LilycoveCity_ContestLobby_Movement_LinkReceptionistExitCounter + applymovement LOCALID_CONTEST_LOBBY_LINK_RECEPTIONIST, LilycoveCity_ContestLobby_Movement_LinkReceptionistExitCounter waitmovement 0 playse SE_BRIDGE_WALK setmetatile 17, 2, METATILE_Contest_CounterFlap_Top, TRUE setmetatile 17, 3, METATILE_Contest_CounterFlap_Bottom, TRUE special DrawWholeMapView delay 20 - applymovement LOCALID_LINK_RECEPTIONIST, LilycoveCity_ContestLobby_Movement_LinkReceptionistFacePlayer + applymovement LOCALID_CONTEST_LOBBY_LINK_RECEPTIONIST, LilycoveCity_ContestLobby_Movement_LinkReceptionistFacePlayer waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, LilycoveCity_ContestLobby_Movement_PlayerApproachLinkReceptionist + applymovement LOCALID_PLAYER, LilycoveCity_ContestLobby_Movement_PlayerApproachLinkReceptionist waitmovement 0 messageautoscroll LilycoveCity_ContestLobby_Text_ComeThroughHere waitmessage delay 20 closemessage call LilycoveCity_ContestLobby_EventScript_DelayIfContestWithRSPlayer - applymovement LOCALID_LINK_RECEPTIONIST, LilycoveCity_ContestLobby_Movement_LinkReceptionistWalkToContestHall - applymovement OBJ_EVENT_ID_PLAYER, LilycoveCity_ContestLobby_Movement_PlayerWalkToLinkContestHall + applymovement LOCALID_CONTEST_LOBBY_LINK_RECEPTIONIST, LilycoveCity_ContestLobby_Movement_LinkReceptionistWalkToContestHall + applymovement LOCALID_PLAYER, LilycoveCity_ContestLobby_Movement_PlayerWalkToLinkContestHall waitmovement 0 release return diff --git a/data/maps/LilycoveCity_CoveLilyMotel_1F/map.json b/data/maps/LilycoveCity_CoveLilyMotel_1F/map.json index 098b53336046..859b0f11b63a 100644 --- a/data/maps/LilycoveCity_CoveLilyMotel_1F/map.json +++ b/data/maps/LilycoveCity_CoveLilyMotel_1F/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_MOTEL_OWNER", "graphics_id": "OBJ_EVENT_GFX_MAN_1", "x": 10, "y": 3, diff --git a/data/maps/LilycoveCity_CoveLilyMotel_1F/scripts.inc b/data/maps/LilycoveCity_CoveLilyMotel_1F/scripts.inc index 796645f47fcd..a6ef6760eaed 100644 --- a/data/maps/LilycoveCity_CoveLilyMotel_1F/scripts.inc +++ b/data/maps/LilycoveCity_CoveLilyMotel_1F/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_OWNER, 1 - LilycoveCity_CoveLilyMotel_1F_MapScripts:: .byte 0 @@ -8,33 +6,33 @@ LilycoveCity_CoveLilyMotel_1F_EventScript_MotelOwner:: goto_if_set FLAG_SYS_GAME_CLEAR, LilycoveCity_CoveLilyMotel_1F_EventScript_GameClear goto_if_set FLAG_BADGE07_GET, LilycoveCity_CoveLilyMotel_1F_EventScript_AquaHideoutBusted msgbox LilycoveCity_CoveLilyMotel_1F_Text_GuestsDoubledByMascot, MSGBOX_DEFAULT - applymovement LOCALID_OWNER, Common_Movement_FacePlayer + applymovement LOCALID_MOTEL_OWNER, Common_Movement_FacePlayer waitmovement 0 msgbox LilycoveCity_CoveLilyMotel_1F_Text_NoGuestsWithTeamAqua, MSGBOX_DEFAULT closemessage - applymovement LOCALID_OWNER, Common_Movement_FaceOriginalDirection + applymovement LOCALID_MOTEL_OWNER, Common_Movement_FaceOriginalDirection waitmovement 0 releaseall end LilycoveCity_CoveLilyMotel_1F_EventScript_AquaHideoutBusted:: msgbox LilycoveCity_CoveLilyMotel_1F_Text_MonFoundLostItem, MSGBOX_DEFAULT - applymovement LOCALID_OWNER, Common_Movement_FacePlayer + applymovement LOCALID_MOTEL_OWNER, Common_Movement_FacePlayer waitmovement 0 msgbox LilycoveCity_CoveLilyMotel_1F_Text_HeardAquaHideoutBusted, MSGBOX_DEFAULT closemessage - applymovement LOCALID_OWNER, Common_Movement_FaceOriginalDirection + applymovement LOCALID_MOTEL_OWNER, Common_Movement_FaceOriginalDirection waitmovement 0 releaseall end LilycoveCity_CoveLilyMotel_1F_EventScript_GameClear:: msgbox LilycoveCity_CoveLilyMotel_1F_Text_HouseSittingMonCaughtBurglar, MSGBOX_DEFAULT - applymovement LOCALID_OWNER, Common_Movement_FacePlayer + applymovement LOCALID_MOTEL_OWNER, Common_Movement_FacePlayer waitmovement 0 msgbox LilycoveCity_CoveLilyMotel_1F_Text_BetterGetWorkingOnGuestsDinner, MSGBOX_DEFAULT closemessage - applymovement LOCALID_OWNER, Common_Movement_FaceOriginalDirection + applymovement LOCALID_MOTEL_OWNER, Common_Movement_FaceOriginalDirection waitmovement 0 releaseall end @@ -42,18 +40,18 @@ LilycoveCity_CoveLilyMotel_1F_EventScript_GameClear:: LilycoveCity_CoveLilyMotel_1F_EventScript_BlockingTV:: lockall playse SE_PIN - applymovement LOCALID_OWNER, Common_Movement_ExclamationMark + applymovement LOCALID_MOTEL_OWNER, Common_Movement_ExclamationMark waitmovement 0 - applymovement LOCALID_OWNER, Common_Movement_Delay48 + applymovement LOCALID_MOTEL_OWNER, Common_Movement_Delay48 waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterDown + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterDown waitmovement 0 msgbox LilycoveCity_CoveLilyMotel_1F_Text_CantSeeTheTV, MSGBOX_DEFAULT closemessage - applymovement OBJ_EVENT_ID_PLAYER, LilycoveCity_CoveLilyMotel_1F_Movement_PlayerPushFromTV - applymovement LOCALID_OWNER, LilycoveCity_CoveLilyMotel_1F_Movement_OwnerPushPlayer + applymovement LOCALID_PLAYER, LilycoveCity_CoveLilyMotel_1F_Movement_PlayerPushFromTV + applymovement LOCALID_MOTEL_OWNER, LilycoveCity_CoveLilyMotel_1F_Movement_OwnerPushPlayer waitmovement 0 - applymovement LOCALID_OWNER, LilycoveCity_CoveLilyMotel_1F_Movement_OwnerReturn + applymovement LOCALID_MOTEL_OWNER, LilycoveCity_CoveLilyMotel_1F_Movement_OwnerReturn waitmovement 0 release end diff --git a/data/maps/LilycoveCity_DepartmentStore_1F/map.json b/data/maps/LilycoveCity_DepartmentStore_1F/map.json index 951777f8f418..98c58a1bad86 100644 --- a/data/maps/LilycoveCity_DepartmentStore_1F/map.json +++ b/data/maps/LilycoveCity_DepartmentStore_1F/map.json @@ -28,6 +28,7 @@ "flag": "0" }, { + "local_id": "LOCALID_LOTTERY_CLERK", "graphics_id": "OBJ_EVENT_GFX_BEAUTY", "x": 10, "y": 2, diff --git a/data/maps/LilycoveCity_DepartmentStore_1F/scripts.inc b/data/maps/LilycoveCity_DepartmentStore_1F/scripts.inc index b0656cfd4a84..32b5f592f837 100644 --- a/data/maps/LilycoveCity_DepartmentStore_1F/scripts.inc +++ b/data/maps/LilycoveCity_DepartmentStore_1F/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_LOTTERY_CLERK, 2 - LilycoveCity_DepartmentStore_1F_MapScripts:: .byte 0 diff --git a/data/maps/LilycoveCity_DepartmentStore_5F/map.json b/data/maps/LilycoveCity_DepartmentStore_5F/map.json index e816d3f217a4..a7d258ec9c73 100644 --- a/data/maps/LilycoveCity_DepartmentStore_5F/map.json +++ b/data/maps/LilycoveCity_DepartmentStore_5F/map.json @@ -93,6 +93,7 @@ "flag": "0" }, { + "local_id": "LOCALID_DEPARTMENT_STORE_STAIRS_WOMAN", "graphics_id": "OBJ_EVENT_GFX_WOMAN_2", "x": 9, "y": 5, diff --git a/data/maps/LilycoveCity_DepartmentStore_5F/scripts.inc b/data/maps/LilycoveCity_DepartmentStore_5F/scripts.inc index a9683d13c9b6..84b8a3ac7e7f 100644 --- a/data/maps/LilycoveCity_DepartmentStore_5F/scripts.inc +++ b/data/maps/LilycoveCity_DepartmentStore_5F/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_WOMAN, 7 - LilycoveCity_DepartmentStore_5F_MapScripts:: map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, LilycoveCity_DepartmentStore_5F_OnWarp .byte 0 @@ -13,8 +11,8 @@ LilycoveCity_DepartmentStore_5F_OnWarp: .2byte 0 LilycoveCity_DepartmentStore_5F_EventScript_BlockRoofStairs:: - setobjectxy LOCALID_WOMAN, 16, 2 - turnobject LOCALID_WOMAN, DIR_NORTH + setobjectxy LOCALID_DEPARTMENT_STORE_STAIRS_WOMAN, 16, 2 + turnobject LOCALID_DEPARTMENT_STORE_STAIRS_WOMAN, DIR_NORTH end LilycoveCity_DepartmentStore_5F_EventScript_ClerkFarLeft:: @@ -127,7 +125,7 @@ LilycoveCity_DepartmentStore_5F_EventScript_PokefanF:: LilycoveCity_DepartmentStore_5F_EventScript_Woman:: lockall - applymovement LOCALID_WOMAN, Common_Movement_FacePlayer + applymovement LOCALID_DEPARTMENT_STORE_STAIRS_WOMAN, Common_Movement_FacePlayer waitmovement 0 goto_if_eq VAR_SOOTOPOLIS_CITY_STATE, 0, LilycoveCity_DepartmentStore_5F_EventScript_WomanNormal goto_if_ge VAR_SOOTOPOLIS_CITY_STATE, 4, LilycoveCity_DepartmentStore_5F_EventScript_WomanNormal @@ -143,7 +141,7 @@ LilycoveCity_DepartmentStore_5F_EventScript_WomanNormal:: LilycoveCity_DepartmentStore_5F_EventScript_WomanLegendaryWeather:: msgbox LilycoveCity_DepartmentStore_5F_Text_ClosedRooftopForWeather, MSGBOX_DEFAULT closemessage - applymovement LOCALID_WOMAN, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_DEPARTMENT_STORE_STAIRS_WOMAN, Common_Movement_WalkInPlaceFasterUp waitmovement 0 releaseall end diff --git a/data/maps/LilycoveCity_Harbor/map.json b/data/maps/LilycoveCity_Harbor/map.json index 06d49e0c8899..671e6edd7400 100644 --- a/data/maps/LilycoveCity_Harbor/map.json +++ b/data/maps/LilycoveCity_Harbor/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_LILYCOVE_HARBOR_ATTENDANT", "graphics_id": "OBJ_EVENT_GFX_BEAUTY", "x": 8, "y": 10, @@ -28,6 +29,7 @@ "flag": "FLAG_HIDE_LILYCOVE_HARBOR_FERRY_ATTENDANT" }, { + "local_id": "LOCALID_LILYCOVE_HARBOR_SS_TIDAL", "graphics_id": "OBJ_EVENT_GFX_SS_TIDAL", "x": 8, "y": 9, @@ -54,6 +56,7 @@ "flag": "0" }, { + "local_id": "LOCALID_LILYCOVE_HARBOR_FERRY_SAILOR", "graphics_id": "OBJ_EVENT_GFX_SAILOR", "x": 8, "y": 10, @@ -67,6 +70,7 @@ "flag": "FLAG_HIDE_LILYCOVE_HARBOR_FERRY_SAILOR" }, { + "local_id": "LOCALID_LILYCOVE_HARBOR_BRINEY", "graphics_id": "OBJ_EVENT_GFX_EXPERT_M", "x": 8, "y": 10, diff --git a/data/maps/LilycoveCity_Harbor/scripts.inc b/data/maps/LilycoveCity_Harbor/scripts.inc index 63010dc4c77d..9388609ab5b1 100644 --- a/data/maps/LilycoveCity_Harbor/scripts.inc +++ b/data/maps/LilycoveCity_Harbor/scripts.inc @@ -1,8 +1,3 @@ -.set LOCALID_ATTENDANT, 1 -.set LOCALID_SS_TIDAL, 2 -.set LOCALID_FERRY_SAILOR, 4 -.set LOCALID_BRINEY, 5 - LilycoveCity_Harbor_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, LilycoveCity_Harbor_OnTransition .byte 0 @@ -231,16 +226,16 @@ LilycoveCity_Harbor_EventScript_OldSeaMapFirstTime:: call LilycoveCity_Harbor_EventScript_GetEventTicketSailor msgbox EventTicket_Text_OldSeaMapTooFar, MSGBOX_DEFAULT closemessage - applymovement LOCALID_FERRY_SAILOR, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_LILYCOVE_HARBOR_FERRY_SAILOR, Common_Movement_WalkInPlaceFasterUp waitmovement 0 playse SE_PIN - applymovement LOCALID_FERRY_SAILOR, Common_Movement_ExclamationMark + applymovement LOCALID_LILYCOVE_HARBOR_FERRY_SAILOR, Common_Movement_ExclamationMark waitmovement 0 - applymovement LOCALID_FERRY_SAILOR, Common_Movement_Delay48 + applymovement LOCALID_LILYCOVE_HARBOR_FERRY_SAILOR, Common_Movement_Delay48 waitmovement 0 call_if_eq VAR_FACING, DIR_NORTH, LilycoveCity_Harbor_EventScript_MoveSailorOutOfWayNorth call_if_eq VAR_FACING, DIR_EAST, LilycoveCity_Harbor_EventScript_MoveSailorOutOfWayEast - addobject LOCALID_BRINEY + addobject LOCALID_LILYCOVE_HARBOR_BRINEY call_if_eq VAR_FACING, DIR_NORTH, LilycoveCity_Harbor_EventScript_BrineyFaceSailorNorth call_if_eq VAR_FACING, DIR_EAST, LilycoveCity_Harbor_EventScript_BrineyFaceSailorEast msgbox EventTicket_Text_BrineyHoldOnASecond, MSGBOX_DEFAULT @@ -250,7 +245,7 @@ LilycoveCity_Harbor_EventScript_OldSeaMapFirstTime:: closemessage call_if_eq VAR_FACING, DIR_NORTH, LilycoveCity_Harbor_EventScript_BoardFerryWithBrineyAndSailorNorth call_if_eq VAR_FACING, DIR_EAST, LilycoveCity_Harbor_EventScript_BoardFerryWithBrineyAndSailorEast - setvar VAR_0x8004, LOCALID_SS_TIDAL + setvar VAR_0x8004, LOCALID_LILYCOVE_HARBOR_SS_TIDAL call Common_EventScript_FerryDepart warp MAP_FARAWAY_ISLAND_ENTRANCE, 13, 38 waitstate @@ -305,14 +300,14 @@ LilycoveCity_Harbor_EventScript_MultipleEventTicketsFirstTime:: LilycoveCity_Harbor_EventScript_ExitFirstTimeTicketSailSelect:: msgbox EventTicket_Text_AsYouLike, MSGBOX_DEFAULT closemessage - applymovement LOCALID_FERRY_SAILOR, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_LILYCOVE_HARBOR_FERRY_SAILOR, Common_Movement_WalkInPlaceFasterUp waitmovement 0 delay 30 - removeobject LOCALID_FERRY_SAILOR + removeobject LOCALID_LILYCOVE_HARBOR_FERRY_SAILOR delay 30 - applymovement LOCALID_ATTENDANT, Common_Movement_WalkInPlaceFasterDown + applymovement LOCALID_LILYCOVE_HARBOR_ATTENDANT, Common_Movement_WalkInPlaceFasterDown waitmovement 0 - showobjectat LOCALID_ATTENDANT, MAP_LILYCOVE_CITY_HARBOR + showobjectat LOCALID_LILYCOVE_HARBOR_ATTENDANT, MAP_LILYCOVE_CITY_HARBOR delay 30 msgbox LilycoveCity_Harbor_Text_SailAnotherTime, MSGBOX_DEFAULT release @@ -324,22 +319,22 @@ LilycoveCity_Harbor_EventScript_GetEventTicketSailor:: delay 30 hideobjectat VAR_LAST_TALKED, MAP_LILYCOVE_CITY_HARBOR delay 60 - addobject LOCALID_FERRY_SAILOR + addobject LOCALID_LILYCOVE_HARBOR_FERRY_SAILOR delay 30 - applymovement LOCALID_FERRY_SAILOR, Common_Movement_FacePlayer + applymovement LOCALID_LILYCOVE_HARBOR_FERRY_SAILOR, Common_Movement_FacePlayer waitmovement 0 return LilycoveCity_Harbor_EventScript_BoardFerryWithSailor:: - applymovement LOCALID_FERRY_SAILOR, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_LILYCOVE_HARBOR_FERRY_SAILOR, Common_Movement_WalkInPlaceFasterUp waitmovement 0 delay 30 - removeobject LOCALID_FERRY_SAILOR + removeobject LOCALID_LILYCOVE_HARBOR_FERRY_SAILOR call_if_eq VAR_FACING, DIR_NORTH, LilycoveCity_Harbor_EventScript_PlayerBoardFerryNorth call_if_eq VAR_FACING, DIR_EAST, LilycoveCity_Harbor_EventScript_PlayerBoardFerryEast delay 30 - hideobjectat OBJ_EVENT_ID_PLAYER, 0 - setvar VAR_0x8004, LOCALID_SS_TIDAL + hideobjectat LOCALID_PLAYER, 0 + setvar VAR_0x8004, LOCALID_LILYCOVE_HARBOR_SS_TIDAL call Common_EventScript_FerryDepart return @@ -398,18 +393,18 @@ LilycoveCity_Harbor_EventScript_BoardFerry:: call_if_eq VAR_FACING, DIR_NORTH, LilycoveCity_Harbor_EventScript_PlayerBoardFerryNorth call_if_eq VAR_FACING, DIR_EAST, LilycoveCity_Harbor_EventScript_PlayerBoardFerryEast delay 30 - hideobjectat OBJ_EVENT_ID_PLAYER, 0 - setvar VAR_0x8004, LOCALID_SS_TIDAL + hideobjectat LOCALID_PLAYER, 0 + setvar VAR_0x8004, LOCALID_LILYCOVE_HARBOR_SS_TIDAL call Common_EventScript_FerryDepart return LilycoveCity_Harbor_EventScript_PlayerBoardFerryEast:: - applymovement OBJ_EVENT_ID_PLAYER, LilycoveCity_Harbor_Movement_PlayerBoardFerryEast + applymovement LOCALID_PLAYER, LilycoveCity_Harbor_Movement_PlayerBoardFerryEast waitmovement 0 return LilycoveCity_Harbor_EventScript_PlayerBoardFerryNorth:: - applymovement OBJ_EVENT_ID_PLAYER, LilycoveCity_Harbor_Movement_PlayerBoardFerryNorth + applymovement LOCALID_PLAYER, LilycoveCity_Harbor_Movement_PlayerBoardFerryNorth waitmovement 0 return @@ -445,12 +440,12 @@ LilycoveCity_Harbor_EventScript_SailorFerryAvailable:: end LilycoveCity_Harbor_EventScript_MoveSailorOutOfWayNorth:: - applymovement LOCALID_FERRY_SAILOR, LilycoveCity_Harbor_Movement_SailorOutOfWayNorth + applymovement LOCALID_LILYCOVE_HARBOR_FERRY_SAILOR, LilycoveCity_Harbor_Movement_SailorOutOfWayNorth waitmovement 0 return LilycoveCity_Harbor_EventScript_MoveSailorOutOfWayEast:: - applymovement LOCALID_FERRY_SAILOR, LilycoveCity_Harbor_Movement_SailorOutOfWayEast + applymovement LOCALID_LILYCOVE_HARBOR_FERRY_SAILOR, LilycoveCity_Harbor_Movement_SailorOutOfWayEast waitmovement 0 return @@ -468,36 +463,36 @@ LilycoveCity_Harbor_Movement_SailorOutOfWayEast: step_end LilycoveCity_Harbor_EventScript_BrineyFaceSailorNorth:: - applymovement LOCALID_BRINEY, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_LILYCOVE_HARBOR_BRINEY, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 return LilycoveCity_Harbor_EventScript_BrineyFaceSailorEast:: - applymovement LOCALID_BRINEY, Common_Movement_WalkInPlaceFasterDown + applymovement LOCALID_LILYCOVE_HARBOR_BRINEY, Common_Movement_WalkInPlaceFasterDown waitmovement 0 return LilycoveCity_Harbor_EventScript_BrineyFacePlayerNorth:: - applymovement LOCALID_BRINEY, Common_Movement_WalkInPlaceFasterDown + applymovement LOCALID_LILYCOVE_HARBOR_BRINEY, Common_Movement_WalkInPlaceFasterDown waitmovement 0 return LilycoveCity_Harbor_EventScript_BrineyFacePlayerEast:: - applymovement LOCALID_BRINEY, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_LILYCOVE_HARBOR_BRINEY, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 return LilycoveCity_Harbor_EventScript_BoardFerryWithBrineyAndSailorNorth:: - applymovement LOCALID_BRINEY, LilycoveCity_Harbor_Movement_BrineyBoardFerry - applymovement OBJ_EVENT_ID_PLAYER, LilycoveCity_Harbor_Movement_PlayerBoardWithBrineyNorth - applymovement LOCALID_FERRY_SAILOR, LilycoveCity_Harbor_Movement_SailorBoardWithBrineyNorth + applymovement LOCALID_LILYCOVE_HARBOR_BRINEY, LilycoveCity_Harbor_Movement_BrineyBoardFerry + applymovement LOCALID_PLAYER, LilycoveCity_Harbor_Movement_PlayerBoardWithBrineyNorth + applymovement LOCALID_LILYCOVE_HARBOR_FERRY_SAILOR, LilycoveCity_Harbor_Movement_SailorBoardWithBrineyNorth waitmovement 0 return LilycoveCity_Harbor_EventScript_BoardFerryWithBrineyAndSailorEast:: - applymovement LOCALID_BRINEY, LilycoveCity_Harbor_Movement_BrineyBoardFerry - applymovement OBJ_EVENT_ID_PLAYER, LilycoveCity_Harbor_Movement_PlayerBoardWithBrineyEast - applymovement LOCALID_FERRY_SAILOR, LilycoveCity_Harbor_Movement_SailorBoardWithBrineyEast + applymovement LOCALID_LILYCOVE_HARBOR_BRINEY, LilycoveCity_Harbor_Movement_BrineyBoardFerry + applymovement LOCALID_PLAYER, LilycoveCity_Harbor_Movement_PlayerBoardWithBrineyEast + applymovement LOCALID_LILYCOVE_HARBOR_FERRY_SAILOR, LilycoveCity_Harbor_Movement_SailorBoardWithBrineyEast waitmovement 0 return diff --git a/data/maps/LilycoveCity_LilycoveMuseum_1F/map.json b/data/maps/LilycoveCity_LilycoveMuseum_1F/map.json index 1710e0df8f67..6b44c299feb8 100644 --- a/data/maps/LilycoveCity_LilycoveMuseum_1F/map.json +++ b/data/maps/LilycoveCity_LilycoveMuseum_1F/map.json @@ -28,6 +28,7 @@ "flag": "0" }, { + "local_id": "LOCALID_MUSEUM_1F_CURATOR", "graphics_id": "OBJ_EVENT_GFX_GENTLEMAN", "x": 16, "y": 2, @@ -106,6 +107,7 @@ "flag": "FLAG_HIDE_LILYCOVE_MUSEUM_PATRON_1" }, { + "local_id": "LOCALID_MUSEUM_1F_ARTIST_2", "graphics_id": "OBJ_EVENT_GFX_ARTIST", "x": 19, "y": 3, diff --git a/data/maps/LilycoveCity_LilycoveMuseum_1F/scripts.inc b/data/maps/LilycoveCity_LilycoveMuseum_1F/scripts.inc index 2d9d446f9d51..052e1e4f3f24 100644 --- a/data/maps/LilycoveCity_LilycoveMuseum_1F/scripts.inc +++ b/data/maps/LilycoveCity_LilycoveMuseum_1F/scripts.inc @@ -1,6 +1,3 @@ -.set LOCALID_CURATOR, 2 -.set LOCALID_ARTIST_2, 8 - LilycoveCity_LilycoveMuseum_1F_MapScripts:: .byte 0 @@ -10,7 +7,7 @@ LilycoveCity_LilycoveMuseum_1F_EventScript_Greeter:: LilycoveCity_LilycoveMuseum_1F_EventScript_Curator:: lockall - applymovement LOCALID_CURATOR, Common_Movement_FacePlayer + applymovement LOCALID_MUSEUM_1F_CURATOR, Common_Movement_FacePlayer message LilycoveCity_LilycoveMuseum_1F_Text_ImCuratorHaveYouViewedOurPaintings waitmessage multichoice 20, 8, MULTI_VIEWED_PAINTINGS, TRUE @@ -35,9 +32,9 @@ LilycoveCity_LilycoveMuseum_1F_EventScript_NotInterested:: LilycoveCity_LilycoveMuseum_1F_EventScript_InterestedInPaintings:: msgbox LilycoveCity_LilycoveMuseum_1F_Text_ExcellentCanYouComeWithMe, MSGBOX_SIGN - applymovement LOCALID_CURATOR, LilycoveCity_LilycoveMuseum_1F_Movement_CuratorEnterStairs + applymovement LOCALID_MUSEUM_1F_CURATOR, LilycoveCity_LilycoveMuseum_1F_Movement_CuratorEnterStairs waitmovement 0 - removeobject LOCALID_CURATOR + removeobject LOCALID_MUSEUM_1F_CURATOR switch VAR_FACING case DIR_NORTH, LilycoveCity_LilycoveMuseum_1F_EventScript_FollowCuratorNorth case DIR_WEST, LilycoveCity_LilycoveMuseum_1F_EventScript_FollowCuratorWest @@ -46,7 +43,7 @@ LilycoveCity_LilycoveMuseum_1F_EventScript_InterestedInPaintings:: LilycoveCity_LilycoveMuseum_1F_EventScript_FollowCuratorNorth:: lockall - applymovement OBJ_EVENT_ID_PLAYER, LilycoveCity_LilycoveMuseum_1F_Movement_FollowCuratorNorth + applymovement LOCALID_PLAYER, LilycoveCity_LilycoveMuseum_1F_Movement_FollowCuratorNorth waitmovement 0 warp MAP_LILYCOVE_CITY_LILYCOVE_MUSEUM_2F, 11, 8 waitstate @@ -54,7 +51,7 @@ LilycoveCity_LilycoveMuseum_1F_EventScript_FollowCuratorNorth:: LilycoveCity_LilycoveMuseum_1F_EventScript_FollowCuratorWest:: lockall - applymovement OBJ_EVENT_ID_PLAYER, LilycoveCity_LilycoveMuseum_1F_Movement_FollowCuratorWest + applymovement LOCALID_PLAYER, LilycoveCity_LilycoveMuseum_1F_Movement_FollowCuratorWest waitmovement 0 warp MAP_LILYCOVE_CITY_LILYCOVE_MUSEUM_2F, 11, 8 waitstate @@ -62,7 +59,7 @@ LilycoveCity_LilycoveMuseum_1F_EventScript_FollowCuratorWest:: LilycoveCity_LilycoveMuseum_1F_EventScript_FollowCuratorEast:: lockall - applymovement OBJ_EVENT_ID_PLAYER, LilycoveCity_LilycoveMuseum_1F_Movement_FollowCuratorEast + applymovement LOCALID_PLAYER, LilycoveCity_LilycoveMuseum_1F_Movement_FollowCuratorEast waitmovement 0 warp MAP_LILYCOVE_CITY_LILYCOVE_MUSEUM_2F, 11, 8 waitstate @@ -152,7 +149,7 @@ LilycoveCity_LilycoveMuseum_1F_EventScript_Artist2:: faceplayer msgbox LilycoveCity_LilycoveMuseum_1F_Text_AimToSeeGreatPaintings, MSGBOX_DEFAULT closemessage - applymovement LOCALID_ARTIST_2, Common_Movement_FaceOriginalDirection + applymovement LOCALID_MUSEUM_1F_ARTIST_2, Common_Movement_FaceOriginalDirection waitmovement 0 release end diff --git a/data/maps/LilycoveCity_LilycoveMuseum_2F/map.json b/data/maps/LilycoveCity_LilycoveMuseum_2F/map.json index 83fe63aab01b..be3467f2d17d 100644 --- a/data/maps/LilycoveCity_LilycoveMuseum_2F/map.json +++ b/data/maps/LilycoveCity_LilycoveMuseum_2F/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_MUSEUM_2F_CURATOR", "graphics_id": "OBJ_EVENT_GFX_GENTLEMAN", "x": 10, "y": 8, diff --git a/data/maps/LilycoveCity_LilycoveMuseum_2F/scripts.inc b/data/maps/LilycoveCity_LilycoveMuseum_2F/scripts.inc index 9212ca67df1e..e00c7bcb3c2c 100644 --- a/data/maps/LilycoveCity_LilycoveMuseum_2F/scripts.inc +++ b/data/maps/LilycoveCity_LilycoveMuseum_2F/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_CURATOR, 1 - LilycoveCity_LilycoveMuseum_2F_MapScripts:: map_script MAP_SCRIPT_ON_LOAD, LilycoveCity_LilycoveMuseum_2F_OnLoad map_script MAP_SCRIPT_ON_FRAME_TABLE, LilycoveCity_LilycoveMuseum_2F_OnFrame @@ -64,18 +62,18 @@ LilycoveCity_LilycoveMuseum_2F_OnFrame: LilycoveCity_LilycoveMuseum_2F_EventScript_ShowExhibitHall:: lockall - applymovement LOCALID_CURATOR, Common_Movement_FacePlayer - applymovement OBJ_EVENT_ID_PLAYER, LilycoveCity_LilycoveMuseum_2F_Movement_PlayerWalkInPlaceLeft + applymovement LOCALID_MUSEUM_2F_CURATOR, Common_Movement_FacePlayer + applymovement LOCALID_PLAYER, LilycoveCity_LilycoveMuseum_2F_Movement_PlayerWalkInPlaceLeft waitmovement 0 msgbox LilycoveCity_LilycoveMuseum_2F_Text_ThisIsExhibitHall, MSGBOX_SIGN - applymovement LOCALID_CURATOR, LilycoveCity_LilycoveMuseum_2F_Movement_FaceExhibitHall + applymovement LOCALID_MUSEUM_2F_CURATOR, LilycoveCity_LilycoveMuseum_2F_Movement_FaceExhibitHall waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, LilycoveCity_LilycoveMuseum_2F_Movement_FaceExhibitHall + applymovement LOCALID_PLAYER, LilycoveCity_LilycoveMuseum_2F_Movement_FaceExhibitHall waitmovement 0 msgbox LilycoveCity_LilycoveMuseum_2F_Text_ExplainExhibitHall, MSGBOX_SIGN - applymovement LOCALID_CURATOR, Common_Movement_FacePlayer + applymovement LOCALID_MUSEUM_2F_CURATOR, Common_Movement_FacePlayer waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, LilycoveCity_LilycoveMuseum_2F_Movement_PlayerWalkInPlaceLeft + applymovement LOCALID_PLAYER, LilycoveCity_LilycoveMuseum_2F_Movement_PlayerWalkInPlaceLeft waitmovement 0 msgbox LilycoveCity_LilycoveMuseum_2F_Text_PleaseObtainPaintingsForExhibit, MSGBOX_SIGN copyvar VAR_LILYCOVE_MUSEUM_2F_STATE, 1 @@ -109,16 +107,16 @@ LilycoveCity_LilycoveMuseum_2F_EventScript_AddedPainting:: end LilycoveCity_LilycoveMuseum_2F_EventScript_ThankPlayer:: - applymovement LOCALID_CURATOR, Common_Movement_FacePlayer + applymovement LOCALID_MUSEUM_2F_CURATOR, Common_Movement_FacePlayer waitmovement 0 msgbox LilycoveCity_LilycoveMuseum_2F_Text_ItsYouPlayer, MSGBOX_DEFAULT - applymovement LOCALID_CURATOR, LilycoveCity_LilycoveMuseum_2F_Movement_FaceExhibitHall + applymovement LOCALID_MUSEUM_2F_CURATOR, LilycoveCity_LilycoveMuseum_2F_Movement_FaceExhibitHall msgbox LilycoveCity_LilycoveMuseum_2F_Text_PaintingsAttractedMoreGuests, MSGBOX_DEFAULT goto LilycoveCity_LilycoveMuseum_2F_EventScript_GiveGlassOrnament end LilycoveCity_LilycoveMuseum_2F_EventScript_GiveGlassOrnament:: - applymovement LOCALID_CURATOR, Common_Movement_FacePlayer + applymovement LOCALID_MUSEUM_2F_CURATOR, Common_Movement_FacePlayer msgbox LilycoveCity_LilycoveMuseum_2F_Text_TokenOfGratitude, MSGBOX_DEFAULT givedecoration DECOR_GLASS_ORNAMENT goto_if_eq VAR_RESULT, FALSE, LilycoveCity_LilycoveMuseum_2F_EventScript_NoRoomForGlassOrnament diff --git a/data/maps/LilycoveCity_MoveDeletersHouse/map.json b/data/maps/LilycoveCity_MoveDeletersHouse/map.json index 29c6f3636e8c..f10630570aec 100644 --- a/data/maps/LilycoveCity_MoveDeletersHouse/map.json +++ b/data/maps/LilycoveCity_MoveDeletersHouse/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_MOVE_DELETER", "graphics_id": "OBJ_EVENT_GFX_EXPERT_M", "x": 4, "y": 4, diff --git a/data/maps/LilycoveCity_MoveDeletersHouse/scripts.inc b/data/maps/LilycoveCity_MoveDeletersHouse/scripts.inc index db042653e1ca..b8d21d5e283c 100644 --- a/data/maps/LilycoveCity_MoveDeletersHouse/scripts.inc +++ b/data/maps/LilycoveCity_MoveDeletersHouse/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_MOVE_DELETER, 1 - LilycoveCity_MoveDeletersHouse_MapScripts:: .byte 0 diff --git a/data/maps/LilycoveCity_PokemonCenter_1F/map.json b/data/maps/LilycoveCity_PokemonCenter_1F/map.json index 595b5af54b44..8eb6312fb26c 100644 --- a/data/maps/LilycoveCity_PokemonCenter_1F/map.json +++ b/data/maps/LilycoveCity_PokemonCenter_1F/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_LILYCOVE_NURSE", "graphics_id": "OBJ_EVENT_GFX_NURSE", "x": 7, "y": 2, @@ -54,6 +55,7 @@ "flag": "0" }, { + "local_id": "LOCALID_LILYCOVE_LADY", "graphics_id": "OBJ_EVENT_GFX_VAR_0", "x": 1, "y": 3, @@ -67,6 +69,7 @@ "flag": "0" }, { + "local_id": "LOCALID_LILYCOVE_LADYS_MON", "graphics_id": "OBJ_EVENT_GFX_VAR_1", "x": 2, "y": 3, diff --git a/data/maps/LilycoveCity_PokemonCenter_1F/scripts.inc b/data/maps/LilycoveCity_PokemonCenter_1F/scripts.inc index a7f853afada1..9273816d1f20 100644 --- a/data/maps/LilycoveCity_PokemonCenter_1F/scripts.inc +++ b/data/maps/LilycoveCity_PokemonCenter_1F/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_NURSE, 1 - LilycoveCity_PokemonCenter_1F_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, LilycoveCity_PokemonCenter_1F_OnTransition map_script MAP_SCRIPT_ON_RESUME, CableClub_OnResume @@ -26,7 +24,7 @@ LilycoveCity_PokemonCenter_1F_EventScript_ShowContestLadyMon:: end LilycoveCity_PokemonCenter_1F_EventScript_Nurse:: - setvar VAR_0x800B, LOCALID_NURSE + setvar VAR_0x800B, LOCALID_LILYCOVE_NURSE call Common_EventScript_PkmnCenterNurse waitmessage waitbuttonpress diff --git a/data/maps/LilycoveCity_PokemonTrainerFanClub/map.json b/data/maps/LilycoveCity_PokemonTrainerFanClub/map.json index ccd988bf3a87..db0c31aa16b1 100644 --- a/data/maps/LilycoveCity_PokemonTrainerFanClub/map.json +++ b/data/maps/LilycoveCity_PokemonTrainerFanClub/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_TRAINER_FAN_CLUB_LASS", "graphics_id": "OBJ_EVENT_GFX_LASS", "x": 3, "y": 11, @@ -28,6 +29,7 @@ "flag": "0" }, { + "local_id": "LOCALID_TRAINER_FAN_CLUB_MAN", "graphics_id": "OBJ_EVENT_GFX_MAN_4", "x": 8, "y": 10, @@ -41,6 +43,7 @@ "flag": "0" }, { + "local_id": "LOCALID_TRAINER_FAN_CLUB_POKEFAN_M", "graphics_id": "OBJ_EVENT_GFX_POKEFAN_M", "x": 6, "y": 11, @@ -54,6 +57,7 @@ "flag": "0" }, { + "local_id": "LOCALID_TRAINER_FAN_CLUB_LITTLE_GIRL", "graphics_id": "OBJ_EVENT_GFX_LITTLE_GIRL", "x": 5, "y": 8, @@ -67,6 +71,7 @@ "flag": "0" }, { + "local_id": "LOCALID_TRAINER_FAN_CLUB_NINJA_BOY", "graphics_id": "OBJ_EVENT_GFX_NINJA_BOY", "x": 7, "y": 11, @@ -80,6 +85,7 @@ "flag": "FLAG_HIDE_FANCLUB_LITTLE_BOY" }, { + "local_id": "LOCALID_TRAINER_FAN_CLUB_BOY", "graphics_id": "OBJ_EVENT_GFX_BOY_2", "x": 1, "y": 9, @@ -93,6 +99,7 @@ "flag": "FLAG_HIDE_FANCLUB_BOY" }, { + "local_id": "LOCALID_TRAINER_FAN_CLUB_WOMAN", "graphics_id": "OBJ_EVENT_GFX_WOMAN_3", "x": 3, "y": 10, @@ -106,6 +113,7 @@ "flag": "FLAG_HIDE_FANCLUB_LADY" }, { + "local_id": "LOCALID_TRAINER_FAN_CLUB_EXPERT_F", "graphics_id": "OBJ_EVENT_GFX_EXPERT_F", "x": 10, "y": 10, diff --git a/data/maps/LilycoveCity_PokemonTrainerFanClub/scripts.inc b/data/maps/LilycoveCity_PokemonTrainerFanClub/scripts.inc index ba8001324a06..18d0f73edc04 100644 --- a/data/maps/LilycoveCity_PokemonTrainerFanClub/scripts.inc +++ b/data/maps/LilycoveCity_PokemonTrainerFanClub/scripts.inc @@ -1,12 +1,3 @@ -.set LOCALID_LASS, 1 -.set LOCALID_MAN, 2 -.set LOCALID_POKEFAN_M, 3 -.set LOCALID_LITTLE_GIRL, 4 -.set LOCALID_NINJA_BOY, 5 -.set LOCALID_BOY, 6 -.set LOCALID_WOMAN, 7 -.set LOCALID_EXPERT_F, 8 - LilycoveCity_PokemonTrainerFanClub_MapScripts:: map_script MAP_SCRIPT_ON_FRAME_TABLE, LilycoveCity_PokemonTrainerFanClub_OnFrame map_script MAP_SCRIPT_ON_TRANSITION, LilycoveCity_PokemonTrainerFanClub_OnTransition @@ -20,20 +11,20 @@ LilycoveCity_PokemonTrainerFanClub_OnFrame: LilycoveCity_PokemonTrainerFanClub_EventScript_MeetFirstFans:: lockall - applymovement LOCALID_LASS, Common_Movement_WalkInPlaceFasterDown + applymovement LOCALID_TRAINER_FAN_CLUB_LASS, Common_Movement_WalkInPlaceFasterDown waitmovement 0 msgbox LilycoveCity_PokemonTrainerFanClub_Text_OhWowItsPlayer, MSGBOX_DEFAULT - applymovement LOCALID_LITTLE_GIRL, LilycoveCity_PokemonTrainerFanClub_Movement_LittleGirlWatchPlayer - applymovement LOCALID_MAN, LilycoveCity_PokemonTrainerFanClub_Movement_FanApproachPlayer + applymovement LOCALID_TRAINER_FAN_CLUB_LITTLE_GIRL, LilycoveCity_PokemonTrainerFanClub_Movement_LittleGirlWatchPlayer + applymovement LOCALID_TRAINER_FAN_CLUB_MAN, LilycoveCity_PokemonTrainerFanClub_Movement_FanApproachPlayer waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterRight waitmovement 0 msgbox LilycoveCity_PokemonTrainerFanClub_Text_HeardAboutYouImYourFan, MSGBOX_DEFAULT - applymovement LOCALID_LITTLE_GIRL, LilycoveCity_PokemonTrainerFanClub_Movement_LittleGirlMoveCloserToPlayer + applymovement LOCALID_TRAINER_FAN_CLUB_LITTLE_GIRL, LilycoveCity_PokemonTrainerFanClub_Movement_LittleGirlMoveCloserToPlayer waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 - applymovement LOCALID_LITTLE_GIRL, LilycoveCity_PokemonTrainerFanClub_Movement_LittleGirlHideFromPlayer + applymovement LOCALID_TRAINER_FAN_CLUB_LITTLE_GIRL, LilycoveCity_PokemonTrainerFanClub_Movement_LittleGirlHideFromPlayer waitmovement 0 setvar VAR_LILYCOVE_FAN_CLUB_STATE, 2 releaseall @@ -157,35 +148,35 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_TrySetUpTVShow:: return LilycoveCity_PokemonTrainerFanClub_EventScript_MoveMember1ToFarTable:: - setobjectxyperm LOCALID_LASS, 7, 5 + setobjectxyperm LOCALID_TRAINER_FAN_CLUB_LASS, 7, 5 return LilycoveCity_PokemonTrainerFanClub_EventScript_MoveMember2ToFarTable:: - setobjectxyperm LOCALID_POKEFAN_M, 3, 4 + setobjectxyperm LOCALID_TRAINER_FAN_CLUB_POKEFAN_M, 3, 4 return LilycoveCity_PokemonTrainerFanClub_EventScript_MoveMember3ToFarTable:: - setobjectxyperm LOCALID_LITTLE_GIRL, 7, 2 + setobjectxyperm LOCALID_TRAINER_FAN_CLUB_LITTLE_GIRL, 7, 2 return LilycoveCity_PokemonTrainerFanClub_EventScript_MoveMember4ToFarTable:: - setobjectxyperm LOCALID_NINJA_BOY, 5, 5 + setobjectxyperm LOCALID_TRAINER_FAN_CLUB_NINJA_BOY, 5, 5 return LilycoveCity_PokemonTrainerFanClub_EventScript_MoveMember5ToFarTable:: - setobjectxyperm LOCALID_BOY, 5, 2 + setobjectxyperm LOCALID_TRAINER_FAN_CLUB_BOY, 5, 2 return LilycoveCity_PokemonTrainerFanClub_EventScript_MoveMember6ToFarTable:: - setobjectxyperm LOCALID_MAN, 8, 4 + setobjectxyperm LOCALID_TRAINER_FAN_CLUB_MAN, 8, 4 return LilycoveCity_PokemonTrainerFanClub_EventScript_MoveMember7ToFarTable:: - setobjectxyperm LOCALID_WOMAN, 3, 3 + setobjectxyperm LOCALID_TRAINER_FAN_CLUB_WOMAN, 3, 3 return LilycoveCity_PokemonTrainerFanClub_EventScript_MoveMember8ToFarTable:: - setobjectxyperm LOCALID_EXPERT_F, 8, 3 + setobjectxyperm LOCALID_TRAINER_FAN_CLUB_EXPERT_F, 8, 3 return LilycoveCity_PokemonTrainerFanClub_EventScript_SetFanMemberPositionsForFirstFanMeeting:: diff --git a/data/maps/LittlerootTown/map.json b/data/maps/LittlerootTown/map.json index 4cff63da0972..e897b714a44c 100644 --- a/data/maps/LittlerootTown/map.json +++ b/data/maps/LittlerootTown/map.json @@ -21,6 +21,7 @@ ], "object_events": [ { + "local_id": "LOCALID_LITTLEROOT_TWIN", "graphics_id": "OBJ_EVENT_GFX_TWIN", "x": 16, "y": 10, @@ -60,6 +61,7 @@ "flag": "0" }, { + "local_id": "LOCALID_LITTLEROOT_MOM", "graphics_id": "OBJ_EVENT_GFX_MOM", "x": 5, "y": 8, @@ -99,6 +101,7 @@ "flag": "FLAG_HIDE_LITTLEROOT_TOWN_MAYS_HOUSE_TRUCK" }, { + "local_id": "LOCALID_LITTLEROOT_RIVAL", "graphics_id": "OBJ_EVENT_GFX_VAR_0", "x": 13, "y": 10, @@ -112,6 +115,7 @@ "flag": "FLAG_HIDE_LITTLEROOT_TOWN_RIVAL" }, { + "local_id": "LOCALID_LITTLEROOT_BIRCH", "graphics_id": "OBJ_EVENT_GFX_PROF_BIRCH", "x": 14, "y": 10, diff --git a/data/maps/LittlerootTown/scripts.inc b/data/maps/LittlerootTown/scripts.inc index 69961bf36230..fd1d970b1349 100644 --- a/data/maps/LittlerootTown/scripts.inc +++ b/data/maps/LittlerootTown/scripts.inc @@ -1,8 +1,3 @@ -.set LOCALID_TWIN, 1 -.set LOCALID_MOM, 4 -.set LOCALID_RIVAL, 7 -.set LOCALID_BIRCH, 8 - LittlerootTown_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, LittlerootTown_OnTransition map_script MAP_SCRIPT_ON_FRAME_TABLE, LittlerootTown_OnFrame @@ -76,34 +71,34 @@ LittlerootTown_EventScript_SetExitedHouseAfterLatiSSTicketEvent:: return LittlerootTown_EventScript_MoveMomToMaysDoor:: - setobjectxyperm LOCALID_MOM, 14, 8 + setobjectxyperm LOCALID_LITTLEROOT_MOM, 14, 8 return LittlerootTown_EventScript_SetTwinPos:: goto_if_eq VAR_LITTLEROOT_TOWN_STATE, 0, LittlerootTown_EventScript_SetTwinGuardingRoutePos - setobjectxyperm LOCALID_TWIN, 10, 1 - setobjectmovementtype LOCALID_TWIN, MOVEMENT_TYPE_FACE_UP + setobjectxyperm LOCALID_LITTLEROOT_TWIN, 10, 1 + setobjectmovementtype LOCALID_LITTLEROOT_TWIN, MOVEMENT_TYPE_FACE_UP return LittlerootTown_EventScript_SetTwinGuardingRoutePos:: - setobjectxyperm LOCALID_TWIN, 7, 2 - setobjectmovementtype LOCALID_TWIN, MOVEMENT_TYPE_FACE_DOWN + setobjectxyperm LOCALID_LITTLEROOT_TWIN, 7, 2 + setobjectmovementtype LOCALID_LITTLEROOT_TWIN, MOVEMENT_TYPE_FACE_DOWN return LittlerootTown_EventScript_SetMomStandingInFrontOfDoorPos:: clearflag FLAG_HIDE_LITTLEROOT_TOWN_MOM_OUTSIDE - setobjectmovementtype LOCALID_MOM, MOVEMENT_TYPE_FACE_DOWN + setobjectmovementtype LOCALID_LITTLEROOT_MOM, MOVEMENT_TYPE_FACE_DOWN checkplayergender call_if_eq VAR_RESULT, MALE, LittlerootTown_EventScript_SetMomInFrontOfDoorMale call_if_eq VAR_RESULT, FEMALE, LittlerootTown_EventScript_SetMomInFrontOfDoorFemale return LittlerootTown_EventScript_SetMomInFrontOfDoorMale:: - setobjectxyperm LOCALID_MOM, 5, 9 + setobjectxyperm LOCALID_LITTLEROOT_MOM, 5, 9 return LittlerootTown_EventScript_SetMomInFrontOfDoorFemale:: - setobjectxyperm LOCALID_MOM, 14, 9 + setobjectxyperm LOCALID_LITTLEROOT_MOM, 14, 9 return LittlerootTown_OnFrame: @@ -137,31 +132,31 @@ LittlerootTown_EventScript_StepOffTruckFemale:: LittlerootTown_EventScript_GoInsideWithMom:: delay 15 playse SE_LEDGE - applymovement OBJ_EVENT_ID_PLAYER, LittlerootTown_Movement_PlayerStepOffTruck + applymovement LOCALID_PLAYER, LittlerootTown_Movement_PlayerStepOffTruck waitmovement 0 opendoor VAR_0x8004, VAR_0x8005 waitdooranim - addobject LOCALID_MOM - applymovement LOCALID_MOM, LittlerootTown_Movement_MomExitHouse + addobject LOCALID_LITTLEROOT_MOM + applymovement LOCALID_LITTLEROOT_MOM, LittlerootTown_Movement_MomExitHouse waitmovement 0 closedoor VAR_0x8004, VAR_0x8005 waitdooranim delay 10 - applymovement LOCALID_MOM, LittlerootTown_Movement_MomApproachPlayerAtTruck + applymovement LOCALID_LITTLEROOT_MOM, LittlerootTown_Movement_MomApproachPlayerAtTruck waitmovement 0 msgbox LittlerootTown_Text_OurNewHomeLetsGoInside, MSGBOX_DEFAULT closemessage - applymovement LOCALID_MOM, LittlerootTown_Movement_MomApproachDoor - applymovement OBJ_EVENT_ID_PLAYER, LittlerootTown_Movement_PlayerApproachDoor + applymovement LOCALID_LITTLEROOT_MOM, LittlerootTown_Movement_MomApproachDoor + applymovement LOCALID_PLAYER, LittlerootTown_Movement_PlayerApproachDoor waitmovement 0 opendoor VAR_0x8004, VAR_0x8005 waitdooranim - applymovement LOCALID_MOM, LittlerootTown_Movement_MomEnterHouse - applymovement OBJ_EVENT_ID_PLAYER, LittlerootTown_Movement_PlayerEnterHouse + applymovement LOCALID_LITTLEROOT_MOM, LittlerootTown_Movement_MomEnterHouse + applymovement LOCALID_PLAYER, LittlerootTown_Movement_PlayerEnterHouse waitmovement 0 setflag FLAG_HIDE_LITTLEROOT_TOWN_MOM_OUTSIDE setvar VAR_LITTLEROOT_INTRO_STATE, 3 - hideobjectat OBJ_EVENT_ID_PLAYER, 0 + hideobjectat LOCALID_PLAYER, 0 closedoor VAR_0x8004, VAR_0x8005 waitdooranim clearflag FLAG_HIDE_LITTLEROOT_TOWN_FAT_MAN @@ -210,7 +205,7 @@ LittlerootTown_Movement_PlayerStepOffTruck: LittlerootTown_EventScript_BeginDexUpgradeScene:: lockall playse SE_PIN - applymovement LOCALID_BIRCH, Common_Movement_ExclamationMark + applymovement LOCALID_LITTLEROOT_BIRCH, Common_Movement_ExclamationMark waitmovement 0 delay 80 msgbox LittlerootTown_Text_BirchSomethingToShowYouAtLab, MSGBOX_DEFAULT @@ -229,21 +224,21 @@ LittlerootTown_OnWarp: .2byte 0 LittlerootTown_EventScript_SetRivalBirchPosForDexUpgrade:: - addobject LOCALID_BIRCH - addobject LOCALID_RIVAL + addobject LOCALID_LITTLEROOT_BIRCH + addobject LOCALID_LITTLEROOT_RIVAL checkplayergender goto_if_eq VAR_RESULT, MALE, LittlerootTown_EventScript_SetRivalBirchPosForDexUpgradeMale goto LittlerootTown_EventScript_SetRivalBirchPosForDexUpgradeFemale end LittlerootTown_EventScript_SetRivalBirchPosForDexUpgradeMale:: - setobjectxy LOCALID_RIVAL, 6, 10 - setobjectxy LOCALID_BIRCH, 5, 10 + setobjectxy LOCALID_LITTLEROOT_RIVAL, 6, 10 + setobjectxy LOCALID_LITTLEROOT_BIRCH, 5, 10 end LittlerootTown_EventScript_SetRivalBirchPosForDexUpgradeFemale:: - setobjectxy LOCALID_RIVAL, 13, 10 - setobjectxy LOCALID_BIRCH, 14, 10 + setobjectxy LOCALID_LITTLEROOT_RIVAL, 13, 10 + setobjectxy LOCALID_LITTLEROOT_BIRCH, 14, 10 end LittlerootTown_EventScript_FatMan:: @@ -268,7 +263,7 @@ LittlerootTown_EventScript_GoSaveBirch:: special GetPlayerBigGuyGirlString msgbox LittlerootTown_Text_CanYouGoSeeWhatsHappening, MSGBOX_DEFAULT closemessage - applymovement LOCALID_TWIN, Common_Movement_FaceOriginalDirection + applymovement LOCALID_LITTLEROOT_TWIN, Common_Movement_FaceOriginalDirection waitmovement 0 setvar VAR_LITTLEROOT_TOWN_STATE, 2 release @@ -287,10 +282,10 @@ LittlerootTown_EventScript_GoodLuck:: LittlerootTown_EventScript_NeedPokemonTriggerLeft:: lockall - applymovement LOCALID_TWIN, LittlerootTown_Movement_TwinApproachPlayerLeft + applymovement LOCALID_LITTLEROOT_TWIN, LittlerootTown_Movement_TwinApproachPlayerLeft waitmovement 0 call LittlerootTown_EventScript_DangerousWithoutPokemon - applymovement LOCALID_TWIN, LittlerootTown_Movement_TwinReturnLeft + applymovement LOCALID_LITTLEROOT_TWIN, LittlerootTown_Movement_TwinReturnLeft waitmovement 0 releaseall end @@ -298,8 +293,8 @@ LittlerootTown_EventScript_NeedPokemonTriggerLeft:: LittlerootTown_EventScript_DangerousWithoutPokemon:: msgbox LittlerootTown_Text_IfYouGoInGrassPokemonWillJumpOut, MSGBOX_DEFAULT closemessage - applymovement LOCALID_TWIN, LittlerootTown_Movement_TwinPushPlayerFromRoute - applymovement OBJ_EVENT_ID_PLAYER, LittlerootTown_Movement_PushPlayerBackFromRoute + applymovement LOCALID_LITTLEROOT_TWIN, LittlerootTown_Movement_TwinPushPlayerFromRoute + applymovement LOCALID_PLAYER, LittlerootTown_Movement_PushPlayerBackFromRoute waitmovement 0 msgbox LittlerootTown_Text_DangerousIfYouDontHavePokemon, MSGBOX_DEFAULT closemessage @@ -345,10 +340,10 @@ LittlerootTown_Movement_PushPlayerBackFromRoute: LittlerootTown_EventScript_NeedPokemonTriggerRight:: lockall - applymovement LOCALID_TWIN, LittlerootTown_Movement_TwinApproachPlayerRight + applymovement LOCALID_LITTLEROOT_TWIN, LittlerootTown_Movement_TwinApproachPlayerRight waitmovement 0 call LittlerootTown_EventScript_DangerousWithoutPokemon - applymovement LOCALID_TWIN, LittlerootTown_Movement_TwinReturnRight + applymovement LOCALID_LITTLEROOT_TWIN, LittlerootTown_Movement_TwinReturnRight waitmovement 0 releaseall end @@ -379,14 +374,14 @@ LittlerootTown_Movement_TwinReturnRight: LittlerootTown_EventScript_GoSaveBirchTrigger:: lockall - applymovement LOCALID_TWIN, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_LITTLEROOT_TWIN, Common_Movement_WalkInPlaceFasterRight waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 special GetPlayerBigGuyGirlString msgbox LittlerootTown_Text_CanYouGoSeeWhatsHappening, MSGBOX_DEFAULT closemessage - applymovement LOCALID_TWIN, Common_Movement_FaceOriginalDirection + applymovement LOCALID_LITTLEROOT_TWIN, Common_Movement_FaceOriginalDirection waitmovement 0 setvar VAR_LITTLEROOT_TOWN_STATE, 2 releaseall @@ -435,14 +430,14 @@ LittlerootTown_EventScript_PlayersHouseSignFemale:: LittlerootTown_EventScript_GiveRunningShoesTrigger0:: lockall setvar VAR_0x8008, 0 - setobjectxy LOCALID_MOM, 10, 9 + setobjectxy LOCALID_LITTLEROOT_MOM, 10, 9 goto LittlerootTown_EventScript_GiveRunningShoesTrigger end LittlerootTown_EventScript_GiveRunningShoesTrigger1:: lockall setvar VAR_0x8008, 1 - setobjectxy LOCALID_MOM, 11, 9 + setobjectxy LOCALID_LITTLEROOT_MOM, 11, 9 goto LittlerootTown_EventScript_GiveRunningShoesTrigger end @@ -500,12 +495,12 @@ LittlerootTown_EventScript_SetHomeDoorCoordsFemale:: return LittlerootTown_EventScript_MomNoticePlayerMale:: - applymovement LOCALID_MOM, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_LITTLEROOT_MOM, Common_Movement_WalkInPlaceFasterRight waitmovement 0 return LittlerootTown_EventScript_MomNoticePlayerFemale:: - applymovement LOCALID_MOM, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_LITTLEROOT_MOM, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 return @@ -528,72 +523,72 @@ LittlerootTown_EventScript_MomApproachPlayerFemale:: return LittlerootTown_EventScript_MomApproachPlayer0:: - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterDown + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterDown waitmovement 0 - applymovement LOCALID_MOM, LittlerootTown_Movement_MomApproachPlayer0 + applymovement LOCALID_LITTLEROOT_MOM, LittlerootTown_Movement_MomApproachPlayer0 waitmovement 0 return LittlerootTown_EventScript_MomApproachPlayer1:: - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterDown + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterDown waitmovement 0 - applymovement LOCALID_MOM, LittlerootTown_Movement_MomApproachPlayer1 + applymovement LOCALID_LITTLEROOT_MOM, LittlerootTown_Movement_MomApproachPlayer1 waitmovement 0 return LittlerootTown_EventScript_MomApproachPlayerMale2:: - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 - applymovement LOCALID_MOM, LittlerootTown_Movement_MomApproachPlayerMale2 + applymovement LOCALID_LITTLEROOT_MOM, LittlerootTown_Movement_MomApproachPlayerMale2 waitmovement 0 return LittlerootTown_EventScript_MomApproachPlayerMale3:: - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 - applymovement LOCALID_MOM, LittlerootTown_Movement_MomApproachPlayerMale3 + applymovement LOCALID_LITTLEROOT_MOM, LittlerootTown_Movement_MomApproachPlayerMale3 waitmovement 0 return LittlerootTown_EventScript_MomApproachPlayerMale4:: - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 - applymovement LOCALID_MOM, LittlerootTown_Movement_MomApproachPlayerMale4 + applymovement LOCALID_LITTLEROOT_MOM, LittlerootTown_Movement_MomApproachPlayerMale4 waitmovement 0 return LittlerootTown_EventScript_MomApproachPlayerMale5:: - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 - applymovement LOCALID_MOM, LittlerootTown_Movement_MomApproachPlayerMale5 + applymovement LOCALID_LITTLEROOT_MOM, LittlerootTown_Movement_MomApproachPlayerMale5 waitmovement 0 return LittlerootTown_EventScript_MomApproachPlayerFemale2:: - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterRight waitmovement 0 - applymovement LOCALID_MOM, LittlerootTown_Movement_MomApproachPlayerFemale2 + applymovement LOCALID_LITTLEROOT_MOM, LittlerootTown_Movement_MomApproachPlayerFemale2 waitmovement 0 return LittlerootTown_EventScript_MomApproachPlayerFemale3:: - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterRight waitmovement 0 - applymovement LOCALID_MOM, LittlerootTown_Movement_MomApproachPlayerFemale3 + applymovement LOCALID_LITTLEROOT_MOM, LittlerootTown_Movement_MomApproachPlayerFemale3 waitmovement 0 return LittlerootTown_EventScript_MomApproachPlayerFemale4:: - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterRight waitmovement 0 - applymovement LOCALID_MOM, LittlerootTown_Movement_MomApproachPlayerFemale4 + applymovement LOCALID_LITTLEROOT_MOM, LittlerootTown_Movement_MomApproachPlayerFemale4 waitmovement 0 return LittlerootTown_EventScript_MomApproachPlayerFemale5:: - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterRight waitmovement 0 - applymovement LOCALID_MOM, LittlerootTown_Movement_MomApproachPlayerFemale5 + applymovement LOCALID_LITTLEROOT_MOM, LittlerootTown_Movement_MomApproachPlayerFemale5 waitmovement 0 return @@ -616,107 +611,107 @@ LittlerootTown_EventScript_MomReturnHomeFemale:: return LittlerootTown_EventScript_MomReturnHome0:: - applymovement LOCALID_MOM, LittlerootTown_Movement_MomReturnHome0 + applymovement LOCALID_LITTLEROOT_MOM, LittlerootTown_Movement_MomReturnHome0 waitmovement 0 return LittlerootTown_EventScript_MomReturnHome1:: - applymovement LOCALID_MOM, LittlerootTown_Movement_MomReturnHome1 + applymovement LOCALID_LITTLEROOT_MOM, LittlerootTown_Movement_MomReturnHome1 waitmovement 0 return LittlerootTown_EventScript_MomReturnHomeMale2:: - applymovement LOCALID_MOM, LittlerootTown_Movement_MomReturnHomeMale2 + applymovement LOCALID_LITTLEROOT_MOM, LittlerootTown_Movement_MomReturnHomeMale2 waitmovement 0 opendoor VAR_0x8009, VAR_0x800A waitdooranim - applymovement LOCALID_MOM, LittlerootTown_Movement_MomExitThroughDoor + applymovement LOCALID_LITTLEROOT_MOM, LittlerootTown_Movement_MomExitThroughDoor waitmovement 0 - hideobjectat LOCALID_MOM, MAP_LITTLEROOT_TOWN + hideobjectat LOCALID_LITTLEROOT_MOM, MAP_LITTLEROOT_TOWN closedoor VAR_0x8009, VAR_0x800A waitdooranim return LittlerootTown_EventScript_MomReturnHomeMale3:: - applymovement LOCALID_MOM, LittlerootTown_Movement_MomReturnHomeMale3 + applymovement LOCALID_LITTLEROOT_MOM, LittlerootTown_Movement_MomReturnHomeMale3 waitmovement 0 opendoor VAR_0x8009, VAR_0x800A waitdooranim - applymovement LOCALID_MOM, LittlerootTown_Movement_MomExitThroughDoor + applymovement LOCALID_LITTLEROOT_MOM, LittlerootTown_Movement_MomExitThroughDoor waitmovement 0 - hideobjectat LOCALID_MOM, MAP_LITTLEROOT_TOWN + hideobjectat LOCALID_LITTLEROOT_MOM, MAP_LITTLEROOT_TOWN closedoor VAR_0x8009, VAR_0x800A waitdooranim return LittlerootTown_EventScript_MomReturnHomeMale4:: - applymovement LOCALID_MOM, LittlerootTown_Movement_MomReturnHomeMale4 + applymovement LOCALID_LITTLEROOT_MOM, LittlerootTown_Movement_MomReturnHomeMale4 waitmovement 0 opendoor VAR_0x8009, VAR_0x800A waitdooranim - applymovement LOCALID_MOM, LittlerootTown_Movement_MomExitThroughDoor + applymovement LOCALID_LITTLEROOT_MOM, LittlerootTown_Movement_MomExitThroughDoor waitmovement 0 - hideobjectat LOCALID_MOM, MAP_LITTLEROOT_TOWN + hideobjectat LOCALID_LITTLEROOT_MOM, MAP_LITTLEROOT_TOWN closedoor VAR_0x8009, VAR_0x800A waitdooranim return LittlerootTown_EventScript_MomReturnHomeMale5:: - applymovement LOCALID_MOM, LittlerootTown_Movement_MomReturnHomeMale5 + applymovement LOCALID_LITTLEROOT_MOM, LittlerootTown_Movement_MomReturnHomeMale5 waitmovement 0 opendoor VAR_0x8009, VAR_0x800A waitdooranim - applymovement LOCALID_MOM, LittlerootTown_Movement_MomExitThroughDoor + applymovement LOCALID_LITTLEROOT_MOM, LittlerootTown_Movement_MomExitThroughDoor waitmovement 0 - hideobjectat LOCALID_MOM, MAP_LITTLEROOT_TOWN + hideobjectat LOCALID_LITTLEROOT_MOM, MAP_LITTLEROOT_TOWN closedoor VAR_0x8009, VAR_0x800A waitdooranim return LittlerootTown_EventScript_MomReturnHomeFemale2:: - applymovement LOCALID_MOM, LittlerootTown_Movement_MomReturnHomeFemale2 + applymovement LOCALID_LITTLEROOT_MOM, LittlerootTown_Movement_MomReturnHomeFemale2 waitmovement 0 opendoor VAR_0x8009, VAR_0x800A waitdooranim - applymovement LOCALID_MOM, LittlerootTown_Movement_MomExitThroughDoor + applymovement LOCALID_LITTLEROOT_MOM, LittlerootTown_Movement_MomExitThroughDoor waitmovement 0 - hideobjectat LOCALID_MOM, MAP_LITTLEROOT_TOWN + hideobjectat LOCALID_LITTLEROOT_MOM, MAP_LITTLEROOT_TOWN closedoor VAR_0x8009, VAR_0x800A waitdooranim return LittlerootTown_EventScript_MomReturnHomeFemale3:: - applymovement LOCALID_MOM, LittlerootTown_Movement_MomReturnHomeFemale3 + applymovement LOCALID_LITTLEROOT_MOM, LittlerootTown_Movement_MomReturnHomeFemale3 waitmovement 0 opendoor VAR_0x8009, VAR_0x800A waitdooranim - applymovement LOCALID_MOM, LittlerootTown_Movement_MomExitThroughDoor + applymovement LOCALID_LITTLEROOT_MOM, LittlerootTown_Movement_MomExitThroughDoor waitmovement 0 - hideobjectat LOCALID_MOM, MAP_LITTLEROOT_TOWN + hideobjectat LOCALID_LITTLEROOT_MOM, MAP_LITTLEROOT_TOWN closedoor VAR_0x8009, VAR_0x800A waitdooranim return LittlerootTown_EventScript_MomReturnHomeFemale4:: - applymovement LOCALID_MOM, LittlerootTown_Movement_MomReturnHomeFemale4 + applymovement LOCALID_LITTLEROOT_MOM, LittlerootTown_Movement_MomReturnHomeFemale4 waitmovement 0 opendoor VAR_0x8009, VAR_0x800A waitdooranim - applymovement LOCALID_MOM, LittlerootTown_Movement_MomExitThroughDoor + applymovement LOCALID_LITTLEROOT_MOM, LittlerootTown_Movement_MomExitThroughDoor waitmovement 0 - hideobjectat LOCALID_MOM, MAP_LITTLEROOT_TOWN + hideobjectat LOCALID_LITTLEROOT_MOM, MAP_LITTLEROOT_TOWN closedoor VAR_0x8009, VAR_0x800A waitdooranim return LittlerootTown_EventScript_MomReturnHomeFemale5:: - applymovement LOCALID_MOM, LittlerootTown_Movement_MomReturnHomeFemale5 + applymovement LOCALID_LITTLEROOT_MOM, LittlerootTown_Movement_MomReturnHomeFemale5 waitmovement 0 opendoor VAR_0x8009, VAR_0x800A waitdooranim - applymovement LOCALID_MOM, LittlerootTown_Movement_MomExitThroughDoor + applymovement LOCALID_LITTLEROOT_MOM, LittlerootTown_Movement_MomExitThroughDoor waitmovement 0 - hideobjectat LOCALID_MOM, MAP_LITTLEROOT_TOWN + hideobjectat LOCALID_LITTLEROOT_MOM, MAP_LITTLEROOT_TOWN closedoor VAR_0x8009, VAR_0x800A waitdooranim return @@ -878,20 +873,20 @@ LittlerootTown_EventScript_Mom:: call_if_eq VAR_RESULT, MALE, LittlerootTown_EventScript_SetHomeDoorCoordsMale call_if_eq VAR_RESULT, FEMALE, LittlerootTown_EventScript_SetHomeDoorCoordsFemale call LittlerootTown_EventScript_GiveRunningShoes - applymovement LOCALID_MOM, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_LITTLEROOT_MOM, Common_Movement_WalkInPlaceFasterUp waitmovement 0 opendoor VAR_0x8009, VAR_0x800A waitdooranim - applymovement LOCALID_MOM, LittlerootTown_Movement_MomExitThroughDoor + applymovement LOCALID_LITTLEROOT_MOM, LittlerootTown_Movement_MomExitThroughDoor waitmovement 0 - hideobjectat LOCALID_MOM, MAP_LITTLEROOT_TOWN + hideobjectat LOCALID_LITTLEROOT_MOM, MAP_LITTLEROOT_TOWN closedoor VAR_0x8009, VAR_0x800A waitdooranim goto LittlerootTown_EventScript_SetReceivedRunningShoes end LittlerootTown_EventScript_SetReceivedRunningShoes:: - removeobject LOCALID_MOM + removeobject LOCALID_LITTLEROOT_MOM setflag FLAG_SYS_B_DASH setvar VAR_LITTLEROOT_TOWN_STATE, 4 release diff --git a/data/maps/LittlerootTown_BrendansHouse_1F/map.json b/data/maps/LittlerootTown_BrendansHouse_1F/map.json index 23b1bf28c64a..d8f2f818e109 100644 --- a/data/maps/LittlerootTown_BrendansHouse_1F/map.json +++ b/data/maps/LittlerootTown_BrendansHouse_1F/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_PLAYERS_HOUSE_1F_MOM", "graphics_id": "OBJ_EVENT_GFX_MOM", "x": 2, "y": 6, @@ -54,6 +55,7 @@ "flag": "FLAG_HIDE_LITTLEROOT_TOWN_PLAYERS_HOUSE_VIGOROTH_1" }, { + "local_id": "LOCALID_RIVALS_HOUSE_1F_MOM", "graphics_id": "OBJ_EVENT_GFX_WOMAN_4", "x": 2, "y": 7, @@ -67,6 +69,7 @@ "flag": "FLAG_HIDE_LITTLEROOT_TOWN_BRENDANS_HOUSE_RIVAL_MOM" }, { + "local_id": "LOCALID_PLAYERS_HOUSE_1F_DAD", "graphics_id": "OBJ_EVENT_GFX_NORMAN", "x": 5, "y": 6, @@ -93,6 +96,7 @@ "flag": "FLAG_HIDE_LITTLEROOT_TOWN_BRENDANS_HOUSE_RIVAL_SIBLING" }, { + "local_id": "LOCALID_RIVALS_HOUSE_1F_RIVAL", "graphics_id": "OBJ_EVENT_GFX_RIVAL_BRENDAN_NORMAL", "x": 8, "y": 8, diff --git a/data/maps/LittlerootTown_BrendansHouse_1F/scripts.inc b/data/maps/LittlerootTown_BrendansHouse_1F/scripts.inc index cce8cd59b921..3b544fdf2d63 100644 --- a/data/maps/LittlerootTown_BrendansHouse_1F/scripts.inc +++ b/data/maps/LittlerootTown_BrendansHouse_1F/scripts.inc @@ -1,7 +1,3 @@ -.set LOCALID_MOM, 1 -.set LOCALID_RIVAL_MOM, 4 -.set LOCALID_RIVAL, 7 - LittlerootTown_BrendansHouse_1F_MapScripts:: map_script MAP_SCRIPT_ON_LOAD, LittlerootTown_BrendansHouse_1F_OnLoad map_script MAP_SCRIPT_ON_TRANSITION, LittlerootTown_BrendansHouse_1F_OnTransition @@ -34,18 +30,18 @@ LittlerootTown_BrendansHouse_1F_OnTransition: end LittlerootTown_BrendansHouse_1F_EventScript_MoveMomToStairs:: - setobjectxyperm LOCALID_MOM, 8, 4 - setobjectmovementtype LOCALID_MOM, MOVEMENT_TYPE_FACE_UP + setobjectxyperm LOCALID_PLAYERS_HOUSE_1F_MOM, 8, 4 + setobjectmovementtype LOCALID_PLAYERS_HOUSE_1F_MOM, MOVEMENT_TYPE_FACE_UP return LittlerootTown_BrendansHouse_1F_EventScript_MoveMomToTV:: - setobjectxyperm LOCALID_MOM, 4, 5 - setobjectmovementtype LOCALID_MOM, MOVEMENT_TYPE_FACE_UP + setobjectxyperm LOCALID_PLAYERS_HOUSE_1F_MOM, 4, 5 + setobjectmovementtype LOCALID_PLAYERS_HOUSE_1F_MOM, MOVEMENT_TYPE_FACE_UP return LittlerootTown_BrendansHouse_1F_EventScript_MoveMomToDoor:: - setobjectxyperm LOCALID_MOM, 9, 8 - setobjectmovementtype LOCALID_MOM, MOVEMENT_TYPE_FACE_UP + setobjectxyperm LOCALID_PLAYERS_HOUSE_1F_MOM, 9, 8 + setobjectmovementtype LOCALID_PLAYERS_HOUSE_1F_MOM, MOVEMENT_TYPE_FACE_UP return @ Many of the below scripts have no gender check because they assume youre in the correct house @@ -62,8 +58,8 @@ LittlerootTown_BrendansHouse_1F_EventScript_GoUpstairsToSetClock:: lockall msgbox PlayersHouse_1F_Text_GoSetTheClock, MSGBOX_DEFAULT closemessage - applymovement OBJ_EVENT_ID_PLAYER, LittlerootTown_BrendansHouse_1F_Movement_PushTowardStairs - applymovement LOCALID_MOM, LittlerootTown_BrendansHouse_1F_Movement_PushTowardStairs + applymovement LOCALID_PLAYER, LittlerootTown_BrendansHouse_1F_Movement_PushTowardStairs + applymovement LOCALID_PLAYERS_HOUSE_1F_MOM, LittlerootTown_BrendansHouse_1F_Movement_PushTowardStairs waitmovement 0 warp MAP_LITTLEROOT_TOWN_BRENDANS_HOUSE_2F, 7, 1 waitstate @@ -76,7 +72,7 @@ LittlerootTown_BrendansHouse_1F_Movement_PushTowardStairs: LittlerootTown_BrendansHouse_1F_EventScript_EnterHouseMovingIn:: lockall - setvar VAR_0x8004, LOCALID_MOM + setvar VAR_0x8004, LOCALID_PLAYERS_HOUSE_1F_MOM setvar VAR_0x8005, MALE goto PlayersHouse_1F_EventScript_EnterHouseMovingIn end @@ -84,19 +80,19 @@ LittlerootTown_BrendansHouse_1F_EventScript_EnterHouseMovingIn:: LittlerootTown_BrendansHouse_1F_EventScript_PetalburgGymReport:: lockall setvar VAR_0x8004, MALE - setvar VAR_0x8005, LOCALID_MOM + setvar VAR_0x8005, LOCALID_PLAYERS_HOUSE_1F_MOM goto PlayersHouse_1F_EventScript_PetalburgGymReportMale end LittlerootTown_BrendansHouse_1F_EventScript_YoureNewNeighbor:: lockall playse SE_PIN - applymovement LOCALID_RIVAL_MOM, Common_Movement_ExclamationMark + applymovement LOCALID_RIVALS_HOUSE_1F_MOM, Common_Movement_ExclamationMark waitmovement 0 - applymovement LOCALID_RIVAL_MOM, Common_Movement_Delay48 + applymovement LOCALID_RIVALS_HOUSE_1F_MOM, Common_Movement_Delay48 waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft - applymovement LOCALID_RIVAL_MOM, LittlerootTown_BrendansHouse_1F_Movement_RivalMomApproach + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_RIVALS_HOUSE_1F_MOM, LittlerootTown_BrendansHouse_1F_Movement_RivalMomApproach waitmovement 0 special GetRivalSonDaughterString msgbox RivalsHouse_1F_Text_OhYoureTheNewNeighbor, MSGBOX_DEFAULT @@ -116,7 +112,7 @@ LittlerootTown_BrendansHouse_1F_Movement_RivalMomApproach: LittlerootTown_BrendansHouse_1F_EventScript_GoSeeRoom:: lockall - setvar VAR_0x8004, LOCALID_MOM + setvar VAR_0x8004, LOCALID_PLAYERS_HOUSE_1F_MOM setvar VAR_0x8005, MALE applymovement VAR_0x8004, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 @@ -144,12 +140,12 @@ LittlerootTown_BrendansHouse_1F_EventScript_MeetRival2:: LittlerootTown_BrendansHouse_1F_EventScript_MeetRival:: playse SE_EXIT delay 10 - addobject LOCALID_RIVAL + addobject LOCALID_RIVALS_HOUSE_1F_RIVAL delay 30 playse SE_PIN - applymovement LOCALID_RIVAL, Common_Movement_ExclamationMark + applymovement LOCALID_RIVALS_HOUSE_1F_RIVAL, Common_Movement_ExclamationMark waitmovement 0 - applymovement LOCALID_RIVAL, Common_Movement_Delay48 + applymovement LOCALID_RIVALS_HOUSE_1F_RIVAL, Common_Movement_Delay48 waitmovement 0 call_if_ne VAR_0x8008, 1, LittlerootTown_BrendansHouse_1F_EventScript_PlayerFaceBrendan playbgm MUS_ENCOUNTER_BRENDAN, TRUE @@ -162,7 +158,7 @@ LittlerootTown_BrendansHouse_1F_EventScript_MeetRival:: call_if_eq VAR_0x8008, 1, LittlerootTown_BrendansHouse_1F_EventScript_BrendanGoUpstairs1 call_if_eq VAR_0x8008, 2, LittlerootTown_BrendansHouse_1F_EventScript_BrendanGoUpstairs2 playse SE_EXIT - removeobject LOCALID_RIVAL + removeobject LOCALID_RIVALS_HOUSE_1F_RIVAL setflag FLAG_HIDE_LITTLEROOT_TOWN_BRENDANS_HOUSE_BRENDAN setflag FLAG_HIDE_LITTLEROOT_TOWN_BRENDANS_HOUSE_2F_POKE_BALL clearflag FLAG_HIDE_LITTLEROOT_TOWN_BRENDANS_HOUSE_RIVAL_BEDROOM @@ -175,22 +171,22 @@ LittlerootTown_BrendansHouse_1F_EventScript_MeetRival:: end LittlerootTown_BrendansHouse_1F_EventScript_PlayerFaceBrendan:: - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterDown + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterDown waitmovement 0 return LittlerootTown_BrendansHouse_1F_EventScript_BrendanApproachPlayer0:: - applymovement LOCALID_RIVAL, LittlerootTown_BrendansHouse_1F_Movement_BrendanApproachPlayer0 + applymovement LOCALID_RIVALS_HOUSE_1F_RIVAL, LittlerootTown_BrendansHouse_1F_Movement_BrendanApproachPlayer0 waitmovement 0 return LittlerootTown_BrendansHouse_1F_EventScript_BrendanApproachPlayer1:: - applymovement LOCALID_RIVAL, LittlerootTown_BrendansHouse_1F_Movement_BrendanApproachPlayer1 + applymovement LOCALID_RIVALS_HOUSE_1F_RIVAL, LittlerootTown_BrendansHouse_1F_Movement_BrendanApproachPlayer1 waitmovement 0 return LittlerootTown_BrendansHouse_1F_EventScript_BrendanApproachPlayer2:: - applymovement LOCALID_RIVAL, LittlerootTown_BrendansHouse_1F_Movement_BrendanApproachPlayer2 + applymovement LOCALID_RIVALS_HOUSE_1F_RIVAL, LittlerootTown_BrendansHouse_1F_Movement_BrendanApproachPlayer2 waitmovement 0 return @@ -221,20 +217,20 @@ LittlerootTown_BrendansHouse_1F_Movement_BrendanApproachPlayer2: step_end LittlerootTown_BrendansHouse_1F_EventScript_BrendanGoUpstairs0:: - applymovement OBJ_EVENT_ID_PLAYER, LittlerootTown_BrendansHouse_1F_Movement_PlayerWatchBrendanExit0 - applymovement LOCALID_RIVAL, LittlerootTown_BrendansHouse_1F_Movement_BrendanGoUpstairs0 + applymovement LOCALID_PLAYER, LittlerootTown_BrendansHouse_1F_Movement_PlayerWatchBrendanExit0 + applymovement LOCALID_RIVALS_HOUSE_1F_RIVAL, LittlerootTown_BrendansHouse_1F_Movement_BrendanGoUpstairs0 waitmovement 0 return LittlerootTown_BrendansHouse_1F_EventScript_BrendanGoUpstairs1:: - applymovement OBJ_EVENT_ID_PLAYER, LittlerootTown_BrendansHouse_1F_Movement_PlayerWatchBrendanExit1 - applymovement LOCALID_RIVAL, LittlerootTown_BrendansHouse_1F_Movement_BrendanGoUpstairs1 + applymovement LOCALID_PLAYER, LittlerootTown_BrendansHouse_1F_Movement_PlayerWatchBrendanExit1 + applymovement LOCALID_RIVALS_HOUSE_1F_RIVAL, LittlerootTown_BrendansHouse_1F_Movement_BrendanGoUpstairs1 waitmovement 0 return LittlerootTown_BrendansHouse_1F_EventScript_BrendanGoUpstairs2:: - applymovement OBJ_EVENT_ID_PLAYER, LittlerootTown_BrendansHouse_1F_Movement_PlayerWatchBrendanExit2 - applymovement LOCALID_RIVAL, LittlerootTown_BrendansHouse_1F_Movement_BrendanGoUpstairs2 + applymovement LOCALID_PLAYER, LittlerootTown_BrendansHouse_1F_Movement_PlayerWatchBrendanExit2 + applymovement LOCALID_RIVALS_HOUSE_1F_RIVAL, LittlerootTown_BrendansHouse_1F_Movement_BrendanGoUpstairs2 waitmovement 0 return diff --git a/data/maps/LittlerootTown_BrendansHouse_2F/map.json b/data/maps/LittlerootTown_BrendansHouse_2F/map.json index 89869459c5de..5bd46deeb90c 100644 --- a/data/maps/LittlerootTown_BrendansHouse_2F/map.json +++ b/data/maps/LittlerootTown_BrendansHouse_2F/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_RIVALS_HOUSE_2F_RIVAL", "graphics_id": "OBJ_EVENT_GFX_RIVAL_BRENDAN_NORMAL", "x": 7, "y": 1, @@ -184,6 +185,7 @@ "flag": "FLAG_DECORATION_12" }, { + "local_id": "LOCALID_PLAYERS_HOUSE_2F_MOM", "graphics_id": "OBJ_EVENT_GFX_MOM", "x": 7, "y": 1, diff --git a/data/maps/LittlerootTown_BrendansHouse_2F/scripts.inc b/data/maps/LittlerootTown_BrendansHouse_2F/scripts.inc index cd4d15519245..2832e9d79491 100644 --- a/data/maps/LittlerootTown_BrendansHouse_2F/scripts.inc +++ b/data/maps/LittlerootTown_BrendansHouse_2F/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_RIVAL, 1 - LittlerootTown_BrendansHouse_2F_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, LittlerootTown_BrendansHouse_2F_OnTransition map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, LittlerootTown_BrendansHouse_2F_OnWarp @@ -23,8 +21,8 @@ LittlerootTown_BrendansHouse_2F_EventScript_TryUpdateBrendanPos:: goto_if_eq VAR_RESULT, MALE, LittlerootTown_BrendansHouse_2F_EventScript_Ret @ Odd that the MaysHouse equivalent was used below instead goto_if_ge VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 2, LittlerootTown_MaysHouse_2F_EventScript_Ret - setobjectxyperm LOCALID_RIVAL, 0, 2 - setobjectmovementtype LOCALID_RIVAL, MOVEMENT_TYPE_FACE_UP + setobjectxyperm LOCALID_RIVALS_HOUSE_2F_RIVAL, 0, 2 + setobjectmovementtype LOCALID_RIVALS_HOUSE_2F_RIVAL, MOVEMENT_TYPE_FACE_UP return LittlerootTown_BrendansHouse_2F_EventScript_Ret:: @@ -57,13 +55,13 @@ LittlerootTown_BrendansHouse_2F_EventScript_RivalsPokeBall:: LittlerootTown_BrendansHouse_2F_EventScript_MeetBrendan:: delay 10 - addobject LOCALID_RIVAL - applymovement LOCALID_RIVAL, LittlerootTown_BrendansHouse_2F_Movement_BrendanEnters + addobject LOCALID_RIVALS_HOUSE_2F_RIVAL + applymovement LOCALID_RIVALS_HOUSE_2F_RIVAL, LittlerootTown_BrendansHouse_2F_Movement_BrendanEnters waitmovement 0 playse SE_PIN - applymovement LOCALID_RIVAL, Common_Movement_ExclamationMark + applymovement LOCALID_RIVALS_HOUSE_2F_RIVAL, Common_Movement_ExclamationMark waitmovement 0 - applymovement LOCALID_RIVAL, Common_Movement_Delay48 + applymovement LOCALID_RIVALS_HOUSE_2F_RIVAL, Common_Movement_Delay48 waitmovement 0 delay 10 playbgm MUS_ENCOUNTER_BRENDAN, TRUE @@ -81,49 +79,49 @@ LittlerootTown_BrendansHouse_2F_EventScript_MeetBrendan:: end LittlerootTown_BrendansHouse_2F_EventScript_MeetBrendanNorth:: - applymovement LOCALID_RIVAL, LittlerootTown_BrendansHouse_2F_Movement_BrendanApproachPlayerNorth + applymovement LOCALID_RIVALS_HOUSE_2F_RIVAL, LittlerootTown_BrendansHouse_2F_Movement_BrendanApproachPlayerNorth waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterRight waitmovement 0 msgbox RivalsHouse_2F_Text_BrendanWhoAreYou, MSGBOX_DEFAULT closemessage - applymovement OBJ_EVENT_ID_PLAYER, LittlerootTown_BrendansHouse_2F_Movement_PlayerWatchBrendanNorth - applymovement LOCALID_RIVAL, LittlerootTown_BrendansHouse_2F_Movement_BrendanWalkToPCNorth + applymovement LOCALID_PLAYER, LittlerootTown_BrendansHouse_2F_Movement_PlayerWatchBrendanNorth + applymovement LOCALID_RIVALS_HOUSE_2F_RIVAL, LittlerootTown_BrendansHouse_2F_Movement_BrendanWalkToPCNorth waitmovement 0 return LittlerootTown_BrendansHouse_2F_EventScript_MeetBrendanSouth:: - applymovement LOCALID_RIVAL, LittlerootTown_BrendansHouse_2F_Movement_BrendanApproachPlayerSouth + applymovement LOCALID_RIVALS_HOUSE_2F_RIVAL, LittlerootTown_BrendansHouse_2F_Movement_BrendanApproachPlayerSouth waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterRight waitmovement 0 msgbox RivalsHouse_2F_Text_BrendanWhoAreYou, MSGBOX_DEFAULT closemessage - applymovement OBJ_EVENT_ID_PLAYER, LittlerootTown_BrendansHouse_2F_Movement_PlayerWatchBrendanSouth - applymovement LOCALID_RIVAL, LittlerootTown_BrendansHouse_2F_Movement_BrendanWalkToPCSouth + applymovement LOCALID_PLAYER, LittlerootTown_BrendansHouse_2F_Movement_PlayerWatchBrendanSouth + applymovement LOCALID_RIVALS_HOUSE_2F_RIVAL, LittlerootTown_BrendansHouse_2F_Movement_BrendanWalkToPCSouth waitmovement 0 return LittlerootTown_BrendansHouse_2F_EventScript_MeetBrendanWest:: - applymovement LOCALID_RIVAL, LittlerootTown_BrendansHouse_2F_Movement_BrendanApproachPlayerWest + applymovement LOCALID_RIVALS_HOUSE_2F_RIVAL, LittlerootTown_BrendansHouse_2F_Movement_BrendanApproachPlayerWest waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterRight waitmovement 0 msgbox RivalsHouse_2F_Text_BrendanWhoAreYou, MSGBOX_DEFAULT closemessage - applymovement OBJ_EVENT_ID_PLAYER, LittlerootTown_BrendansHouse_2F_Movement_PlayerWatchBrendanWest - applymovement LOCALID_RIVAL, LittlerootTown_BrendansHouse_2F_Movement_BrendanWalkToPCWest + applymovement LOCALID_PLAYER, LittlerootTown_BrendansHouse_2F_Movement_PlayerWatchBrendanWest + applymovement LOCALID_RIVALS_HOUSE_2F_RIVAL, LittlerootTown_BrendansHouse_2F_Movement_BrendanWalkToPCWest waitmovement 0 return LittlerootTown_BrendansHouse_2F_EventScript_MeetBrendanEast:: - applymovement LOCALID_RIVAL, LittlerootTown_BrendansHouse_2F_Movement_BrendanApproachPlayerEast + applymovement LOCALID_RIVALS_HOUSE_2F_RIVAL, LittlerootTown_BrendansHouse_2F_Movement_BrendanApproachPlayerEast waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 msgbox RivalsHouse_2F_Text_BrendanWhoAreYou, MSGBOX_DEFAULT closemessage - applymovement LOCALID_RIVAL, LittlerootTown_BrendansHouse_2F_Movement_BrendanWalkToPCEast + applymovement LOCALID_RIVALS_HOUSE_2F_RIVAL, LittlerootTown_BrendansHouse_2F_Movement_BrendanWalkToPCEast waitmovement 0 return diff --git a/data/maps/LittlerootTown_MaysHouse_1F/map.json b/data/maps/LittlerootTown_MaysHouse_1F/map.json index 4e4887003f66..6fd26a9b9693 100644 --- a/data/maps/LittlerootTown_MaysHouse_1F/map.json +++ b/data/maps/LittlerootTown_MaysHouse_1F/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_PLAYERS_HOUSE_1F_MOM", "graphics_id": "OBJ_EVENT_GFX_MOM", "x": 8, "y": 6, @@ -54,6 +55,7 @@ "flag": "FLAG_HIDE_LITTLEROOT_TOWN_PLAYERS_HOUSE_VIGOROTH_2" }, { + "local_id": "LOCALID_RIVALS_HOUSE_1F_MOM", "graphics_id": "OBJ_EVENT_GFX_WOMAN_4", "x": 8, "y": 7, @@ -67,6 +69,7 @@ "flag": "FLAG_HIDE_LITTLEROOT_TOWN_MAYS_HOUSE_RIVAL_MOM" }, { + "local_id": "LOCALID_PLAYERS_HOUSE_1F_DAD", "graphics_id": "OBJ_EVENT_GFX_NORMAN", "x": 5, "y": 6, @@ -93,6 +96,7 @@ "flag": "FLAG_HIDE_LITTLEROOT_TOWN_MAYS_HOUSE_RIVAL_SIBLING" }, { + "local_id": "LOCALID_RIVALS_HOUSE_1F_RIVAL", "graphics_id": "OBJ_EVENT_GFX_RIVAL_MAY_NORMAL", "x": 2, "y": 8, diff --git a/data/maps/LittlerootTown_MaysHouse_1F/scripts.inc b/data/maps/LittlerootTown_MaysHouse_1F/scripts.inc index b4c4775c334a..6a7b6644b9e9 100644 --- a/data/maps/LittlerootTown_MaysHouse_1F/scripts.inc +++ b/data/maps/LittlerootTown_MaysHouse_1F/scripts.inc @@ -1,7 +1,3 @@ -.set LOCALID_MOM, 1 -.set LOCALID_RIVAL_MOM, 4 -.set LOCALID_RIVAL, 7 - LittlerootTown_MaysHouse_1F_MapScripts:: map_script MAP_SCRIPT_ON_LOAD, LittlerootTown_MaysHouse_1F_OnLoad map_script MAP_SCRIPT_ON_TRANSITION, LittlerootTown_MaysHouse_1F_OnTransition @@ -34,18 +30,18 @@ LittlerootTown_MaysHouse_1F_OnTransition: end LittlerootTown_MaysHouse_1F_EventScript_MoveMomToStairs:: - setobjectxyperm LOCALID_MOM, 2, 4 - setobjectmovementtype LOCALID_MOM, MOVEMENT_TYPE_FACE_UP + setobjectxyperm LOCALID_PLAYERS_HOUSE_1F_MOM, 2, 4 + setobjectmovementtype LOCALID_PLAYERS_HOUSE_1F_MOM, MOVEMENT_TYPE_FACE_UP return LittlerootTown_MaysHouse_1F_EventScript_MoveMomToTV:: - setobjectxyperm LOCALID_MOM, 6, 5 - setobjectmovementtype LOCALID_MOM, MOVEMENT_TYPE_FACE_UP + setobjectxyperm LOCALID_PLAYERS_HOUSE_1F_MOM, 6, 5 + setobjectmovementtype LOCALID_PLAYERS_HOUSE_1F_MOM, MOVEMENT_TYPE_FACE_UP return LittlerootTown_MaysHouse_1F_EventScript_MoveMomToDoor:: - setobjectxyperm LOCALID_MOM, 1, 8 - setobjectmovementtype LOCALID_MOM, MOVEMENT_TYPE_FACE_UP + setobjectxyperm LOCALID_PLAYERS_HOUSE_1F_MOM, 1, 8 + setobjectmovementtype LOCALID_PLAYERS_HOUSE_1F_MOM, MOVEMENT_TYPE_FACE_UP return @ Many of the below scripts have no gender check because they assume youre in the correct house @@ -61,8 +57,8 @@ LittlerootTown_MaysHouse_1F_EventScript_GoUpstairsToSetClock:: lockall msgbox PlayersHouse_1F_Text_GoSetTheClock, MSGBOX_DEFAULT closemessage - applymovement OBJ_EVENT_ID_PLAYER, LittlerootTown_MaysHouse_1F_Movement_PushTowardStairs - applymovement LOCALID_MOM, LittlerootTown_MaysHouse_1F_Movement_PushTowardStairs + applymovement LOCALID_PLAYER, LittlerootTown_MaysHouse_1F_Movement_PushTowardStairs + applymovement LOCALID_PLAYERS_HOUSE_1F_MOM, LittlerootTown_MaysHouse_1F_Movement_PushTowardStairs waitmovement 0 warp MAP_LITTLEROOT_TOWN_MAYS_HOUSE_2F, 1, 1 waitstate @@ -75,7 +71,7 @@ LittlerootTown_MaysHouse_1F_Movement_PushTowardStairs: LittlerootTown_MaysHouse_1F_EventScript_EnterHouseMovingIn:: lockall - setvar VAR_0x8004, LOCALID_MOM + setvar VAR_0x8004, LOCALID_PLAYERS_HOUSE_1F_MOM setvar VAR_0x8005, FEMALE goto PlayersHouse_1F_EventScript_EnterHouseMovingIn end @@ -83,19 +79,19 @@ LittlerootTown_MaysHouse_1F_EventScript_EnterHouseMovingIn:: LittlerootTown_MaysHouse_1F_EventScript_PetalburgGymReport:: lockall setvar VAR_0x8004, FEMALE - setvar VAR_0x8005, LOCALID_MOM + setvar VAR_0x8005, LOCALID_PLAYERS_HOUSE_1F_MOM goto PlayersHouse_1F_EventScript_PetalburgGymReportFemale end LittlerootTown_MaysHouse_1F_EventScript_YoureNewNeighbor:: lockall playse SE_PIN - applymovement LOCALID_RIVAL_MOM, Common_Movement_ExclamationMark + applymovement LOCALID_RIVALS_HOUSE_1F_MOM, Common_Movement_ExclamationMark waitmovement 0 - applymovement LOCALID_RIVAL_MOM, Common_Movement_Delay48 + applymovement LOCALID_RIVALS_HOUSE_1F_MOM, Common_Movement_Delay48 waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterRight - applymovement LOCALID_RIVAL_MOM, LittlerootTown_MaysHouse_1F_Movement_RivalMomApproach + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_RIVALS_HOUSE_1F_MOM, LittlerootTown_MaysHouse_1F_Movement_RivalMomApproach waitmovement 0 special GetRivalSonDaughterString msgbox RivalsHouse_1F_Text_OhYoureTheNewNeighbor, MSGBOX_DEFAULT @@ -149,7 +145,7 @@ RivalsHouse_1F_EventScript_RivalSibling:: LittlerootTown_MaysHouse_1F_EventScript_GoSeeRoom:: lockall - setvar VAR_0x8004, LOCALID_MOM + setvar VAR_0x8004, LOCALID_PLAYERS_HOUSE_1F_MOM setvar VAR_0x8005, FEMALE applymovement VAR_0x8004, Common_Movement_WalkInPlaceFasterRight waitmovement 0 @@ -177,12 +173,12 @@ LittlerootTown_MaysHouse_1F_EventScript_MeetRival2:: LittlerootTown_MaysHouse_1F_EventScript_MeetRival:: playse SE_EXIT delay 10 - addobject LOCALID_RIVAL + addobject LOCALID_RIVALS_HOUSE_1F_RIVAL delay 30 playse SE_PIN - applymovement LOCALID_RIVAL, Common_Movement_ExclamationMark + applymovement LOCALID_RIVALS_HOUSE_1F_RIVAL, Common_Movement_ExclamationMark waitmovement 0 - applymovement LOCALID_RIVAL, Common_Movement_Delay48 + applymovement LOCALID_RIVALS_HOUSE_1F_RIVAL, Common_Movement_Delay48 waitmovement 0 call_if_ne VAR_0x8008, 1, LittlerootTown_MaysHouse_1F_EventScript_PlayerFaceMay playbgm MUS_ENCOUNTER_MAY, TRUE @@ -195,7 +191,7 @@ LittlerootTown_MaysHouse_1F_EventScript_MeetRival:: call_if_eq VAR_0x8008, 1, LittlerootTown_MaysHouse_1F_EventScript_MayGoUpstairs1 call_if_eq VAR_0x8008, 2, LittlerootTown_MaysHouse_1F_EventScript_MayGoUpstairs2 playse SE_EXIT - removeobject LOCALID_RIVAL + removeobject LOCALID_RIVALS_HOUSE_1F_RIVAL setflag FLAG_HIDE_LITTLEROOT_TOWN_MAYS_HOUSE_MAY setflag FLAG_HIDE_LITTLEROOT_TOWN_MAYS_HOUSE_2F_POKE_BALL clearflag FLAG_HIDE_LITTLEROOT_TOWN_MAYS_HOUSE_RIVAL_BEDROOM @@ -208,22 +204,22 @@ LittlerootTown_MaysHouse_1F_EventScript_MeetRival:: end LittlerootTown_MaysHouse_1F_EventScript_PlayerFaceMay:: - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterDown + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterDown waitmovement 0 return LittlerootTown_MaysHouse_1F_EventScript_MayApproachPlayer0:: - applymovement LOCALID_RIVAL, LittlerootTown_MaysHouse_1F_Movement_MayApproachPlayer0 + applymovement LOCALID_RIVALS_HOUSE_1F_RIVAL, LittlerootTown_MaysHouse_1F_Movement_MayApproachPlayer0 waitmovement 0 return LittlerootTown_MaysHouse_1F_EventScript_MayApproachPlayer1:: - applymovement LOCALID_RIVAL, LittlerootTown_MaysHouse_1F_Movement_MayApproachPlayer1 + applymovement LOCALID_RIVALS_HOUSE_1F_RIVAL, LittlerootTown_MaysHouse_1F_Movement_MayApproachPlayer1 waitmovement 0 return LittlerootTown_MaysHouse_1F_EventScript_MayApproachPlayer2:: - applymovement LOCALID_RIVAL, LittlerootTown_MaysHouse_1F_Movement_MayApproachPlayer2 + applymovement LOCALID_RIVALS_HOUSE_1F_RIVAL, LittlerootTown_MaysHouse_1F_Movement_MayApproachPlayer2 waitmovement 0 return @@ -254,20 +250,20 @@ LittlerootTown_MaysHouse_1F_Movement_MayApproachPlayer2: step_end LittlerootTown_MaysHouse_1F_EventScript_MayGoUpstairs0:: - applymovement OBJ_EVENT_ID_PLAYER, LittlerootTown_MaysHouse_1F_Movement_PlayerWatchMayExit0 - applymovement LOCALID_RIVAL, LittlerootTown_MaysHouse_1F_Movement_MayGoUpstairs0 + applymovement LOCALID_PLAYER, LittlerootTown_MaysHouse_1F_Movement_PlayerWatchMayExit0 + applymovement LOCALID_RIVALS_HOUSE_1F_RIVAL, LittlerootTown_MaysHouse_1F_Movement_MayGoUpstairs0 waitmovement 0 return LittlerootTown_MaysHouse_1F_EventScript_MayGoUpstairs1:: - applymovement OBJ_EVENT_ID_PLAYER, LittlerootTown_MaysHouse_1F_Movement_PlayerWatchMayExit1 - applymovement LOCALID_RIVAL, LittlerootTown_MaysHouse_1F_Movement_MayGoUpstairs1 + applymovement LOCALID_PLAYER, LittlerootTown_MaysHouse_1F_Movement_PlayerWatchMayExit1 + applymovement LOCALID_RIVALS_HOUSE_1F_RIVAL, LittlerootTown_MaysHouse_1F_Movement_MayGoUpstairs1 waitmovement 0 return LittlerootTown_MaysHouse_1F_EventScript_MayGoUpstairs2:: - applymovement OBJ_EVENT_ID_PLAYER, LittlerootTown_MaysHouse_1F_Movement_PlayerWatchMayExit2 - applymovement LOCALID_RIVAL, LittlerootTown_MaysHouse_1F_Movement_MayGoUpstairs2 + applymovement LOCALID_PLAYER, LittlerootTown_MaysHouse_1F_Movement_PlayerWatchMayExit2 + applymovement LOCALID_RIVALS_HOUSE_1F_RIVAL, LittlerootTown_MaysHouse_1F_Movement_MayGoUpstairs2 waitmovement 0 return diff --git a/data/maps/LittlerootTown_MaysHouse_2F/map.json b/data/maps/LittlerootTown_MaysHouse_2F/map.json index b852fc04001d..02d5ab06dbd6 100644 --- a/data/maps/LittlerootTown_MaysHouse_2F/map.json +++ b/data/maps/LittlerootTown_MaysHouse_2F/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_RIVALS_HOUSE_2F_RIVAL", "graphics_id": "OBJ_EVENT_GFX_RIVAL_MAY_NORMAL", "x": 1, "y": 1, @@ -184,6 +185,7 @@ "flag": "FLAG_DECORATION_12" }, { + "local_id": "LOCALID_PLAYERS_HOUSE_2F_MOM", "graphics_id": "OBJ_EVENT_GFX_MOM", "x": 1, "y": 1, diff --git a/data/maps/LittlerootTown_MaysHouse_2F/scripts.inc b/data/maps/LittlerootTown_MaysHouse_2F/scripts.inc index ef8e83bf7e9e..9aa76dc2b421 100644 --- a/data/maps/LittlerootTown_MaysHouse_2F/scripts.inc +++ b/data/maps/LittlerootTown_MaysHouse_2F/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_RIVAL, 1 - LittlerootTown_MaysHouse_2F_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, LittlerootTown_MaysHouse_2F_OnTransition map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, LittlerootTown_MaysHouse_2F_OnWarp @@ -22,8 +20,8 @@ LittlerootTown_MaysHouse_2F_EventScript_TryUpdateMayPos:: checkplayergender goto_if_eq VAR_RESULT, FEMALE, LittlerootTown_MaysHouse_2F_EventScript_Ret goto_if_ge VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 2, LittlerootTown_MaysHouse_2F_EventScript_Ret - setobjectxyperm LOCALID_RIVAL, 8, 2 - setobjectmovementtype LOCALID_RIVAL, MOVEMENT_TYPE_FACE_UP + setobjectxyperm LOCALID_RIVALS_HOUSE_2F_RIVAL, 8, 2 + setobjectmovementtype LOCALID_RIVALS_HOUSE_2F_RIVAL, MOVEMENT_TYPE_FACE_UP return LittlerootTown_MaysHouse_2F_EventScript_Ret:: @@ -56,13 +54,13 @@ LittlerootTown_MaysHouse_2F_EventScript_RivalsPokeBall:: LittlerootTown_MaysHouse_2F_EventScript_MeetMay:: delay 10 - addobject LOCALID_RIVAL - applymovement LOCALID_RIVAL, LittlerootTown_MaysHouse_2F_Movement_MayEnters + addobject LOCALID_RIVALS_HOUSE_2F_RIVAL + applymovement LOCALID_RIVALS_HOUSE_2F_RIVAL, LittlerootTown_MaysHouse_2F_Movement_MayEnters waitmovement 0 playse SE_PIN - applymovement LOCALID_RIVAL, Common_Movement_ExclamationMark + applymovement LOCALID_RIVALS_HOUSE_2F_RIVAL, Common_Movement_ExclamationMark waitmovement 0 - applymovement LOCALID_RIVAL, Common_Movement_Delay48 + applymovement LOCALID_RIVALS_HOUSE_2F_RIVAL, Common_Movement_Delay48 waitmovement 0 delay 10 playbgm MUS_ENCOUNTER_MAY, TRUE @@ -80,49 +78,49 @@ LittlerootTown_MaysHouse_2F_EventScript_MeetMay:: end LittlerootTown_MaysHouse_2F_EventScript_MeetMayNorth:: - applymovement LOCALID_RIVAL, LittlerootTown_MaysHouse_2F_Movement_MayApproachPlayerNorth + applymovement LOCALID_RIVALS_HOUSE_2F_RIVAL, LittlerootTown_MaysHouse_2F_Movement_MayApproachPlayerNorth waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 msgbox RivalsHouse_2F_Text_MayWhoAreYou, MSGBOX_DEFAULT closemessage - applymovement OBJ_EVENT_ID_PLAYER, LittlerootTown_MaysHouse_2F_Movement_PlayerWatchMayNorth - applymovement LOCALID_RIVAL, LittlerootTown_MaysHouse_2F_Movement_MayWalkToPCNorth + applymovement LOCALID_PLAYER, LittlerootTown_MaysHouse_2F_Movement_PlayerWatchMayNorth + applymovement LOCALID_RIVALS_HOUSE_2F_RIVAL, LittlerootTown_MaysHouse_2F_Movement_MayWalkToPCNorth waitmovement 0 return LittlerootTown_MaysHouse_2F_EventScript_MeetMaySouth:: - applymovement LOCALID_RIVAL, LittlerootTown_MaysHouse_2F_Movement_MayApproachPlayerSouth + applymovement LOCALID_RIVALS_HOUSE_2F_RIVAL, LittlerootTown_MaysHouse_2F_Movement_MayApproachPlayerSouth waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 msgbox RivalsHouse_2F_Text_MayWhoAreYou, MSGBOX_DEFAULT closemessage - applymovement OBJ_EVENT_ID_PLAYER, LittlerootTown_MaysHouse_2F_Movement_PlayerWatchMaySouth - applymovement LOCALID_RIVAL, LittlerootTown_MaysHouse_2F_Movement_MayWalkToPCSouth + applymovement LOCALID_PLAYER, LittlerootTown_MaysHouse_2F_Movement_PlayerWatchMaySouth + applymovement LOCALID_RIVALS_HOUSE_2F_RIVAL, LittlerootTown_MaysHouse_2F_Movement_MayWalkToPCSouth waitmovement 0 return LittlerootTown_MaysHouse_2F_EventScript_MeetMayWest:: - applymovement LOCALID_RIVAL, LittlerootTown_MaysHouse_2F_Movement_MayApproachPlayerWest + applymovement LOCALID_RIVALS_HOUSE_2F_RIVAL, LittlerootTown_MaysHouse_2F_Movement_MayApproachPlayerWest waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 msgbox RivalsHouse_2F_Text_MayWhoAreYou, MSGBOX_DEFAULT closemessage - applymovement LOCALID_RIVAL, LittlerootTown_MaysHouse_2F_Movement_MayWalkToPCWest + applymovement LOCALID_RIVALS_HOUSE_2F_RIVAL, LittlerootTown_MaysHouse_2F_Movement_MayWalkToPCWest waitmovement 0 return LittlerootTown_MaysHouse_2F_EventScript_MeetMayEast:: - applymovement LOCALID_RIVAL, LittlerootTown_MaysHouse_2F_Movement_MayApproachPlayerEast + applymovement LOCALID_RIVALS_HOUSE_2F_RIVAL, LittlerootTown_MaysHouse_2F_Movement_MayApproachPlayerEast waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 msgbox RivalsHouse_2F_Text_MayWhoAreYou, MSGBOX_DEFAULT closemessage - applymovement OBJ_EVENT_ID_PLAYER, LittlerootTown_MaysHouse_2F_Movement_PlayerWatchMayEast - applymovement LOCALID_RIVAL, LittlerootTown_MaysHouse_2F_Movement_MayWalkToPCEast + applymovement LOCALID_PLAYER, LittlerootTown_MaysHouse_2F_Movement_PlayerWatchMayEast + applymovement LOCALID_RIVALS_HOUSE_2F_RIVAL, LittlerootTown_MaysHouse_2F_Movement_MayWalkToPCEast waitmovement 0 return diff --git a/data/maps/LittlerootTown_ProfessorBirchsLab/map.json b/data/maps/LittlerootTown_ProfessorBirchsLab/map.json index d97c026bdab9..a701b4522d6e 100644 --- a/data/maps/LittlerootTown_ProfessorBirchsLab/map.json +++ b/data/maps/LittlerootTown_ProfessorBirchsLab/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_BIRCHS_LAB_AIDE", "graphics_id": "OBJ_EVENT_GFX_SCIENTIST_1", "x": 9, "y": 8, @@ -28,6 +29,7 @@ "flag": "0" }, { + "local_id": "LOCALID_BIRCHS_LAB_BIRCH", "graphics_id": "OBJ_EVENT_GFX_PROF_BIRCH", "x": 6, "y": 4, @@ -41,6 +43,7 @@ "flag": "FLAG_HIDE_LITTLEROOT_TOWN_BIRCHS_LAB_BIRCH" }, { + "local_id": "LOCALID_BIRCHS_LAB_RIVAL", "graphics_id": "OBJ_EVENT_GFX_VAR_0", "x": 7, "y": 4, @@ -54,6 +57,7 @@ "flag": "FLAG_HIDE_LITTLEROOT_TOWN_BIRCHS_LAB_RIVAL" }, { + "local_id": "LOCALID_BIRCHS_LAB_CYNDAQUIL_BALL", "graphics_id": "OBJ_EVENT_GFX_ITEM_BALL", "x": 6, "y": 8, @@ -67,6 +71,7 @@ "flag": "FLAG_HIDE_LITTLEROOT_TOWN_BIRCHS_LAB_POKEBALL_CYNDAQUIL" }, { + "local_id": "LOCALID_BIRCHS_LAB_TOTODILE_BALL", "graphics_id": "OBJ_EVENT_GFX_ITEM_BALL", "x": 6, "y": 8, @@ -80,6 +85,7 @@ "flag": "FLAG_HIDE_LITTLEROOT_TOWN_BIRCHS_LAB_POKEBALL_TOTODILE" }, { + "local_id": "LOCALID_BIRCHS_LAB_CHIKORITA_BALL", "graphics_id": "OBJ_EVENT_GFX_ITEM_BALL", "x": 6, "y": 8, diff --git a/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc b/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc index 0c8a468ab04e..76fda0f323f0 100644 --- a/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc +++ b/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc @@ -1,10 +1,3 @@ -.set LOCALID_AIDE, 1 -.set LOCALID_BIRCH, 2 -.set LOCALID_RIVAL, 3 -.set LOCALID_BALL_CYNDAQUIL, 4 -.set LOCALID_BALL_TOTODILE, 5 -.set LOCALID_BALL_CHIKORITA, 6 - LittlerootTown_ProfessorBirchsLab_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, LittlerootTown_ProfessorBirchsLab_OnTransition map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, LittlerootTown_ProfessorBirchsLab_OnWarp @@ -37,8 +30,8 @@ LittlerootTown_ProfessorBirchsLab_OnTransition: LittlerootTown_ProfessorBirchsLab_EventScript_CheckReadyForJohtoStarter:: specialvar VAR_RESULT, HasAllHoennMons goto_if_eq VAR_RESULT, TRUE, LittlerootTown_ProfessorBirchsLab_EventScript_SetReadyForJohtoStarter - setobjectmovementtype LOCALID_RIVAL, MOVEMENT_TYPE_WANDER_UP_AND_DOWN - setobjectxyperm LOCALID_RIVAL, 5, 10 + setobjectmovementtype LOCALID_BIRCHS_LAB_RIVAL, MOVEMENT_TYPE_WANDER_UP_AND_DOWN + setobjectxyperm LOCALID_BIRCHS_LAB_RIVAL, 5, 10 end LittlerootTown_ProfessorBirchsLab_EventScript_SetReadyForJohtoStarter:: @@ -51,8 +44,8 @@ LittlerootTown_ProfessorBirchsLab_EventScript_SetJohtoStarterLayout:: LittlerootTown_ProfessorBirchsLab_EventScript_SetAfterJohtoStarterLayout:: setmaplayoutindex LAYOUT_LITTLEROOT_TOWN_PROFESSOR_BIRCHS_LAB_WITH_TABLE - setobjectmovementtype LOCALID_RIVAL, MOVEMENT_TYPE_WANDER_UP_AND_DOWN - setobjectxyperm LOCALID_RIVAL, 5, 10 + setobjectmovementtype LOCALID_BIRCHS_LAB_RIVAL, MOVEMENT_TYPE_WANDER_UP_AND_DOWN + setobjectxyperm LOCALID_BIRCHS_LAB_RIVAL, 5, 10 end LittlerootTown_ProfessorBirchsLab_OnWarp: @@ -66,40 +59,40 @@ LittlerootTown_ProfessorBirchsLab_OnWarp: .2byte 0 LittlerootTown_ProfessorBirchsLab_EventScript_SetPlayerPosForReceiveStarter:: - turnobject OBJ_EVENT_ID_PLAYER, DIR_NORTH + turnobject LOCALID_PLAYER, DIR_NORTH end LittlerootTown_ProfessorBirchsLab_EventScript_SetObjectPosForDexUpgrade:: - turnobject OBJ_EVENT_ID_PLAYER, DIR_NORTH - addobject LOCALID_BIRCH - addobject LOCALID_RIVAL - turnobject LOCALID_RIVAL, DIR_NORTH - setobjectxy LOCALID_RIVAL, 5, 5 - turnobject LOCALID_BIRCH, DIR_SOUTH - setobjectxy LOCALID_BIRCH, 6, 4 - turnobject LOCALID_AIDE, DIR_EAST - setobjectxy LOCALID_AIDE, 10, 10 + turnobject LOCALID_PLAYER, DIR_NORTH + addobject LOCALID_BIRCHS_LAB_BIRCH + addobject LOCALID_BIRCHS_LAB_RIVAL + turnobject LOCALID_BIRCHS_LAB_RIVAL, DIR_NORTH + setobjectxy LOCALID_BIRCHS_LAB_RIVAL, 5, 5 + turnobject LOCALID_BIRCHS_LAB_BIRCH, DIR_SOUTH + setobjectxy LOCALID_BIRCHS_LAB_BIRCH, 6, 4 + turnobject LOCALID_BIRCHS_LAB_AIDE, DIR_EAST + setobjectxy LOCALID_BIRCHS_LAB_AIDE, 10, 10 end LittlerootTown_ProfessorBirchsLab_EventScript_AddRivalObject:: - addobject LOCALID_RIVAL + addobject LOCALID_BIRCHS_LAB_RIVAL end LittlerootTown_ProfessorBirchsLab_EventScript_SetObjectPosForJohtoStarters:: - addobject LOCALID_BALL_CYNDAQUIL - addobject LOCALID_BALL_TOTODILE - addobject LOCALID_BALL_CHIKORITA - addobject LOCALID_RIVAL - turnobject LOCALID_BALL_CYNDAQUIL, DIR_SOUTH - setobjectxy LOCALID_BALL_CYNDAQUIL, 8, 4 - turnobject LOCALID_BALL_TOTODILE, DIR_SOUTH - setobjectxy LOCALID_BALL_TOTODILE, 9, 4 - turnobject LOCALID_BALL_CHIKORITA, DIR_SOUTH - setobjectxy LOCALID_BALL_CHIKORITA, 10, 4 - turnobject LOCALID_BIRCH, DIR_SOUTH - setobjectxy LOCALID_BIRCH, 6, 4 - turnobject LOCALID_RIVAL, DIR_EAST - setobjectxy LOCALID_RIVAL, 5, 5 + addobject LOCALID_BIRCHS_LAB_CYNDAQUIL_BALL + addobject LOCALID_BIRCHS_LAB_TOTODILE_BALL + addobject LOCALID_BIRCHS_LAB_CHIKORITA_BALL + addobject LOCALID_BIRCHS_LAB_RIVAL + turnobject LOCALID_BIRCHS_LAB_CYNDAQUIL_BALL, DIR_SOUTH + setobjectxy LOCALID_BIRCHS_LAB_CYNDAQUIL_BALL, 8, 4 + turnobject LOCALID_BIRCHS_LAB_TOTODILE_BALL, DIR_SOUTH + setobjectxy LOCALID_BIRCHS_LAB_TOTODILE_BALL, 9, 4 + turnobject LOCALID_BIRCHS_LAB_CHIKORITA_BALL, DIR_SOUTH + setobjectxy LOCALID_BIRCHS_LAB_CHIKORITA_BALL, 10, 4 + turnobject LOCALID_BIRCHS_LAB_BIRCH, DIR_SOUTH + setobjectxy LOCALID_BIRCHS_LAB_BIRCH, 6, 4 + turnobject LOCALID_BIRCHS_LAB_RIVAL, DIR_EAST + setobjectxy LOCALID_BIRCHS_LAB_RIVAL, 5, 5 end LittlerootTown_ProfessorBirchsLab_OnFrame: @@ -150,7 +143,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_DeclineSeeingRival:: LittlerootTown_ProfessorBirchsLab_EventScript_GivePokedexEvent:: lockall - applymovement OBJ_EVENT_ID_PLAYER, LittlerootTown_ProfessorBirchsLab_Movement_PlayerEnterLabForPokedex + applymovement LOCALID_PLAYER, LittlerootTown_ProfessorBirchsLab_Movement_PlayerEnterLabForPokedex waitmovement 0 goto LittlerootTown_ProfessorBirchsLab_EventScript_GivePokedex end @@ -170,7 +163,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_UpgradeToNationalDex:: delay 30 msgbox LittlerootTown_ProfessorBirchsLab_Text_OtherRegionsUpgradeToNational, MSGBOX_DEFAULT closemessage - applymovement LOCALID_BIRCH, LittlerootTown_ProfessorBirchsLab_Movement_BirchRetrievePokedexes + applymovement LOCALID_BIRCHS_LAB_BIRCH, LittlerootTown_ProfessorBirchsLab_Movement_BirchRetrievePokedexes waitmovement 0 delay 20 playse SE_CLICK @@ -181,8 +174,8 @@ LittlerootTown_ProfessorBirchsLab_EventScript_UpgradeToNationalDex:: delay 10 playse SE_CLICK delay 20 - applymovement LOCALID_RIVAL, Common_Movement_WalkInPlaceFasterRight - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_BIRCHS_LAB_RIVAL, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 checkplayergender call_if_eq VAR_RESULT, MALE, LittlerootTown_ProfessorBirchsLab_EventScript_MayUpgradeComment @@ -190,10 +183,10 @@ LittlerootTown_ProfessorBirchsLab_EventScript_UpgradeToNationalDex:: playse SE_PC_ON waitse delay 20 - applymovement LOCALID_BIRCH, LittlerootTown_ProfessorBirchsLab_Movement_BirchReturnPokedex + applymovement LOCALID_BIRCHS_LAB_BIRCH, LittlerootTown_ProfessorBirchsLab_Movement_BirchReturnPokedex waitmovement 0 - applymovement LOCALID_RIVAL, Common_Movement_WalkInPlaceFasterUp - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_BIRCHS_LAB_RIVAL, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 msgbox LittlerootTown_ProfessorBirchsLab_Text_OkayAllDone, MSGBOX_DEFAULT playfanfare MUS_OBTAIN_ITEM @@ -256,7 +249,7 @@ LittlerootTown_ProfessorBirchsLab_Movement_BirchReturnPokedex: LittlerootTown_ProfessorBirchsLab_EventScript_ChooseJohtoStarter:: lockall - applymovement OBJ_EVENT_ID_PLAYER, LittlerootTown_ProfessorBirchsLab_Movement_PlayerEnterLabForJohtoStarter + applymovement LOCALID_PLAYER, LittlerootTown_ProfessorBirchsLab_Movement_PlayerEnterLabForJohtoStarter waitmovement 0 msgbox LittlerootTown_ProfessorBirchsLab_Text_CompletedDexChoosePokemon, MSGBOX_DEFAULT setvar VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 5 @@ -296,7 +289,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_AideReceivedStarter:: LittlerootTown_ProfessorBirchsLab_EventScript_Cyndaquil:: release goto_if_ge VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 6, LittlerootTown_ProfessorBirchsLab_EventScript_AlreadyChoseJohtoStarter - applymovement LOCALID_BIRCH, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_BIRCHS_LAB_BIRCH, Common_Movement_WalkInPlaceFasterRight waitmovement 0 showmonpic SPECIES_CYNDAQUIL, 10, 3 msgbox LittlerootTown_ProfessorBirchsLab_Text_YoullTakeCyndaquil, MSGBOX_YESNO @@ -307,7 +300,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_Cyndaquil:: LittlerootTown_ProfessorBirchsLab_EventScript_Totodile:: release goto_if_ge VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 6, LittlerootTown_ProfessorBirchsLab_EventScript_AlreadyChoseJohtoStarter - applymovement LOCALID_BIRCH, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_BIRCHS_LAB_BIRCH, Common_Movement_WalkInPlaceFasterRight waitmovement 0 showmonpic SPECIES_TOTODILE, 10, 3 msgbox LittlerootTown_ProfessorBirchsLab_Text_YoullTakeTotodile, MSGBOX_YESNO @@ -318,7 +311,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_Totodile:: LittlerootTown_ProfessorBirchsLab_EventScript_Chikorita:: release goto_if_ge VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 6, LittlerootTown_ProfessorBirchsLab_EventScript_AlreadyChoseJohtoStarter - applymovement LOCALID_BIRCH, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_BIRCHS_LAB_BIRCH, Common_Movement_WalkInPlaceFasterRight waitmovement 0 showmonpic SPECIES_CHIKORITA, 10, 3 msgbox LittlerootTown_ProfessorBirchsLab_Text_YoullTakeChikorita, MSGBOX_YESNO @@ -349,7 +342,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_GiveCyndaquil:: LittlerootTown_ProfessorBirchsLab_EventScript_SendCyndaquilToParty:: call LittlerootTown_ProfessorBirchsLab_EventScript_ReceivedJohtoStarter - removeobject LOCALID_BALL_CYNDAQUIL + removeobject LOCALID_BIRCHS_LAB_CYNDAQUIL_BALL msgbox gText_NicknameThisPokemon, MSGBOX_YESNO goto_if_eq VAR_RESULT, NO, LittlerootTown_ProfessorBirchsLab_EventScript_ReceivedCyndaquil call Common_EventScript_GetGiftMonPartySlot @@ -359,7 +352,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_SendCyndaquilToParty:: LittlerootTown_ProfessorBirchsLab_EventScript_SendCyndaquilToPC:: call LittlerootTown_ProfessorBirchsLab_EventScript_ReceivedJohtoStarter - removeobject LOCALID_BALL_CYNDAQUIL + removeobject LOCALID_BIRCHS_LAB_CYNDAQUIL_BALL msgbox gText_NicknameThisPokemon, MSGBOX_YESNO goto_if_eq VAR_RESULT, NO, LittlerootTown_ProfessorBirchsLab_EventScript_CyndaquilTransferredToPC call Common_EventScript_NameReceivedBoxMon @@ -390,7 +383,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_GiveTotodile:: LittlerootTown_ProfessorBirchsLab_EventScript_SendTotodileToParty:: call LittlerootTown_ProfessorBirchsLab_EventScript_ReceivedJohtoStarter - removeobject LOCALID_BALL_TOTODILE + removeobject LOCALID_BIRCHS_LAB_TOTODILE_BALL msgbox gText_NicknameThisPokemon, MSGBOX_YESNO goto_if_eq VAR_RESULT, NO, LittlerootTown_ProfessorBirchsLab_EventScript_ReceivedTotodile call Common_EventScript_GetGiftMonPartySlot @@ -400,7 +393,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_SendTotodileToParty:: LittlerootTown_ProfessorBirchsLab_EventScript_SendTotodileToPC:: call LittlerootTown_ProfessorBirchsLab_EventScript_ReceivedJohtoStarter - removeobject LOCALID_BALL_TOTODILE + removeobject LOCALID_BIRCHS_LAB_TOTODILE_BALL msgbox gText_NicknameThisPokemon, MSGBOX_YESNO goto_if_eq VAR_RESULT, NO, LittlerootTown_ProfessorBirchsLab_EventScript_TotodileTransferredToPC call Common_EventScript_NameReceivedBoxMon @@ -431,7 +424,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_GiveChikorita:: LittlerootTown_ProfessorBirchsLab_EventScript_SendChikoritaToParty:: call LittlerootTown_ProfessorBirchsLab_EventScript_ReceivedJohtoStarter - removeobject LOCALID_BALL_CHIKORITA + removeobject LOCALID_BIRCHS_LAB_CHIKORITA_BALL msgbox gText_NicknameThisPokemon, MSGBOX_YESNO goto_if_eq VAR_RESULT, NO, LittlerootTown_ProfessorBirchsLab_EventScript_ReceivedChikorita call Common_EventScript_GetGiftMonPartySlot @@ -441,7 +434,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_SendChikoritaToParty:: LittlerootTown_ProfessorBirchsLab_EventScript_SendChikoritaToPC:: call LittlerootTown_ProfessorBirchsLab_EventScript_ReceivedJohtoStarter - removeobject LOCALID_BALL_CHIKORITA + removeobject LOCALID_BIRCHS_LAB_CHIKORITA_BALL msgbox gText_NicknameThisPokemon, MSGBOX_YESNO goto_if_eq VAR_RESULT, NO, LittlerootTown_ProfessorBirchsLab_EventScript_ChikoritaTransferredToPC call Common_EventScript_NameReceivedBoxMon @@ -515,9 +508,9 @@ LittlerootTown_ProfessorBirchsLab_EventScript_GivePokedex:: call LittlerootTown_ProfessorBirchsLab_EventScript_ReceivePokedex msgbox LittlerootTown_ProfessorBirchsLab_Text_ExplainPokedex, MSGBOX_DEFAULT closemessage - applymovement LOCALID_RIVAL, LittlerootTown_ProfessorBirchsLab_Movement_RivalApproachPlayer + applymovement LOCALID_BIRCHS_LAB_RIVAL, LittlerootTown_ProfessorBirchsLab_Movement_RivalApproachPlayer waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterRight waitmovement 0 checkplayergender call_if_eq VAR_RESULT, MALE, LittlerootTown_ProfessorBirchsLab_EventScript_MayGivePokeBalls diff --git a/data/maps/MagmaHideout_4F/map.json b/data/maps/MagmaHideout_4F/map.json index d426affdec02..f257ebaf5c73 100644 --- a/data/maps/MagmaHideout_4F/map.json +++ b/data/maps/MagmaHideout_4F/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_MAGMA_HIDEOUT_4F_GROUDON", "graphics_id": "OBJ_EVENT_GFX_GROUDON_FRONT", "x": 16, "y": 17, @@ -28,6 +29,7 @@ "flag": "FLAG_HIDE_MAGMA_HIDEOUT_4F_GROUDON" }, { + "local_id": "LOCALID_MAGMA_HIDEOUT_4F_GRUNT_1", "graphics_id": "OBJ_EVENT_GFX_MAGMA_MEMBER_M", "x": 31, "y": 22, @@ -41,6 +43,7 @@ "flag": "FLAG_HIDE_MAGMA_HIDEOUT_GRUNTS" }, { + "local_id": "LOCALID_MAGMA_HIDEOUT_4F_GRUNT_2", "graphics_id": "OBJ_EVENT_GFX_MAGMA_MEMBER_M", "x": 30, "y": 13, @@ -54,6 +57,7 @@ "flag": "FLAG_HIDE_MAGMA_HIDEOUT_GRUNTS" }, { + "local_id": "LOCALID_MAGMA_HIDEOUT_4F_GRUNT_3", "graphics_id": "OBJ_EVENT_GFX_MAGMA_MEMBER_M", "x": 26, "y": 13, @@ -67,6 +71,7 @@ "flag": "FLAG_HIDE_MAGMA_HIDEOUT_GRUNTS" }, { + "local_id": "LOCALID_MAGMA_HIDEOUT_4F_TABITHA", "graphics_id": "OBJ_EVENT_GFX_MAGMA_MEMBER_M", "x": 22, "y": 4, @@ -80,6 +85,7 @@ "flag": "FLAG_HIDE_MAGMA_HIDEOUT_GRUNTS" }, { + "local_id": "LOCALID_MAGMA_HIDEOUT_4F_MAXIE", "graphics_id": "OBJ_EVENT_GFX_MAXIE", "x": 16, "y": 21, @@ -93,6 +99,7 @@ "flag": "FLAG_HIDE_MAGMA_HIDEOUT_GRUNTS" }, { + "local_id": "LOCALID_MAGMA_HIDEOUT_4F_GROUDON_SLEEPING", "graphics_id": "OBJ_EVENT_GFX_GROUDON_ASLEEP", "x": 16, "y": 17, diff --git a/data/maps/MagmaHideout_4F/scripts.inc b/data/maps/MagmaHideout_4F/scripts.inc index ef29d1180a68..34ed84e0a6f8 100644 --- a/data/maps/MagmaHideout_4F/scripts.inc +++ b/data/maps/MagmaHideout_4F/scripts.inc @@ -1,11 +1,3 @@ -.set LOCALID_GROUDON, 1 -.set LOCALID_GRUNT_1, 2 -.set LOCALID_GRUNT_2, 3 -.set LOCALID_GRUNT_3, 4 -.set LOCALID_TABITHA, 5 -.set LOCALID_MAXIE, 6 -.set LOCALID_GROUDON_SLEEPING, 7 - MagmaHideout_4F_MapScripts:: .byte 0 @@ -23,14 +15,14 @@ MagmaHideout_4F_EventScript_Maxie:: playfanfare MUS_AWAKEN_LEGEND playse SE_ORB special DoOrbEffect - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 delay 150 - removeobject LOCALID_GROUDON_SLEEPING - addobject LOCALID_GROUDON + removeobject LOCALID_MAGMA_HIDEOUT_4F_GROUDON_SLEEPING + addobject LOCALID_MAGMA_HIDEOUT_4F_GROUDON waitstate delay 60 - applymovement LOCALID_GROUDON, MagmaHideout_4F_Movement_GroudonApproach + applymovement LOCALID_MAGMA_HIDEOUT_4F_GROUDON, MagmaHideout_4F_Movement_GroudonApproach waitmovement 0 special FadeOutOrbEffect waitstate @@ -40,9 +32,9 @@ MagmaHideout_4F_EventScript_Maxie:: setvar VAR_0x8007, 5 @ shake delay special ShakeCamera waitstate - applymovement LOCALID_GROUDON, MagmaHideout_4F_Movement_GroudonExit + applymovement LOCALID_MAGMA_HIDEOUT_4F_GROUDON, MagmaHideout_4F_Movement_GroudonExit waitmovement 0 - removeobject LOCALID_GROUDON + removeobject LOCALID_MAGMA_HIDEOUT_4F_GROUDON delay 4 setvar VAR_0x8004, 2 @ vertical pan setvar VAR_0x8005, 2 @ horizontal pan @@ -51,14 +43,14 @@ MagmaHideout_4F_EventScript_Maxie:: special ShakeCamera waitstate delay 30 - applymovement LOCALID_MAXIE, MagmaHideout_4F_Movement_MaxieLookAround + applymovement LOCALID_MAGMA_HIDEOUT_4F_MAXIE, MagmaHideout_4F_Movement_MaxieLookAround waitmovement 0 msgbox MagmaHideout_4F_Text_MaxieGroudonWhatsWrong, MSGBOX_DEFAULT closemessage - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterRight waitmovement 0 delay 30 - applymovement LOCALID_MAXIE, Common_Movement_FacePlayer + applymovement LOCALID_MAGMA_HIDEOUT_4F_MAXIE, Common_Movement_FacePlayer waitmovement 0 msgbox MagmaHideout_4F_Text_MaxieOhItWasYou, MSGBOX_DEFAULT closemessage @@ -71,11 +63,11 @@ MagmaHideout_4F_EventScript_Maxie:: setflag FLAG_GROUDON_AWAKENED_MAGMA_HIDEOUT setvar VAR_SLATEPORT_HARBOR_STATE, 1 fadescreen FADE_TO_BLACK - removeobject LOCALID_MAXIE - removeobject LOCALID_GRUNT_1 - removeobject LOCALID_GRUNT_2 - removeobject LOCALID_GRUNT_3 - removeobject LOCALID_TABITHA + removeobject LOCALID_MAGMA_HIDEOUT_4F_MAXIE + removeobject LOCALID_MAGMA_HIDEOUT_4F_GRUNT_1 + removeobject LOCALID_MAGMA_HIDEOUT_4F_GRUNT_2 + removeobject LOCALID_MAGMA_HIDEOUT_4F_GRUNT_3 + removeobject LOCALID_MAGMA_HIDEOUT_4F_TABITHA setflag FLAG_HIDE_MAGMA_HIDEOUT_GRUNTS fadescreen FADE_FROM_BLACK releaseall diff --git a/data/maps/MarineCave_End/map.json b/data/maps/MarineCave_End/map.json index 3430b2da0d61..6e59768d5b3b 100644 --- a/data/maps/MarineCave_End/map.json +++ b/data/maps/MarineCave_End/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_MARINE_CAVE_KYOGRE", "graphics_id": "OBJ_EVENT_GFX_KYOGRE_FRONT", "x": 9, "y": 22, diff --git a/data/maps/MarineCave_End/scripts.inc b/data/maps/MarineCave_End/scripts.inc index a7ff58369553..c3eb109880f8 100644 --- a/data/maps/MarineCave_End/scripts.inc +++ b/data/maps/MarineCave_End/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_KYOGRE, 1 - MarineCave_End_MapScripts:: map_script MAP_SCRIPT_ON_RESUME, MarineCave_End_OnResume map_script MAP_SCRIPT_ON_TRANSITION, MarineCave_End_OnTransition @@ -12,7 +10,7 @@ MarineCave_End_OnResume: MarineCave_End_EventScript_TryRemoveKyogre:: specialvar VAR_RESULT, GetBattleOutcome goto_if_ne VAR_RESULT, B_OUTCOME_CAUGHT, Common_EventScript_NopReturn - removeobject LOCALID_KYOGRE + removeobject LOCALID_MARINE_CAVE_KYOGRE return MarineCave_End_OnTransition: @@ -26,15 +24,15 @@ MarineCave_End_EventScript_ShowKyogre:: MarineCave_End_EventScript_Kyogre:: lockall - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_FaceUp + applymovement LOCALID_PLAYER, Common_Movement_FaceUp waitmovement 0 - applymovement LOCALID_KYOGRE, MarineCave_End_Movement_KyogreApproach + applymovement LOCALID_MARINE_CAVE_KYOGRE, MarineCave_End_Movement_KyogreApproach waitmovement 0 waitse playmoncry SPECIES_KYOGRE, CRY_MODE_ENCOUNTER delay 40 waitmoncry - setvar VAR_LAST_TALKED, LOCALID_KYOGRE + setvar VAR_LAST_TALKED, LOCALID_MARINE_CAVE_KYOGRE setwildbattle SPECIES_KYOGRE, 70 setflag FLAG_SYS_CTRL_OBJ_DELETE special BattleSetup_StartLegendaryBattle diff --git a/data/maps/MauvilleCity/map.json b/data/maps/MauvilleCity/map.json index c123138dd522..b6340a2715c9 100644 --- a/data/maps/MauvilleCity/map.json +++ b/data/maps/MauvilleCity/map.json @@ -101,6 +101,7 @@ "flag": "0" }, { + "local_id": "LOCALID_MAUVILLE_WALLY", "graphics_id": "OBJ_EVENT_GFX_WALLY", "x": 8, "y": 6, @@ -114,6 +115,7 @@ "flag": "FLAG_HIDE_MAUVILLE_CITY_WALLY" }, { + "local_id": "LOCALID_MAUVILLE_WALLYS_UNCLE", "graphics_id": "OBJ_EVENT_GFX_POKEFAN_M", "x": 9, "y": 6, @@ -166,6 +168,7 @@ "flag": "0" }, { + "local_id": "LOCALID_MAUVILLE_SCOTT", "graphics_id": "OBJ_EVENT_GFX_SCOTT", "x": 12, "y": 14, diff --git a/data/maps/MauvilleCity/scripts.inc b/data/maps/MauvilleCity/scripts.inc index 921140270505..ddaf0a1e9369 100644 --- a/data/maps/MauvilleCity/scripts.inc +++ b/data/maps/MauvilleCity/scripts.inc @@ -1,7 +1,3 @@ -.set LOCALID_WALLY, 6 -.set LOCALID_WALLYS_UNCLE, 7 -.set LOCALID_SCOTT, 11 - MauvilleCity_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, MauvilleCity_OnTransition .byte 0 @@ -74,7 +70,7 @@ MauvilleCity_EventScript_WallysUncle:: goto_if_set FLAG_DECLINED_WALLY_BATTLE_MAUVILLE, MauvilleCity_EventScript_UncleAskPlayerToBattleWally msgbox MauvilleCity_Text_UncleHesTooPeppy, MSGBOX_DEFAULT closemessage - applymovement LOCALID_WALLYS_UNCLE, Common_Movement_FaceOriginalDirection + applymovement LOCALID_MAUVILLE_WALLYS_UNCLE, Common_Movement_FaceOriginalDirection waitmovement 0 release end @@ -82,7 +78,7 @@ MauvilleCity_EventScript_WallysUncle:: MauvilleCity_EventScript_UncleAskPlayerToBattleWally:: msgbox MauvilleCity_Text_UncleCanYouBattleWally, MSGBOX_DEFAULT closemessage - applymovement LOCALID_WALLYS_UNCLE, Common_Movement_FaceOriginalDirection + applymovement LOCALID_MAUVILLE_WALLYS_UNCLE, Common_Movement_FaceOriginalDirection waitmovement 0 release end @@ -90,17 +86,17 @@ MauvilleCity_EventScript_UncleAskPlayerToBattleWally:: MauvilleCity_EventScript_Wally:: lockall goto_if_set FLAG_DECLINED_WALLY_BATTLE_MAUVILLE, MauvilleCity_EventScript_WallyRequestBattleAgain - applymovement LOCALID_WALLY, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_MAUVILLE_WALLY, Common_Movement_WalkInPlaceFasterRight waitmovement 0 msgbox MauvilleCity_Text_WallyWantToChallengeGym, MSGBOX_DEFAULT msgbox MauvilleCity_Text_UncleYourePushingIt, MSGBOX_DEFAULT msgbox MauvilleCity_Text_WallyWeCanBeatAnyone, MSGBOX_DEFAULT - applymovement LOCALID_WALLY, Common_Movement_FacePlayer + applymovement LOCALID_MAUVILLE_WALLY, Common_Movement_FacePlayer waitmovement 0 playse SE_PIN - applymovement LOCALID_WALLY, Common_Movement_ExclamationMark + applymovement LOCALID_MAUVILLE_WALLY, Common_Movement_ExclamationMark waitmovement 0 - applymovement LOCALID_WALLY, Common_Movement_Delay48 + applymovement LOCALID_MAUVILLE_WALLY, Common_Movement_Delay48 waitmovement 0 msgbox MauvilleCity_Text_WallyWillYouBattleMe, MSGBOX_YESNO goto MauvilleCity_EventScript_BattleWallyPrompt @@ -116,47 +112,47 @@ MauvilleCity_EventScript_BattleWallyPrompt:: end MauvilleCity_EventScript_WallyAndUncleExitNorth:: - applymovement OBJ_EVENT_ID_PLAYER, MauvilleCity_Movement_PlayerWatchWallyExitNorth1 - applymovement LOCALID_WALLY, MauvilleCity_Movement_WallyExitNorth1 - applymovement LOCALID_WALLYS_UNCLE, MauvilleCity_Movement_WallysUncleExitNorth1 + applymovement LOCALID_PLAYER, MauvilleCity_Movement_PlayerWatchWallyExitNorth1 + applymovement LOCALID_MAUVILLE_WALLY, MauvilleCity_Movement_WallyExitNorth1 + applymovement LOCALID_MAUVILLE_WALLYS_UNCLE, MauvilleCity_Movement_WallysUncleExitNorth1 waitmovement 0 - applymovement LOCALID_WALLY, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_MAUVILLE_WALLY, Common_Movement_WalkInPlaceFasterRight waitmovement 0 delay 30 - applymovement OBJ_EVENT_ID_PLAYER, MauvilleCity_Movement_PlayerFaceUncleNorth - applymovement LOCALID_WALLYS_UNCLE, MauvilleCity_Movement_WallysUncleApproachPlayerNorth + applymovement LOCALID_PLAYER, MauvilleCity_Movement_PlayerFaceUncleNorth + applymovement LOCALID_MAUVILLE_WALLYS_UNCLE, MauvilleCity_Movement_WallysUncleApproachPlayerNorth waitmovement 0 msgbox MauvilleCity_Text_UncleVisitUsSometime, MSGBOX_DEFAULT closemessage - applymovement OBJ_EVENT_ID_PLAYER, MauvilleCity_Movement_PlayerWatchWallyExitNorth2 - applymovement LOCALID_WALLYS_UNCLE, MauvilleCity_Movement_WallysUncleExitNorth2 - applymovement LOCALID_WALLY, MauvilleCity_Movement_WallyExitNorth2 + applymovement LOCALID_PLAYER, MauvilleCity_Movement_PlayerWatchWallyExitNorth2 + applymovement LOCALID_MAUVILLE_WALLYS_UNCLE, MauvilleCity_Movement_WallysUncleExitNorth2 + applymovement LOCALID_MAUVILLE_WALLY, MauvilleCity_Movement_WallyExitNorth2 waitmovement 0 goto MauvilleCity_EventScript_DefeatedWally end MauvilleCity_EventScript_WallyAndUncleExitEast:: - applymovement OBJ_EVENT_ID_PLAYER, MauvilleCity_Movement_PlayerWatchWallyExitEast1 - applymovement LOCALID_WALLY, MauvilleCity_Movement_WallyExitEast1 - applymovement LOCALID_WALLYS_UNCLE, MauvilleCity_Movement_WallysUncleExitEast1 + applymovement LOCALID_PLAYER, MauvilleCity_Movement_PlayerWatchWallyExitEast1 + applymovement LOCALID_MAUVILLE_WALLY, MauvilleCity_Movement_WallyExitEast1 + applymovement LOCALID_MAUVILLE_WALLYS_UNCLE, MauvilleCity_Movement_WallysUncleExitEast1 waitmovement 0 - applymovement LOCALID_WALLY, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_MAUVILLE_WALLY, Common_Movement_WalkInPlaceFasterRight waitmovement 0 delay 30 - applymovement LOCALID_WALLYS_UNCLE, MauvilleCity_Movement_WallysUncleApproachPlayerEast + applymovement LOCALID_MAUVILLE_WALLYS_UNCLE, MauvilleCity_Movement_WallysUncleApproachPlayerEast waitmovement 0 msgbox MauvilleCity_Text_UncleVisitUsSometime, MSGBOX_DEFAULT closemessage - applymovement OBJ_EVENT_ID_PLAYER, MauvilleCity_Movement_PlayerWatchWallyExitEast2 - applymovement LOCALID_WALLYS_UNCLE, MauvilleCity_Movement_WallysUncleExitEast2 - applymovement LOCALID_WALLY, MauvilleCity_Movement_WallyExitEast2 + applymovement LOCALID_PLAYER, MauvilleCity_Movement_PlayerWatchWallyExitEast2 + applymovement LOCALID_MAUVILLE_WALLYS_UNCLE, MauvilleCity_Movement_WallysUncleExitEast2 + applymovement LOCALID_MAUVILLE_WALLY, MauvilleCity_Movement_WallyExitEast2 waitmovement 0 goto MauvilleCity_EventScript_DefeatedWally end MauvilleCity_EventScript_DefeatedWally:: - removeobject LOCALID_WALLY - removeobject LOCALID_WALLYS_UNCLE + removeobject LOCALID_MAUVILLE_WALLY + removeobject LOCALID_MAUVILLE_WALLYS_UNCLE clearflag FLAG_HIDE_VERDANTURF_TOWN_WANDAS_HOUSE_WALLY clearflag FLAG_HIDE_VERDANTURF_TOWN_WANDAS_HOUSE_WALLYS_UNCLE setflag FLAG_DEFEATED_WALLY_MAUVILLE @@ -164,52 +160,52 @@ MauvilleCity_EventScript_DefeatedWally:: setflag FLAG_ENABLE_FIRST_WALLY_POKENAV_CALL call_if_eq VAR_FACING, DIR_NORTH, MauvilleCity_EventScript_ScottApproachPlayerNorth call_if_eq VAR_FACING, DIR_EAST, MauvilleCity_EventScript_ScottApproachPlayerEast - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterDown + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterDown waitmovement 0 msgbox MauvilleCity_Text_ScottYouDidntHoldBack, MSGBOX_DEFAULT closemessage addvar VAR_SCOTT_STATE, 1 call_if_eq VAR_FACING, DIR_NORTH, MauvilleCity_EventScript_ScottExitNorth call_if_eq VAR_FACING, DIR_EAST, MauvilleCity_EventScript_ScottExitEast - removeobject LOCALID_SCOTT + removeobject LOCALID_MAUVILLE_SCOTT releaseall end MauvilleCity_EventScript_ScottApproachPlayerNorth:: - addobject LOCALID_SCOTT - applymovement LOCALID_SCOTT, MauvilleCity_Movement_ScottApproachPlayerNorth + addobject LOCALID_MAUVILLE_SCOTT + applymovement LOCALID_MAUVILLE_SCOTT, MauvilleCity_Movement_ScottApproachPlayerNorth waitmovement 0 return MauvilleCity_EventScript_ScottApproachPlayerEast:: - setobjectxyperm LOCALID_SCOTT, 12, 13 - addobject LOCALID_SCOTT - applymovement LOCALID_SCOTT, MauvilleCity_Movement_ScottApproachPlayerEast + setobjectxyperm LOCALID_MAUVILLE_SCOTT, 12, 13 + addobject LOCALID_MAUVILLE_SCOTT + applymovement LOCALID_MAUVILLE_SCOTT, MauvilleCity_Movement_ScottApproachPlayerEast waitmovement 0 return MauvilleCity_EventScript_ScottExitNorth:: - applymovement OBJ_EVENT_ID_PLAYER, MauvilleCity_Movement_PlayerWatchScottExitNorth - applymovement LOCALID_SCOTT, MauvilleCity_Movement_ScottExitNorth + applymovement LOCALID_PLAYER, MauvilleCity_Movement_PlayerWatchScottExitNorth + applymovement LOCALID_MAUVILLE_SCOTT, MauvilleCity_Movement_ScottExitNorth waitmovement 0 return MauvilleCity_EventScript_ScottExitEast:: - applymovement OBJ_EVENT_ID_PLAYER, MauvilleCity_Movement_PlayerWatchScottExitEast - applymovement LOCALID_SCOTT, MauvilleCity_Movement_ScottExitEast + applymovement LOCALID_PLAYER, MauvilleCity_Movement_PlayerWatchScottExitEast + applymovement LOCALID_MAUVILLE_SCOTT, MauvilleCity_Movement_ScottExitEast waitmovement 0 return MauvilleCity_EventScript_BattleWally:: msgbox MauvilleCity_Text_WallyHereICome, MSGBOX_DEFAULT trainerbattle_no_intro TRAINER_WALLY_MAUVILLE, MauvilleCity_Text_WallyDefeat - applymovement LOCALID_WALLY, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_MAUVILLE_WALLY, Common_Movement_WalkInPlaceFasterRight waitmovement 0 msgbox MauvilleCity_Text_WallyIllGoBackToVerdanturf, MSGBOX_DEFAULT - applymovement LOCALID_WALLY, Common_Movement_FacePlayer + applymovement LOCALID_MAUVILLE_WALLY, Common_Movement_FacePlayer waitmovement 0 msgbox MauvilleCity_Text_ThankYouNotEnoughToBattle, MSGBOX_DEFAULT - applymovement LOCALID_WALLY, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_MAUVILLE_WALLY, Common_Movement_WalkInPlaceFasterRight waitmovement 0 msgbox MauvilleCity_Text_UncleNoNeedToBeDown, MSGBOX_DEFAULT return @@ -221,7 +217,7 @@ MauvilleCity_EventScript_DeclineWallyBattle:: end MauvilleCity_EventScript_WallyRequestBattleAgain:: - applymovement LOCALID_WALLY, Common_Movement_FacePlayer + applymovement LOCALID_MAUVILLE_WALLY, Common_Movement_FacePlayer waitmovement 0 msgbox MauvilleCity_Text_WallyPleaseBattleMe, MSGBOX_YESNO goto MauvilleCity_EventScript_BattleWallyPrompt diff --git a/data/maps/MauvilleCity_Mart/map.json b/data/maps/MauvilleCity_Mart/map.json index 53ab6ce22709..d48970d9eae6 100644 --- a/data/maps/MauvilleCity_Mart/map.json +++ b/data/maps/MauvilleCity_Mart/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_MAUVILLE_MART_CLERK", "graphics_id": "OBJ_EVENT_GFX_MART_EMPLOYEE", "x": 1, "y": 3, diff --git a/data/maps/MauvilleCity_PokemonCenter_1F/map.json b/data/maps/MauvilleCity_PokemonCenter_1F/map.json index 1b0a401b8471..4592d77b72cb 100644 --- a/data/maps/MauvilleCity_PokemonCenter_1F/map.json +++ b/data/maps/MauvilleCity_PokemonCenter_1F/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_MAUVILLE_NURSE", "graphics_id": "OBJ_EVENT_GFX_NURSE", "x": 7, "y": 2, diff --git a/data/maps/MauvilleCity_PokemonCenter_1F/scripts.inc b/data/maps/MauvilleCity_PokemonCenter_1F/scripts.inc index 463d652b3b8f..173fe97af007 100644 --- a/data/maps/MauvilleCity_PokemonCenter_1F/scripts.inc +++ b/data/maps/MauvilleCity_PokemonCenter_1F/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_NURSE, 1 - MauvilleCity_PokemonCenter_1F_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, MauvilleCity_PokemonCenter_1F_OnTransition map_script MAP_SCRIPT_ON_RESUME, CableClub_OnResume @@ -16,7 +14,7 @@ MauvilleCity_PokemonCenter_1F_EventScript_SetMauvilleOldManGfx:: end MauvilleCity_PokemonCenter_1F_EventScript_Nurse:: - setvar VAR_0x800B, LOCALID_NURSE + setvar VAR_0x800B, LOCALID_MAUVILLE_NURSE call Common_EventScript_PkmnCenterNurse waitmessage waitbuttonpress diff --git a/data/maps/MeteorFalls_1F_1R/map.json b/data/maps/MeteorFalls_1F_1R/map.json index e0d32c580480..7aa0e579ce5a 100644 --- a/data/maps/MeteorFalls_1F_1R/map.json +++ b/data/maps/MeteorFalls_1F_1R/map.json @@ -67,6 +67,7 @@ "flag": "FLAG_ITEM_METEOR_FALLS_1F_1R_PP_UP" }, { + "local_id": "LOCALID_METEOR_FALLS_MAGMA_GRUNT_1", "graphics_id": "OBJ_EVENT_GFX_MAGMA_MEMBER_M", "x": 12, "y": 20, @@ -80,6 +81,7 @@ "flag": "FLAG_HIDE_METEOR_FALLS_TEAM_MAGMA" }, { + "local_id": "LOCALID_METEOR_FALLS_MAGMA_GRUNT_2", "graphics_id": "OBJ_EVENT_GFX_MAGMA_MEMBER_M", "x": 14, "y": 21, @@ -93,6 +95,7 @@ "flag": "FLAG_HIDE_METEOR_FALLS_TEAM_MAGMA" }, { + "local_id": "LOCALID_METEOR_FALLS_ARCHIE", "graphics_id": "OBJ_EVENT_GFX_ARCHIE", "x": 6, "y": 20, @@ -106,6 +109,7 @@ "flag": "FLAG_HIDE_METEOR_FALLS_TEAM_AQUA" }, { + "local_id": "LOCALID_METEOR_FALLS_AQUA_GRUNT_1", "graphics_id": "OBJ_EVENT_GFX_AQUA_MEMBER_M", "x": 6, "y": 20, @@ -119,6 +123,7 @@ "flag": "FLAG_HIDE_METEOR_FALLS_TEAM_AQUA" }, { + "local_id": "LOCALID_METEOR_FALLS_AQUA_GRUNT_2", "graphics_id": "OBJ_EVENT_GFX_AQUA_MEMBER_M", "x": 6, "y": 21, diff --git a/data/maps/MeteorFalls_1F_1R/scripts.inc b/data/maps/MeteorFalls_1F_1R/scripts.inc index b81f5de267e8..e41c6a631122 100644 --- a/data/maps/MeteorFalls_1F_1R/scripts.inc +++ b/data/maps/MeteorFalls_1F_1R/scripts.inc @@ -1,9 +1,3 @@ -.set LOCALID_MAGMA_GRUNT_1, 5 -.set LOCALID_MAGMA_GRUNT_2, 6 -.set LOCALID_ARCHIE, 7 -.set LOCALID_AQUA_GRUNT_1, 8 -.set LOCALID_AQUA_GRUNT_2, 9 - MeteorFalls_1F_1R_MapScripts:: map_script MAP_SCRIPT_ON_LOAD, MeteorFalls_1F_1R_OnLoad .byte 0 @@ -22,73 +16,73 @@ MeteorFalls_1F_1R_EventScript_OpenStevensCave:: MeteorFalls_1F_1R_EventScript_MagmaStealsMeteoriteScene:: lockall playbgm MUS_ENCOUNTER_MAGMA, FALSE - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_FaceDown + applymovement LOCALID_PLAYER, Common_Movement_FaceDown waitmovement 0 delay 30 - applymovement LOCALID_MAGMA_GRUNT_1, Common_Movement_WalkInPlaceDown + applymovement LOCALID_METEOR_FALLS_MAGMA_GRUNT_1, Common_Movement_WalkInPlaceDown waitmovement 0 msgbox MeteorFalls_1F_1R_Text_WithThisMeteorite, MSGBOX_DEFAULT closemessage - applymovement LOCALID_MAGMA_GRUNT_1, Common_Movement_WalkInPlaceFasterUp - applymovement LOCALID_MAGMA_GRUNT_2, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_METEOR_FALLS_MAGMA_GRUNT_1, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_METEOR_FALLS_MAGMA_GRUNT_2, Common_Movement_WalkInPlaceFasterUp waitmovement 0 playse SE_PIN - applymovement LOCALID_MAGMA_GRUNT_1, Common_Movement_ExclamationMark + applymovement LOCALID_METEOR_FALLS_MAGMA_GRUNT_1, Common_Movement_ExclamationMark waitmovement 0 - applymovement LOCALID_MAGMA_GRUNT_1, Common_Movement_Delay48 + applymovement LOCALID_METEOR_FALLS_MAGMA_GRUNT_1, Common_Movement_Delay48 waitmovement 0 msgbox MeteorFalls_1F_1R_Text_DontExpectMercyFromMagma, MSGBOX_DEFAULT closemessage - applymovement LOCALID_MAGMA_GRUNT_1, MeteorFalls_1F_1R_Movement_MagmaGruntApproachPlayer + applymovement LOCALID_METEOR_FALLS_MAGMA_GRUNT_1, MeteorFalls_1F_1R_Movement_MagmaGruntApproachPlayer waitmovement 0 msgbox MeteorFalls_1F_1R_Text_HoldItRightThereMagma, MSGBOX_DEFAULT closemessage - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft - applymovement LOCALID_MAGMA_GRUNT_1, Common_Movement_WalkInPlaceFasterLeft - applymovement LOCALID_MAGMA_GRUNT_2, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_METEOR_FALLS_MAGMA_GRUNT_1, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_METEOR_FALLS_MAGMA_GRUNT_2, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 - addobject LOCALID_ARCHIE - addobject LOCALID_AQUA_GRUNT_1 - addobject LOCALID_AQUA_GRUNT_2 + addobject LOCALID_METEOR_FALLS_ARCHIE + addobject LOCALID_METEOR_FALLS_AQUA_GRUNT_1 + addobject LOCALID_METEOR_FALLS_AQUA_GRUNT_2 playbgm MUS_ENCOUNTER_AQUA, FALSE - applymovement LOCALID_ARCHIE, MeteorFalls_1F_1R_Movement_ArchieArrive - applymovement LOCALID_AQUA_GRUNT_1, MeteorFalls_1F_1R_Movement_AquaGrunt1Arrive - applymovement LOCALID_AQUA_GRUNT_2, MeteorFalls_1F_1R_Movement_AquaGrunt2Arrive + applymovement LOCALID_METEOR_FALLS_ARCHIE, MeteorFalls_1F_1R_Movement_ArchieArrive + applymovement LOCALID_METEOR_FALLS_AQUA_GRUNT_1, MeteorFalls_1F_1R_Movement_AquaGrunt1Arrive + applymovement LOCALID_METEOR_FALLS_AQUA_GRUNT_2, MeteorFalls_1F_1R_Movement_AquaGrunt2Arrive waitmovement 0 - applymovement LOCALID_MAGMA_GRUNT_1, Common_Movement_WalkInPlaceFasterLeft - applymovement LOCALID_MAGMA_GRUNT_2, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_METEOR_FALLS_MAGMA_GRUNT_1, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_METEOR_FALLS_MAGMA_GRUNT_2, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 msgbox MeteorFalls_1F_1R_Text_BeSeeingYouTeamAqua, MSGBOX_DEFAULT closemessage - applymovement OBJ_EVENT_ID_PLAYER, MeteorFalls_1F_1R_Movement_PushPlayerOutOfWay - applymovement LOCALID_MAGMA_GRUNT_1, MeteorFalls_1F_1R_Movement_MagmaGrunt1Exit - applymovement LOCALID_MAGMA_GRUNT_2, MeteorFalls_1F_1R_Movement_MagmaGrunt2Exit + applymovement LOCALID_PLAYER, MeteorFalls_1F_1R_Movement_PushPlayerOutOfWay + applymovement LOCALID_METEOR_FALLS_MAGMA_GRUNT_1, MeteorFalls_1F_1R_Movement_MagmaGrunt1Exit + applymovement LOCALID_METEOR_FALLS_MAGMA_GRUNT_2, MeteorFalls_1F_1R_Movement_MagmaGrunt2Exit waitmovement 0 - removeobject LOCALID_MAGMA_GRUNT_1 - removeobject LOCALID_MAGMA_GRUNT_2 - applymovement LOCALID_ARCHIE, MeteorFalls_1F_1R_Movement_ArchieApproachPlayer + removeobject LOCALID_METEOR_FALLS_MAGMA_GRUNT_1 + removeobject LOCALID_METEOR_FALLS_MAGMA_GRUNT_2 + applymovement LOCALID_METEOR_FALLS_ARCHIE, MeteorFalls_1F_1R_Movement_ArchieApproachPlayer waitmovement 0 msgbox MeteorFalls_1F_1R_Text_ArchieSeenYouBefore, MSGBOX_DEFAULT closemessage - applymovement LOCALID_AQUA_GRUNT_1, MeteorFalls_1F_1R_Movement_AquaGrunt1ApproachArchie - applymovement LOCALID_AQUA_GRUNT_2, MeteorFalls_1F_1R_Movement_AquaGrunt2ApproachArchie + applymovement LOCALID_METEOR_FALLS_AQUA_GRUNT_1, MeteorFalls_1F_1R_Movement_AquaGrunt1ApproachArchie + applymovement LOCALID_METEOR_FALLS_AQUA_GRUNT_2, MeteorFalls_1F_1R_Movement_AquaGrunt2ApproachArchie waitmovement 0 msgbox MeteorFalls_1F_1R_Text_BossWeShouldChaseMagma, MSGBOX_DEFAULT - applymovement LOCALID_ARCHIE, Common_Movement_WalkInPlaceFasterDown + applymovement LOCALID_METEOR_FALLS_ARCHIE, Common_Movement_WalkInPlaceFasterDown waitmovement 0 msgbox MeteorFalls_1F_1R_Text_ArchieYesNoTellingWhatMagmaWillDo, MSGBOX_DEFAULT - applymovement LOCALID_ARCHIE, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_METEOR_FALLS_ARCHIE, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 msgbox MeteorFalls_1F_1R_Text_ArchieFarewell, MSGBOX_DEFAULT closemessage - applymovement LOCALID_ARCHIE, MeteorFalls_1F_1R_Movement_ArchieExit - applymovement LOCALID_AQUA_GRUNT_1, MeteorFalls_1F_1R_Movement_AquaGrunt1Exit - applymovement LOCALID_AQUA_GRUNT_2, MeteorFalls_1F_1R_Movement_AquaGrunt2Exit + applymovement LOCALID_METEOR_FALLS_ARCHIE, MeteorFalls_1F_1R_Movement_ArchieExit + applymovement LOCALID_METEOR_FALLS_AQUA_GRUNT_1, MeteorFalls_1F_1R_Movement_AquaGrunt1Exit + applymovement LOCALID_METEOR_FALLS_AQUA_GRUNT_2, MeteorFalls_1F_1R_Movement_AquaGrunt2Exit waitmovement 0 fadedefaultbgm - removeobject LOCALID_ARCHIE - removeobject LOCALID_AQUA_GRUNT_1 - removeobject LOCALID_AQUA_GRUNT_2 + removeobject LOCALID_METEOR_FALLS_ARCHIE + removeobject LOCALID_METEOR_FALLS_AQUA_GRUNT_1 + removeobject LOCALID_METEOR_FALLS_AQUA_GRUNT_2 setflag FLAG_HIDE_ROUTE_112_TEAM_MAGMA setflag FLAG_MET_ARCHIE_METEOR_FALLS setflag FLAG_HIDE_FALLARBOR_TOWN_BATTLE_TENT_SCOTT diff --git a/data/maps/MeteorFalls_StevensCave/map.json b/data/maps/MeteorFalls_StevensCave/map.json index 8e329fc0d3f9..69520324c690 100644 --- a/data/maps/MeteorFalls_StevensCave/map.json +++ b/data/maps/MeteorFalls_StevensCave/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_METEOR_FALLS_STEVEN", "graphics_id": "OBJ_EVENT_GFX_STEVEN", "x": 19, "y": 3, diff --git a/data/maps/MeteorFalls_StevensCave/scripts.inc b/data/maps/MeteorFalls_StevensCave/scripts.inc index a1c9e74ecead..de24d35124c8 100644 --- a/data/maps/MeteorFalls_StevensCave/scripts.inc +++ b/data/maps/MeteorFalls_StevensCave/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_STEVEN, 1 - MeteorFalls_StevensCave_MapScripts:: .byte 0 @@ -8,11 +6,11 @@ MeteorFalls_StevensCave_EventScript_Steven:: goto_if_set FLAG_DEFEATED_METEOR_FALLS_STEVEN, MeteorFalls_StevensCave_EventScript_Defeated waitse playse SE_PIN - applymovement LOCALID_STEVEN, Common_Movement_ExclamationMark + applymovement LOCALID_METEOR_FALLS_STEVEN, Common_Movement_ExclamationMark waitmovement 0 - applymovement LOCALID_STEVEN, Common_Movement_Delay48 + applymovement LOCALID_METEOR_FALLS_STEVEN, Common_Movement_Delay48 waitmovement 0 - applymovement LOCALID_STEVEN, Common_Movement_FacePlayer + applymovement LOCALID_METEOR_FALLS_STEVEN, Common_Movement_FacePlayer waitmovement 0 msgbox MeteorFalls_StevensCave_Text_ShouldKnowHowGoodIAmExpectWorst, MSGBOX_DEFAULT trainerbattle_no_intro TRAINER_STEVEN, MeteorFalls_StevensCave_Text_StevenDefeat @@ -22,7 +20,7 @@ MeteorFalls_StevensCave_EventScript_Steven:: end MeteorFalls_StevensCave_EventScript_Defeated:: - applymovement LOCALID_STEVEN, Common_Movement_FacePlayer + applymovement LOCALID_METEOR_FALLS_STEVEN, Common_Movement_FacePlayer waitmovement 0 msgbox MeteorFalls_StevensCave_Text_MyPredictionCameTrue, MSGBOX_DEFAULT release diff --git a/data/maps/MirageTower_4F/map.json b/data/maps/MirageTower_4F/map.json index fb375f6ae1ec..a1873a9c5477 100644 --- a/data/maps/MirageTower_4F/map.json +++ b/data/maps/MirageTower_4F/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_MIRAGE_ROOT_FOSSIL", "graphics_id": "OBJ_EVENT_GFX_FOSSIL", "x": 5, "y": 4, @@ -28,6 +29,7 @@ "flag": "FLAG_HIDE_MIRAGE_TOWER_ROOT_FOSSIL" }, { + "local_id": "LOCALID_MIRAGE_CLAW_FOSSIL", "graphics_id": "OBJ_EVENT_GFX_FOSSIL", "x": 7, "y": 4, diff --git a/data/maps/MirageTower_4F/scripts.inc b/data/maps/MirageTower_4F/scripts.inc index 61bde877c512..57280b9d030f 100644 --- a/data/maps/MirageTower_4F/scripts.inc +++ b/data/maps/MirageTower_4F/scripts.inc @@ -1,6 +1,3 @@ -.set LOCALID_ROOT_FOSSIL, 1 -.set LOCALID_CLAW_FOSSIL, 2 - MirageTower_4F_MapScripts:: .byte 0 @@ -13,7 +10,7 @@ MirageTower_4F_EventScript_RootFossil:: closemessage setflag FLAG_HIDE_MIRAGE_TOWER_ROOT_FOSSIL setflag FLAG_HIDE_MIRAGE_TOWER_CLAW_FOSSIL - removeobject LOCALID_ROOT_FOSSIL + removeobject LOCALID_MIRAGE_ROOT_FOSSIL delay 30 setflag FLAG_CHOSE_ROOT_FOSSIL goto MirageTower_4F_EventScript_CollapseMirageTower @@ -33,7 +30,7 @@ MirageTower_4F_EventScript_ClawFossil:: closemessage setflag FLAG_HIDE_MIRAGE_TOWER_CLAW_FOSSIL setflag FLAG_HIDE_MIRAGE_TOWER_ROOT_FOSSIL - removeobject LOCALID_CLAW_FOSSIL + removeobject LOCALID_MIRAGE_CLAW_FOSSIL delay 30 setflag FLAG_CHOSE_CLAW_FOSSIL goto MirageTower_4F_EventScript_CollapseMirageTower diff --git a/data/maps/MossdeepCity/map.json b/data/maps/MossdeepCity/map.json index 232cbda81436..993f0c55205a 100644 --- a/data/maps/MossdeepCity/map.json +++ b/data/maps/MossdeepCity/map.json @@ -148,6 +148,7 @@ "flag": "0" }, { + "local_id": "LOCALID_MOSSDEEP_GRUNT_1", "graphics_id": "OBJ_EVENT_GFX_MAGMA_MEMBER_M", "x": 44, "y": 23, @@ -161,6 +162,7 @@ "flag": "FLAG_HIDE_MOSSDEEP_CITY_TEAM_MAGMA" }, { + "local_id": "LOCALID_MOSSDEEP_GRUNT_2", "graphics_id": "OBJ_EVENT_GFX_MAGMA_MEMBER_M", "x": 44, "y": 24, @@ -174,6 +176,7 @@ "flag": "FLAG_HIDE_MOSSDEEP_CITY_TEAM_MAGMA" }, { + "local_id": "LOCALID_MOSSDEEP_GRUNT_3", "graphics_id": "OBJ_EVENT_GFX_MAGMA_MEMBER_M", "x": 44, "y": 25, @@ -187,6 +190,7 @@ "flag": "FLAG_HIDE_MOSSDEEP_CITY_TEAM_MAGMA" }, { + "local_id": "LOCALID_MOSSDEEP_GRUNT_4", "graphics_id": "OBJ_EVENT_GFX_MAGMA_MEMBER_M", "x": 44, "y": 26, @@ -200,6 +204,7 @@ "flag": "FLAG_HIDE_MOSSDEEP_CITY_TEAM_MAGMA" }, { + "local_id": "LOCALID_MOSSDEEP_MAXIE", "graphics_id": "OBJ_EVENT_GFX_MAXIE", "x": 45, "y": 25, @@ -226,6 +231,7 @@ "flag": "0" }, { + "local_id": "LOCALID_MOSSDEEP_SCOTT", "graphics_id": "OBJ_EVENT_GFX_SCOTT", "x": 61, "y": 29, diff --git a/data/maps/MossdeepCity/scripts.inc b/data/maps/MossdeepCity/scripts.inc index a03b1db8201a..0d19067e3f46 100644 --- a/data/maps/MossdeepCity/scripts.inc +++ b/data/maps/MossdeepCity/scripts.inc @@ -1,10 +1,3 @@ -.set LOCALID_GRUNT_1, 10 -.set LOCALID_GRUNT_2, 11 -.set LOCALID_GRUNT_3, 12 -.set LOCALID_GRUNT_4, 13 -.set LOCALID_MAXIE, 14 -.set LOCALID_SCOTT, 16 - MossdeepCity_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, MossdeepCity_OnTransition .byte 0 @@ -82,24 +75,24 @@ MossdeepCity_EventScript_VisitedMossdeep:: MossdeepCity_EventScript_TeamMagmaEnterSpaceCenter:: lockall - applymovement LOCALID_MAXIE, MossdeepCity_Movement_MaxieGestureToSpaceCenter + applymovement LOCALID_MOSSDEEP_MAXIE, MossdeepCity_Movement_MaxieGestureToSpaceCenter waitmovement 0 - applymovement LOCALID_GRUNT_1, MossdeepCity_Movement_GruntFaceSpaceCenter - applymovement LOCALID_GRUNT_2, MossdeepCity_Movement_GruntFaceSpaceCenter - applymovement LOCALID_GRUNT_3, MossdeepCity_Movement_GruntFaceSpaceCenter - applymovement LOCALID_GRUNT_4, MossdeepCity_Movement_GruntFaceSpaceCenter + applymovement LOCALID_MOSSDEEP_GRUNT_1, MossdeepCity_Movement_GruntFaceSpaceCenter + applymovement LOCALID_MOSSDEEP_GRUNT_2, MossdeepCity_Movement_GruntFaceSpaceCenter + applymovement LOCALID_MOSSDEEP_GRUNT_3, MossdeepCity_Movement_GruntFaceSpaceCenter + applymovement LOCALID_MOSSDEEP_GRUNT_4, MossdeepCity_Movement_GruntFaceSpaceCenter waitmovement 0 - applymovement LOCALID_MAXIE, MossdeepCity_Movement_MaxieEnterSpaceCenter - applymovement LOCALID_GRUNT_1, MossdeepCity_Movement_Grunt1EnterSpaceCenter - applymovement LOCALID_GRUNT_2, MossdeepCity_Movement_Grunt2EnterSpaceCenter - applymovement LOCALID_GRUNT_3, MossdeepCity_Movement_Grunt3EnterSpaceCenter - applymovement LOCALID_GRUNT_4, MossdeepCity_Movement_Grunt4EnterSpaceCenter + applymovement LOCALID_MOSSDEEP_MAXIE, MossdeepCity_Movement_MaxieEnterSpaceCenter + applymovement LOCALID_MOSSDEEP_GRUNT_1, MossdeepCity_Movement_Grunt1EnterSpaceCenter + applymovement LOCALID_MOSSDEEP_GRUNT_2, MossdeepCity_Movement_Grunt2EnterSpaceCenter + applymovement LOCALID_MOSSDEEP_GRUNT_3, MossdeepCity_Movement_Grunt3EnterSpaceCenter + applymovement LOCALID_MOSSDEEP_GRUNT_4, MossdeepCity_Movement_Grunt4EnterSpaceCenter waitmovement 0 - removeobject LOCALID_MAXIE - removeobject LOCALID_GRUNT_1 - removeobject LOCALID_GRUNT_2 - removeobject LOCALID_GRUNT_3 - removeobject LOCALID_GRUNT_4 + removeobject LOCALID_MOSSDEEP_MAXIE + removeobject LOCALID_MOSSDEEP_GRUNT_1 + removeobject LOCALID_MOSSDEEP_GRUNT_2 + removeobject LOCALID_MOSSDEEP_GRUNT_3 + removeobject LOCALID_MOSSDEEP_GRUNT_4 delay 30 setvar VAR_MOSSDEEP_CITY_STATE, 2 setflag FLAG_HIDE_MOSSDEEP_CITY_TEAM_MAGMA @@ -263,19 +256,19 @@ MossdeepCity_EventScript_Scott:: call_if_eq VAR_FACING, DIR_NORTH, MossdeepCity_EventScript_ScottExitNorth call_if_eq VAR_FACING, DIR_EAST, MossdeepCity_EventScript_ScottExitEast addvar VAR_SCOTT_STATE, 1 - removeobject LOCALID_SCOTT + removeobject LOCALID_MOSSDEEP_SCOTT release end MossdeepCity_EventScript_ScottExitNorth:: - applymovement OBJ_EVENT_ID_PLAYER, MossdeepCity_Movement_PlayerWatchScottExit - applymovement LOCALID_SCOTT, MossdeepCity_Movement_ScottExitNorth + applymovement LOCALID_PLAYER, MossdeepCity_Movement_PlayerWatchScottExit + applymovement LOCALID_MOSSDEEP_SCOTT, MossdeepCity_Movement_ScottExitNorth waitmovement 0 return MossdeepCity_EventScript_ScottExitEast:: - applymovement OBJ_EVENT_ID_PLAYER, MossdeepCity_Movement_PlayerWatchScottExit - applymovement LOCALID_SCOTT, MossdeepCity_Movement_ScottExitEast + applymovement LOCALID_PLAYER, MossdeepCity_Movement_PlayerWatchScottExit + applymovement LOCALID_MOSSDEEP_SCOTT, MossdeepCity_Movement_ScottExitEast waitmovement 0 return diff --git a/data/maps/MossdeepCity_Gym/scripts.inc b/data/maps/MossdeepCity_Gym/scripts.inc index f2d08c13b163..8ff582e34d66 100644 --- a/data/maps/MossdeepCity_Gym/scripts.inc +++ b/data/maps/MossdeepCity_Gym/scripts.inc @@ -114,7 +114,7 @@ MossdeepCity_Gym_EventScript_Switch1:: lockall goto_if_set FLAG_MOSSDEEP_GYM_SWITCH_1, MossdeepCity_Gym_EventScript_ClearSwitch1 setflag FLAG_MOSSDEEP_GYM_SWITCH_1 - applymovement OBJ_EVENT_ID_PLAYER, MossdeepCity_Gym_Movement_WaitAfterSwitchUse + applymovement LOCALID_PLAYER, MossdeepCity_Gym_Movement_WaitAfterSwitchUse waitmovement 0 setmetatile 5, 5, METATILE_RSMossdeepGym_RedArrow_Right, FALSE setmetatile 2, 7, METATILE_RSMossdeepGym_Switch_Down, TRUE @@ -129,7 +129,7 @@ MossdeepCity_Gym_EventScript_DrawMapAfterSwitchUsed:: MossdeepCity_Gym_EventScript_ClearSwitch1:: clearflag FLAG_MOSSDEEP_GYM_SWITCH_1 - applymovement OBJ_EVENT_ID_PLAYER, MossdeepCity_Gym_Movement_WaitAfterSwitchUse + applymovement LOCALID_PLAYER, MossdeepCity_Gym_Movement_WaitAfterSwitchUse waitmovement 0 setmetatile 5, 5, METATILE_RSMossdeepGym_RedArrow_Left, FALSE setmetatile 2, 7, METATILE_RSMossdeepGym_Switch_Up, TRUE @@ -140,7 +140,7 @@ MossdeepCity_Gym_EventScript_Switch2:: lockall goto_if_set FLAG_MOSSDEEP_GYM_SWITCH_2, MossdeepCity_Gym_EventScript_ClearSwitch2 setflag FLAG_MOSSDEEP_GYM_SWITCH_2 - applymovement OBJ_EVENT_ID_PLAYER, MossdeepCity_Gym_Movement_WaitAfterSwitchUse + applymovement LOCALID_PLAYER, MossdeepCity_Gym_Movement_WaitAfterSwitchUse waitmovement 0 setmetatile 8, 14, METATILE_RSMossdeepGym_RedArrow_Right, FALSE setmetatile 8, 10, METATILE_RSMossdeepGym_Switch_Down, TRUE @@ -149,7 +149,7 @@ MossdeepCity_Gym_EventScript_Switch2:: MossdeepCity_Gym_EventScript_ClearSwitch2:: clearflag FLAG_MOSSDEEP_GYM_SWITCH_2 - applymovement OBJ_EVENT_ID_PLAYER, MossdeepCity_Gym_Movement_WaitAfterSwitchUse + applymovement LOCALID_PLAYER, MossdeepCity_Gym_Movement_WaitAfterSwitchUse waitmovement 0 setmetatile 8, 14, METATILE_RSMossdeepGym_RedArrow_Down, FALSE setmetatile 8, 10, METATILE_RSMossdeepGym_Switch_Up, TRUE @@ -160,7 +160,7 @@ MossdeepCity_Gym_EventScript_Switch3:: lockall goto_if_set FLAG_MOSSDEEP_GYM_SWITCH_3, MossdeepCity_Gym_EventScript_ClearSwitch3 setflag FLAG_MOSSDEEP_GYM_SWITCH_3 - applymovement OBJ_EVENT_ID_PLAYER, MossdeepCity_Gym_Movement_WaitAfterSwitchUse + applymovement LOCALID_PLAYER, MossdeepCity_Gym_Movement_WaitAfterSwitchUse waitmovement 0 setmetatile 15, 17, METATILE_RSMossdeepGym_RedArrow_Left, FALSE setmetatile 17, 15, METATILE_RSMossdeepGym_Switch_Down, TRUE @@ -169,7 +169,7 @@ MossdeepCity_Gym_EventScript_Switch3:: MossdeepCity_Gym_EventScript_ClearSwitch3:: clearflag FLAG_MOSSDEEP_GYM_SWITCH_3 - applymovement OBJ_EVENT_ID_PLAYER, MossdeepCity_Gym_Movement_WaitAfterSwitchUse + applymovement LOCALID_PLAYER, MossdeepCity_Gym_Movement_WaitAfterSwitchUse waitmovement 0 setmetatile 15, 17, METATILE_RSMossdeepGym_RedArrow_Right, FALSE setmetatile 17, 15, METATILE_RSMossdeepGym_Switch_Up, TRUE @@ -180,7 +180,7 @@ MossdeepCity_Gym_EventScript_Switch4:: lockall goto_if_set FLAG_MOSSDEEP_GYM_SWITCH_4, MossdeepCity_Gym_EventScript_ClearSwitch4 setflag FLAG_MOSSDEEP_GYM_SWITCH_4 - applymovement OBJ_EVENT_ID_PLAYER, MossdeepCity_Gym_Movement_WaitAfterSwitchUse + applymovement LOCALID_PLAYER, MossdeepCity_Gym_Movement_WaitAfterSwitchUse waitmovement 0 setmetatile 1, 23, METATILE_RSMossdeepGym_RedArrow_Up, FALSE setmetatile 5, 24, METATILE_RSMossdeepGym_Switch_Down, TRUE @@ -189,7 +189,7 @@ MossdeepCity_Gym_EventScript_Switch4:: MossdeepCity_Gym_EventScript_ClearSwitch4:: clearflag FLAG_MOSSDEEP_GYM_SWITCH_4 - applymovement OBJ_EVENT_ID_PLAYER, MossdeepCity_Gym_Movement_WaitAfterSwitchUse + applymovement LOCALID_PLAYER, MossdeepCity_Gym_Movement_WaitAfterSwitchUse waitmovement 0 setmetatile 1, 23, METATILE_RSMossdeepGym_RedArrow_Right, FALSE setmetatile 5, 24, METATILE_RSMossdeepGym_Switch_Up, TRUE diff --git a/data/maps/MossdeepCity_House2/map.json b/data/maps/MossdeepCity_House2/map.json index a8a03ed95880..8bd4a210e3ef 100644 --- a/data/maps/MossdeepCity_House2/map.json +++ b/data/maps/MossdeepCity_House2/map.json @@ -41,6 +41,7 @@ "flag": "0" }, { + "local_id": "LOCALID_MOSSDEEP_HOUSE_WINGULL", "graphics_id": "OBJ_EVENT_GFX_WINGULL", "x": 4, "y": 5, diff --git a/data/maps/MossdeepCity_House2/scripts.inc b/data/maps/MossdeepCity_House2/scripts.inc index 56a8381963ef..0317753560c3 100644 --- a/data/maps/MossdeepCity_House2/scripts.inc +++ b/data/maps/MossdeepCity_House2/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_WINGULL, 3 - MossdeepCity_House2_MapScripts:: .byte 0 @@ -23,17 +21,17 @@ MossdeepCity_House2_EventScript_Wingull:: clearflag FLAG_HIDE_FORTREE_CITY_HOUSE_4_WINGULL call_if_eq VAR_FACING, DIR_NORTH, MossdeepCity_House2_EventScript_WingullExitNorth call_if_eq VAR_FACING, DIR_WEST, MossdeepCity_House2_EventScript_WingullExitWest - removeobject LOCALID_WINGULL + removeobject LOCALID_MOSSDEEP_HOUSE_WINGULL release end MossdeepCity_House2_EventScript_WingullExitNorth:: - applymovement LOCALID_WINGULL, MossdeepCity_House2_Movement_WingullExitNorth + applymovement LOCALID_MOSSDEEP_HOUSE_WINGULL, MossdeepCity_House2_Movement_WingullExitNorth waitmovement 0 return MossdeepCity_House2_EventScript_WingullExitWest:: - applymovement LOCALID_WINGULL, MossdeepCity_House2_Movement_WingullExitEast + applymovement LOCALID_MOSSDEEP_HOUSE_WINGULL, MossdeepCity_House2_Movement_WingullExitEast waitmovement 0 return diff --git a/data/maps/MossdeepCity_Mart/map.json b/data/maps/MossdeepCity_Mart/map.json index 9679df7892e7..dce4f7576ce7 100644 --- a/data/maps/MossdeepCity_Mart/map.json +++ b/data/maps/MossdeepCity_Mart/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_MOSSDEEP_MART_CLERK", "graphics_id": "OBJ_EVENT_GFX_MART_EMPLOYEE", "x": 1, "y": 3, diff --git a/data/maps/MossdeepCity_PokemonCenter_1F/map.json b/data/maps/MossdeepCity_PokemonCenter_1F/map.json index 72863244c761..db1471925aba 100644 --- a/data/maps/MossdeepCity_PokemonCenter_1F/map.json +++ b/data/maps/MossdeepCity_PokemonCenter_1F/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_MOSSDEEP_NURSE", "graphics_id": "OBJ_EVENT_GFX_NURSE", "x": 7, "y": 2, diff --git a/data/maps/MossdeepCity_PokemonCenter_1F/scripts.inc b/data/maps/MossdeepCity_PokemonCenter_1F/scripts.inc index bfd3561d2612..da597f43b280 100644 --- a/data/maps/MossdeepCity_PokemonCenter_1F/scripts.inc +++ b/data/maps/MossdeepCity_PokemonCenter_1F/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_NURSE, 1 - MossdeepCity_PokemonCenter_1F_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, MossdeepCity_PokemonCenter_1F_OnTransition map_script MAP_SCRIPT_ON_RESUME, CableClub_OnResume @@ -10,7 +8,7 @@ MossdeepCity_PokemonCenter_1F_OnTransition: end MossdeepCity_PokemonCenter_1F_EventScript_Nurse:: - setvar VAR_0x800B, LOCALID_NURSE + setvar VAR_0x800B, LOCALID_MOSSDEEP_NURSE call Common_EventScript_PkmnCenterNurse waitmessage waitbuttonpress diff --git a/data/maps/MossdeepCity_SpaceCenter_1F/map.json b/data/maps/MossdeepCity_SpaceCenter_1F/map.json index e7f47bcfb88c..f6b04f5f2fc3 100644 --- a/data/maps/MossdeepCity_SpaceCenter_1F/map.json +++ b/data/maps/MossdeepCity_SpaceCenter_1F/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_SPACE_CENTER_1F_SCIENTIST_1", "graphics_id": "OBJ_EVENT_GFX_SCIENTIST_1", "x": 7, "y": 2, @@ -28,6 +29,7 @@ "flag": "0" }, { + "local_id": "LOCALID_SPACE_CENTER_1F_SCIENTIST_2", "graphics_id": "OBJ_EVENT_GFX_SCIENTIST_1", "x": 2, "y": 2, @@ -41,6 +43,7 @@ "flag": "0" }, { + "local_id": "LOCALID_SPACE_CENTER_1F_SAILOR", "graphics_id": "OBJ_EVENT_GFX_SAILOR", "x": 6, "y": 6, @@ -54,6 +57,7 @@ "flag": "0" }, { + "local_id": "LOCALID_SPACE_CENTER_1F_OLD_MAN", "graphics_id": "OBJ_EVENT_GFX_OLD_MAN", "x": 10, "y": 2, @@ -67,6 +71,7 @@ "flag": "0" }, { + "local_id": "LOCALID_SPACE_CENTER_1F_WOMAN", "graphics_id": "OBJ_EVENT_GFX_WOMAN_4", "x": 14, "y": 7, @@ -119,6 +124,7 @@ "flag": "FLAG_HIDE_MOSSDEEP_CITY_SPACE_CENTER_1F_TEAM_MAGMA" }, { + "local_id": "LOCALID_SPACE_CENTER_1F_STAIR_GRUNT", "graphics_id": "OBJ_EVENT_GFX_MAGMA_MEMBER_M", "x": 13, "y": 2, diff --git a/data/maps/MossdeepCity_SpaceCenter_1F/scripts.inc b/data/maps/MossdeepCity_SpaceCenter_1F/scripts.inc index e17af3572452..0ed531ba4b6f 100644 --- a/data/maps/MossdeepCity_SpaceCenter_1F/scripts.inc +++ b/data/maps/MossdeepCity_SpaceCenter_1F/scripts.inc @@ -1,10 +1,3 @@ -.set LOCALID_SCIENTIST_1, 1 -.set LOCALID_SCIENTIST_2, 2 -.set LOCALID_SAILOR, 3 -.set LOCALID_OLD_MAN, 4 -.set LOCALID_WOMAN, 5 -.set LOCALID_STAIR_GRUNT, 9 - MossdeepCity_SpaceCenter_1F_MapScripts:: map_script MAP_SCRIPT_ON_LOAD, MossdeepCity_SpaceCenter_1F_OnLoad map_script MAP_SCRIPT_ON_TRANSITION, MossdeepCity_SpaceCenter_1F_OnTransition @@ -15,31 +8,31 @@ MossdeepCity_SpaceCenter_1F_OnTransition: end MossdeepCity_SpaceCenter_1F_EventScript_MoveObjectsForTeamMagma:: - setobjectxyperm LOCALID_SAILOR, 1, 9 - setobjectmovementtype LOCALID_SAILOR, MOVEMENT_TYPE_FACE_RIGHT - setobjectxyperm LOCALID_WOMAN, 0, 8 - setobjectmovementtype LOCALID_WOMAN, MOVEMENT_TYPE_FACE_RIGHT - setobjectxyperm LOCALID_OLD_MAN, 1, 6 - setobjectmovementtype LOCALID_OLD_MAN, MOVEMENT_TYPE_FACE_RIGHT - setobjectxyperm LOCALID_SCIENTIST_1, 3, 4 - setobjectmovementtype LOCALID_SCIENTIST_1, MOVEMENT_TYPE_FACE_RIGHT - setobjectmovementtype LOCALID_SCIENTIST_2, MOVEMENT_TYPE_FACE_RIGHT + setobjectxyperm LOCALID_SPACE_CENTER_1F_SAILOR, 1, 9 + setobjectmovementtype LOCALID_SPACE_CENTER_1F_SAILOR, MOVEMENT_TYPE_FACE_RIGHT + setobjectxyperm LOCALID_SPACE_CENTER_1F_WOMAN, 0, 8 + setobjectmovementtype LOCALID_SPACE_CENTER_1F_WOMAN, MOVEMENT_TYPE_FACE_RIGHT + setobjectxyperm LOCALID_SPACE_CENTER_1F_OLD_MAN, 1, 6 + setobjectmovementtype LOCALID_SPACE_CENTER_1F_OLD_MAN, MOVEMENT_TYPE_FACE_RIGHT + setobjectxyperm LOCALID_SPACE_CENTER_1F_SCIENTIST_1, 3, 4 + setobjectmovementtype LOCALID_SPACE_CENTER_1F_SCIENTIST_1, MOVEMENT_TYPE_FACE_RIGHT + setobjectmovementtype LOCALID_SPACE_CENTER_1F_SCIENTIST_2, MOVEMENT_TYPE_FACE_RIGHT goto_if_eq VAR_MOSSDEEP_SPACE_CENTER_STAIR_GUARD_STATE, 1, MossdeepCity_SpaceCenter_1F_EventScript_MoveStairGuardLeft goto_if_eq VAR_MOSSDEEP_SPACE_CENTER_STAIR_GUARD_STATE, 2, MossdeepCity_SpaceCenter_1F_EventScript_MoveStairGuardDown goto_if_eq VAR_MOSSDEEP_SPACE_CENTER_STAIR_GUARD_STATE, 3, MossdeepCity_SpaceCenter_1F_EventScript_MoveStairGuardRight end MossdeepCity_SpaceCenter_1F_EventScript_MoveStairGuardLeft:: - setobjectxyperm LOCALID_STAIR_GRUNT, 12, 2 + setobjectxyperm LOCALID_SPACE_CENTER_1F_STAIR_GRUNT, 12, 2 end MossdeepCity_SpaceCenter_1F_EventScript_MoveStairGuardDown:: - setobjectxyperm LOCALID_STAIR_GRUNT, 13, 3 + setobjectxyperm LOCALID_SPACE_CENTER_1F_STAIR_GRUNT, 13, 3 end @ Functionally unused. See comment on MossdeepCity_SpaceCenter_1F_EventScript_MoveGruntFromStairsEast MossdeepCity_SpaceCenter_1F_EventScript_MoveStairGuardRight:: - setobjectxyperm LOCALID_STAIR_GRUNT, 14, 2 + setobjectxyperm LOCALID_SPACE_CENTER_1F_STAIR_GRUNT, 14, 2 end MossdeepCity_SpaceCenter_1F_OnLoad: @@ -226,7 +219,7 @@ MossdeepCity_SpaceCenter_1F_EventScript_Grunt2:: msgbox MossdeepCity_SpaceCenter_1F_Text_Grunt2Intro, MSGBOX_DEFAULT trainerbattle_no_intro TRAINER_GRUNT_SPACE_CENTER_2, MossdeepCity_SpaceCenter_1F_Text_Grunt2Defeat setflag FLAG_DEFEATED_GRUNT_SPACE_CENTER_1F - copyobjectxytoperm LOCALID_STAIR_GRUNT + copyobjectxytoperm LOCALID_SPACE_CENTER_1F_STAIR_GRUNT switch VAR_FACING case DIR_WEST, MossdeepCity_SpaceCenter_1F_EventScript_MoveGruntFromStairsWest #ifdef BUGFIX @@ -234,7 +227,7 @@ MossdeepCity_SpaceCenter_1F_EventScript_Grunt2:: #else case DIR_WEST, MossdeepCity_SpaceCenter_1F_EventScript_MoveGruntFromStairsEast #endif - applymovement LOCALID_STAIR_GRUNT, MossdeepCity_SpaceCenter_1F_Movement_MoveGruntFromStairs + applymovement LOCALID_SPACE_CENTER_1F_STAIR_GRUNT, MossdeepCity_SpaceCenter_1F_Movement_MoveGruntFromStairs waitmovement 0 setvar VAR_MOSSDEEP_SPACE_CENTER_STAIR_GUARD_STATE, 2 release @@ -246,7 +239,7 @@ MossdeepCity_SpaceCenter_1F_EventScript_Grunt2Defeated:: end MossdeepCity_SpaceCenter_1F_EventScript_MoveGruntFromStairsWest:: - applymovement LOCALID_STAIR_GRUNT, MossdeepCity_SpaceCenter_1F_Movement_MoveGruntFromStairsWest + applymovement LOCALID_SPACE_CENTER_1F_STAIR_GRUNT, MossdeepCity_SpaceCenter_1F_Movement_MoveGruntFromStairsWest waitmovement 0 setvar VAR_MOSSDEEP_SPACE_CENTER_STAIR_GUARD_STATE, 1 release @@ -255,7 +248,7 @@ MossdeepCity_SpaceCenter_1F_EventScript_MoveGruntFromStairsWest:: @ Functionally unused by mistake. The movement is handled anyway after the switch (see above) @ This also means VAR_MOSSDEEP_SPACE_CENTER_STAIR_GUARD_STATE can never be 3 MossdeepCity_SpaceCenter_1F_EventScript_MoveGruntFromStairsEast:: - applymovement LOCALID_STAIR_GRUNT, MossdeepCity_SpaceCenter_1F_Movement_MoveGruntFromStairsEast + applymovement LOCALID_SPACE_CENTER_1F_STAIR_GRUNT, MossdeepCity_SpaceCenter_1F_Movement_MoveGruntFromStairsEast waitmovement 0 setvar VAR_MOSSDEEP_SPACE_CENTER_STAIR_GUARD_STATE, 3 release diff --git a/data/maps/MossdeepCity_SpaceCenter_2F/map.json b/data/maps/MossdeepCity_SpaceCenter_2F/map.json index f68b5bfd3ee0..74d83a905fa8 100644 --- a/data/maps/MossdeepCity_SpaceCenter_2F/map.json +++ b/data/maps/MossdeepCity_SpaceCenter_2F/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_SPACE_CENTER_2F_RICH_BOY", "graphics_id": "OBJ_EVENT_GFX_RICH_BOY", "x": 6, "y": 2, @@ -28,6 +29,7 @@ "flag": "0" }, { + "local_id": "LOCALID_SPACE_CENTER_2F_GENTLEMAN", "graphics_id": "OBJ_EVENT_GFX_GENTLEMAN", "x": 11, "y": 8, @@ -41,6 +43,7 @@ "flag": "0" }, { + "local_id": "LOCALID_SPACE_CENTER_2F_SCIENTIST", "graphics_id": "OBJ_EVENT_GFX_SCIENTIST_1", "x": 5, "y": 6, @@ -54,6 +57,7 @@ "flag": "0" }, { + "local_id": "LOCALID_SPACE_CENTER_2F_STEVEN", "graphics_id": "OBJ_EVENT_GFX_STEVEN", "x": 1, "y": 8, @@ -67,6 +71,7 @@ "flag": "FLAG_HIDE_MOSSDEEP_CITY_SPACE_CENTER_2F_STEVEN" }, { + "local_id": "LOCALID_SPACE_CENTER_GRUNT_6", "graphics_id": "OBJ_EVENT_GFX_MAGMA_MEMBER_M", "x": 12, "y": 2, @@ -80,6 +85,7 @@ "flag": "FLAG_HIDE_MOSSDEEP_CITY_SPACE_CENTER_2F_TEAM_MAGMA" }, { + "local_id": "LOCALID_SPACE_CENTER_GRUNT_5", "graphics_id": "OBJ_EVENT_GFX_MAGMA_MEMBER_M", "x": 13, "y": 3, @@ -93,6 +99,7 @@ "flag": "FLAG_HIDE_MOSSDEEP_CITY_SPACE_CENTER_2F_TEAM_MAGMA" }, { + "local_id": "LOCALID_SPACE_CENTER_GRUNT_7", "graphics_id": "OBJ_EVENT_GFX_MAGMA_MEMBER_M", "x": 14, "y": 2, @@ -106,6 +113,7 @@ "flag": "FLAG_HIDE_MOSSDEEP_CITY_SPACE_CENTER_2F_TEAM_MAGMA" }, { + "local_id": "LOCALID_SPACE_CENTER_TABITHA", "graphics_id": "OBJ_EVENT_GFX_MAGMA_MEMBER_M", "x": 0, "y": 8, @@ -119,6 +127,7 @@ "flag": "FLAG_HIDE_MOSSDEEP_CITY_SPACE_CENTER_2F_TEAM_MAGMA" }, { + "local_id": "LOCALID_SPACE_CENTER_MAXIE", "graphics_id": "OBJ_EVENT_GFX_MAXIE", "x": 1, "y": 9, diff --git a/data/maps/MossdeepCity_SpaceCenter_2F/scripts.inc b/data/maps/MossdeepCity_SpaceCenter_2F/scripts.inc index c82a33e78d86..cbb9cba9afb4 100644 --- a/data/maps/MossdeepCity_SpaceCenter_2F/scripts.inc +++ b/data/maps/MossdeepCity_SpaceCenter_2F/scripts.inc @@ -1,14 +1,3 @@ -.set LOCALID_RICH_BOY, 1 -.set LOCALID_GENTLEMAN, 2 -.set LOCALID_SCIENTIST, 3 -.set LOCALID_STEVEN, 4 -@ Grunt names numbered like their Trainer values (which are for the full Space Center) -.set LOCALID_GRUNT_6, 5 -.set LOCALID_GRUNT_5, 6 -.set LOCALID_GRUNT_7, 7 -.set LOCALID_TABITHA, 8 -.set LOCALID_MAXIE, 9 - MossdeepCity_SpaceCenter_2F_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, MossdeepCity_SpaceCenter_2F_OnTransition map_script MAP_SCRIPT_ON_FRAME_TABLE, MossdeepCity_SpaceCenter_2F_OnFrame @@ -21,18 +10,18 @@ MossdeepCity_SpaceCenter_2F_OnTransition: MossdeepCity_SpaceCenter_2F_EventScript_MoveCivilians:: clearflag FLAG_INTERACTED_WITH_STEVEN_SPACE_CENTER - setobjectxyperm LOCALID_SCIENTIST, 5, 3 - setobjectmovementtype LOCALID_SCIENTIST, MOVEMENT_TYPE_FACE_RIGHT - setobjectxyperm LOCALID_RICH_BOY, 3, 2 - setobjectmovementtype LOCALID_RICH_BOY, MOVEMENT_TYPE_FACE_RIGHT - setobjectxyperm LOCALID_GENTLEMAN, 1, 3 - setobjectmovementtype LOCALID_GENTLEMAN, MOVEMENT_TYPE_FACE_RIGHT + setobjectxyperm LOCALID_SPACE_CENTER_2F_SCIENTIST, 5, 3 + setobjectmovementtype LOCALID_SPACE_CENTER_2F_SCIENTIST, MOVEMENT_TYPE_FACE_RIGHT + setobjectxyperm LOCALID_SPACE_CENTER_2F_RICH_BOY, 3, 2 + setobjectmovementtype LOCALID_SPACE_CENTER_2F_RICH_BOY, MOVEMENT_TYPE_FACE_RIGHT + setobjectxyperm LOCALID_SPACE_CENTER_2F_GENTLEMAN, 1, 3 + setobjectmovementtype LOCALID_SPACE_CENTER_2F_GENTLEMAN, MOVEMENT_TYPE_FACE_RIGHT return MossdeepCity_SpaceCenter_2F_EventScript_MoveDefeatedGrunts:: - setobjectxyperm LOCALID_GRUNT_6, 11, 2 - setobjectxyperm LOCALID_GRUNT_7, 15, 2 - setobjectxyperm LOCALID_GRUNT_5, 13, 4 + setobjectxyperm LOCALID_SPACE_CENTER_GRUNT_6, 11, 2 + setobjectxyperm LOCALID_SPACE_CENTER_GRUNT_7, 15, 2 + setobjectxyperm LOCALID_SPACE_CENTER_GRUNT_5, 13, 4 return MossdeepCity_SpaceCenter_2F_OnFrame: @@ -41,15 +30,15 @@ MossdeepCity_SpaceCenter_2F_OnFrame: MossdeepCity_SpaceCenter_2F_EventScript_ThreeMagmaGrunts:: playse SE_PIN - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_ExclamationMark + applymovement LOCALID_PLAYER, Common_Movement_ExclamationMark waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_Delay48 + applymovement LOCALID_PLAYER, Common_Movement_Delay48 waitmovement 0 msgbox MossdeepCity_SpaceCenter_2F_Text_YoureOutnumberedTakeUsOn, MSGBOX_YESNO goto_if_eq VAR_RESULT, YES, MossdeepCity_SpaceCenter_2F_EventScript_BattleThreeMagmaGrunts msgbox MossdeepCity_SpaceCenter_2F_Text_GoodAnswer, MSGBOX_DEFAULT closemessage - applymovement OBJ_EVENT_ID_PLAYER, MossdeepCity_SpaceCenter_2F_Movement_PlayerExit + applymovement LOCALID_PLAYER, MossdeepCity_SpaceCenter_2F_Movement_PlayerExit waitmovement 0 warp MAP_MOSSDEEP_CITY_SPACE_CENTER_1F, 13, 1 waitstate @@ -63,24 +52,24 @@ MossdeepCity_SpaceCenter_2F_Movement_PlayerExit: MossdeepCity_SpaceCenter_2F_EventScript_BattleThreeMagmaGrunts:: msgbox MossdeepCity_SpaceCenter_2F_Text_Grunt5Intro, MSGBOX_DEFAULT trainerbattle_no_intro TRAINER_GRUNT_SPACE_CENTER_5, MossdeepCity_SpaceCenter_2F_Text_Grunt5Defeat - applymovement LOCALID_GRUNT_5, MossdeepCity_SpaceCenter_2F_Movement_Grunt5Defeated + applymovement LOCALID_SPACE_CENTER_GRUNT_5, MossdeepCity_SpaceCenter_2F_Movement_Grunt5Defeated waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 msgbox MossdeepCity_SpaceCenter_2F_Text_Grunt6Intro, MSGBOX_DEFAULT trainerbattle_no_intro TRAINER_GRUNT_SPACE_CENTER_6, MossdeepCity_SpaceCenter_2F_Text_Grunt6Defeat - applymovement LOCALID_GRUNT_6, MossdeepCity_SpaceCenter_2F_Movement_Grunt6Defeated + applymovement LOCALID_SPACE_CENTER_GRUNT_6, MossdeepCity_SpaceCenter_2F_Movement_Grunt6Defeated waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterRight waitmovement 0 msgbox MossdeepCity_SpaceCenter_2F_Text_Grunt7Intro, MSGBOX_DEFAULT trainerbattle_no_intro TRAINER_GRUNT_SPACE_CENTER_7, MossdeepCity_SpaceCenter_2F_Text_Grunt7Defeat - applymovement LOCALID_GRUNT_7, MossdeepCity_SpaceCenter_2F_Movement_Grunt7Defeated + applymovement LOCALID_SPACE_CENTER_GRUNT_7, MossdeepCity_SpaceCenter_2F_Movement_Grunt7Defeated waitmovement 0 setvar VAR_MOSSDEEP_SPACE_CENTER_STATE, 2 - copyobjectxytoperm LOCALID_GRUNT_6 - copyobjectxytoperm LOCALID_GRUNT_7 - copyobjectxytoperm LOCALID_GRUNT_5 + copyobjectxytoperm LOCALID_SPACE_CENTER_GRUNT_6 + copyobjectxytoperm LOCALID_SPACE_CENTER_GRUNT_7 + copyobjectxytoperm LOCALID_SPACE_CENTER_GRUNT_5 releaseall end @@ -198,13 +187,13 @@ MossdeepCity_SpaceCenter_2F_EventScript_Steven:: playse SE_NOT_EFFECTIVE switch VAR_FACING case DIR_SOUTH, MossdeepCity_SpaceCenter_2F_EventScript_StevenFightMovementSouth - applymovement LOCALID_STEVEN, MossdeepCity_SpaceCenter_2F_Movement_StevenFight + applymovement LOCALID_SPACE_CENTER_2F_STEVEN, MossdeepCity_SpaceCenter_2F_Movement_StevenFight waitmovement 0 releaseall end MossdeepCity_SpaceCenter_2F_EventScript_StevenFightMovementSouth:: - applymovement LOCALID_STEVEN, MossdeepCity_SpaceCenter_2F_Movement_StevenFightSouth + applymovement LOCALID_SPACE_CENTER_2F_STEVEN, MossdeepCity_SpaceCenter_2F_Movement_StevenFightSouth waitmovement 0 releaseall end @@ -275,12 +264,12 @@ MossdeepCity_SpaceCenter_2F_EventScript_DefeatedMaxieTabitha:: msgbox MossdeepCity_SpaceCenter_2F_Text_MaxieWeFailedIsAquaAlsoMisguided, MSGBOX_DEFAULT closemessage delay 20 - applymovement LOCALID_MAXIE, Common_Movement_WalkInPlaceFasterLeft - applymovement LOCALID_TABITHA, Common_Movement_WalkInPlaceFasterDown + applymovement LOCALID_SPACE_CENTER_MAXIE, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_SPACE_CENTER_TABITHA, Common_Movement_WalkInPlaceFasterDown waitmovement 0 delay 60 - applymovement LOCALID_MAXIE, Common_Movement_WalkInPlaceFasterUp - applymovement LOCALID_TABITHA, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_SPACE_CENTER_MAXIE, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_SPACE_CENTER_TABITHA, Common_Movement_WalkInPlaceFasterRight waitmovement 0 delay 20 msgbox MossdeepCity_SpaceCenter_2F_Text_MaxieWeWillGiveUp, MSGBOX_DEFAULT @@ -292,17 +281,17 @@ MossdeepCity_SpaceCenter_2F_EventScript_DefeatedMaxieTabitha:: setflag FLAG_HIDE_MOSSDEEP_CITY_SPACE_CENTER_1F_TEAM_MAGMA setflag FLAG_HIDE_MOSSDEEP_CITY_SPACE_CENTER_2F_TEAM_MAGMA setflag FLAG_HIDE_MOSSDEEP_CITY_TEAM_MAGMA - removeobject LOCALID_GRUNT_6 - removeobject LOCALID_GRUNT_7 - removeobject LOCALID_GRUNT_5 - removeobject LOCALID_TABITHA - removeobject LOCALID_MAXIE - setobjectxy LOCALID_SCIENTIST, 5, 6 - turnobject LOCALID_SCIENTIST, DIR_SOUTH - setobjectxy LOCALID_GENTLEMAN, 11, 8 - turnobject LOCALID_GENTLEMAN, DIR_NORTH - setobjectxy LOCALID_RICH_BOY, 6, 2 - turnobject LOCALID_RICH_BOY, DIR_NORTH + removeobject LOCALID_SPACE_CENTER_GRUNT_6 + removeobject LOCALID_SPACE_CENTER_GRUNT_7 + removeobject LOCALID_SPACE_CENTER_GRUNT_5 + removeobject LOCALID_SPACE_CENTER_TABITHA + removeobject LOCALID_SPACE_CENTER_MAXIE + setobjectxy LOCALID_SPACE_CENTER_2F_SCIENTIST, 5, 6 + turnobject LOCALID_SPACE_CENTER_2F_SCIENTIST, DIR_SOUTH + setobjectxy LOCALID_SPACE_CENTER_2F_GENTLEMAN, 11, 8 + turnobject LOCALID_SPACE_CENTER_2F_GENTLEMAN, DIR_NORTH + setobjectxy LOCALID_SPACE_CENTER_2F_RICH_BOY, 6, 2 + turnobject LOCALID_SPACE_CENTER_2F_RICH_BOY, DIR_NORTH call MossdeepCity_SpaceCenter_2F_EventScript_StevenFacePlayer fadescreen FADE_FROM_BLACK msgbox MossdeepCity_SpaceCenter_2F_Text_StevenThankYouComeSeeMeAtHome, MSGBOX_DEFAULT @@ -310,15 +299,15 @@ MossdeepCity_SpaceCenter_2F_EventScript_DefeatedMaxieTabitha:: fadescreen FADE_TO_BLACK setflag FLAG_DEFEATED_MAGMA_SPACE_CENTER setflag FLAG_HIDE_MOSSDEEP_CITY_STEVENS_HOUSE_STEVEN - removeobject LOCALID_STEVEN + removeobject LOCALID_SPACE_CENTER_2F_STEVEN setflag FLAG_HIDE_MOSSDEEP_CITY_SPACE_CENTER_MAGMA_NOTE clearflag FLAG_HIDE_MOSSDEEP_CITY_STEVENS_HOUSE_STEVEN setvar VAR_STEVENS_HOUSE_STATE, 1 setflag FLAG_HIDE_MOSSDEEP_CITY_SCOTT - removeobject LOCALID_SCIENTIST - setobjectxyperm LOCALID_SCIENTIST, 5, 6 - setobjectmovementtype LOCALID_SCIENTIST, MOVEMENT_TYPE_WANDER_AROUND - addobject LOCALID_SCIENTIST + removeobject LOCALID_SPACE_CENTER_2F_SCIENTIST + setobjectxyperm LOCALID_SPACE_CENTER_2F_SCIENTIST, 5, 6 + setobjectmovementtype LOCALID_SPACE_CENTER_2F_SCIENTIST, MOVEMENT_TYPE_WANDER_AROUND + addobject LOCALID_SPACE_CENTER_2F_SCIENTIST fadescreen FADE_FROM_BLACK #ifdef BUGFIX releaseall @@ -332,11 +321,11 @@ MossdeepCity_SpaceCenter_2F_EventScript_StevenFacePlayer:: return MossdeepCity_SpaceCenter_2F_EventScript_StevenFacePlayerSouth:: - turnobject LOCALID_STEVEN, DIR_NORTH + turnobject LOCALID_SPACE_CENTER_2F_STEVEN, DIR_NORTH return MossdeepCity_SpaceCenter_2F_EventScript_StevenFacePlayerWest:: - turnobject LOCALID_STEVEN, DIR_EAST + turnobject LOCALID_SPACE_CENTER_2F_STEVEN, DIR_EAST return MossdeepCity_SpaceCenter_2F_EventScript_MaxieTrainer:: diff --git a/data/maps/MossdeepCity_StevensHouse/map.json b/data/maps/MossdeepCity_StevensHouse/map.json index 3a864a67c9eb..330e92b63536 100644 --- a/data/maps/MossdeepCity_StevensHouse/map.json +++ b/data/maps/MossdeepCity_StevensHouse/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_STEVENS_HOUSE_STEVEN", "graphics_id": "OBJ_EVENT_GFX_STEVEN", "x": 9, "y": 6, @@ -28,6 +29,7 @@ "flag": "FLAG_HIDE_MOSSDEEP_CITY_STEVENS_HOUSE_STEVEN" }, { + "local_id": "LOCALID_STEVENS_HOUSE_BALL", "graphics_id": "OBJ_EVENT_GFX_ITEM_BALL", "x": 4, "y": 3, diff --git a/data/maps/MossdeepCity_StevensHouse/scripts.inc b/data/maps/MossdeepCity_StevensHouse/scripts.inc index 0f9255e5b664..cf69bfe8a29f 100644 --- a/data/maps/MossdeepCity_StevensHouse/scripts.inc +++ b/data/maps/MossdeepCity_StevensHouse/scripts.inc @@ -1,6 +1,3 @@ -.set LOCALID_STEVEN, 1 -.set LOCALID_BELDUM_BALL, 2 - MossdeepCity_StevensHouse_MapScripts:: map_script MAP_SCRIPT_ON_LOAD, MossdeepCity_StevensHouse_OnLoad map_script MAP_SCRIPT_ON_TRANSITION, MossdeepCity_StevensHouse_OnTransition @@ -20,8 +17,8 @@ MossdeepCity_StevensHouse_OnTransition: end MossdeepCity_StevensHouse_EventScript_SetStevenPos:: - setobjectxyperm LOCALID_STEVEN, 6, 5 - setobjectmovementtype LOCALID_STEVEN, MOVEMENT_TYPE_FACE_UP + setobjectxyperm LOCALID_STEVENS_HOUSE_STEVEN, 6, 5 + setobjectmovementtype LOCALID_STEVENS_HOUSE_STEVEN, MOVEMENT_TYPE_FACE_UP return MossdeepCity_StevensHouse_OnFrame: @@ -30,14 +27,14 @@ MossdeepCity_StevensHouse_OnFrame: MossdeepCity_StevensHouse_EventScript_StevenGivesDive:: lockall - applymovement LOCALID_STEVEN, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_STEVENS_HOUSE_STEVEN, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 playse SE_PIN - applymovement LOCALID_STEVEN, Common_Movement_ExclamationMark + applymovement LOCALID_STEVENS_HOUSE_STEVEN, Common_Movement_ExclamationMark waitmovement 0 - applymovement LOCALID_STEVEN, Common_Movement_Delay48 + applymovement LOCALID_STEVENS_HOUSE_STEVEN, Common_Movement_Delay48 waitmovement 0 - applymovement LOCALID_STEVEN, MossdeepCity_StevensHouse_Movement_StevenApproachPlayer + applymovement LOCALID_STEVENS_HOUSE_STEVEN, MossdeepCity_StevensHouse_Movement_StevenApproachPlayer waitmovement 0 msgbox MossdeepCity_StevensHouse_Text_YouveEarnedHMDive, MSGBOX_DEFAULT giveitem ITEM_HM_DIVE @@ -46,7 +43,7 @@ MossdeepCity_StevensHouse_EventScript_StevenGivesDive:: msgbox MossdeepCity_StevensHouse_Text_ExplainDive, MSGBOX_DEFAULT closemessage delay 20 - applymovement LOCALID_STEVEN, MossdeepCity_StevensHouse_Movement_StevenReturn + applymovement LOCALID_STEVENS_HOUSE_STEVEN, MossdeepCity_StevensHouse_Movement_StevenReturn waitmovement 0 setflag FLAG_HIDE_MOSSDEEP_CITY_SCOTT setflag FLAG_HIDE_SEAFLOOR_CAVERN_ENTRANCE_AQUA_GRUNT @@ -116,7 +113,7 @@ MossdeepCity_StevensHouse_EventScript_BeldumTransferredToPC:: MossdeepCity_StevensHouse_EventScript_ReceivedBeldumFanfare:: bufferspeciesname STR_VAR_2, SPECIES_BELDUM - removeobject LOCALID_BELDUM_BALL + removeobject LOCALID_STEVENS_HOUSE_BALL playfanfare MUS_OBTAIN_ITEM message MossdeepCity_StevensHouse_Text_ObtainedBeldum waitmessage diff --git a/data/maps/MtChimney/map.json b/data/maps/MtChimney/map.json index 55bd065cb68d..e4cf247d0e70 100644 --- a/data/maps/MtChimney/map.json +++ b/data/maps/MtChimney/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_MT_CHIMNEY_ARCHIE", "graphics_id": "OBJ_EVENT_GFX_ARCHIE", "x": 24, "y": 19, @@ -28,6 +29,7 @@ "flag": "FLAG_HIDE_MT_CHIMNEY_TEAM_AQUA" }, { + "local_id": "LOCALID_MT_CHIMNEY_MAXIE", "graphics_id": "OBJ_EVENT_GFX_MAXIE", "x": 13, "y": 6, @@ -41,6 +43,7 @@ "flag": "FLAG_HIDE_MT_CHIMNEY_TEAM_MAGMA" }, { + "local_id": "LOCALID_MT_CHIMNEY_TABITHA", "graphics_id": "OBJ_EVENT_GFX_MAGMA_MEMBER_M", "x": 12, "y": 11, @@ -288,6 +291,7 @@ "flag": "FLAG_HIDE_MT_CHIMNEY_TEAM_MAGMA" }, { + "local_id": "LOCALID_MT_CHIMNEY_MAGMA_GRUNT_2", "graphics_id": "OBJ_EVENT_GFX_MAGMA_MEMBER_M", "x": 9, "y": 16, @@ -379,6 +383,7 @@ "flag": "FLAG_HIDE_MT_CHIMNEY_TRAINERS" }, { + "local_id": "LOCALID_MT_CHIMNEY_MAGMA_GRUNT_1", "graphics_id": "OBJ_EVENT_GFX_MAGMA_MEMBER_F", "x": 13, "y": 16, diff --git a/data/maps/MtChimney/scripts.inc b/data/maps/MtChimney/scripts.inc index 1931633258c0..9d9e1d4eae40 100644 --- a/data/maps/MtChimney/scripts.inc +++ b/data/maps/MtChimney/scripts.inc @@ -1,10 +1,3 @@ -.set LOCALID_ARCHIE, 1 -.set LOCALID_MAXIE, 2 -.set LOCALID_TABITHA, 3 -.set LOCALID_MAGMA_GRUNT_2, 22 -.set LOCALID_MAGMA_GRUNT_1, 29 - - MtChimney_MapScripts:: map_script MAP_SCRIPT_ON_RESUME, MtChimney_OnResume map_script MAP_SCRIPT_ON_TRANSITION, MtChimney_OnTransition @@ -24,7 +17,7 @@ MtChimney_EventScript_Archie:: call_if_unset FLAG_EVIL_LEADER_PLEASE_STOP, MtChimney_EventScript_ArchieGoStopTeamMagma call_if_set FLAG_EVIL_LEADER_PLEASE_STOP, MtChimney_EventScript_ArchieBusyFighting closemessage - applymovement LOCALID_ARCHIE, Common_Movement_FaceOriginalDirection + applymovement LOCALID_MT_CHIMNEY_ARCHIE, Common_Movement_FaceOriginalDirection waitmovement 0 setflag FLAG_EVIL_LEADER_PLEASE_STOP release @@ -42,12 +35,12 @@ MtChimney_EventScript_Maxie:: lockall playbgm MUS_ENCOUNTER_MAGMA, FALSE msgbox MtChimney_Text_MeteoriteWillActivateVolcano, MSGBOX_DEFAULT - applymovement LOCALID_MAXIE, Common_Movement_FacePlayer + applymovement LOCALID_MT_CHIMNEY_MAXIE, Common_Movement_FacePlayer waitmovement 0 playse SE_PIN - applymovement LOCALID_MAXIE, Common_Movement_ExclamationMark + applymovement LOCALID_MT_CHIMNEY_MAXIE, Common_Movement_ExclamationMark waitmovement 0 - applymovement LOCALID_MAXIE, Common_Movement_Delay48 + applymovement LOCALID_MT_CHIMNEY_MAXIE, Common_Movement_Delay48 waitmovement 0 msgbox MtChimney_Text_MaxieIntro, MSGBOX_DEFAULT trainerbattle_no_intro TRAINER_MAXIE_MT_CHIMNEY, MtChimney_Text_MaxieDefeat @@ -55,23 +48,23 @@ MtChimney_EventScript_Maxie:: closemessage delay 30 fadescreen FADE_TO_BLACK - removeobject LOCALID_MAXIE - removeobject LOCALID_MAGMA_GRUNT_1 - removeobject LOCALID_TABITHA - removeobject LOCALID_MAGMA_GRUNT_2 + removeobject LOCALID_MT_CHIMNEY_MAXIE + removeobject LOCALID_MT_CHIMNEY_MAGMA_GRUNT_1 + removeobject LOCALID_MT_CHIMNEY_TABITHA + removeobject LOCALID_MT_CHIMNEY_MAGMA_GRUNT_2 setflag FLAG_HIDE_MT_CHIMNEY_TEAM_MAGMA fadescreen FADE_FROM_BLACK - setobjectxyperm LOCALID_ARCHIE, 10, 12 - addobject LOCALID_ARCHIE + setobjectxyperm LOCALID_MT_CHIMNEY_ARCHIE, 10, 12 + addobject LOCALID_MT_CHIMNEY_ARCHIE call_if_eq VAR_FACING, DIR_EAST, MtChimney_EventScript_ArchieApproachPlayerEast call_if_eq VAR_FACING, DIR_NORTH, MtChimney_EventScript_ArchieApproachPlayerNorth - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 msgbox MtChimney_Text_ArchieThankYou, MSGBOX_DEFAULT closemessage call_if_eq VAR_FACING, DIR_EAST, MtChimney_EventScript_ArchieExitEast call_if_eq VAR_FACING, DIR_NORTH, MtChimney_EventScript_ArchieExitNorth - removeobject LOCALID_ARCHIE + removeobject LOCALID_MT_CHIMNEY_ARCHIE setflag FLAG_HIDE_MT_CHIMNEY_TEAM_AQUA setflag FLAG_DEFEATED_EVIL_TEAM_MT_CHIMNEY clearflag FLAG_HIDE_FALLARBOR_HOUSE_PROF_COZMO @@ -81,22 +74,22 @@ MtChimney_EventScript_Maxie:: end MtChimney_EventScript_ArchieApproachPlayerEast:: - applymovement LOCALID_ARCHIE, MtChimney_Movement_ArchieApproachPlayerEast + applymovement LOCALID_MT_CHIMNEY_ARCHIE, MtChimney_Movement_ArchieApproachPlayerEast waitmovement 0 return MtChimney_EventScript_ArchieApproachPlayerNorth:: - applymovement LOCALID_ARCHIE, MtChimney_Movement_ArchieApproachPlayerNorth + applymovement LOCALID_MT_CHIMNEY_ARCHIE, MtChimney_Movement_ArchieApproachPlayerNorth waitmovement 0 return MtChimney_EventScript_ArchieExitEast:: - applymovement LOCALID_ARCHIE, MtChimney_Movement_ArchieExitEast + applymovement LOCALID_MT_CHIMNEY_ARCHIE, MtChimney_Movement_ArchieExitEast waitmovement 0 return MtChimney_EventScript_ArchieExitNorth:: - applymovement LOCALID_ARCHIE, MtChimney_Movement_ArchieExitNorth + applymovement LOCALID_MT_CHIMNEY_ARCHIE, MtChimney_Movement_ArchieExitNorth waitmovement 0 return diff --git a/data/maps/MtChimney_CableCarStation/map.json b/data/maps/MtChimney_CableCarStation/map.json index 5fe36a373591..be716e5b75e3 100644 --- a/data/maps/MtChimney_CableCarStation/map.json +++ b/data/maps/MtChimney_CableCarStation/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_MT_CHIMNEY_CABLE_CAR_ATTENDANT", "graphics_id": "OBJ_EVENT_GFX_BEAUTY", "x": 6, "y": 6, diff --git a/data/maps/MtChimney_CableCarStation/scripts.inc b/data/maps/MtChimney_CableCarStation/scripts.inc index b3e36a496aee..b9d8b1ce2d34 100644 --- a/data/maps/MtChimney_CableCarStation/scripts.inc +++ b/data/maps/MtChimney_CableCarStation/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_ATTENDANT, 1 - MtChimney_CableCarStation_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, MtChimney_CableCarStation_OnTransition map_script MAP_SCRIPT_ON_FRAME_TABLE, MtChimney_CableCarStation_OnFrame @@ -10,8 +8,8 @@ MtChimney_CableCarStation_OnTransition: end MtChimney_CableCarStation_EventScript_MoveAttendantAside:: - setobjectxyperm LOCALID_ATTENDANT, 5, 4 - setobjectmovementtype LOCALID_ATTENDANT, MOVEMENT_TYPE_FACE_RIGHT + setobjectxyperm LOCALID_MT_CHIMNEY_CABLE_CAR_ATTENDANT, 5, 4 + setobjectmovementtype LOCALID_MT_CHIMNEY_CABLE_CAR_ATTENDANT, MOVEMENT_TYPE_FACE_RIGHT return MtChimney_CableCarStation_OnFrame: @@ -20,12 +18,12 @@ MtChimney_CableCarStation_OnFrame: MtChimney_CableCarStation_EventScript_ExitCableCar:: lockall - applymovement OBJ_EVENT_ID_PLAYER, MtChimney_CableCarStation_Movement_ExitCableCar - applymovement LOCALID_ATTENDANT, MtChimney_CableCarStation_Movement_FollowPlayerOutFromCableCar + applymovement LOCALID_PLAYER, MtChimney_CableCarStation_Movement_ExitCableCar + applymovement LOCALID_MT_CHIMNEY_CABLE_CAR_ATTENDANT, MtChimney_CableCarStation_Movement_FollowPlayerOutFromCableCar waitmovement 0 setvar VAR_CABLE_CAR_STATION_STATE, 0 - setobjectxyperm LOCALID_ATTENDANT, 6, 7 - setobjectmovementtype LOCALID_ATTENDANT, MOVEMENT_TYPE_FACE_DOWN + setobjectxyperm LOCALID_MT_CHIMNEY_CABLE_CAR_ATTENDANT, 6, 7 + setobjectmovementtype LOCALID_MT_CHIMNEY_CABLE_CAR_ATTENDANT, MOVEMENT_TYPE_FACE_DOWN releaseall end @@ -40,8 +38,8 @@ MtChimney_CableCarStation_EventScript_Attendant:: MtChimney_CableCarStation_EventScript_RideCableCar:: msgbox MtChimney_CableCarStation_Text_StepThisWay, MSGBOX_DEFAULT closemessage - applymovement LOCALID_ATTENDANT, MtChimney_CableCarStation_Movement_LeadPlayerToCableCar - applymovement OBJ_EVENT_ID_PLAYER, MtChimney_CableCarStation_Movement_BoardCableCar + applymovement LOCALID_MT_CHIMNEY_CABLE_CAR_ATTENDANT, MtChimney_CableCarStation_Movement_LeadPlayerToCableCar + applymovement LOCALID_PLAYER, MtChimney_CableCarStation_Movement_BoardCableCar waitmovement 0 setvar VAR_0x8004, TRUE @ Going down setvar VAR_CABLE_CAR_STATION_STATE, 2 diff --git a/data/maps/MtPyre_Summit/map.json b/data/maps/MtPyre_Summit/map.json index 49fd8b9f72e9..7a2cccdd3681 100644 --- a/data/maps/MtPyre_Summit/map.json +++ b/data/maps/MtPyre_Summit/map.json @@ -28,6 +28,7 @@ "flag": "0" }, { + "local_id": "LOCALID_MT_PYRE_SUMMIT_ARCHIE", "graphics_id": "OBJ_EVENT_GFX_ARCHIE", "x": 23, "y": 6, @@ -41,6 +42,7 @@ "flag": "FLAG_HIDE_MT_PYRE_SUMMIT_ARCHIE" }, { + "local_id": "LOCALID_MT_PYRE_SUMMIT_OLD_LADY", "graphics_id": "OBJ_EVENT_GFX_EXPERT_F", "x": 23, "y": 5, @@ -54,6 +56,7 @@ "flag": "0" }, { + "local_id": "LOCALID_MT_PYRE_SUMMIT_GRUNT_1", "graphics_id": "OBJ_EVENT_GFX_AQUA_MEMBER_M", "x": 21, "y": 15, @@ -67,6 +70,7 @@ "flag": "FLAG_HIDE_MT_PYRE_SUMMIT_TEAM_AQUA" }, { + "local_id": "LOCALID_MT_PYRE_SUMMIT_GRUNT_2", "graphics_id": "OBJ_EVENT_GFX_AQUA_MEMBER_M", "x": 25, "y": 18, @@ -80,6 +84,7 @@ "flag": "FLAG_HIDE_MT_PYRE_SUMMIT_TEAM_AQUA" }, { + "local_id": "LOCALID_MT_PYRE_SUMMIT_GRUNT_3", "graphics_id": "OBJ_EVENT_GFX_AQUA_MEMBER_M", "x": 21, "y": 11, @@ -93,6 +98,7 @@ "flag": "FLAG_HIDE_MT_PYRE_SUMMIT_TEAM_AQUA" }, { + "local_id": "LOCALID_MT_PYRE_SUMMIT_GRUNT_4", "graphics_id": "OBJ_EVENT_GFX_AQUA_MEMBER_F", "x": 25, "y": 11, @@ -106,6 +112,7 @@ "flag": "FLAG_HIDE_MT_PYRE_SUMMIT_TEAM_AQUA" }, { + "local_id": "LOCALID_MT_PYRE_SUMMIT_MAXIE", "graphics_id": "OBJ_EVENT_GFX_MAXIE", "x": 23, "y": 6, diff --git a/data/maps/MtPyre_Summit/scripts.inc b/data/maps/MtPyre_Summit/scripts.inc index 3de60df3f2fb..7b0ca2d3a118 100644 --- a/data/maps/MtPyre_Summit/scripts.inc +++ b/data/maps/MtPyre_Summit/scripts.inc @@ -1,11 +1,3 @@ -.set LOCALID_ARCHIE, 2 -.set LOCALID_OLD_LADY, 3 -.set LOCALID_GRUNT_1, 4 -.set LOCALID_GRUNT_2, 5 -.set LOCALID_GRUNT_3, 6 -.set LOCALID_GRUNT_4, 7 -.set LOCALID_MAXIE, 8 - MtPyre_Summit_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, MtPyre_Summit_OnTransition .byte 0 @@ -15,8 +7,8 @@ MtPyre_Summit_OnTransition: end MtPyre_Summit_EventScript_SetArchieMaxiePositions:: - setobjectxyperm LOCALID_MAXIE, 23, 6 - setobjectxyperm LOCALID_ARCHIE, 22, 6 + setobjectxyperm LOCALID_MT_PYRE_SUMMIT_MAXIE, 23, 6 + setobjectxyperm LOCALID_MT_PYRE_SUMMIT_ARCHIE, 22, 6 end MtPyre_Summit_EventScript_TeamAquaTrigger0:: @@ -39,9 +31,9 @@ MtPyre_Summit_EventScript_TeamAquaTrigger2:: MtPyre_Summit_EventScript_TeamAquaExits:: playbgm MUS_ENCOUNTER_AQUA, FALSE - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_FaceUp + applymovement LOCALID_PLAYER, Common_Movement_FaceUp waitmovement 0 - applymovement LOCALID_ARCHIE, Common_Movement_WalkInPlaceFasterDown + applymovement LOCALID_MT_PYRE_SUMMIT_ARCHIE, Common_Movement_WalkInPlaceFasterDown waitmovement 0 delay 50 call_if_eq VAR_0x8008, 0, MtPyre_Summit_EventScript_ArchieFacePlayer0 @@ -50,11 +42,11 @@ MtPyre_Summit_EventScript_TeamAquaExits:: msgbox MtPyre_Summit_Text_ArchieWeGotTheOrbLetsGo, MSGBOX_DEFAULT closemessage fadescreen FADE_TO_BLACK - removeobject LOCALID_ARCHIE - removeobject LOCALID_GRUNT_1 - removeobject LOCALID_GRUNT_2 - removeobject LOCALID_GRUNT_3 - removeobject LOCALID_GRUNT_4 + removeobject LOCALID_MT_PYRE_SUMMIT_ARCHIE + removeobject LOCALID_MT_PYRE_SUMMIT_GRUNT_1 + removeobject LOCALID_MT_PYRE_SUMMIT_GRUNT_2 + removeobject LOCALID_MT_PYRE_SUMMIT_GRUNT_3 + removeobject LOCALID_MT_PYRE_SUMMIT_GRUNT_4 setflag FLAG_HIDE_MT_PYRE_SUMMIT_ARCHIE setflag FLAG_HIDE_MT_PYRE_SUMMIT_TEAM_AQUA fadedefaultbgm @@ -72,7 +64,7 @@ MtPyre_Summit_EventScript_TeamAquaExits:: end MtPyre_Summit_EventScript_ArchieFacePlayer0:: - applymovement LOCALID_ARCHIE, MtPyre_Summit_Movement_ArchieFacePlayer0 + applymovement LOCALID_MT_PYRE_SUMMIT_ARCHIE, MtPyre_Summit_Movement_ArchieFacePlayer0 waitmovement 0 return @@ -81,26 +73,26 @@ MtPyre_Summit_EventScript_ArchieFacePlayer1:: return MtPyre_Summit_EventScript_ArchieFacePlayer2:: - applymovement LOCALID_ARCHIE, MtPyre_Summit_Movement_ArchieFacePlayer2 + applymovement LOCALID_MT_PYRE_SUMMIT_ARCHIE, MtPyre_Summit_Movement_ArchieFacePlayer2 waitmovement 0 return MtPyre_Summit_EventScript_OldLadyApproachPlayer0:: - applymovement LOCALID_OLD_LADY, MtPyre_Summit_Movement_OldLadyApproachPlayer0 + applymovement LOCALID_MT_PYRE_SUMMIT_OLD_LADY, MtPyre_Summit_Movement_OldLadyApproachPlayer0 waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterRight waitmovement 0 return MtPyre_Summit_EventScript_OldLadyApproachPlayer1:: - applymovement LOCALID_OLD_LADY, MtPyre_Summit_Movement_OldLadyApproachPlayer1 + applymovement LOCALID_MT_PYRE_SUMMIT_OLD_LADY, MtPyre_Summit_Movement_OldLadyApproachPlayer1 waitmovement 0 return MtPyre_Summit_EventScript_OldLadyApproachPlayer2:: - applymovement LOCALID_OLD_LADY, MtPyre_Summit_Movement_OldLadyApproachPlayer2 + applymovement LOCALID_MT_PYRE_SUMMIT_OLD_LADY, MtPyre_Summit_Movement_OldLadyApproachPlayer2 waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 return @@ -204,16 +196,16 @@ MtPyre_Summit_EventScript_ArchieMaxieTrigger2:: end MtPyre_Summit_EventScript_ArchieMaxieReturnOrbs:: - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 delay 60 call_if_eq VAR_0x8008, 0, MtPyre_Summit_EventScript_ArchieMaxieBeginExit0 call_if_eq VAR_0x8008, 1, MtPyre_Summit_EventScript_ArchieMaxieBeginExit1 call_if_eq VAR_0x8008, 2, MtPyre_Summit_EventScript_ArchieMaxieBeginExit2 playse SE_PIN - applymovement LOCALID_MAXIE, Common_Movement_ExclamationMark + applymovement LOCALID_MT_PYRE_SUMMIT_MAXIE, Common_Movement_ExclamationMark waitmovement 0 - applymovement LOCALID_MAXIE, Common_Movement_Delay48 + applymovement LOCALID_MT_PYRE_SUMMIT_MAXIE, Common_Movement_Delay48 waitmovement 0 delay 30 call_if_eq VAR_0x8008, 0, MtPyre_Summit_EventScript_MaxieApproachPlayer0 @@ -225,78 +217,78 @@ MtPyre_Summit_EventScript_ArchieMaxieReturnOrbs:: call_if_eq VAR_0x8008, 1, MtPyre_Summit_EventScript_MaxieApproachArchie1 call_if_eq VAR_0x8008, 2, MtPyre_Summit_EventScript_MaxieApproachArchie2 delay 30 - applymovement LOCALID_ARCHIE, MtPyre_Summit_Movement_ArchieExit - applymovement LOCALID_MAXIE, MtPyre_Summit_Movement_MaxieExit + applymovement LOCALID_MT_PYRE_SUMMIT_ARCHIE, MtPyre_Summit_Movement_ArchieExit + applymovement LOCALID_MT_PYRE_SUMMIT_MAXIE, MtPyre_Summit_Movement_MaxieExit waitmovement 0 - removeobject LOCALID_ARCHIE - removeobject LOCALID_MAXIE + removeobject LOCALID_MT_PYRE_SUMMIT_ARCHIE + removeobject LOCALID_MT_PYRE_SUMMIT_MAXIE setvar VAR_MT_PYRE_STATE, 3 releaseall end MtPyre_Summit_EventScript_ArchieMaxieBeginExit0:: - applymovement OBJ_EVENT_ID_PLAYER, MtPyre_Summit_Movement_PlayerWatchArchieMaxieExit0 - applymovement LOCALID_ARCHIE, MtPyre_Summit_Movement_ArchieExit - applymovement LOCALID_MAXIE, MtPyre_Summit_Movement_MaxieExit + applymovement LOCALID_PLAYER, MtPyre_Summit_Movement_PlayerWatchArchieMaxieExit0 + applymovement LOCALID_MT_PYRE_SUMMIT_ARCHIE, MtPyre_Summit_Movement_ArchieExit + applymovement LOCALID_MT_PYRE_SUMMIT_MAXIE, MtPyre_Summit_Movement_MaxieExit waitmovement 0 return MtPyre_Summit_EventScript_ArchieMaxieBeginExit1:: - applymovement OBJ_EVENT_ID_PLAYER, MtPyre_Summit_Movement_PlayerWatchArchieMaxieExit1 - applymovement LOCALID_ARCHIE, MtPyre_Summit_Movement_ArchieExit - applymovement LOCALID_MAXIE, MtPyre_Summit_Movement_MaxieExit + applymovement LOCALID_PLAYER, MtPyre_Summit_Movement_PlayerWatchArchieMaxieExit1 + applymovement LOCALID_MT_PYRE_SUMMIT_ARCHIE, MtPyre_Summit_Movement_ArchieExit + applymovement LOCALID_MT_PYRE_SUMMIT_MAXIE, MtPyre_Summit_Movement_MaxieExit waitmovement 0 return MtPyre_Summit_EventScript_ArchieMaxieBeginExit2:: - applymovement OBJ_EVENT_ID_PLAYER, MtPyre_Summit_Movement_PlayerWatchArchieMaxieExit2 - applymovement LOCALID_ARCHIE, MtPyre_Summit_Movement_ArchieExit - applymovement LOCALID_MAXIE, MtPyre_Summit_Movement_MaxieExit + applymovement LOCALID_PLAYER, MtPyre_Summit_Movement_PlayerWatchArchieMaxieExit2 + applymovement LOCALID_MT_PYRE_SUMMIT_ARCHIE, MtPyre_Summit_Movement_ArchieExit + applymovement LOCALID_MT_PYRE_SUMMIT_MAXIE, MtPyre_Summit_Movement_MaxieExit waitmovement 0 return MtPyre_Summit_EventScript_MaxieApproachPlayer0:: - applymovement OBJ_EVENT_ID_PLAYER, MtPyre_Summit_Movement_PlayerFaceMaxie0 - applymovement LOCALID_ARCHIE, MtPyre_Summit_Movement_ArchieWatchMaxie - applymovement LOCALID_MAXIE, MtPyre_Summit_Movement_MaxieApproachPlayer0 + applymovement LOCALID_PLAYER, MtPyre_Summit_Movement_PlayerFaceMaxie0 + applymovement LOCALID_MT_PYRE_SUMMIT_ARCHIE, MtPyre_Summit_Movement_ArchieWatchMaxie + applymovement LOCALID_MT_PYRE_SUMMIT_MAXIE, MtPyre_Summit_Movement_MaxieApproachPlayer0 waitmovement 0 return MtPyre_Summit_EventScript_MaxieApproachPlayer1:: - applymovement OBJ_EVENT_ID_PLAYER, MtPyre_Summit_Movement_PlayerFaceMaxie - applymovement LOCALID_ARCHIE, MtPyre_Summit_Movement_ArchieWatchMaxie - applymovement LOCALID_MAXIE, MtPyre_Summit_Movement_MaxieApproachPlayer1 + applymovement LOCALID_PLAYER, MtPyre_Summit_Movement_PlayerFaceMaxie + applymovement LOCALID_MT_PYRE_SUMMIT_ARCHIE, MtPyre_Summit_Movement_ArchieWatchMaxie + applymovement LOCALID_MT_PYRE_SUMMIT_MAXIE, MtPyre_Summit_Movement_MaxieApproachPlayer1 waitmovement 0 return MtPyre_Summit_EventScript_MaxieApproachPlayer2:: - applymovement OBJ_EVENT_ID_PLAYER, MtPyre_Summit_Movement_PlayerFaceMaxie - applymovement LOCALID_ARCHIE, MtPyre_Summit_Movement_ArchieWatchMaxie - applymovement LOCALID_MAXIE, MtPyre_Summit_Movement_MaxieApproachPlayer2 + applymovement LOCALID_PLAYER, MtPyre_Summit_Movement_PlayerFaceMaxie + applymovement LOCALID_MT_PYRE_SUMMIT_ARCHIE, MtPyre_Summit_Movement_ArchieWatchMaxie + applymovement LOCALID_MT_PYRE_SUMMIT_MAXIE, MtPyre_Summit_Movement_MaxieApproachPlayer2 waitmovement 0 return MtPyre_Summit_EventScript_MaxieApproachArchie0:: - applymovement OBJ_EVENT_ID_PLAYER, MtPyre_Summit_Movement_PlayerWatchMaxie - applymovement LOCALID_MAXIE, MtPyre_Summit_Movement_MaxieApproachArchie0 + applymovement LOCALID_PLAYER, MtPyre_Summit_Movement_PlayerWatchMaxie + applymovement LOCALID_MT_PYRE_SUMMIT_MAXIE, MtPyre_Summit_Movement_MaxieApproachArchie0 waitmovement 0 - applymovement LOCALID_ARCHIE, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_MT_PYRE_SUMMIT_ARCHIE, Common_Movement_WalkInPlaceFasterRight waitmovement 0 return MtPyre_Summit_EventScript_MaxieApproachArchie1:: - applymovement OBJ_EVENT_ID_PLAYER, MtPyre_Summit_Movement_PlayerWatchMaxie - applymovement LOCALID_MAXIE, MtPyre_Summit_Movement_MaxieApproachArchie1 + applymovement LOCALID_PLAYER, MtPyre_Summit_Movement_PlayerWatchMaxie + applymovement LOCALID_MT_PYRE_SUMMIT_MAXIE, MtPyre_Summit_Movement_MaxieApproachArchie1 waitmovement 0 - applymovement LOCALID_ARCHIE, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_MT_PYRE_SUMMIT_ARCHIE, Common_Movement_WalkInPlaceFasterRight waitmovement 0 return MtPyre_Summit_EventScript_MaxieApproachArchie2:: - applymovement OBJ_EVENT_ID_PLAYER, MtPyre_Summit_Movement_PlayerWatchMaxie - applymovement LOCALID_MAXIE, MtPyre_Summit_Movement_MaxieApproachArchie2 + applymovement LOCALID_PLAYER, MtPyre_Summit_Movement_PlayerWatchMaxie + applymovement LOCALID_MT_PYRE_SUMMIT_MAXIE, MtPyre_Summit_Movement_MaxieApproachArchie2 waitmovement 0 - applymovement LOCALID_ARCHIE, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_MT_PYRE_SUMMIT_ARCHIE, Common_Movement_WalkInPlaceFasterRight waitmovement 0 return diff --git a/data/maps/NavelRock_Bottom/map.json b/data/maps/NavelRock_Bottom/map.json index bd7ce3ffec79..695465e21db2 100644 --- a/data/maps/NavelRock_Bottom/map.json +++ b/data/maps/NavelRock_Bottom/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_NAVEL_ROCK_LUGIA", "graphics_id": "OBJ_EVENT_GFX_LUGIA", "x": 11, "y": 13, diff --git a/data/maps/NavelRock_Bottom/scripts.inc b/data/maps/NavelRock_Bottom/scripts.inc index 90cc229895be..24c06bf1a085 100644 --- a/data/maps/NavelRock_Bottom/scripts.inc +++ b/data/maps/NavelRock_Bottom/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_LUGIA, 1 - NavelRock_Bottom_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, NavelRock_Bottom_OnTransition map_script MAP_SCRIPT_ON_RESUME, NavelRock_Bottom_OnResume @@ -26,7 +24,7 @@ NavelRock_Bottom_OnResume: NavelRock_Bottom_EventScript_TryRemoveLugia:: specialvar VAR_RESULT, GetBattleOutcome goto_if_ne VAR_RESULT, B_OUTCOME_CAUGHT, Common_EventScript_NopReturn - removeobject LOCALID_LUGIA + removeobject LOCALID_NAVEL_ROCK_LUGIA return NavelRock_Bottom_EventScript_Lugia:: diff --git a/data/maps/NavelRock_Harbor/map.json b/data/maps/NavelRock_Harbor/map.json index ed0bb70dac1b..c3ca23d82d6a 100644 --- a/data/maps/NavelRock_Harbor/map.json +++ b/data/maps/NavelRock_Harbor/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_NAVEL_ROCK_SAILOR", "graphics_id": "OBJ_EVENT_GFX_SAILOR", "x": 8, "y": 5, @@ -28,6 +29,7 @@ "flag": "0" }, { + "local_id": "LOCALID_NAVEL_ROCK_SS_TIDAL", "graphics_id": "OBJ_EVENT_GFX_SS_TIDAL", "x": 8, "y": 7, diff --git a/data/maps/NavelRock_Harbor/scripts.inc b/data/maps/NavelRock_Harbor/scripts.inc index a981759175a3..fb12688e3264 100644 --- a/data/maps/NavelRock_Harbor/scripts.inc +++ b/data/maps/NavelRock_Harbor/scripts.inc @@ -1,6 +1,3 @@ -.set LOCALID_SAILOR, 1 -.set LOCALID_SS_TIDAL, 2 - NavelRock_Harbor_MapScripts:: .byte 0 @@ -14,8 +11,8 @@ NavelRock_Harbor_EventScript_Sailor:: applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceFasterDown waitmovement 0 delay 30 - hideobjectat LOCALID_SAILOR, MAP_NAVEL_ROCK_HARBOR - setvar VAR_0x8004, LOCALID_SS_TIDAL + hideobjectat LOCALID_NAVEL_ROCK_SAILOR, MAP_NAVEL_ROCK_HARBOR + setvar VAR_0x8004, LOCALID_NAVEL_ROCK_SS_TIDAL call Common_EventScript_FerryDepartIsland warp MAP_LILYCOVE_CITY_HARBOR, 8, 11 waitstate diff --git a/data/maps/NavelRock_Top/map.json b/data/maps/NavelRock_Top/map.json index c818fc39948e..e208dd7099eb 100644 --- a/data/maps/NavelRock_Top/map.json +++ b/data/maps/NavelRock_Top/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_NAVEL_ROCK_HO_OH", "graphics_id": "OBJ_EVENT_GFX_HOOH", "x": 12, "y": 4, diff --git a/data/maps/NavelRock_Top/scripts.inc b/data/maps/NavelRock_Top/scripts.inc index 10969367a11f..f8c69e039dbc 100644 --- a/data/maps/NavelRock_Top/scripts.inc +++ b/data/maps/NavelRock_Top/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_HO_OH, 1 - NavelRock_Top_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, NavelRock_Top_OnTransition map_script MAP_SCRIPT_ON_RESUME, NavelRock_Top_OnResume @@ -29,7 +27,7 @@ NavelRock_Top_OnResume: NavelRock_Top_EventScript_TryRemoveHoOh:: specialvar VAR_RESULT, GetBattleOutcome goto_if_ne VAR_RESULT, B_OUTCOME_CAUGHT, Common_EventScript_NopReturn - removeobject LOCALID_HO_OH + removeobject LOCALID_NAVEL_ROCK_HO_OH return NavelRock_Top_EventScript_HoOh:: @@ -39,8 +37,8 @@ NavelRock_Top_EventScript_HoOh:: setvar VAR_0x8004, 3 @ num loops setvar VAR_0x8005, 35 @ delay special LoopWingFlapSE - applymovement LOCALID_HO_OH, NavelRock_Top_Movement_HoOhAppear - applymovement OBJ_EVENT_ID_CAMERA, NavelRock_Top_Movement_CameraPanUp + applymovement LOCALID_NAVEL_ROCK_HO_OH, NavelRock_Top_Movement_HoOhAppear + applymovement LOCALID_CAMERA, NavelRock_Top_Movement_CameraPanUp waitmovement 0 delay 50 setweather WEATHER_NONE @@ -53,8 +51,8 @@ NavelRock_Top_EventScript_HoOh:: setvar VAR_0x8004, 3 @ num loops setvar VAR_0x8005, 35 @ delay special LoopWingFlapSE - applymovement OBJ_EVENT_ID_CAMERA, NavelRock_Top_Movement_CameraPanDown - applymovement LOCALID_HO_OH, NavelRock_Top_Movement_HoOhApproach + applymovement LOCALID_CAMERA, NavelRock_Top_Movement_CameraPanDown + applymovement LOCALID_NAVEL_ROCK_HO_OH, NavelRock_Top_Movement_HoOhApproach waitmovement 0 special RemoveCameraObject seteventmon SPECIES_HO_OH, 70 @@ -62,7 +60,7 @@ NavelRock_Top_EventScript_HoOh:: special BattleSetup_StartLegendaryBattle waitstate clearflag FLAG_SYS_CTRL_OBJ_DELETE - setvar VAR_LAST_TALKED, LOCALID_HO_OH + setvar VAR_LAST_TALKED, LOCALID_NAVEL_ROCK_HO_OH specialvar VAR_RESULT, GetBattleOutcome goto_if_eq VAR_RESULT, B_OUTCOME_WON, NavelRock_Top_EventScript_DefeatedHoOh goto_if_eq VAR_RESULT, B_OUTCOME_RAN, NavelRock_Top_EventScript_RanFromHoOh diff --git a/data/maps/NewMauville_Entrance/scripts.inc b/data/maps/NewMauville_Entrance/scripts.inc index 4c498190e070..3b0395386f6e 100644 --- a/data/maps/NewMauville_Entrance/scripts.inc +++ b/data/maps/NewMauville_Entrance/scripts.inc @@ -22,7 +22,7 @@ NewMauville_Entrance_OnTransition: NewMauville_Entrance_EventScript_Door:: lockall - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 msgbox NewMauville_Entrance_Text_DoorIsLocked, MSGBOX_DEFAULT checkitem ITEM_BASEMENT_KEY diff --git a/data/maps/OldaleTown/map.json b/data/maps/OldaleTown/map.json index 4bb86784e9c4..991d2e50ca43 100644 --- a/data/maps/OldaleTown/map.json +++ b/data/maps/OldaleTown/map.json @@ -44,6 +44,7 @@ "flag": "0" }, { + "local_id": "LOCALID_OLDALE_MART_EMPLOYEE", "graphics_id": "OBJ_EVENT_GFX_MART_EMPLOYEE", "x": 13, "y": 7, @@ -57,6 +58,7 @@ "flag": "0" }, { + "local_id": "LOCALID_FOOTPRINTS_MAN", "graphics_id": "OBJ_EVENT_GFX_MANIAC", "x": 8, "y": 9, @@ -70,6 +72,7 @@ "flag": "0" }, { + "local_id": "LOCALID_OLDALE_RIVAL", "graphics_id": "OBJ_EVENT_GFX_VAR_0", "x": 11, "y": 19, diff --git a/data/maps/OldaleTown/scripts.inc b/data/maps/OldaleTown/scripts.inc index b2c25a6dfbc6..a127cd07be55 100644 --- a/data/maps/OldaleTown/scripts.inc +++ b/data/maps/OldaleTown/scripts.inc @@ -1,7 +1,3 @@ -.set LOCALID_MART_EMPLOYEE, 2 -.set LOCALID_FOOTPRINTS_MAN, 3 -.set LOCALID_RIVAL, 4 - OldaleTown_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, OldaleTown_OnTransition .byte 0 @@ -25,8 +21,8 @@ OldaleTown_EventScript_BlockWestEntrance:: return OldaleTown_EventScript_MoveMartEmployee:: - setobjectxyperm LOCALID_MART_EMPLOYEE, 13, 14 - setobjectmovementtype LOCALID_MART_EMPLOYEE, MOVEMENT_TYPE_FACE_DOWN + setobjectxyperm LOCALID_OLDALE_MART_EMPLOYEE, 13, 14 + setobjectmovementtype LOCALID_OLDALE_MART_EMPLOYEE, MOVEMENT_TYPE_FACE_DOWN return OldaleTown_EventScript_TownSign:: @@ -53,22 +49,22 @@ OldaleTown_EventScript_MartEmployee:: end OldaleTown_EventScript_GoToMartSouth:: - applymovement LOCALID_MART_EMPLOYEE, OldaleTown_Movement_EmployeeSouth - applymovement OBJ_EVENT_ID_PLAYER, OldaleTown_Movement_PlayerSouth + applymovement LOCALID_OLDALE_MART_EMPLOYEE, OldaleTown_Movement_EmployeeSouth + applymovement LOCALID_PLAYER, OldaleTown_Movement_PlayerSouth waitmovement 0 goto OldaleTown_EventScript_ExplainPokemonMart end OldaleTown_EventScript_GoToMartNorth:: - applymovement LOCALID_MART_EMPLOYEE, OldaleTown_Movement_EmployeeNorth - applymovement OBJ_EVENT_ID_PLAYER, OldaleTown_Movement_PlayerNorth + applymovement LOCALID_OLDALE_MART_EMPLOYEE, OldaleTown_Movement_EmployeeNorth + applymovement LOCALID_PLAYER, OldaleTown_Movement_PlayerNorth waitmovement 0 goto OldaleTown_EventScript_ExplainPokemonMart end OldaleTown_EventScript_GoToMartEast:: - applymovement OBJ_EVENT_ID_PLAYER, OldaleTown_Movement_PlayerEast - applymovement LOCALID_MART_EMPLOYEE, OldaleTown_Movement_EmployeeEast + applymovement LOCALID_PLAYER, OldaleTown_Movement_PlayerEast + applymovement LOCALID_OLDALE_MART_EMPLOYEE, OldaleTown_Movement_EmployeeEast waitmovement 0 goto OldaleTown_EventScript_ExplainPokemonMart end @@ -204,7 +200,7 @@ OldaleTown_EventScript_FootprintsMan:: OldaleTown_EventScript_BlockedPath:: lockall - applymovement OBJ_EVENT_ID_PLAYER, OldaleTown_Movement_PlayerStepBack + applymovement LOCALID_PLAYER, OldaleTown_Movement_PlayerStepBack applymovement LOCALID_FOOTPRINTS_MAN, OldaleTown_Movement_BackUp waitmovement 0 msgbox OldaleTown_Text_WaitDontComeInHere, MSGBOX_DEFAULT @@ -221,7 +217,7 @@ OldaleTown_EventScript_NotBlockingPath:: OldaleTown_EventScript_Rival:: lockall - applymovement LOCALID_RIVAL, Common_Movement_FacePlayer + applymovement LOCALID_OLDALE_RIVAL, Common_Movement_FacePlayer waitmovement 0 setvar VAR_0x8009, 0 goto OldaleTown_EventScript_ShowRivalMessage @@ -229,9 +225,9 @@ OldaleTown_EventScript_Rival:: OldaleTown_EventScript_RivalTrigger1:: lockall - applymovement LOCALID_RIVAL, OldaleTown_Movement_RivalApproachPlayer1 + applymovement LOCALID_OLDALE_RIVAL, OldaleTown_Movement_RivalApproachPlayer1 waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterRight waitmovement 0 setvar VAR_0x8009, 1 goto OldaleTown_EventScript_ShowRivalMessage @@ -239,9 +235,9 @@ OldaleTown_EventScript_RivalTrigger1:: OldaleTown_EventScript_RivalTrigger2:: lockall - applymovement LOCALID_RIVAL, OldaleTown_Movement_RivalApproachPlayer2 + applymovement LOCALID_OLDALE_RIVAL, OldaleTown_Movement_RivalApproachPlayer2 waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterRight waitmovement 0 setvar VAR_0x8009, 1 goto OldaleTown_EventScript_ShowRivalMessage @@ -249,9 +245,9 @@ OldaleTown_EventScript_RivalTrigger2:: OldaleTown_EventScript_RivalTrigger3:: lockall - applymovement LOCALID_RIVAL, OldaleTown_Movement_RivalApproachPlayer3 + applymovement LOCALID_OLDALE_RIVAL, OldaleTown_Movement_RivalApproachPlayer3 waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterRight waitmovement 0 setvar VAR_0x8009, 1 goto OldaleTown_EventScript_ShowRivalMessage @@ -277,9 +273,9 @@ OldaleTown_EventScript_RivalFinish:: closemessage call_if_eq VAR_0x8009, 0, OldaleTown_EventScript_DoExitMovement1 call_if_eq VAR_0x8009, 1, OldaleTown_EventScript_DoExitMovement2 - applymovement LOCALID_RIVAL, OldaleTown_Movement_RivalExit + applymovement LOCALID_OLDALE_RIVAL, OldaleTown_Movement_RivalExit waitmovement 0 - removeobject LOCALID_RIVAL + removeobject LOCALID_OLDALE_RIVAL setvar VAR_OLDALE_RIVAL_STATE, 2 setflag FLAG_HIDE_OLDALE_TOWN_RIVAL releaseall @@ -287,13 +283,13 @@ OldaleTown_EventScript_RivalFinish:: OldaleTown_EventScript_DoExitMovement1:: goto_if_ne VAR_FACING, DIR_SOUTH, OldaleTown_EventScript_DoExitMovement2 - applymovement LOCALID_RIVAL, OldaleTown_Movement_RivalExit + applymovement LOCALID_OLDALE_RIVAL, OldaleTown_Movement_RivalExit waitmovement 0 return OldaleTown_EventScript_DoExitMovement2:: - applymovement OBJ_EVENT_ID_PLAYER, OldaleTown_Movement_WatchRivalExit - applymovement LOCALID_RIVAL, OldaleTown_Movement_RivalExit + applymovement LOCALID_PLAYER, OldaleTown_Movement_WatchRivalExit + applymovement LOCALID_OLDALE_RIVAL, OldaleTown_Movement_RivalExit waitmovement 0 return diff --git a/data/maps/OldaleTown_Mart/map.json b/data/maps/OldaleTown_Mart/map.json index cfca496fd925..7ec9e7ab68b8 100644 --- a/data/maps/OldaleTown_Mart/map.json +++ b/data/maps/OldaleTown_Mart/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_OLDALE_MART_CLERK", "graphics_id": "OBJ_EVENT_GFX_MART_EMPLOYEE", "x": 1, "y": 3, diff --git a/data/maps/OldaleTown_PokemonCenter_1F/map.json b/data/maps/OldaleTown_PokemonCenter_1F/map.json index d3f72b8492fc..123d371cf491 100644 --- a/data/maps/OldaleTown_PokemonCenter_1F/map.json +++ b/data/maps/OldaleTown_PokemonCenter_1F/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_OLDALE_NURSE", "graphics_id": "OBJ_EVENT_GFX_NURSE", "x": 7, "y": 2, diff --git a/data/maps/OldaleTown_PokemonCenter_1F/scripts.inc b/data/maps/OldaleTown_PokemonCenter_1F/scripts.inc index 07549592f81e..80f4ea359d84 100644 --- a/data/maps/OldaleTown_PokemonCenter_1F/scripts.inc +++ b/data/maps/OldaleTown_PokemonCenter_1F/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_NURSE, 1 - OldaleTown_PokemonCenter_1F_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, OldaleTown_PokemonCenter_1F_OnTransition map_script MAP_SCRIPT_ON_RESUME, CableClub_OnResume @@ -11,7 +9,7 @@ OldaleTown_PokemonCenter_1F_OnTransition: end OldaleTown_PokemonCenter_1F_EventScript_Nurse:: - setvar VAR_0x800B, LOCALID_NURSE + setvar VAR_0x800B, LOCALID_OLDALE_NURSE call Common_EventScript_PkmnCenterNurse waitmessage waitbuttonpress diff --git a/data/maps/PacifidlogTown_PokemonCenter_1F/map.json b/data/maps/PacifidlogTown_PokemonCenter_1F/map.json index f98fdb3dd7b4..08f661ce97c6 100644 --- a/data/maps/PacifidlogTown_PokemonCenter_1F/map.json +++ b/data/maps/PacifidlogTown_PokemonCenter_1F/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_PACIFIDLOG_NURSE", "graphics_id": "OBJ_EVENT_GFX_NURSE", "x": 7, "y": 2, diff --git a/data/maps/PacifidlogTown_PokemonCenter_1F/scripts.inc b/data/maps/PacifidlogTown_PokemonCenter_1F/scripts.inc index 32db89f8dc00..78ea62594a09 100644 --- a/data/maps/PacifidlogTown_PokemonCenter_1F/scripts.inc +++ b/data/maps/PacifidlogTown_PokemonCenter_1F/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_NURSE, 1 - PacifidlogTown_PokemonCenter_1F_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, PacifidlogTown_PokemonCenter_1F_OnTransition map_script MAP_SCRIPT_ON_RESUME, CableClub_OnResume @@ -10,7 +8,7 @@ PacifidlogTown_PokemonCenter_1F_OnTransition: end PacifidlogTown_PokemonCenter_1F_EventScript_Nurse:: - setvar VAR_0x800B, LOCALID_NURSE + setvar VAR_0x800B, LOCALID_PACIFIDLOG_NURSE call Common_EventScript_PkmnCenterNurse waitmessage waitbuttonpress diff --git a/data/maps/PetalburgCity/map.json b/data/maps/PetalburgCity/map.json index 63e02e8955b7..57238192dc0c 100644 --- a/data/maps/PetalburgCity/map.json +++ b/data/maps/PetalburgCity/map.json @@ -39,6 +39,7 @@ "flag": "FLAG_HIDE_PETALBURG_CITY_WALLYS_MOM" }, { + "local_id": "LOCALID_PETALBURG_WALLY", "graphics_id": "OBJ_EVENT_GFX_WALLY", "x": 15, "y": 10, @@ -52,6 +53,7 @@ "flag": "FLAG_HIDE_PETALBURG_CITY_WALLY" }, { + "local_id": "LOCALID_PETALBURG_BOY", "graphics_id": "OBJ_EVENT_GFX_BOY_1", "x": 8, "y": 22, @@ -78,6 +80,7 @@ "flag": "0" }, { + "local_id": "LOCALID_PETALBURG_WALLYS_DAD", "graphics_id": "OBJ_EVENT_GFX_POKEFAN_M", "x": 15, "y": 10, @@ -117,6 +120,7 @@ "flag": "FLAG_ITEM_PETALBURG_CITY_ETHER" }, { + "local_id": "LOCALID_GYM_BOY", "graphics_id": "OBJ_EVENT_GFX_BOY_2", "x": 12, "y": 15, @@ -130,6 +134,7 @@ "flag": "0" }, { + "local_id": "LOCALID_PETALBURG_SCOTT", "graphics_id": "OBJ_EVENT_GFX_SCOTT", "x": 13, "y": 12, diff --git a/data/maps/PetalburgCity/scripts.inc b/data/maps/PetalburgCity/scripts.inc index a9dd1014f265..879e780228a0 100644 --- a/data/maps/PetalburgCity/scripts.inc +++ b/data/maps/PetalburgCity/scripts.inc @@ -1,9 +1,3 @@ -.set LOCALID_WALLY, 2 -.set LOCALID_BOY, 3 -.set LOCALID_WALLYS_DAD, 5 -.set LOCALID_GYM_BOY, 8 -.set LOCALID_SCOTT, 9 - PetalburgCity_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, PetalburgCity_OnTransition map_script MAP_SCRIPT_ON_FRAME_TABLE, PetalburgCity_OnFrame @@ -39,15 +33,15 @@ PetalburgCity_EventScript_WallyTutorial:: lockall special SavePlayerParty special LoadWallyZigzagoon - applymovement LOCALID_WALLY, PetalburgCity_Movement_WallyTutorialWally - applymovement OBJ_EVENT_ID_PLAYER, PetalburgCity_Movement_WallyTutorialPlayer + applymovement LOCALID_PETALBURG_WALLY, PetalburgCity_Movement_WallyTutorialWally + applymovement LOCALID_PLAYER, PetalburgCity_Movement_WallyTutorialPlayer waitmovement 0 msgbox Route102_Text_WatchMeCatchPokemon, MSGBOX_DEFAULT special StartWallyTutorialBattle waitstate msgbox Route102_Text_WallyIDidIt, MSGBOX_DEFAULT - applymovement LOCALID_WALLY, Common_Movement_WalkInPlaceFasterLeft, MAP_PETALBURG_CITY - waitmovement LOCALID_WALLY, MAP_PETALBURG_CITY + applymovement LOCALID_PETALBURG_WALLY, Common_Movement_WalkInPlaceFasterLeft, MAP_PETALBURG_CITY + waitmovement LOCALID_PETALBURG_WALLY, MAP_PETALBURG_CITY msgbox Route102_Text_LetsGoBack, MSGBOX_DEFAULT closemessage clearflag FLAG_HIDE_MAP_NAME_POPUP @@ -64,18 +58,18 @@ PetalburgCity_EventScript_WallyTutorial:: PetalburgCity_EventScript_WalkToWallyHouse:: lockall setflag FLAG_HIDE_MAP_NAME_POPUP - applymovement LOCALID_WALLYS_DAD, PetalburgCity_Movement_WalkToWallyHouseWallysDad - applymovement OBJ_EVENT_ID_PLAYER, PetalburgCity_Movement_WalkToWallyHousePlayer + applymovement LOCALID_PETALBURG_WALLYS_DAD, PetalburgCity_Movement_WalkToWallyHouseWallysDad + applymovement LOCALID_PLAYER, PetalburgCity_Movement_WalkToWallyHousePlayer waitmovement 0 setvar VAR_0x8004, 7 setvar VAR_0x8005, 5 opendoor VAR_0x8004, VAR_0x8005 waitdooranim - applymovement LOCALID_WALLYS_DAD, PetalburgCity_Movement_WalkInsideHouseWallysDad - applymovement OBJ_EVENT_ID_PLAYER, PetalburgCity_Movement_WalkInsideHousePlayer + applymovement LOCALID_PETALBURG_WALLYS_DAD, PetalburgCity_Movement_WalkInsideHouseWallysDad + applymovement LOCALID_PLAYER, PetalburgCity_Movement_WalkInsideHousePlayer waitmovement 0 setflag FLAG_HIDE_PETALBURG_CITY_WALLYS_DAD - hideobjectat OBJ_EVENT_ID_PLAYER, MAP_PETALBURG_CITY + hideobjectat LOCALID_PLAYER, MAP_PETALBURG_CITY closedoor VAR_0x8004, VAR_0x8005 waitdooranim clearflag FLAG_HIDE_MAP_NAME_POPUP @@ -91,7 +85,7 @@ PetalburgCity_EventScript_Boy:: faceplayer msgbox PetalburgCity_Text_WaterReflection, MSGBOX_DEFAULT closemessage - applymovement LOCALID_BOY, Common_Movement_FaceOriginalDirection + applymovement LOCALID_PETALBURG_BOY, Common_Movement_FaceOriginalDirection waitmovement 0 release end @@ -285,7 +279,7 @@ PetalburgCity_EventScript_ShowGymToPlayer:: call_if_eq VAR_0x8008, 3, PetalburgCity_EventScript_LeadPlayerToGym3 msgbox PetalburgCity_Text_ThisIsPetalburgGym, MSGBOX_DEFAULT applymovement LOCALID_GYM_BOY, Common_Movement_WalkInPlaceFasterRight - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterRight waitmovement 0 msgbox PetalburgCity_Text_ThisIsGymSign, MSGBOX_DEFAULT closemessage @@ -298,7 +292,7 @@ PetalburgCity_EventScript_ShowGymToPlayer:: PetalburgCity_EventScript_BoyApproachPlayer0:: applymovement LOCALID_GYM_BOY, PetalburgCity_Movement_BoyApproachPlayer0 waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterDown + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterDown waitmovement 0 return @@ -310,38 +304,38 @@ PetalburgCity_EventScript_BoyApproachPlayer1:: PetalburgCity_EventScript_BoyApproachPlayer2:: applymovement LOCALID_GYM_BOY, PetalburgCity_Movement_BoyApproachPlayer2 waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 return PetalburgCity_EventScript_BoyApproachPlayer3:: applymovement LOCALID_GYM_BOY, PetalburgCity_Movement_BoyApproachPlayer3 waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 return PetalburgCity_EventScript_LeadPlayerToGym0:: applymovement LOCALID_GYM_BOY, PetalburgCity_Movement_BoyWalkToGym0 - applymovement OBJ_EVENT_ID_PLAYER, PetalburgCity_Movement_PlayerWalkToGym0 + applymovement LOCALID_PLAYER, PetalburgCity_Movement_PlayerWalkToGym0 waitmovement 0 return PetalburgCity_EventScript_LeadPlayerToGym1:: applymovement LOCALID_GYM_BOY, PetalburgCity_Movement_BoyWalkToGym1 - applymovement OBJ_EVENT_ID_PLAYER, PetalburgCity_Movement_PlayerWalkToGym1 + applymovement LOCALID_PLAYER, PetalburgCity_Movement_PlayerWalkToGym1 waitmovement 0 return PetalburgCity_EventScript_LeadPlayerToGym2:: applymovement LOCALID_GYM_BOY, PetalburgCity_Movement_BoyWalkToGym2 - applymovement OBJ_EVENT_ID_PLAYER, PetalburgCity_Movement_PlayerWalkToGym2 + applymovement LOCALID_PLAYER, PetalburgCity_Movement_PlayerWalkToGym2 waitmovement 0 return PetalburgCity_EventScript_LeadPlayerToGym3:: applymovement LOCALID_GYM_BOY, PetalburgCity_Movement_BoyWalkToGym3 - applymovement OBJ_EVENT_ID_PLAYER, PetalburgCity_Movement_PlayerWalkToGym3 + applymovement LOCALID_PLAYER, PetalburgCity_Movement_PlayerWalkToGym3 waitmovement 0 return @@ -504,57 +498,57 @@ PetalburgCity_Movement_PlayerWalkToGym3: PetalburgCity_EventScript_Scott0:: lockall - addobject LOCALID_SCOTT + addobject LOCALID_PETALBURG_SCOTT setvar VAR_0x8008, 0 - setobjectxy LOCALID_SCOTT, 13, 10 + setobjectxy LOCALID_PETALBURG_SCOTT, 13, 10 goto PetalburgCity_EventScript_Scott end PetalburgCity_EventScript_Scott1:: lockall - addobject LOCALID_SCOTT + addobject LOCALID_PETALBURG_SCOTT setvar VAR_0x8008, 1 - setobjectxy LOCALID_SCOTT, 13, 11 + setobjectxy LOCALID_PETALBURG_SCOTT, 13, 11 goto PetalburgCity_EventScript_Scott end PetalburgCity_EventScript_Scott2:: lockall - addobject LOCALID_SCOTT + addobject LOCALID_PETALBURG_SCOTT setvar VAR_0x8008, 2 - setobjectxy LOCALID_SCOTT, 13, 12 + setobjectxy LOCALID_PETALBURG_SCOTT, 13, 12 goto PetalburgCity_EventScript_Scott end PetalburgCity_EventScript_Scott3:: lockall - addobject LOCALID_SCOTT + addobject LOCALID_PETALBURG_SCOTT setvar VAR_0x8008, 3 - setobjectxy LOCALID_SCOTT, 13, 13 + setobjectxy LOCALID_PETALBURG_SCOTT, 13, 13 goto PetalburgCity_EventScript_Scott end PetalburgCity_EventScript_Scott:: - applymovement LOCALID_SCOTT, PetalburgCity_Movement_ScottStartWalkLeft + applymovement LOCALID_PETALBURG_SCOTT, PetalburgCity_Movement_ScottStartWalkLeft waitmovement 0 playse SE_PIN - applymovement LOCALID_SCOTT, Common_Movement_ExclamationMark + applymovement LOCALID_PETALBURG_SCOTT, Common_Movement_ExclamationMark waitmovement 0 - applymovement LOCALID_SCOTT, Common_Movement_Delay48 + applymovement LOCALID_PETALBURG_SCOTT, Common_Movement_Delay48 waitmovement 0 - applymovement LOCALID_SCOTT, PetalburgCity_Movement_ScottApproachPlayer + applymovement LOCALID_PETALBURG_SCOTT, PetalburgCity_Movement_ScottApproachPlayer waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterRight waitmovement 0 setvar VAR_SCOTT_STATE, 1 msgbox PetalburgCity_Text_AreYouATrainer, MSGBOX_DEFAULT closemessage - applymovement LOCALID_SCOTT, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_PETALBURG_SCOTT, Common_Movement_WalkInPlaceFasterRight waitmovement 0 delay 30 msgbox PetalburgCity_Text_WellMaybeNot, MSGBOX_DEFAULT closemessage - applymovement LOCALID_SCOTT, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_PETALBURG_SCOTT, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 delay 30 msgbox PetalburgCity_Text_ImLookingForTalentedTrainers, MSGBOX_DEFAULT @@ -564,31 +558,31 @@ PetalburgCity_EventScript_Scott:: call_if_eq VAR_0x8008, 2, PetalburgCity_EventScript_ScottExit2 call_if_eq VAR_0x8008, 3, PetalburgCity_EventScript_ScottExit3 setvar VAR_SCOTT_PETALBURG_ENCOUNTER, 1 - removeobject LOCALID_SCOTT + removeobject LOCALID_PETALBURG_SCOTT releaseall end PetalburgCity_EventScript_ScottExit0:: - applymovement OBJ_EVENT_ID_PLAYER, PetalburgCity_Movement_PlayerWatchScottExit0 - applymovement LOCALID_SCOTT, PetalburgCity_Movement_ScottExit0 + applymovement LOCALID_PLAYER, PetalburgCity_Movement_PlayerWatchScottExit0 + applymovement LOCALID_PETALBURG_SCOTT, PetalburgCity_Movement_ScottExit0 waitmovement 0 return PetalburgCity_EventScript_ScottExit1:: - applymovement OBJ_EVENT_ID_PLAYER, PetalburgCity_Movement_PlayerWatchScottExit1 - applymovement LOCALID_SCOTT, PetalburgCity_Movement_ScottExit1 + applymovement LOCALID_PLAYER, PetalburgCity_Movement_PlayerWatchScottExit1 + applymovement LOCALID_PETALBURG_SCOTT, PetalburgCity_Movement_ScottExit1 waitmovement 0 return PetalburgCity_EventScript_ScottExit2:: - applymovement OBJ_EVENT_ID_PLAYER, PetalburgCity_Movement_PlayerWatchScottExit2 - applymovement LOCALID_SCOTT, PetalburgCity_Movement_ScottExit2 + applymovement LOCALID_PLAYER, PetalburgCity_Movement_PlayerWatchScottExit2 + applymovement LOCALID_PETALBURG_SCOTT, PetalburgCity_Movement_ScottExit2 waitmovement 0 return PetalburgCity_EventScript_ScottExit3:: - applymovement OBJ_EVENT_ID_PLAYER, PetalburgCity_Movement_PlayerWatchScottExit3 - applymovement LOCALID_SCOTT, PetalburgCity_Movement_ScottExit3 + applymovement LOCALID_PLAYER, PetalburgCity_Movement_PlayerWatchScottExit3 + applymovement LOCALID_PETALBURG_SCOTT, PetalburgCity_Movement_ScottExit3 waitmovement 0 return diff --git a/data/maps/PetalburgCity_Gym/map.json b/data/maps/PetalburgCity_Gym/map.json index ef5849171339..ecc3176b2078 100644 --- a/data/maps/PetalburgCity_Gym/map.json +++ b/data/maps/PetalburgCity_Gym/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_PETALBURG_GYM_NORMAN", "graphics_id": "OBJ_EVENT_GFX_NORMAN", "x": 4, "y": 2, @@ -132,6 +133,7 @@ "flag": "FLAG_HIDE_PETALBURG_GYM_GREETER" }, { + "local_id": "LOCALID_PETALBURG_GYM_WALLY", "graphics_id": "OBJ_EVENT_GFX_WALLY", "x": 4, "y": 111, @@ -145,6 +147,7 @@ "flag": "FLAG_HIDE_PETALBURG_GYM_WALLY" }, { + "local_id": "LOCALID_PETALBURG_GYM_WALLYS_DAD", "graphics_id": "OBJ_EVENT_GFX_POKEFAN_M", "x": 1, "y": 7, diff --git a/data/maps/PetalburgCity_Gym/scripts.inc b/data/maps/PetalburgCity_Gym/scripts.inc index 8b107c68ec42..ae93d8c8f396 100644 --- a/data/maps/PetalburgCity_Gym/scripts.inc +++ b/data/maps/PetalburgCity_Gym/scripts.inc @@ -1,7 +1,3 @@ -.set LOCALID_NORMAN, 1 -.set LOCALID_WALLY, 10 -.set LOCALID_WALLYS_DAD, 11 - PetalburgCity_Gym_MapScripts:: map_script MAP_SCRIPT_ON_LOAD, PetalburgCity_Gym_OnLoad map_script MAP_SCRIPT_ON_TRANSITION, PetalburgCity_Gym_OnTransition @@ -46,11 +42,11 @@ PetalburgCity_Gym_OnTransition: end PetalburgCity_Gym_EventScript_MoveWallyToEntrance:: - setobjectxyperm LOCALID_WALLY, 5, 108 + setobjectxyperm LOCALID_PETALBURG_GYM_WALLY, 5, 108 return PetalburgCity_Gym_EventScript_MoveNormanToEntrance:: - setobjectxyperm LOCALID_NORMAN, 4, 107 + setobjectxyperm LOCALID_PETALBURG_GYM_NORMAN, 4, 107 return PetalburgCity_Gym_EventScript_CheckNormanForRematch:: @@ -58,7 +54,7 @@ PetalburgCity_Gym_EventScript_CheckNormanForRematch:: specialvar VAR_RESULT, IsTrainerReadyForRematch goto_if_eq VAR_RESULT, TRUE, PetalburgCity_Gym_EventScript_DontMoveNormanToFront goto_if_eq VAR_PETALBURG_GYM_STATE, 8, PetalburgCity_Gym_EventScript_DontMoveNormanToFront - setobjectxyperm LOCALID_NORMAN, 4, 107 + setobjectxyperm LOCALID_PETALBURG_GYM_NORMAN, 4, 107 return PetalburgCity_Gym_EventScript_DontMoveNormanToFront:: @@ -70,7 +66,7 @@ PetalburgCity_Gym_OnWarp: .2byte 0 PetalburgCity_Gym_EventScript_TurnPlayerNorth:: - turnobject OBJ_EVENT_ID_PLAYER, DIR_NORTH + turnobject LOCALID_PLAYER, DIR_NORTH end PetalburgCity_Gym_OnFrame: @@ -82,14 +78,14 @@ PetalburgCity_Gym_EventScript_ReturnFromWallyTutorial:: msgbox PetalburgCity_Gym_Text_DadSoDidItWorkOut, MSGBOX_DEFAULT msgbox PetalburgCity_Gym_Text_WallyThankYouBye, MSGBOX_DEFAULT closemessage - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterDown - applymovement LOCALID_WALLY, PetalburgCity_Gym_Movement_WallyExitGym + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterDown + applymovement LOCALID_PETALBURG_GYM_WALLY, PetalburgCity_Gym_Movement_WallyExitGym waitmovement 0 playse SE_EXIT - removeobject LOCALID_WALLY + removeobject LOCALID_PETALBURG_GYM_WALLY setflag FLAG_HIDE_PETALBURG_CITY_WALLY delay 30 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 msgbox PetalburgCity_Gym_Text_DadGoCollectBadges, MSGBOX_DEFAULT setvar VAR_PETALBURG_GYM_STATE, 2 @@ -144,7 +140,7 @@ PetalburgCity_Gym_EventScript_BeginWallyTutorialEast:: end PetalburgCity_Gym_EventScript_BeginWallyTutorial:: - addobject LOCALID_WALLY + addobject LOCALID_PETALBURG_GYM_WALLY playse SE_DOOR call_if_eq VAR_0x8008, 0, PetalburgCity_Gym_EventScript_WallyArriveSouth call_if_eq VAR_0x8008, 1, PetalburgCity_Gym_EventScript_WallyArriveNorth @@ -182,7 +178,7 @@ PetalburgCity_Gym_EventScript_BeginWallyTutorial:: call_if_eq VAR_0x8008, 1, PetalburgCity_Gym_EventScript_ExitGymWithWallyNorth call_if_eq VAR_0x8008, 2, PetalburgCity_Gym_EventScript_ExitGymWithWallyWest call_if_eq VAR_0x8008, 3, PetalburgCity_Gym_EventScript_ExitGymWithWallyEast - removeobject LOCALID_WALLY + removeobject LOCALID_PETALBURG_GYM_WALLY setflag FLAG_HIDE_PETALBURG_CITY_WALLYS_MOM setvar VAR_PETALBURG_GYM_STATE, 1 setvar VAR_PETALBURG_CITY_STATE, 2 @@ -196,101 +192,101 @@ PetalburgCity_Gym_EventScript_BeginWallyTutorial:: end PetalburgCity_Gym_EventScript_WallyArriveSouth:: - applymovement LOCALID_NORMAN, Common_Movement_WalkInPlaceFasterDown - applymovement LOCALID_WALLY, PetalburgCity_Gym_Movement_WallyArrive + applymovement LOCALID_PETALBURG_GYM_NORMAN, Common_Movement_WalkInPlaceFasterDown + applymovement LOCALID_PETALBURG_GYM_WALLY, PetalburgCity_Gym_Movement_WallyArrive waitmovement 0 return PetalburgCity_Gym_EventScript_WallyArriveNorth:: - applymovement LOCALID_WALLY, PetalburgCity_Gym_Movement_WallyArriveNorth + applymovement LOCALID_PETALBURG_GYM_WALLY, PetalburgCity_Gym_Movement_WallyArriveNorth waitmovement 0 - applymovement LOCALID_NORMAN, Common_Movement_WalkInPlaceFasterRight - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_PETALBURG_GYM_NORMAN, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterRight waitmovement 0 return PetalburgCity_Gym_EventScript_WallyArriveWestEast:: - applymovement LOCALID_NORMAN, Common_Movement_WalkInPlaceFasterDown - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterDown - applymovement LOCALID_WALLY, PetalburgCity_Gym_Movement_WallyArrive + applymovement LOCALID_PETALBURG_GYM_NORMAN, Common_Movement_WalkInPlaceFasterDown + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterDown + applymovement LOCALID_PETALBURG_GYM_WALLY, PetalburgCity_Gym_Movement_WallyArrive waitmovement 0 return PetalburgCity_Gym_EventScript_ExitGymWithWallySouth:: - applymovement LOCALID_NORMAN, Common_Movement_WalkInPlaceFasterDown - applymovement LOCALID_WALLY, PetalburgCity_Gym_Movement_WallyExitSouthWest - applymovement OBJ_EVENT_ID_PLAYER, PetalburgCity_Gym_Movement_PlayerExitWithWallySouth + applymovement LOCALID_PETALBURG_GYM_NORMAN, Common_Movement_WalkInPlaceFasterDown + applymovement LOCALID_PETALBURG_GYM_WALLY, PetalburgCity_Gym_Movement_WallyExitSouthWest + applymovement LOCALID_PLAYER, PetalburgCity_Gym_Movement_PlayerExitWithWallySouth waitmovement 0 return PetalburgCity_Gym_EventScript_ExitGymWithWallyNorth:: - applymovement LOCALID_WALLY, PetalburgCity_Gym_Movement_WallyExitNorth - applymovement OBJ_EVENT_ID_PLAYER, PetalburgCity_Gym_Movement_PlayerExitWithWallyNorth + applymovement LOCALID_PETALBURG_GYM_WALLY, PetalburgCity_Gym_Movement_WallyExitNorth + applymovement LOCALID_PLAYER, PetalburgCity_Gym_Movement_PlayerExitWithWallyNorth waitmovement 0 return PetalburgCity_Gym_EventScript_ExitGymWithWallyWest:: - applymovement LOCALID_WALLY, PetalburgCity_Gym_Movement_WallyExitSouthWest - applymovement OBJ_EVENT_ID_PLAYER, PetalburgCity_Gym_Movement_PlayerExitWithWallyWest + applymovement LOCALID_PETALBURG_GYM_WALLY, PetalburgCity_Gym_Movement_WallyExitSouthWest + applymovement LOCALID_PLAYER, PetalburgCity_Gym_Movement_PlayerExitWithWallyWest waitmovement 0 return PetalburgCity_Gym_EventScript_ExitGymWithWallyEast:: - applymovement LOCALID_WALLY, PetalburgCity_Gym_Movement_WallyExitEast - applymovement OBJ_EVENT_ID_PLAYER, PetalburgCity_Gym_Movement_PlayerExitWithWallyEast + applymovement LOCALID_PETALBURG_GYM_WALLY, PetalburgCity_Gym_Movement_WallyExitEast + applymovement LOCALID_PLAYER, PetalburgCity_Gym_Movement_PlayerExitWithWallyEast waitmovement 0 return PetalburgCity_Gym_EventScript_NormanAddressPlayerSouth:: - applymovement LOCALID_NORMAN, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_PETALBURG_GYM_NORMAN, Common_Movement_WalkInPlaceFasterUp waitmovement 0 return PetalburgCity_Gym_EventScript_NormanAddressPlayerNorth:: - applymovement LOCALID_NORMAN, Common_Movement_WalkInPlaceFasterDown - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_PETALBURG_GYM_NORMAN, Common_Movement_WalkInPlaceFasterDown + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 return PetalburgCity_Gym_EventScript_NormanAddressPlayerWest:: - applymovement LOCALID_NORMAN, Common_Movement_WalkInPlaceFasterRight - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_PETALBURG_GYM_NORMAN, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 return PetalburgCity_Gym_EventScript_NormanAddressPlayerEast:: - applymovement LOCALID_NORMAN, Common_Movement_WalkInPlaceFasterLeft - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_PETALBURG_GYM_NORMAN, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterRight waitmovement 0 return PetalburgCity_Gym_EventScript_NormanAddressWallySouth:: - applymovement LOCALID_NORMAN, Common_Movement_WalkInPlaceFasterDown + applymovement LOCALID_PETALBURG_GYM_NORMAN, Common_Movement_WalkInPlaceFasterDown waitmovement 0 return PetalburgCity_Gym_EventScript_NormanAddressWallyNorth:: - applymovement LOCALID_NORMAN, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_PETALBURG_GYM_NORMAN, Common_Movement_WalkInPlaceFasterRight waitmovement 0 return PetalburgCity_Gym_EventScript_NormanAddressWallyWest:: - applymovement LOCALID_NORMAN, Common_Movement_WalkInPlaceFasterDown + applymovement LOCALID_PETALBURG_GYM_NORMAN, Common_Movement_WalkInPlaceFasterDown waitmovement 0 return PetalburgCity_Gym_EventScript_NormanAddressWallyEast:: - applymovement LOCALID_NORMAN, Common_Movement_WalkInPlaceFasterDown + applymovement LOCALID_PETALBURG_GYM_NORMAN, Common_Movement_WalkInPlaceFasterDown waitmovement 0 return PetalburgCity_Gym_EventScript_WallyFacePlayer:: - applymovement LOCALID_WALLY, Common_Movement_FacePlayer + applymovement LOCALID_PETALBURG_GYM_WALLY, Common_Movement_FacePlayer waitmovement 0 return PetalburgCity_Gym_EventScript_WallyFaceDown:: - applymovement LOCALID_WALLY, Common_Movement_WalkInPlaceFasterDown + applymovement LOCALID_PETALBURG_GYM_WALLY, Common_Movement_WalkInPlaceFasterDown waitmovement 0 return @@ -319,7 +315,7 @@ PetalburgCity_Gym_EventScript_NormanFaceDoorSouth:: @ For all other NormanFaceDoorX, Norman is already facing the door from NormanAddressWallyX PetalburgCity_Gym_EventScript_NormanFaceDoorNorth:: - applymovement LOCALID_NORMAN, Common_Movement_WalkInPlaceFasterDown + applymovement LOCALID_PETALBURG_GYM_NORMAN, Common_Movement_WalkInPlaceFasterDown waitmovement 0 return @@ -397,7 +393,7 @@ PetalburgCity_Gym_EventScript_NormanBattle:: delay 40 playse SE_DOOR delay 10 - addobject LOCALID_WALLYS_DAD + addobject LOCALID_PETALBURG_GYM_WALLYS_DAD switch VAR_FACING case DIR_NORTH, PetalburgCity_Gym_EventScript_WallysDadArrivesNorth case DIR_WEST, PetalburgCity_Gym_EventScript_WallysDadArrivesWest @@ -424,12 +420,12 @@ PetalburgCity_Gym_EventScript_WallysDadArrivesWest:: goto PetalburgCity_Gym_EventScript_WallysDadArrives PetalburgCity_Gym_EventScript_WallysDadArrives:: - applymovement LOCALID_WALLYS_DAD, PetalburgCity_Gym_Movement_WallysDadEnterGym + applymovement LOCALID_PETALBURG_GYM_WALLYS_DAD, PetalburgCity_Gym_Movement_WallysDadEnterGym waitmovement 0 playse SE_PIN - applymovement LOCALID_WALLYS_DAD, Common_Movement_ExclamationMark + applymovement LOCALID_PETALBURG_GYM_WALLYS_DAD, Common_Movement_ExclamationMark waitmovement 0 - applymovement LOCALID_WALLYS_DAD, Common_Movement_Delay48 + applymovement LOCALID_PETALBURG_GYM_WALLYS_DAD, Common_Movement_Delay48 waitmovement 0 delay 10 call_if_eq VAR_0x8008, 1, PetalburgCity_Gym_EventScript_WallysDadApproachPlayerNorth @@ -448,7 +444,7 @@ PetalburgCity_Gym_EventScript_WallysDadArrives:: call_if_eq VAR_0x8008, 1, PetalburgCity_Gym_EventScript_ExitGymWithWallysDadNorth call_if_eq VAR_0x8008, 2, PetalburgCity_Gym_EventScript_ExitGymWithWallysDadEast call_if_eq VAR_0x8008, 3, PetalburgCity_Gym_EventScript_ExitGymWithWallysDadWest - removeobject LOCALID_WALLYS_DAD + removeobject LOCALID_PETALBURG_GYM_WALLYS_DAD setvar VAR_PETALBURG_CITY_STATE, 4 clearflag FLAG_HIDE_PETALBURG_CITY_WALLYS_DAD warp MAP_PETALBURG_CITY, 15, 8 @@ -457,60 +453,60 @@ PetalburgCity_Gym_EventScript_WallysDadArrives:: end PetalburgCity_Gym_EventScript_WallysDadFaceNormanNorth:: - applymovement LOCALID_WALLYS_DAD, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_PETALBURG_GYM_WALLYS_DAD, Common_Movement_WalkInPlaceFasterUp waitmovement 0 return PetalburgCity_Gym_EventScript_WallysDadFaceNormanEast:: - applymovement LOCALID_WALLYS_DAD, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_PETALBURG_GYM_WALLYS_DAD, Common_Movement_WalkInPlaceFasterRight waitmovement 0 return PetalburgCity_Gym_EventScript_WallysDadFaceNormanWest:: - applymovement LOCALID_WALLYS_DAD, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_PETALBURG_GYM_WALLYS_DAD, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 return PetalburgCity_Gym_EventScript_WallysDadApproachPlayerNorth:: - applymovement LOCALID_WALLYS_DAD, PetalburgCity_Gym_Movement_WallysDadApproachPlayerNorth + applymovement LOCALID_PETALBURG_GYM_WALLYS_DAD, PetalburgCity_Gym_Movement_WallysDadApproachPlayerNorth waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft - applymovement LOCALID_NORMAN, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_PETALBURG_GYM_NORMAN, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 return PetalburgCity_Gym_EventScript_WallysDadApproachPlayerEast:: - applymovement LOCALID_WALLYS_DAD, PetalburgCity_Gym_Movement_WallysDadApproachPlayerEast + applymovement LOCALID_PETALBURG_GYM_WALLYS_DAD, PetalburgCity_Gym_Movement_WallysDadApproachPlayerEast waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterDown - applymovement LOCALID_NORMAN, Common_Movement_WalkInPlaceFasterDown + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterDown + applymovement LOCALID_PETALBURG_GYM_NORMAN, Common_Movement_WalkInPlaceFasterDown waitmovement 0 return PetalburgCity_Gym_EventScript_WallysDadApproachPlayerWest:: - applymovement LOCALID_WALLYS_DAD, PetalburgCity_Gym_Movement_WallysDadApproachPlayerWest + applymovement LOCALID_PETALBURG_GYM_WALLYS_DAD, PetalburgCity_Gym_Movement_WallysDadApproachPlayerWest waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterDown - applymovement LOCALID_NORMAN, Common_Movement_WalkInPlaceFasterDown + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterDown + applymovement LOCALID_PETALBURG_GYM_NORMAN, Common_Movement_WalkInPlaceFasterDown waitmovement 0 return PetalburgCity_Gym_EventScript_ExitGymWithWallysDadNorth:: - applymovement LOCALID_WALLYS_DAD, PetalburgCity_Gym_Movement_WallysDadExitNorth - applymovement LOCALID_NORMAN, Common_Movement_WalkInPlaceFasterDown - applymovement OBJ_EVENT_ID_PLAYER, PetalburgCity_Gym_Movement_PlayerExitWithWallysDadNorth + applymovement LOCALID_PETALBURG_GYM_WALLYS_DAD, PetalburgCity_Gym_Movement_WallysDadExitNorth + applymovement LOCALID_PETALBURG_GYM_NORMAN, Common_Movement_WalkInPlaceFasterDown + applymovement LOCALID_PLAYER, PetalburgCity_Gym_Movement_PlayerExitWithWallysDadNorth waitmovement 0 return PetalburgCity_Gym_EventScript_ExitGymWithWallysDadEast:: - applymovement LOCALID_WALLYS_DAD, PetalburgCity_Gym_Movement_WallysDadExitEast - applymovement OBJ_EVENT_ID_PLAYER, PetalburgCity_Gym_Movement_PlayerExitWithWallysDadEast + applymovement LOCALID_PETALBURG_GYM_WALLYS_DAD, PetalburgCity_Gym_Movement_WallysDadExitEast + applymovement LOCALID_PLAYER, PetalburgCity_Gym_Movement_PlayerExitWithWallysDadEast waitmovement 0 return PetalburgCity_Gym_EventScript_ExitGymWithWallysDadWest:: - applymovement LOCALID_WALLYS_DAD, PetalburgCity_Gym_Movement_WallysDadExitWest - applymovement OBJ_EVENT_ID_PLAYER, PetalburgCity_Gym_Movement_PlayerExitWithWallysDadWest + applymovement LOCALID_PETALBURG_GYM_WALLYS_DAD, PetalburgCity_Gym_Movement_WallysDadExitWest + applymovement LOCALID_PLAYER, PetalburgCity_Gym_Movement_PlayerExitWithWallysDadWest waitmovement 0 return diff --git a/data/maps/PetalburgCity_Mart/map.json b/data/maps/PetalburgCity_Mart/map.json index 7c8a70b28e7c..884e25d3ea3e 100644 --- a/data/maps/PetalburgCity_Mart/map.json +++ b/data/maps/PetalburgCity_Mart/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_PETALBURG_MART_CLERK", "graphics_id": "OBJ_EVENT_GFX_MART_EMPLOYEE", "x": 1, "y": 3, diff --git a/data/maps/PetalburgCity_PokemonCenter_1F/map.json b/data/maps/PetalburgCity_PokemonCenter_1F/map.json index 12b7810df942..ae19e848b358 100644 --- a/data/maps/PetalburgCity_PokemonCenter_1F/map.json +++ b/data/maps/PetalburgCity_PokemonCenter_1F/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_PETALBURG_NURSE", "graphics_id": "OBJ_EVENT_GFX_NURSE", "x": 7, "y": 2, diff --git a/data/maps/PetalburgCity_PokemonCenter_1F/scripts.inc b/data/maps/PetalburgCity_PokemonCenter_1F/scripts.inc index 3dadd3184bac..032007dcfcbf 100644 --- a/data/maps/PetalburgCity_PokemonCenter_1F/scripts.inc +++ b/data/maps/PetalburgCity_PokemonCenter_1F/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_NURSE, 1 - PetalburgCity_PokemonCenter_1F_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, PetalburgCity_PokemonCenter_1F_OnTransition map_script MAP_SCRIPT_ON_RESUME, CableClub_OnResume @@ -11,7 +9,7 @@ PetalburgCity_PokemonCenter_1F_OnTransition: end PetalburgCity_PokemonCenter_1F_EventScript_Nurse:: - setvar VAR_0x800B, LOCALID_NURSE + setvar VAR_0x800B, LOCALID_PETALBURG_NURSE call Common_EventScript_PkmnCenterNurse waitmessage waitbuttonpress diff --git a/data/maps/PetalburgCity_WallysHouse/map.json b/data/maps/PetalburgCity_WallysHouse/map.json index f2fd03e7ff01..8fb48df1ba9c 100644 --- a/data/maps/PetalburgCity_WallysHouse/map.json +++ b/data/maps/PetalburgCity_WallysHouse/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_WALLYS_HOUSE_WALLYS_DAD", "graphics_id": "OBJ_EVENT_GFX_POKEFAN_M", "x": 3, "y": 4, diff --git a/data/maps/PetalburgCity_WallysHouse/scripts.inc b/data/maps/PetalburgCity_WallysHouse/scripts.inc index f7e2e97828cb..fd8896064ef7 100644 --- a/data/maps/PetalburgCity_WallysHouse/scripts.inc +++ b/data/maps/PetalburgCity_WallysHouse/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_WALLYS_DAD, 1 - PetalburgCity_WallysHouse_MapScripts:: map_script MAP_SCRIPT_ON_FRAME_TABLE, PetalburgCity_WallysHouse_OnFrame map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, PetalburgCity_WallysHouse_OnWarp @@ -10,8 +8,8 @@ PetalburgCity_WallysHouse_OnWarp: .2byte 0 PetalburgCity_WallysHouse_EventScript_PlayerWallysDadFaceEachOther:: - turnobject OBJ_EVENT_ID_PLAYER, DIR_EAST - turnobject LOCALID_WALLYS_DAD, DIR_WEST + turnobject LOCALID_PLAYER, DIR_EAST + turnobject LOCALID_WALLYS_HOUSE_WALLYS_DAD, DIR_WEST end PetalburgCity_WallysHouse_OnFrame: diff --git a/data/maps/PetalburgWoods/map.json b/data/maps/PetalburgWoods/map.json index 2979e7e46908..5b6fa65fa75e 100644 --- a/data/maps/PetalburgWoods/map.json +++ b/data/maps/PetalburgWoods/map.json @@ -41,6 +41,7 @@ "flag": "FLAG_TEMP_12" }, { + "local_id": "LOCALID_PETALBURG_WOODS_GRUNT", "graphics_id": "OBJ_EVENT_GFX_AQUA_MEMBER_M", "x": 26, "y": 17, @@ -54,6 +55,7 @@ "flag": "FLAG_HIDE_PETALBURG_WOODS_AQUA_GRUNT" }, { + "local_id": "LOCALID_PETALBURG_WOODS_DEVON_EMPLOYEE", "graphics_id": "OBJ_EVENT_GFX_MAN_2", "x": 26, "y": 20, diff --git a/data/maps/PetalburgWoods/scripts.inc b/data/maps/PetalburgWoods/scripts.inc index 94bd3901486d..14cf1aabb4be 100644 --- a/data/maps/PetalburgWoods/scripts.inc +++ b/data/maps/PetalburgWoods/scripts.inc @@ -1,40 +1,37 @@ -.set LOCALID_GRUNT, 3 -.set LOCALID_DEVON_EMPLOYEE, 4 - PetalburgWoods_MapScripts:: .byte 0 PetalburgWoods_EventScript_DevonResearcherLeft:: lockall call PetalburgWoods_EventScript_DevonResearcherIntro - applymovement LOCALID_DEVON_EMPLOYEE, PetalburgWoods_Movement_DevonResearcherApproachPlayerLeft + applymovement LOCALID_PETALBURG_WOODS_DEVON_EMPLOYEE, PetalburgWoods_Movement_DevonResearcherApproachPlayerLeft waitmovement 0 msgbox PetalburgWoods_Text_HaveYouSeenShroomish, MSGBOX_DEFAULT closemessage playbgm MUS_ENCOUNTER_AQUA, FALSE - applymovement LOCALID_GRUNT, PetalburgWoods_Movement_AquaEntrance + applymovement LOCALID_PETALBURG_WOODS_GRUNT, PetalburgWoods_Movement_AquaEntrance waitmovement 0 msgbox PetalburgWoods_Text_IWasGoingToAmbushYou, MSGBOX_DEFAULT closemessage - applymovement LOCALID_GRUNT, PetalburgWoods_Movement_AquaApproachResearcherLeft + applymovement LOCALID_PETALBURG_WOODS_GRUNT, PetalburgWoods_Movement_AquaApproachResearcherLeft waitmovement 0 - applymovement LOCALID_DEVON_EMPLOYEE, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_PETALBURG_WOODS_DEVON_EMPLOYEE, Common_Movement_WalkInPlaceFasterUp waitmovement 0 msgbox PetalburgWoods_Text_HandOverThosePapers, MSGBOX_DEFAULT closemessage - applymovement LOCALID_DEVON_EMPLOYEE, PetalburgWoods_Movement_DevonResearcherFleeToPlayerLeft + applymovement LOCALID_PETALBURG_WOODS_DEVON_EMPLOYEE, PetalburgWoods_Movement_DevonResearcherFleeToPlayerLeft waitmovement 0 msgbox PetalburgWoods_Text_YouHaveToHelpMe, MSGBOX_DEFAULT closemessage - applymovement LOCALID_GRUNT, PetalburgWoods_Movement_AquaApproachPlayer + applymovement LOCALID_PETALBURG_WOODS_GRUNT, PetalburgWoods_Movement_AquaApproachPlayer waitmovement 0 msgbox PetalburgWoods_Text_NoOneCrossesTeamAqua, MSGBOX_DEFAULT trainerbattle_no_intro TRAINER_GRUNT_PETALBURG_WOODS, PetalburgWoods_Text_YoureKiddingMe - applymovement LOCALID_GRUNT, PetalburgWoods_Movement_AquaBackOff + applymovement LOCALID_PETALBURG_WOODS_GRUNT, PetalburgWoods_Movement_AquaBackOff waitmovement 0 call PetalburgWoods_EventScript_DevonResearcherPostBattle - applymovement OBJ_EVENT_ID_PLAYER, PetalburgWoods_Movement_WatchResearcherLeave - applymovement LOCALID_DEVON_EMPLOYEE, PetalburgWoods_Movement_DevonResearcherExitLeft + applymovement LOCALID_PLAYER, PetalburgWoods_Movement_WatchResearcherLeave + applymovement LOCALID_PETALBURG_WOODS_DEVON_EMPLOYEE, PetalburgWoods_Movement_DevonResearcherExitLeft waitmovement 0 goto PetalburgWoods_EventScript_RemoveDevonResearcher end @@ -42,41 +39,41 @@ PetalburgWoods_EventScript_DevonResearcherLeft:: PetalburgWoods_EventScript_DevonResearcherRight:: lockall call PetalburgWoods_EventScript_DevonResearcherIntro - applymovement LOCALID_DEVON_EMPLOYEE, PetalburgWoods_Movement_DevonResearcherApproachPlayerRight + applymovement LOCALID_PETALBURG_WOODS_DEVON_EMPLOYEE, PetalburgWoods_Movement_DevonResearcherApproachPlayerRight waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 msgbox PetalburgWoods_Text_HaveYouSeenShroomish, MSGBOX_DEFAULT closemessage playbgm MUS_ENCOUNTER_AQUA, FALSE - applymovement LOCALID_GRUNT, PetalburgWoods_Movement_AquaEntrance + applymovement LOCALID_PETALBURG_WOODS_GRUNT, PetalburgWoods_Movement_AquaEntrance waitmovement 0 msgbox PetalburgWoods_Text_IWasGoingToAmbushYou, MSGBOX_DEFAULT closemessage - applymovement LOCALID_GRUNT, PetalburgWoods_Movement_AquaApproachResearcherRight + applymovement LOCALID_PETALBURG_WOODS_GRUNT, PetalburgWoods_Movement_AquaApproachResearcherRight waitmovement 0 - applymovement LOCALID_DEVON_EMPLOYEE, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_PETALBURG_WOODS_DEVON_EMPLOYEE, Common_Movement_WalkInPlaceFasterUp waitmovement 0 msgbox PetalburgWoods_Text_HandOverThosePapers, MSGBOX_DEFAULT closemessage - applymovement LOCALID_DEVON_EMPLOYEE, PetalburgWoods_Movement_DevonResearcherFleeToPlayerRight + applymovement LOCALID_PETALBURG_WOODS_DEVON_EMPLOYEE, PetalburgWoods_Movement_DevonResearcherFleeToPlayerRight waitmovement 0 msgbox PetalburgWoods_Text_YouHaveToHelpMe, MSGBOX_DEFAULT - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 msgbox PetalburgWoods_Text_NoOneCrossesTeamAqua, MSGBOX_DEFAULT trainerbattle_no_intro TRAINER_GRUNT_PETALBURG_WOODS, PetalburgWoods_Text_YoureKiddingMe - applymovement LOCALID_GRUNT, PetalburgWoods_Movement_AquaBackOff + applymovement LOCALID_PETALBURG_WOODS_GRUNT, PetalburgWoods_Movement_AquaBackOff waitmovement 0 call PetalburgWoods_EventScript_DevonResearcherPostBattle - applymovement OBJ_EVENT_ID_PLAYER, PetalburgWoods_Movement_WatchResearcherLeave - applymovement LOCALID_DEVON_EMPLOYEE, PetalburgWoods_Movement_DevonResearcherExitRight + applymovement LOCALID_PLAYER, PetalburgWoods_Movement_WatchResearcherLeave + applymovement LOCALID_PETALBURG_WOODS_DEVON_EMPLOYEE, PetalburgWoods_Movement_DevonResearcherExitRight waitmovement 0 goto PetalburgWoods_EventScript_RemoveDevonResearcher end PetalburgWoods_EventScript_DevonResearcherIntro:: - applymovement LOCALID_DEVON_EMPLOYEE, PetalburgWoods_Movement_DevonResearcherLookAround + applymovement LOCALID_PETALBURG_WOODS_DEVON_EMPLOYEE, PetalburgWoods_Movement_DevonResearcherLookAround waitmovement 0 msgbox PetalburgWoods_Text_NotAOneToBeFound, MSGBOX_DEFAULT closemessage @@ -85,10 +82,10 @@ PetalburgWoods_EventScript_DevonResearcherIntro:: PetalburgWoods_EventScript_DevonResearcherPostBattle:: msgbox PetalburgWoods_Text_YouveGotSomeNerve, MSGBOX_DEFAULT closemessage - applymovement LOCALID_GRUNT, PetalburgWoods_Movement_AquaRunAway + applymovement LOCALID_PETALBURG_WOODS_GRUNT, PetalburgWoods_Movement_AquaRunAway waitmovement 0 - removeobject LOCALID_GRUNT - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterDown + removeobject LOCALID_PETALBURG_WOODS_GRUNT + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterDown waitmovement 0 msgbox PetalburgWoods_Text_ThatWasAwfullyClose, MSGBOX_DEFAULT giveitem ITEM_GREAT_BALL @@ -103,14 +100,14 @@ PetalburgWoods_EventScript_BagFull:: PetalburgWoods_EventScript_DevonResearcherFinish:: msgbox PetalburgWoods_Text_TeamAquaAfterSomethingInRustboro, MSGBOX_DEFAULT - applymovement LOCALID_DEVON_EMPLOYEE, PetalburgWoods_Movement_DevonResearcherStartExit + applymovement LOCALID_PETALBURG_WOODS_DEVON_EMPLOYEE, PetalburgWoods_Movement_DevonResearcherStartExit waitmovement 0 msgbox PetalburgWoods_Text_ICantBeWastingTime, MSGBOX_DEFAULT closemessage return PetalburgWoods_EventScript_RemoveDevonResearcher:: - removeobject LOCALID_DEVON_EMPLOYEE + removeobject LOCALID_PETALBURG_WOODS_DEVON_EMPLOYEE setvar VAR_PETALBURG_WOODS_STATE, 1 releaseall end diff --git a/data/maps/Route101/map.json b/data/maps/Route101/map.json index 1abb23030bf6..d24d997151df 100644 --- a/data/maps/Route101/map.json +++ b/data/maps/Route101/map.json @@ -39,6 +39,7 @@ "flag": "0" }, { + "local_id": "LOCALID_ROUTE101_BIRCH", "graphics_id": "OBJ_EVENT_GFX_PROF_BIRCH", "x": 9, "y": 13, @@ -65,6 +66,7 @@ "flag": "FLAG_HIDE_ROUTE_101_BIRCH_STARTERS_BAG" }, { + "local_id": "LOCALID_ROUTE101_ZIGZAGOON", "graphics_id": "OBJ_EVENT_GFX_ZIGZAGOON_1", "x": 10, "y": 13, diff --git a/data/maps/Route101/scripts.inc b/data/maps/Route101/scripts.inc index dd0ef5dcec1d..b02c69e279a2 100644 --- a/data/maps/Route101/scripts.inc +++ b/data/maps/Route101/scripts.inc @@ -1,6 +1,3 @@ -.set LOCALID_BIRCH, 2 -.set LOCALID_ZIGZAGOON, 4 - Route101_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, Route101_OnTransition map_script MAP_SCRIPT_ON_FRAME_TABLE, Route101_OnFrame @@ -24,19 +21,19 @@ Route101_EventScript_StartBirchRescue:: playbgm MUS_HELP, TRUE msgbox Route101_Text_HelpMe, MSGBOX_DEFAULT closemessage - setobjectxy LOCALID_BIRCH, 0, 15 - setobjectxy LOCALID_ZIGZAGOON, 0, 16 - applymovement OBJ_EVENT_ID_PLAYER, Route101_Movement_EnterScene - applymovement LOCALID_BIRCH, Route101_Movement_BirchRunAway1 - applymovement LOCALID_ZIGZAGOON, Route101_Movement_ZigzagoonChase1 + setobjectxy LOCALID_ROUTE101_BIRCH, 0, 15 + setobjectxy LOCALID_ROUTE101_ZIGZAGOON, 0, 16 + applymovement LOCALID_PLAYER, Route101_Movement_EnterScene + applymovement LOCALID_ROUTE101_BIRCH, Route101_Movement_BirchRunAway1 + applymovement LOCALID_ROUTE101_ZIGZAGOON, Route101_Movement_ZigzagoonChase1 waitmovement 0 - applymovement LOCALID_ZIGZAGOON, Route101_Movement_ZigzagoonChaseInCircles - applymovement LOCALID_BIRCH, Route101_Movement_BirchRunInCircles + applymovement LOCALID_ROUTE101_ZIGZAGOON, Route101_Movement_ZigzagoonChaseInCircles + applymovement LOCALID_ROUTE101_BIRCH, Route101_Movement_BirchRunInCircles waitmovement 0 - applymovement LOCALID_BIRCH, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_ROUTE101_BIRCH, Common_Movement_WalkInPlaceFasterRight waitmovement 0 - applymovement LOCALID_ZIGZAGOON, Route101_Movement_ZigzagoonFaceBirch - applymovement LOCALID_BIRCH, Route101_Movement_BirchFaceZigzagoon + applymovement LOCALID_ROUTE101_ZIGZAGOON, Route101_Movement_ZigzagoonFaceBirch + applymovement LOCALID_ROUTE101_BIRCH, Route101_Movement_BirchFaceZigzagoon waitmovement 0 msgbox Route101_Text_PleaseHelp, MSGBOX_DEFAULT closemessage @@ -48,7 +45,7 @@ Route101_EventScript_PreventExitSouth:: lockall msgbox Route101_Text_DontLeaveMe, MSGBOX_DEFAULT closemessage - applymovement OBJ_EVENT_ID_PLAYER, Route101_Movement_PreventExitSouth + applymovement LOCALID_PLAYER, Route101_Movement_PreventExitSouth waitmovement 0 releaseall end @@ -57,7 +54,7 @@ Route101_EventScript_PreventExitWest:: lockall msgbox Route101_Text_DontLeaveMe, MSGBOX_DEFAULT closemessage - applymovement OBJ_EVENT_ID_PLAYER, Route101_Movement_PreventExitWest + applymovement LOCALID_PLAYER, Route101_Movement_PreventExitWest waitmovement 0 releaseall end @@ -66,7 +63,7 @@ Route101_EventScript_PreventExitNorth:: lockall msgbox Route101_Text_DontLeaveMe, MSGBOX_DEFAULT closemessage - applymovement OBJ_EVENT_ID_PLAYER, Route101_Movement_PreventExitNorth + applymovement LOCALID_PLAYER, Route101_Movement_PreventExitNorth waitmovement 0 releaseall end @@ -224,13 +221,13 @@ Route101_EventScript_BirchsBag:: setflag FLAG_SYS_POKEMON_GET setflag FLAG_RESCUED_BIRCH fadescreen FADE_TO_BLACK - removeobject LOCALID_ZIGZAGOON - setobjectxy OBJ_EVENT_ID_PLAYER, 6, 13 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft + removeobject LOCALID_ROUTE101_ZIGZAGOON + setobjectxy LOCALID_PLAYER, 6, 13 + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 special ChooseStarter waitstate - applymovement LOCALID_BIRCH, Route101_Movement_BirchApproachPlayer + applymovement LOCALID_ROUTE101_BIRCH, Route101_Movement_BirchApproachPlayer waitmovement 0 msgbox Route101_Text_YouSavedMe, MSGBOX_DEFAULT special HealPlayerParty diff --git a/data/maps/Route103/map.json b/data/maps/Route103/map.json index 9bc6fed67fee..65e4a9014e28 100644 --- a/data/maps/Route103/map.json +++ b/data/maps/Route103/map.json @@ -39,6 +39,7 @@ "flag": "0" }, { + "local_id": "LOCALID_ROUTE103_RIVAL", "graphics_id": "OBJ_EVENT_GFX_VAR_0", "x": 10, "y": 3, diff --git a/data/maps/Route103/scripts.inc b/data/maps/Route103/scripts.inc index 557db64e298b..941d464c37e0 100644 --- a/data/maps/Route103/scripts.inc +++ b/data/maps/Route103/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_RIVAL, 2 - Route103_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, Route103_OnTransition map_script MAP_SCRIPT_ON_LOAD, Route103_OnLoad @@ -30,11 +28,11 @@ Route103_EventScript_RivalMay:: msgbox Route103_Text_MayRoute103Pokemon, MSGBOX_DEFAULT closemessage playbgm MUS_ENCOUNTER_MAY, TRUE - applymovement LOCALID_RIVAL, Common_Movement_FacePlayer + applymovement LOCALID_ROUTE103_RIVAL, Common_Movement_FacePlayer waitmovement 0 - applymovement LOCALID_RIVAL, Common_Movement_ExclamationMark + applymovement LOCALID_ROUTE103_RIVAL, Common_Movement_ExclamationMark waitmovement 0 - applymovement LOCALID_RIVAL, Common_Movement_Delay48 + applymovement LOCALID_ROUTE103_RIVAL, Common_Movement_Delay48 waitmovement 0 msgbox Route103_Text_MayLetsBattle, MSGBOX_DEFAULT switch VAR_STARTER_MON @@ -47,11 +45,11 @@ Route103_EventScript_RivalBrendan:: msgbox Route103_Text_BrendanRoute103Pokemon, MSGBOX_DEFAULT closemessage playbgm MUS_ENCOUNTER_BRENDAN, TRUE - applymovement LOCALID_RIVAL, Common_Movement_FacePlayer + applymovement LOCALID_ROUTE103_RIVAL, Common_Movement_FacePlayer waitmovement 0 - applymovement LOCALID_RIVAL, Common_Movement_ExclamationMark + applymovement LOCALID_ROUTE103_RIVAL, Common_Movement_ExclamationMark waitmovement 0 - applymovement LOCALID_RIVAL, Common_Movement_Delay48 + applymovement LOCALID_ROUTE103_RIVAL, Common_Movement_Delay48 waitmovement 0 msgbox Route103_Text_BrendanLetsBattle, MSGBOX_DEFAULT switch VAR_STARTER_MON @@ -110,36 +108,36 @@ Route103_EventScript_RivalExit:: end Route103_EventScript_RivalExitFacingNorth:: - applymovement OBJ_EVENT_ID_PLAYER, Route103_Movement_WatchRivalExitFacingNorth - applymovement LOCALID_RIVAL, Route103_Movement_RivalExitFacingNorth1 + applymovement LOCALID_PLAYER, Route103_Movement_WatchRivalExitFacingNorth + applymovement LOCALID_ROUTE103_RIVAL, Route103_Movement_RivalExitFacingNorth1 waitmovement 0 playse SE_LEDGE - applymovement LOCALID_RIVAL, Route103_Movement_RivalExitFacingNorth2 + applymovement LOCALID_ROUTE103_RIVAL, Route103_Movement_RivalExitFacingNorth2 waitmovement 0 goto Route103_EventScript_RivalEnd end Route103_EventScript_RivalExitFacingEastOrWest:: - applymovement OBJ_EVENT_ID_PLAYER, Route103_Movement_WatchRivalExitFacingEastOrWest - applymovement LOCALID_RIVAL, Route103_Movement_RivalExit1 + applymovement LOCALID_PLAYER, Route103_Movement_WatchRivalExitFacingEastOrWest + applymovement LOCALID_ROUTE103_RIVAL, Route103_Movement_RivalExit1 waitmovement 0 playse SE_LEDGE - applymovement LOCALID_RIVAL, Route103_Movement_RivalExit2 + applymovement LOCALID_ROUTE103_RIVAL, Route103_Movement_RivalExit2 waitmovement 0 goto Route103_EventScript_RivalEnd end Route103_EventScript_RivalExitFacingSouth:: - applymovement LOCALID_RIVAL, Route103_Movement_RivalExit1 + applymovement LOCALID_ROUTE103_RIVAL, Route103_Movement_RivalExit1 waitmovement 0 playse SE_LEDGE - applymovement LOCALID_RIVAL, Route103_Movement_RivalExit2 + applymovement LOCALID_ROUTE103_RIVAL, Route103_Movement_RivalExit2 waitmovement 0 goto Route103_EventScript_RivalEnd end Route103_EventScript_RivalEnd:: - removeobject LOCALID_RIVAL + removeobject LOCALID_ROUTE103_RIVAL setvar VAR_BIRCH_LAB_STATE, 4 clearflag FLAG_HIDE_LITTLEROOT_TOWN_BIRCHS_LAB_RIVAL setflag FLAG_DEFEATED_RIVAL_ROUTE103 diff --git a/data/maps/Route104/map.json b/data/maps/Route104/map.json index 80af8aa6d825..4a4679acd376 100644 --- a/data/maps/Route104/map.json +++ b/data/maps/Route104/map.json @@ -109,6 +109,7 @@ "flag": "0" }, { + "local_id": "LOCALID_ROUTE104_BOAT", "graphics_id": "OBJ_EVENT_GFX_MR_BRINEYS_BOAT", "x": 12, "y": 54, @@ -122,6 +123,7 @@ "flag": "FLAG_HIDE_ROUTE_104_MR_BRINEY_BOAT" }, { + "local_id": "LOCALID_ROUTE104_BRINEY", "graphics_id": "OBJ_EVENT_GFX_EXPERT_M", "x": 12, "y": 51, @@ -460,6 +462,7 @@ "flag": "0" }, { + "local_id": "LOCALID_ROUTE104_RIVAL", "graphics_id": "OBJ_EVENT_GFX_VAR_0", "x": 17, "y": 50, diff --git a/data/maps/Route104/scripts.inc b/data/maps/Route104/scripts.inc index dfb7675e9048..e2c66a837cd1 100644 --- a/data/maps/Route104/scripts.inc +++ b/data/maps/Route104/scripts.inc @@ -1,7 +1,3 @@ -@ NOTE: Route 104's sail to Dewford script references local IDs from Dewford's map. -@ These are labeled in DewfordTown/scripts.inc -.set LOCALID_RIVAL, 34 - Route104_MapScripts:: map_script MAP_SCRIPT_ON_FRAME_TABLE, Route104_OnFrame map_script MAP_SCRIPT_ON_TRANSITION, Route104_OnTransition @@ -36,7 +32,7 @@ Route104_EventScript_TrySetRivalPos:: goto_if_ge VAR_BOARD_BRINEY_BOAT_STATE, 1, Route104_EventScript_DontSetRivalPos goto_if_set FLAG_MET_RIVAL_RUSTBORO, Route104_EventScript_DontSetRivalPos goto_if_unset FLAG_REGISTER_RIVAL_POKENAV, Route104_EventScript_DontSetRivalPos - setobjectxyperm LOCALID_RIVAL, 17, 52 + setobjectxyperm LOCALID_ROUTE104_RIVAL, 17, 52 return Route104_EventScript_DontSetRivalPos:: @@ -45,7 +41,7 @@ Route104_EventScript_DontSetRivalPos:: Route104_EventScript_Rival:: lockall setvar VAR_0x8008, 1 - applymovement LOCALID_RIVAL, Common_Movement_FacePlayer + applymovement LOCALID_ROUTE104_RIVAL, Common_Movement_FacePlayer waitmovement 0 goto Route104_EventScript_RivalEncounter @@ -54,22 +50,22 @@ Route104_EventScript_RivalTrigger:: setflag FLAG_HIDE_RUSTBORO_CITY_RIVAL setvar VAR_RUSTBORO_CITY_STATE, 8 setvar VAR_ROUTE104_STATE, 2 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 delay 10 - addobject LOCALID_RIVAL + addobject LOCALID_ROUTE104_RIVAL clearflag FLAG_HIDE_ROUTE_104_RIVAL - applymovement OBJ_EVENT_ID_PLAYER, Route104_Movement_PlayerBackUp + applymovement LOCALID_PLAYER, Route104_Movement_PlayerBackUp waitmovement 0 - applymovement LOCALID_RIVAL, Route104_Movement_RivalExitBrineysCottage + applymovement LOCALID_ROUTE104_RIVAL, Route104_Movement_RivalExitBrineysCottage waitmovement 0 delay 20 setvar VAR_0x8008, 0 call RustboroCity_EventScript_PlayRivalMusic playse SE_PIN - applymovement LOCALID_RIVAL, Common_Movement_ExclamationMark + applymovement LOCALID_ROUTE104_RIVAL, Common_Movement_ExclamationMark waitmovement 0 - applymovement LOCALID_RIVAL, Common_Movement_Delay48 + applymovement LOCALID_ROUTE104_RIVAL, Common_Movement_Delay48 waitmovement 0 goto Route104_EventScript_RivalEncounter @@ -107,14 +103,14 @@ Route104_EventScript_MayEncounter:: closemessage delay 30 setflag FLAG_ENABLE_RIVAL_MATCH_CALL - applymovement OBJ_EVENT_ID_PLAYER, Route104_Movement_PlayerFaceRival - applymovement LOCALID_RIVAL, Route104_Movement_RivalWalkSlowLeft + applymovement LOCALID_PLAYER, Route104_Movement_PlayerFaceRival + applymovement LOCALID_ROUTE104_RIVAL, Route104_Movement_RivalWalkSlowLeft msgbox Route104_Text_MayHowsYourPokedex, MSGBOX_DEFAULT closemessage waitmovement 0 - applymovement LOCALID_RIVAL, Route104_Movement_RivalApproachPlayer + applymovement LOCALID_ROUTE104_RIVAL, Route104_Movement_RivalApproachPlayer waitmovement 0 - copyobjectxytoperm LOCALID_RIVAL + copyobjectxytoperm LOCALID_ROUTE104_RIVAL msgbox Route104_Text_MayMinesDecentLetsBattle, MSGBOX_YESNO goto_if_eq VAR_RESULT, YES, Route104_EventScript_BattleMay msgbox Route104_Text_MayHaventRaisedPokemon, MSGBOX_DEFAULT @@ -193,14 +189,14 @@ Route104_EventScript_BrendanEncounter:: closemessage delay 30 setflag FLAG_ENABLE_RIVAL_MATCH_CALL - applymovement OBJ_EVENT_ID_PLAYER, Route104_Movement_PlayerFaceRival - applymovement LOCALID_RIVAL, Route104_Movement_RivalWalkSlowLeft + applymovement LOCALID_PLAYER, Route104_Movement_PlayerFaceRival + applymovement LOCALID_ROUTE104_RIVAL, Route104_Movement_RivalWalkSlowLeft msgbox Route104_Text_BrendanHowsYourPokedex, MSGBOX_DEFAULT closemessage waitmovement 0 - applymovement LOCALID_RIVAL, Route104_Movement_RivalApproachPlayer + applymovement LOCALID_ROUTE104_RIVAL, Route104_Movement_RivalApproachPlayer waitmovement 0 - copyobjectxytoperm LOCALID_RIVAL + copyobjectxytoperm LOCALID_ROUTE104_RIVAL msgbox Route104_Text_BrendanDoingGreatLetsBattle, MSGBOX_YESNO goto_if_eq VAR_RESULT, YES, Route104_EventScript_BattleBrendan msgbox Route104_Text_BrendanNoConfidence, MSGBOX_DEFAULT @@ -347,28 +343,28 @@ Route104_EventScript_Girl2:: end Route104_EventScript_SailToDewford:: - setobjectsubpriority LOCALID_BRINEY_R104, MAP_ROUTE104, 0 - setobjectsubpriority OBJ_EVENT_ID_PLAYER, MAP_ROUTE104, 0 - applymovement LOCALID_BRINEY_R104, Route104_Movement_BrineyBoardBoat + setobjectsubpriority LOCALID_ROUTE104_BRINEY, MAP_ROUTE104, 0 + setobjectsubpriority LOCALID_PLAYER, MAP_ROUTE104, 0 + applymovement LOCALID_ROUTE104_BRINEY, Route104_Movement_BrineyBoardBoat waitmovement 0 - removeobject LOCALID_BRINEY_R104 - applymovement OBJ_EVENT_ID_PLAYER, Route104_Movement_PlayerBoardBoat + removeobject LOCALID_ROUTE104_BRINEY + applymovement LOCALID_PLAYER, Route104_Movement_PlayerBoardBoat waitmovement 0 - hideobjectat OBJ_EVENT_ID_PLAYER, MAP_ROUTE104 + hideobjectat LOCALID_PLAYER, MAP_ROUTE104 call Common_EventScript_PlayBrineysBoatMusic goto_if_set FLAG_ENABLE_NORMAN_MATCH_CALL, Route104_EventScript_SailToDewfordNoCall goto_if_unset FLAG_ENABLE_NORMAN_MATCH_CALL, Route104_EventScript_SailToDewfordDadCalls end Route104_EventScript_SailToDewfordNoCall:: - applymovement LOCALID_BOAT_R104, Route104_Movement_SailToDewford - applymovement OBJ_EVENT_ID_PLAYER, Route104_Movement_SailToDewford + applymovement LOCALID_ROUTE104_BOAT, Route104_Movement_SailToDewford + applymovement LOCALID_PLAYER, Route104_Movement_SailToDewford waitmovement 0 goto Route104_EventScript_ArriveInDewford Route104_EventScript_SailToDewfordDadCalls:: - applymovement LOCALID_BOAT_R104, Route104_Movement_SailToDewfordBeforeDadCalls - applymovement OBJ_EVENT_ID_PLAYER, Route104_Movement_SailToDewfordBeforeDadCalls + applymovement LOCALID_ROUTE104_BOAT, Route104_Movement_SailToDewfordBeforeDadCalls + applymovement LOCALID_PLAYER, Route104_Movement_SailToDewfordBeforeDadCalls waitmovement 0 pokenavcall Route104_Text_DadPokenavCall waitmessage @@ -379,35 +375,35 @@ Route104_EventScript_SailToDewfordDadCalls:: closemessage delay 30 setflag FLAG_ENABLE_NORMAN_MATCH_CALL - applymovement OBJ_EVENT_ID_PLAYER, Route104_Movement_SailToDewfordAfterDadCalls - applymovement LOCALID_BOAT_R104, Route104_Movement_SailToDewfordAfterDadCalls, MAP_ROUTE104 - waitmovement LOCALID_BOAT_R104, MAP_ROUTE104 + applymovement LOCALID_PLAYER, Route104_Movement_SailToDewfordAfterDadCalls + applymovement LOCALID_ROUTE104_BOAT, Route104_Movement_SailToDewfordAfterDadCalls, MAP_ROUTE104 + waitmovement LOCALID_ROUTE104_BOAT, MAP_ROUTE104 waitmovement 0 goto Route104_EventScript_ArriveInDewford Route104_EventScript_ArriveInDewford:: delay 50 - applymovement OBJ_EVENT_ID_PLAYER, Route104_Movement_PlayerExitBoat + applymovement LOCALID_PLAYER, Route104_Movement_PlayerExitBoat waitmovement 0 call Common_EventScript_StopBrineysBoatMusic - showobjectat OBJ_EVENT_ID_PLAYER, MAP_DEWFORD_TOWN - applymovement OBJ_EVENT_ID_PLAYER, Route104_Movement_PlayerMoveForBriney + showobjectat LOCALID_PLAYER, MAP_DEWFORD_TOWN + applymovement LOCALID_PLAYER, Route104_Movement_PlayerMoveForBriney waitmovement 0 - setobjectxyperm LOCALID_BRINEY_DEWFORD, 12, 8 - addobject LOCALID_BRINEY_DEWFORD - setobjectsubpriority LOCALID_BRINEY_DEWFORD, MAP_DEWFORD_TOWN, 0 + setobjectxyperm LOCALID_DEWFORD_BRINEY, 12, 8 + addobject LOCALID_DEWFORD_BRINEY + setobjectsubpriority LOCALID_DEWFORD_BRINEY, MAP_DEWFORD_TOWN, 0 clearflag FLAG_HIDE_MR_BRINEY_DEWFORD_TOWN - applymovement LOCALID_BRINEY_DEWFORD, Route104_Movement_BrineyExitBoat + applymovement LOCALID_DEWFORD_BRINEY, Route104_Movement_BrineyExitBoat waitmovement 0 - addobject LOCALID_BOAT_DEWFORD + addobject LOCALID_DEWFORD_BOAT clearflag FLAG_HIDE_MR_BRINEY_BOAT_DEWFORD_TOWN call Common_EventScript_StopBrineysBoatMusic setflag FLAG_HIDE_ROUTE_104_MR_BRINEY_BOAT - hideobjectat LOCALID_BOAT_R104, MAP_ROUTE104 + hideobjectat LOCALID_ROUTE104_BOAT, MAP_ROUTE104 copyvar VAR_BRINEY_LOCATION, VAR_0x8008 - resetobjectsubpriority OBJ_EVENT_ID_PLAYER, MAP_ROUTE104 - resetobjectsubpriority LOCALID_BRINEY_DEWFORD, MAP_DEWFORD_TOWN - copyobjectxytoperm LOCALID_BRINEY_DEWFORD + resetobjectsubpriority LOCALID_PLAYER, MAP_ROUTE104 + resetobjectsubpriority LOCALID_DEWFORD_BRINEY, MAP_DEWFORD_TOWN + copyobjectxytoperm LOCALID_DEWFORD_BRINEY setvar VAR_BOARD_BRINEY_BOAT_STATE, 0 goto_if_unset FLAG_DELIVERED_STEVEN_LETTER, Route104_EventScript_DeliverLetterReminder goto_if_set FLAG_DELIVERED_STEVEN_LETTER, Route104_EventScript_LandedInDewford diff --git a/data/maps/Route104_MrBrineysHouse/map.json b/data/maps/Route104_MrBrineysHouse/map.json index 6424965291a7..91420bd74681 100644 --- a/data/maps/Route104_MrBrineysHouse/map.json +++ b/data/maps/Route104_MrBrineysHouse/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_BRINEYS_HOUSE_BRINEY", "graphics_id": "OBJ_EVENT_GFX_EXPERT_M", "x": 5, "y": 3, @@ -28,6 +29,7 @@ "flag": "FLAG_HIDE_BRINEYS_HOUSE_MR_BRINEY" }, { + "local_id": "LOCALID_BRINEYS_HOUSE_PEEKO", "graphics_id": "OBJ_EVENT_GFX_WINGULL", "x": 6, "y": 3, diff --git a/data/maps/Route104_MrBrineysHouse/scripts.inc b/data/maps/Route104_MrBrineysHouse/scripts.inc index 4c693cb4faaf..bce0895919c8 100644 --- a/data/maps/Route104_MrBrineysHouse/scripts.inc +++ b/data/maps/Route104_MrBrineysHouse/scripts.inc @@ -1,6 +1,3 @@ -.set LOCALID_BRINEY, 1 -.set LOCALID_PEEKO, 2 - Route104_MrBrineysHouse_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, Route104_MrBrineysHouse_OnTransition .byte 0 @@ -16,10 +13,10 @@ Route104_MrBrineysHouse_EventScript_HideRustboroRival:: return Route104_MrBrineysHouse_EventScript_SetBrineyPeekoPos:: - setobjectxyperm LOCALID_BRINEY, 9, 3 - setobjectmovementtype LOCALID_BRINEY, MOVEMENT_TYPE_WALK_SEQUENCE_DOWN_LEFT_UP_RIGHT - setobjectxyperm LOCALID_PEEKO, 9, 6 - setobjectmovementtype LOCALID_PEEKO, MOVEMENT_TYPE_WALK_SEQUENCE_LEFT_UP_RIGHT_DOWN + setobjectxyperm LOCALID_BRINEYS_HOUSE_BRINEY, 9, 3 + setobjectmovementtype LOCALID_BRINEYS_HOUSE_BRINEY, MOVEMENT_TYPE_WALK_SEQUENCE_DOWN_LEFT_UP_RIGHT + setobjectxyperm LOCALID_BRINEYS_HOUSE_PEEKO, 9, 6 + setobjectmovementtype LOCALID_BRINEYS_HOUSE_PEEKO, MOVEMENT_TYPE_WALK_SEQUENCE_LEFT_UP_RIGHT_DOWN return Route104_MrBrineysHouse_EventScript_Briney:: diff --git a/data/maps/Route104_PrettyPetalFlowerShop/map.json b/data/maps/Route104_PrettyPetalFlowerShop/map.json index 27e18ddc71ff..9f81453c601c 100644 --- a/data/maps/Route104_PrettyPetalFlowerShop/map.json +++ b/data/maps/Route104_PrettyPetalFlowerShop/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_FLOWER_SHOP_OWNER", "graphics_id": "OBJ_EVENT_GFX_WOMAN_2", "x": 0, "y": 3, diff --git a/data/maps/Route104_PrettyPetalFlowerShop/scripts.inc b/data/maps/Route104_PrettyPetalFlowerShop/scripts.inc index 5f0ec28fa51d..08d52a0a731b 100644 --- a/data/maps/Route104_PrettyPetalFlowerShop/scripts.inc +++ b/data/maps/Route104_PrettyPetalFlowerShop/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_OWNER, 1 - Route104_PrettyPetalFlowerShop_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, Route104_PrettyPetalFlowerShop_OnTransition .byte 0 @@ -12,7 +10,7 @@ Route104_PrettyPetalFlowerShop_OnTransition: end Route104_PrettyPetalFlowerShop_EventScript_MoveShopOwner:: - setobjectxyperm LOCALID_OWNER, 4, 6 + setobjectxyperm LOCALID_FLOWER_SHOP_OWNER, 4, 6 end Route104_PrettyPetalFlowerShop_EventScript_ShopOwner:: diff --git a/data/maps/Route109/map.json b/data/maps/Route109/map.json index 49357f0a0e9d..be5fa5a6b20b 100644 --- a/data/maps/Route109/map.json +++ b/data/maps/Route109/map.json @@ -26,6 +26,7 @@ ], "object_events": [ { + "local_id": "LOCALID_ROUTE109_BOAT", "graphics_id": "OBJ_EVENT_GFX_MR_BRINEYS_BOAT", "x": 21, "y": 26, @@ -39,6 +40,7 @@ "flag": "FLAG_HIDE_ROUTE_109_MR_BRINEY_BOAT" }, { + "local_id": "LOCALID_ROUTE109_BRINEY", "graphics_id": "OBJ_EVENT_GFX_EXPERT_M", "x": 21, "y": 24, diff --git a/data/maps/Route109/scripts.inc b/data/maps/Route109/scripts.inc index f0353fef4d61..88b802a8e76b 100644 --- a/data/maps/Route109/scripts.inc +++ b/data/maps/Route109/scripts.inc @@ -6,11 +6,11 @@ Route109_MapScripts:: Route109_EventScript_StartDepartForDewford:: call EventScript_BackupMrBrineyLocation - setobjectsubpriority LOCALID_BRINEY_R109, MAP_ROUTE109, 0 - setobjectsubpriority OBJ_EVENT_ID_PLAYER, MAP_ROUTE109, 0 - applymovement LOCALID_BRINEY_R109, Route109_Movement_BrineyEnterBoat + setobjectsubpriority LOCALID_ROUTE109_BRINEY, MAP_ROUTE109, 0 + setobjectsubpriority LOCALID_PLAYER, MAP_ROUTE109, 0 + applymovement LOCALID_ROUTE109_BRINEY, Route109_Movement_BrineyEnterBoat waitmovement 0 - removeobject LOCALID_BRINEY_R109 + removeobject LOCALID_ROUTE109_BRINEY switch VAR_FACING case DIR_SOUTH, Route109_EventScript_EnterBoatSouth case DIR_WEST, Route109_EventScript_EnterBoatWest @@ -18,50 +18,50 @@ Route109_EventScript_StartDepartForDewford:: end Route109_EventScript_EnterBoatSouth:: - applymovement OBJ_EVENT_ID_PLAYER, Route109_Movement_PlayerEnterBoatSouth + applymovement LOCALID_PLAYER, Route109_Movement_PlayerEnterBoatSouth waitmovement 0 goto Route109_EventScript_DoSailToDewford end Route109_EventScript_EnterBoatEast:: - applymovement OBJ_EVENT_ID_PLAYER, Route109_Movement_PlayerEnterBoatEast + applymovement LOCALID_PLAYER, Route109_Movement_PlayerEnterBoatEast waitmovement 0 goto Route109_EventScript_DoSailToDewford end Route109_EventScript_EnterBoatWest:: - applymovement OBJ_EVENT_ID_PLAYER, Route109_Movement_PlayerEnterBoatWest + applymovement LOCALID_PLAYER, Route109_Movement_PlayerEnterBoatWest waitmovement 0 goto Route109_EventScript_DoSailToDewford end Route109_EventScript_DoSailToDewford:: - hideobjectat OBJ_EVENT_ID_PLAYER, MAP_ROUTE109 + hideobjectat LOCALID_PLAYER, MAP_ROUTE109 call Common_EventScript_PlayBrineysBoatMusic - applymovement LOCALID_BOAT_R109, Route109_Movement_SailToDewford - applymovement OBJ_EVENT_ID_PLAYER, Route109_Movement_SailToDewford + applymovement LOCALID_ROUTE109_BOAT, Route109_Movement_SailToDewford + applymovement LOCALID_PLAYER, Route109_Movement_SailToDewford waitmovement 0 delay 50 call Common_EventScript_StopBrineysBoatMusic - showobjectat OBJ_EVENT_ID_PLAYER, MAP_DEWFORD_TOWN - applymovement OBJ_EVENT_ID_PLAYER, Route109_Movement_PlayerExitBoat + showobjectat LOCALID_PLAYER, MAP_DEWFORD_TOWN + applymovement LOCALID_PLAYER, Route109_Movement_PlayerExitBoat waitmovement 0 - addobject LOCALID_BOAT_DEWFORD + addobject LOCALID_DEWFORD_BOAT clearflag FLAG_HIDE_MR_BRINEY_BOAT_DEWFORD_TOWN - setobjectxyperm LOCALID_BRINEY_DEWFORD, 12, 8 - addobject LOCALID_BRINEY_DEWFORD - setobjectsubpriority LOCALID_BRINEY_DEWFORD, MAP_DEWFORD_TOWN, 0 - applymovement LOCALID_BRINEY_DEWFORD, Route109_Movement_BrineyExitBoat + setobjectxyperm LOCALID_DEWFORD_BRINEY, 12, 8 + addobject LOCALID_DEWFORD_BRINEY + setobjectsubpriority LOCALID_DEWFORD_BRINEY, MAP_DEWFORD_TOWN, 0 + applymovement LOCALID_DEWFORD_BRINEY, Route109_Movement_BrineyExitBoat waitmovement 0 clearflag FLAG_HIDE_MR_BRINEY_DEWFORD_TOWN setflag FLAG_HIDE_ROUTE_109_MR_BRINEY_BOAT - hideobjectat LOCALID_BOAT_R109, MAP_ROUTE109 + hideobjectat LOCALID_ROUTE109_BOAT, MAP_ROUTE109 msgbox DewfordTown_Text_BrineyLandedInDewford, MSGBOX_DEFAULT closemessage copyvar VAR_BRINEY_LOCATION, VAR_0x8008 - resetobjectsubpriority OBJ_EVENT_ID_PLAYER, MAP_ROUTE109 - resetobjectsubpriority LOCALID_BRINEY_DEWFORD, MAP_DEWFORD_TOWN - copyobjectxytoperm LOCALID_BRINEY_DEWFORD + resetobjectsubpriority LOCALID_PLAYER, MAP_ROUTE109 + resetobjectsubpriority LOCALID_DEWFORD_BRINEY, MAP_DEWFORD_TOWN + copyobjectxytoperm LOCALID_DEWFORD_BRINEY release end diff --git a/data/maps/Route110/map.json b/data/maps/Route110/map.json index 6e4982fa22c1..989229f8c993 100644 --- a/data/maps/Route110/map.json +++ b/data/maps/Route110/map.json @@ -291,6 +291,7 @@ "flag": "FLAG_ITEM_ROUTE_110_RARE_CANDY" }, { + "local_id": "LOCALID_CHALLENGE_BIKER", "graphics_id": "OBJ_EVENT_GFX_CYCLING_TRIATHLETE_M", "x": 27, "y": 92, @@ -382,6 +383,7 @@ "flag": "0" }, { + "local_id": "LOCALID_ROUTE110_RIVAL", "graphics_id": "OBJ_EVENT_GFX_VAR_0", "x": 34, "y": 54, @@ -395,6 +397,7 @@ "flag": "FLAG_HIDE_ROUTE_110_RIVAL" }, { + "local_id": "LOCALID_ROUTE110_RIVAL_ON_BIKE", "graphics_id": "OBJ_EVENT_GFX_VAR_3", "x": 34, "y": 54, @@ -486,6 +489,7 @@ "flag": "FLAG_ITEM_ROUTE_110_ELIXIR" }, { + "local_id": "LOCALID_ROUTE110_BIRCH", "graphics_id": "OBJ_EVENT_GFX_PROF_BIRCH", "x": 9, "y": 79, diff --git a/data/maps/Route110/scripts.inc b/data/maps/Route110/scripts.inc index 7d16c8b10c28..984595a82c98 100644 --- a/data/maps/Route110/scripts.inc +++ b/data/maps/Route110/scripts.inc @@ -1,8 +1,3 @@ -.set LOCALID_CHALLENGE_BIKER, 21 -.set LOCALID_RIVAL, 28 -.set LOCALID_RIVAL_ON_BIKE, 29 -.set LOCALID_BIRCH, 36 - Route110_MapScripts:: map_script MAP_SCRIPT_ON_RESUME, Route110_OnResume map_script MAP_SCRIPT_ON_TRANSITION, Route110_OnTransition @@ -378,11 +373,11 @@ Route110_EventScript_RivalScene:: checkplayergender call_if_eq VAR_RESULT, MALE, Route110_EventScript_PlayMayMusic call_if_eq VAR_RESULT, FEMALE, Route110_EventScript_PlayBrendanMusic - applymovement LOCALID_RIVAL, Common_Movement_WalkInPlaceFasterDown + applymovement LOCALID_ROUTE110_RIVAL, Common_Movement_WalkInPlaceFasterDown waitmovement 0 - applymovement LOCALID_RIVAL, Common_Movement_ExclamationMark + applymovement LOCALID_ROUTE110_RIVAL, Common_Movement_ExclamationMark waitmovement 0 - applymovement LOCALID_RIVAL, Common_Movement_Delay48 + applymovement LOCALID_ROUTE110_RIVAL, Common_Movement_Delay48 waitmovement 0 delay 30 call_if_eq VAR_0x8008, 1, Route110_EventScript_RivalApproachPlayer1 @@ -471,15 +466,15 @@ Route110_EventScript_RivalExit:: call_if_eq VAR_0x8008, 1, Route110_EventScript_MoveRival1 call_if_eq VAR_0x8008, 2, Route110_EventScript_MoveRival2 call_if_eq VAR_0x8008, 3, Route110_EventScript_MoveRival3 - setobjectmovementtype LOCALID_RIVAL, MOVEMENT_TYPE_FACE_RIGHT - setobjectmovementtype LOCALID_RIVAL_ON_BIKE, MOVEMENT_TYPE_FACE_RIGHT - removeobject LOCALID_RIVAL - addobject LOCALID_RIVAL_ON_BIKE + setobjectmovementtype LOCALID_ROUTE110_RIVAL, MOVEMENT_TYPE_FACE_RIGHT + setobjectmovementtype LOCALID_ROUTE110_RIVAL_ON_BIKE, MOVEMENT_TYPE_FACE_RIGHT + removeobject LOCALID_ROUTE110_RIVAL + addobject LOCALID_ROUTE110_RIVAL_ON_BIKE delay 45 call_if_eq VAR_0x8008, 1, Route110_EventScript_RivalExit1 call_if_eq VAR_0x8008, 2, Route110_EventScript_RivalExit2 call_if_eq VAR_0x8008, 3, Route110_EventScript_RivalExit3 - removeobject LOCALID_RIVAL_ON_BIKE + removeobject LOCALID_ROUTE110_RIVAL_ON_BIKE setvar VAR_ROUTE110_STATE, 1 savebgm MUS_DUMMY fadedefaultbgm @@ -487,45 +482,45 @@ Route110_EventScript_RivalExit:: end Route110_EventScript_RivalApproachPlayer1:: - applymovement LOCALID_RIVAL, Route110_Movement_RivalApproachPlayer1 + applymovement LOCALID_ROUTE110_RIVAL, Route110_Movement_RivalApproachPlayer1 waitmovement 0 return Route110_EventScript_RivalApproachPlayer2:: - applymovement LOCALID_RIVAL, Route110_Movement_RivalApproachPlayer2 + applymovement LOCALID_ROUTE110_RIVAL, Route110_Movement_RivalApproachPlayer2 waitmovement 0 return Route110_EventScript_RivalApproachPlayer3:: - applymovement LOCALID_RIVAL, Route110_Movement_RivalApproachPlayer3 + applymovement LOCALID_ROUTE110_RIVAL, Route110_Movement_RivalApproachPlayer3 waitmovement 0 return Route110_EventScript_RivalExit1:: - applymovement LOCALID_RIVAL_ON_BIKE, Route110_Movement_RivalExit1 + applymovement LOCALID_ROUTE110_RIVAL_ON_BIKE, Route110_Movement_RivalExit1 waitmovement 0 return Route110_EventScript_RivalExit2:: - applymovement LOCALID_RIVAL_ON_BIKE, Route110_Movement_RivalExit2 + applymovement LOCALID_ROUTE110_RIVAL_ON_BIKE, Route110_Movement_RivalExit2 waitmovement 0 return Route110_EventScript_RivalExit3:: - applymovement LOCALID_RIVAL_ON_BIKE, Route110_Movement_RivalExit3 + applymovement LOCALID_ROUTE110_RIVAL_ON_BIKE, Route110_Movement_RivalExit3 waitmovement 0 return Route110_EventScript_MoveRival1:: - setobjectxyperm LOCALID_RIVAL_ON_BIKE, 33, 55 + setobjectxyperm LOCALID_ROUTE110_RIVAL_ON_BIKE, 33, 55 return Route110_EventScript_MoveRival2:: - setobjectxyperm LOCALID_RIVAL_ON_BIKE, 34, 55 + setobjectxyperm LOCALID_ROUTE110_RIVAL_ON_BIKE, 34, 55 return Route110_EventScript_MoveRival3:: - setobjectxyperm LOCALID_RIVAL_ON_BIKE, 35, 55 + setobjectxyperm LOCALID_ROUTE110_RIVAL_ON_BIKE, 35, 55 return Route110_Movement_RivalApproachPlayer1: @@ -596,13 +591,13 @@ Route110_EventScript_BirchScene4:: goto Route110_EventScript_BirchScene Route110_EventScript_BirchScene:: - addobject LOCALID_BIRCH - applymovement LOCALID_BIRCH, Route110_Movement_BirchEntrance + addobject LOCALID_ROUTE110_BIRCH + applymovement LOCALID_ROUTE110_BIRCH, Route110_Movement_BirchEntrance waitmovement 0 playse SE_PIN - applymovement LOCALID_BIRCH, Common_Movement_ExclamationMark + applymovement LOCALID_ROUTE110_BIRCH, Common_Movement_ExclamationMark waitmovement 0 - applymovement LOCALID_BIRCH, Common_Movement_Delay48 + applymovement LOCALID_ROUTE110_BIRCH, Common_Movement_Delay48 waitmovement 0 call_if_eq VAR_0x8008, 1, Route110_EventScript_BirchApproachPlayer1 call_if_eq VAR_0x8008, 2, Route110_EventScript_BirchApproachPlayer2 @@ -611,13 +606,13 @@ Route110_EventScript_BirchScene:: msgbox Route110_Text_ImagineSeeingYouHere, MSGBOX_DEFAULT closemessage delay 20 - applymovement LOCALID_BIRCH, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_ROUTE110_BIRCH, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 delay 10 - applymovement LOCALID_BIRCH, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_ROUTE110_BIRCH, Common_Movement_WalkInPlaceFasterRight waitmovement 0 delay 20 - applymovement LOCALID_BIRCH, Common_Movement_WalkInPlaceFasterDown + applymovement LOCALID_ROUTE110_BIRCH, Common_Movement_WalkInPlaceFasterDown waitmovement 0 delay 30 msgbox Route110_Text_HeardYouInstallMatchCall, MSGBOX_DEFAULT @@ -635,48 +630,48 @@ Route110_EventScript_BirchScene:: call_if_eq VAR_0x8008, 2, Route110_EventScript_BirchExit2 call_if_eq VAR_0x8008, 3, Route110_EventScript_BirchExit3 call_if_eq VAR_0x8008, 4, Route110_EventScript_BirchExit4 - removeobject LOCALID_BIRCH + removeobject LOCALID_ROUTE110_BIRCH setvar VAR_REGISTER_BIRCH_STATE, 2 releaseall end Route110_EventScript_BirchApproachPlayer1:: - applymovement LOCALID_BIRCH, Route110_Movement_BirchApproachPlayer1 + applymovement LOCALID_ROUTE110_BIRCH, Route110_Movement_BirchApproachPlayer1 waitmovement 0 return Route110_EventScript_BirchApproachPlayer2:: - applymovement LOCALID_BIRCH, Route110_Movement_BirchApproachPlayer2 + applymovement LOCALID_ROUTE110_BIRCH, Route110_Movement_BirchApproachPlayer2 waitmovement 0 return Route110_EventScript_BirchApproachPlayer3:: - applymovement LOCALID_BIRCH, Route110_Movement_BirchApproachPlayer3 + applymovement LOCALID_ROUTE110_BIRCH, Route110_Movement_BirchApproachPlayer3 waitmovement 0 return Route110_EventScript_BirchApproachPlayer4:: - applymovement LOCALID_BIRCH, Route110_Movement_BirchApproachPlayer4 + applymovement LOCALID_ROUTE110_BIRCH, Route110_Movement_BirchApproachPlayer4 waitmovement 0 return Route110_EventScript_BirchExit1:: - applymovement LOCALID_BIRCH, Route110_Movement_BirchExit1 + applymovement LOCALID_ROUTE110_BIRCH, Route110_Movement_BirchExit1 waitmovement 0 return Route110_EventScript_BirchExit2:: - applymovement LOCALID_BIRCH, Route110_Movement_BirchExit2 + applymovement LOCALID_ROUTE110_BIRCH, Route110_Movement_BirchExit2 waitmovement 0 return Route110_EventScript_BirchExit3:: - applymovement LOCALID_BIRCH, Route110_Movement_BirchExit3 + applymovement LOCALID_ROUTE110_BIRCH, Route110_Movement_BirchExit3 waitmovement 0 return Route110_EventScript_BirchExit4:: - applymovement LOCALID_BIRCH, Route110_Movement_BirchExit4 + applymovement LOCALID_ROUTE110_BIRCH, Route110_Movement_BirchExit4 waitmovement 0 return diff --git a/data/maps/Route110_SeasideCyclingRoadNorthEntrance/scripts.inc b/data/maps/Route110_SeasideCyclingRoadNorthEntrance/scripts.inc index fb1cdc5c7122..cc3a867f8b86 100644 --- a/data/maps/Route110_SeasideCyclingRoadNorthEntrance/scripts.inc +++ b/data/maps/Route110_SeasideCyclingRoadNorthEntrance/scripts.inc @@ -35,7 +35,7 @@ Route110_SeasideCyclingRoadNorthEntrance_EventScript_OnMachBike:: Route110_SeasideCyclingRoadNorthEntrance_EventScript_NoBike:: msgbox Route110_SeasideCyclingRoadNorthEntrance_Text_TooDangerousToWalk, MSGBOX_DEFAULT closemessage - applymovement OBJ_EVENT_ID_PLAYER, Route110_SeasideCyclingRoadNorthEntrance_Movement_PushPlayerBackFromCounter + applymovement LOCALID_PLAYER, Route110_SeasideCyclingRoadNorthEntrance_Movement_PushPlayerBackFromCounter waitmovement 0 releaseall end diff --git a/data/maps/Route110_SeasideCyclingRoadSouthEntrance/scripts.inc b/data/maps/Route110_SeasideCyclingRoadSouthEntrance/scripts.inc index 5c4dcfa2194c..1f88b6e27c66 100644 --- a/data/maps/Route110_SeasideCyclingRoadSouthEntrance/scripts.inc +++ b/data/maps/Route110_SeasideCyclingRoadSouthEntrance/scripts.inc @@ -20,7 +20,7 @@ Route110_SeasideCyclingRoadSouthEntrance_EventScript_BikeCheck:: Route110_SeasideCyclingRoadSouthEntrance_EventScript_NoBike:: msgbox Route110_SeasideCyclingRoadSouthEntrance_Text_TooDangerousToWalk, MSGBOX_DEFAULT closemessage - applymovement OBJ_EVENT_ID_PLAYER, Route110_SeasideCyclingRoadSouthEntrance_Movement_PushPlayerBackFromCounter + applymovement LOCALID_PLAYER, Route110_SeasideCyclingRoadSouthEntrance_Movement_PushPlayerBackFromCounter waitmovement 0 releaseall end diff --git a/data/maps/Route110_TrickHouseEnd/map.json b/data/maps/Route110_TrickHouseEnd/map.json index 90d228549666..2a44e297c433 100644 --- a/data/maps/Route110_TrickHouseEnd/map.json +++ b/data/maps/Route110_TrickHouseEnd/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_TRICK_MASTER_END", "graphics_id": "OBJ_EVENT_GFX_MAN_1", "x": 4, "y": 5, diff --git a/data/maps/Route110_TrickHouseEnd/scripts.inc b/data/maps/Route110_TrickHouseEnd/scripts.inc index 9f31d89e4cfb..e3b4660dad79 100644 --- a/data/maps/Route110_TrickHouseEnd/scripts.inc +++ b/data/maps/Route110_TrickHouseEnd/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_TRICK_MASTER, 1 - Route110_TrickHouseEnd_MapScripts:: map_script MAP_SCRIPT_ON_RESUME, Route110_TrickHouseEnd_OnResume map_script MAP_SCRIPT_ON_TRANSITION, Route110_TrickHouseEnd_OnTransition @@ -22,9 +20,9 @@ Route110_TrickHouseEnd_OnWarp: .2byte 0 Route110_TrickHouseEnd_EventScript_SetTrickMasterPos:: - addobject LOCALID_TRICK_MASTER - showobjectat LOCALID_TRICK_MASTER, MAP_ROUTE110_TRICK_HOUSE_END - turnobject LOCALID_TRICK_MASTER, DIR_EAST + addobject LOCALID_TRICK_MASTER_END + showobjectat LOCALID_TRICK_MASTER_END, MAP_ROUTE110_TRICK_HOUSE_END + turnobject LOCALID_TRICK_MASTER_END, DIR_EAST end Route110_TrickHouseEnd_OnFrame: @@ -151,7 +149,7 @@ Route110_TrickHouseEnd_EventScript_CompletedPuzzle8:: delay 30 msgbox Route110_TrickHouseEnd_Text_FountainOfIdeasRunDry, MSGBOX_DEFAULT closemessage - applymovement LOCALID_TRICK_MASTER, Common_Movement_FacePlayer + applymovement LOCALID_TRICK_MASTER_END, Common_Movement_FacePlayer waitmovement 0 delay 30 msgbox Route110_TrickHouseEnd_Text_DefeatedMePreferWhichTent, MSGBOX_DEFAULT @@ -179,12 +177,12 @@ Route110_TrickHouseEnd_EventScript_GiveBlueTent:: return Route110_TrickHouseEnd_EventScript_TrickMasterExit:: - applymovement LOCALID_TRICK_MASTER, Route110_TrickHouse_Movement_TrickMasterSpin + applymovement LOCALID_TRICK_MASTER_END, Route110_TrickHouse_Movement_TrickMasterSpin waitmovement 0 playse SE_M_EXPLOSION - applymovement LOCALID_TRICK_MASTER, Route110_TrickHouse_Movement_TrickMasterJumpAway + applymovement LOCALID_TRICK_MASTER_END, Route110_TrickHouse_Movement_TrickMasterJumpAway waitmovement 0 - removeobject LOCALID_TRICK_MASTER + removeobject LOCALID_TRICK_MASTER_END addvar VAR_TRICK_HOUSE_LEVEL, 1 return @@ -201,43 +199,43 @@ Route110_TrickHouseEnd_EventScript_NoRoomForTent:: return Route110_TrickHouseEnd_EventScript_TrickMasterFaceAwaySouth:: - applymovement LOCALID_TRICK_MASTER, Common_Movement_WalkInPlaceFasterDown + applymovement LOCALID_TRICK_MASTER_END, Common_Movement_WalkInPlaceFasterDown waitmovement 0 return Route110_TrickHouseEnd_EventScript_TrickMasterFaceAwayNorth:: - applymovement LOCALID_TRICK_MASTER, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_TRICK_MASTER_END, Common_Movement_WalkInPlaceFasterUp waitmovement 0 return Route110_TrickHouseEnd_EventScript_TrickMasterFaceAwayWest:: - applymovement LOCALID_TRICK_MASTER, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_TRICK_MASTER_END, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 return Route110_TrickHouseEnd_EventScript_TrickMasterFaceAwayEast:: - applymovement LOCALID_TRICK_MASTER, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_TRICK_MASTER_END, Common_Movement_WalkInPlaceFasterRight waitmovement 0 return Route110_TrickHouseEnd_EventScript_TrickMasterExitTrigger:: lockall - turnobject LOCALID_TRICK_MASTER, DIR_WEST + turnobject LOCALID_TRICK_MASTER_END, DIR_WEST playse SE_PIN - applymovement LOCALID_TRICK_MASTER, Common_Movement_ExclamationMark + applymovement LOCALID_TRICK_MASTER_END, Common_Movement_ExclamationMark waitmovement 0 delay 20 - applymovement LOCALID_TRICK_MASTER, Route110_TrickHouseEnd_Movement_TrickMasterSurprise + applymovement LOCALID_TRICK_MASTER_END, Route110_TrickHouseEnd_Movement_TrickMasterSurprise waitmovement 0 playse SE_M_EXPLOSION - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterDown + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterDown waitmovement 0 msgbox Route110_TrickHouseEnd_Text_YoureIgnoringMe, MSGBOX_DEFAULT closemessage - applymovement OBJ_EVENT_ID_PLAYER, Route110_TrickHouseEnd_Movement_KeepPlayerInRoom + applymovement LOCALID_PLAYER, Route110_TrickHouseEnd_Movement_KeepPlayerInRoom waitmovement 0 delay 4 - turnobject LOCALID_TRICK_MASTER, DIR_EAST + turnobject LOCALID_TRICK_MASTER_END, DIR_EAST releaseall end diff --git a/data/maps/Route110_TrickHouseEntrance/map.json b/data/maps/Route110_TrickHouseEntrance/map.json index 5584a534c396..60f2bec2a0c0 100644 --- a/data/maps/Route110_TrickHouseEntrance/map.json +++ b/data/maps/Route110_TrickHouseEntrance/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_TRICK_MASTER", "graphics_id": "OBJ_EVENT_GFX_MAN_1", "x": 6, "y": 2, diff --git a/data/maps/Route110_TrickHouseEntrance/scripts.inc b/data/maps/Route110_TrickHouseEntrance/scripts.inc index 51135ac339c6..93daa17b0b89 100644 --- a/data/maps/Route110_TrickHouseEntrance/scripts.inc +++ b/data/maps/Route110_TrickHouseEntrance/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_TRICK_MASTER, 1 - Route110_TrickHouseEntrance_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, Route110_TrickHouseEntrance_OnTransition map_script MAP_SCRIPT_ON_FRAME_TABLE, Route110_TrickHouseEntrance_OnFrame @@ -129,7 +127,7 @@ Route110_TrickHouseEntrance_EventScript_TrickMasterFound:: addobject LOCALID_TRICK_MASTER showobjectat LOCALID_TRICK_MASTER, MAP_ROUTE110_TRICK_HOUSE_ENTRANCE turnobject LOCALID_TRICK_MASTER, DIR_EAST - turnobject OBJ_EVENT_ID_PLAYER, DIR_WEST + turnobject LOCALID_PLAYER, DIR_WEST end Route110_TrickHouseEntrance_EventScript_SetTrickMasterHidingSpot:: @@ -231,9 +229,9 @@ Route110_TrickHouseEntrance_EventScript_TrickMaster:: Route110_TrickHouseEntrance_EventScript_FoundTrickMaster:: playse SE_PIN - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_ExclamationMark + applymovement LOCALID_PLAYER, Common_Movement_ExclamationMark waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_Delay48 + applymovement LOCALID_PLAYER, Common_Movement_Delay48 waitmovement 0 call_if_eq VAR_TRICK_HOUSE_LEVEL, 0, Route110_TrickHouseEntrance_EventScript_FoundBeneathDesk call_if_eq VAR_TRICK_HOUSE_LEVEL, 1, Route110_TrickHouseEntrance_EventScript_FoundBehindTree @@ -467,9 +465,9 @@ Route110_TrickHouseEntrance_EventScript_EnterPuzzleRoom:: setmetatile 5, 1, METATILE_GenericBuilding_TrickHouse_Stairs_Down, FALSE special DrawWholeMapView delay 20 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkUp + applymovement LOCALID_PLAYER, Common_Movement_WalkUp waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Route110_TrickHouseEntrance_Movement_EnterRoom + applymovement LOCALID_PLAYER, Route110_TrickHouseEntrance_Movement_EnterRoom waitmovement 0 switch VAR_TRICK_HOUSE_LEVEL case 0, Route110_TrickHouseEntrance_EventScript_EnterPuzzleRoom1 diff --git a/data/maps/Route110_TrickHousePuzzle5/map.json b/data/maps/Route110_TrickHousePuzzle5/map.json index 3775505235c5..e094688bbf64 100644 --- a/data/maps/Route110_TrickHousePuzzle5/map.json +++ b/data/maps/Route110_TrickHousePuzzle5/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_MECHADOLL_1", "graphics_id": "OBJ_EVENT_GFX_MAN_1", "x": 6, "y": 17, @@ -28,6 +29,7 @@ "flag": "0" }, { + "local_id": "LOCALID_MECHADOLL_2", "graphics_id": "OBJ_EVENT_GFX_MAN_1", "x": 0, "y": 7, @@ -41,6 +43,7 @@ "flag": "0" }, { + "local_id": "LOCALID_MECHADOLL_3", "graphics_id": "OBJ_EVENT_GFX_MAN_1", "x": 14, "y": 10, @@ -54,6 +57,7 @@ "flag": "0" }, { + "local_id": "LOCALID_MECHADOLL_4", "graphics_id": "OBJ_EVENT_GFX_MAN_1", "x": 14, "y": 19, @@ -67,6 +71,7 @@ "flag": "0" }, { + "local_id": "LOCALID_MECHADOLL_5", "graphics_id": "OBJ_EVENT_GFX_MAN_1", "x": 10, "y": 4, diff --git a/data/maps/Route110_TrickHousePuzzle5/scripts.inc b/data/maps/Route110_TrickHousePuzzle5/scripts.inc index e0fa432bd2ae..c59dad2e5719 100644 --- a/data/maps/Route110_TrickHousePuzzle5/scripts.inc +++ b/data/maps/Route110_TrickHousePuzzle5/scripts.inc @@ -1,9 +1,3 @@ -.set LOCALID_MECHADOLL_1, 1 -.set LOCALID_MECHADOLL_2, 2 -.set LOCALID_MECHADOLL_3, 3 -.set LOCALID_MECHADOLL_4, 4 -.set LOCALID_MECHADOLL_5, 5 - Route110_TrickHousePuzzle5_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, Route110_TrickHousePuzzle5_OnTransition .byte 0 diff --git a/data/maps/Route111/map.json b/data/maps/Route111/map.json index 6efa1770e280..c090b61c9fe8 100644 --- a/data/maps/Route111/map.json +++ b/data/maps/Route111/map.json @@ -31,6 +31,7 @@ ], "object_events": [ { + "local_id": "LOCALID_ROUTE111_VICTOR", "graphics_id": "OBJ_EVENT_GFX_MAN_1", "x": 13, "y": 114, @@ -44,6 +45,7 @@ "flag": "FLAG_HIDE_ROUTE_111_VICTOR_WINSTRATE" }, { + "local_id": "LOCALID_ROUTE111_VICTORIA", "graphics_id": "OBJ_EVENT_GFX_POKEFAN_F", "x": 13, "y": 113, @@ -57,6 +59,7 @@ "flag": "FLAG_HIDE_ROUTE_111_VICTORIA_WINSTRATE" }, { + "local_id": "LOCALID_ROUTE111_VIVI", "graphics_id": "OBJ_EVENT_GFX_LASS", "x": 13, "y": 113, @@ -70,6 +73,7 @@ "flag": "FLAG_HIDE_ROUTE_111_VIVI_WINSTRATE" }, { + "local_id": "LOCALID_ROUTE111_VICKY", "graphics_id": "OBJ_EVENT_GFX_EXPERT_F", "x": 13, "y": 113, @@ -187,6 +191,7 @@ "flag": "0" }, { + "local_id": "LOCALID_ROUTE111_TY_1", "graphics_id": "OBJ_EVENT_GFX_CAMERAMAN", "x": 14, "y": 86, @@ -200,6 +205,7 @@ "flag": "FLAG_HIDE_ROUTE_111_GABBY_AND_TY_1" }, { + "local_id": "LOCALID_ROUTE111_GABBY_1", "graphics_id": "OBJ_EVENT_GFX_REPORTER_F", "x": 13, "y": 86, @@ -291,6 +297,7 @@ "flag": "0" }, { + "local_id": "LOCALID_ROUTE111_GABBY_2", "graphics_id": "OBJ_EVENT_GFX_REPORTER_F", "x": 13, "y": 86, @@ -301,9 +308,10 @@ "trainer_type": "TRAINER_TYPE_NONE", "trainer_sight_or_berry_tree_id": "0", "script": "GabbyAndTy_EventScript_GabbyBattle4", - "flag": "FLAG_HIDE_ROUTE_111_GABBY_AND_TY_3" + "flag": "FLAG_HIDE_ROUTE_111_GABBY_AND_TY_2" }, { + "local_id": "LOCALID_ROUTE111_TY_2", "graphics_id": "OBJ_EVENT_GFX_CAMERAMAN", "x": 14, "y": 86, @@ -314,9 +322,10 @@ "trainer_type": "TRAINER_TYPE_NONE", "trainer_sight_or_berry_tree_id": "0", "script": "GabbyAndTy_EventScript_TyBattle4", - "flag": "FLAG_HIDE_ROUTE_111_GABBY_AND_TY_3" + "flag": "FLAG_HIDE_ROUTE_111_GABBY_AND_TY_2" }, { + "local_id": "LOCALID_ROUTE111_GABBY_3", "graphics_id": "OBJ_EVENT_GFX_REPORTER_F", "x": 13, "y": 86, @@ -327,9 +336,10 @@ "trainer_type": "TRAINER_TYPE_NONE", "trainer_sight_or_berry_tree_id": "0", "script": "GabbyAndTy_EventScript_GabbyBattle6", - "flag": "FLAG_HIDE_ROUTE_111_GABBY_AND_TY_2" + "flag": "FLAG_HIDE_ROUTE_111_GABBY_AND_TY_3" }, { + "local_id": "LOCALID_ROUTE111_TY_3", "graphics_id": "OBJ_EVENT_GFX_CAMERAMAN", "x": 14, "y": 86, @@ -340,7 +350,7 @@ "trainer_type": "TRAINER_TYPE_NONE", "trainer_sight_or_berry_tree_id": "0", "script": "GabbyAndTy_EventScript_TyBattle6", - "flag": "FLAG_HIDE_ROUTE_111_GABBY_AND_TY_2" + "flag": "FLAG_HIDE_ROUTE_111_GABBY_AND_TY_3" }, { "graphics_id": "OBJ_EVENT_GFX_ITEM_BALL", @@ -603,6 +613,7 @@ "flag": "FLAG_HIDE_ROUTE_111_DESERT_FOSSIL" }, { + "local_id": "LOCALID_ROUTE111_PLAYER_FALLING", "graphics_id": "OBJ_EVENT_GFX_VAR_0", "x": 19, "y": 53, @@ -616,6 +627,7 @@ "flag": "FLAG_HIDE_ROUTE_111_PLAYER_DESCENT" }, { + "local_id": "LOCALID_ROUTE111_ROCK_SMASH_MAN", "graphics_id": "OBJ_EVENT_GFX_FAT_MAN", "x": 19, "y": 101, diff --git a/data/maps/Route111/scripts.inc b/data/maps/Route111/scripts.inc index 7335d0e1cea6..5e0b5dcda443 100644 --- a/data/maps/Route111/scripts.inc +++ b/data/maps/Route111/scripts.inc @@ -1,11 +1,3 @@ -.set LOCALID_VICTOR, 1 -.set LOCALID_VICTORIA, 2 -.set LOCALID_VIVI, 3 -.set LOCALID_VICKY, 4 -.set LOCALID_ROCK_SMASH_MAN, 46 - -@ Note: LOCALID_ROUTE111_PLAYER_FALLING is a local id for this map used elsewhere. It's defined in event_objects.h - Route111_MapScripts:: map_script MAP_SCRIPT_ON_LOAD, Route111_OnLoad map_script MAP_SCRIPT_ON_TRANSITION, Route111_OnTransition @@ -105,7 +97,7 @@ Route111_OnWarp: .2byte 0 Route111_EventScript_HidePlayerForMirageTower:: - hideobjectat OBJ_EVENT_ID_PLAYER, MAP_LITTLEROOT_TOWN + hideobjectat LOCALID_PLAYER, MAP_LITTLEROOT_TOWN end Route111_OnFrame: @@ -121,10 +113,10 @@ Route111_EventScript_MirageTowerDisappear:: addobject LOCALID_ROUTE111_PLAYER_FALLING special StartPlayerDescendMirageTower waitstate - showobjectat OBJ_EVENT_ID_PLAYER, MAP_LITTLEROOT_TOWN + showobjectat LOCALID_PLAYER, MAP_LITTLEROOT_TOWN removeobject LOCALID_ROUTE111_PLAYER_FALLING delay 16 - turnobject OBJ_EVENT_ID_PLAYER, DIR_NORTH + turnobject LOCALID_PLAYER, DIR_NORTH delay 16 special StartMirageTowerDisintegration waitstate @@ -216,22 +208,22 @@ Route111_EventScript_PreventRouteAccess:: end Route111_EventScript_PushUpFromRoute:: - applymovement OBJ_EVENT_ID_PLAYER, Route111_Movement_PushUpFromRoute + applymovement LOCALID_PLAYER, Route111_Movement_PushUpFromRoute waitmovement 0 return Route111_EventScript_PushDownFromRoute:: - applymovement OBJ_EVENT_ID_PLAYER, Route111_Movement_PushDownFromRoute + applymovement LOCALID_PLAYER, Route111_Movement_PushDownFromRoute waitmovement 0 return Route111_EventScript_PushLeftFromRoute:: - applymovement OBJ_EVENT_ID_PLAYER, Route111_Movement_PushLeftFromRoute + applymovement LOCALID_PLAYER, Route111_Movement_PushLeftFromRoute waitmovement 0 return Route111_EventScript_PushRightFromRoute:: - applymovement OBJ_EVENT_ID_PLAYER, Route111_Movement_PushRightFromRoute + applymovement LOCALID_PLAYER, Route111_Movement_PushRightFromRoute waitmovement 0 return @@ -277,68 +269,68 @@ Route111_EventScript_Victor:: Route111_EventScript_BattleWinstrates:: msgbox Route111_Text_VictorIntro, MSGBOX_DEFAULT trainerbattle_no_intro TRAINER_VICTOR, Route111_Text_VictorDefeat - applymovement LOCALID_VICTOR, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_ROUTE111_VICTOR, Common_Movement_WalkInPlaceFasterUp waitmovement 0 call Route111_EventScript_OpenWinstrateDoor msgbox Route111_Text_VictorPostBattle, MSGBOX_DEFAULT closemessage - applymovement LOCALID_VICTOR, Route111_Movement_WinstrateEnterHouse + applymovement LOCALID_ROUTE111_VICTOR, Route111_Movement_WinstrateEnterHouse waitmovement 0 - removeobject LOCALID_VICTOR + removeobject LOCALID_ROUTE111_VICTOR call Route111_EventScript_CloseWinstrateDoor - applymovement OBJ_EVENT_ID_PLAYER, Route111_Movement_WaitForNextWinstrate + applymovement LOCALID_PLAYER, Route111_Movement_WaitForNextWinstrate waitmovement 0 call Route111_EventScript_OpenWinstrateDoor - addobject LOCALID_VICTORIA - applymovement LOCALID_VICTORIA, Route111_Movement_WinstrateExitHouse + addobject LOCALID_ROUTE111_VICTORIA + applymovement LOCALID_ROUTE111_VICTORIA, Route111_Movement_WinstrateExitHouse waitmovement 0 call Route111_EventScript_CloseWinstrateDoor msgbox Route111_Text_VictoriaIntro, MSGBOX_DEFAULT trainerbattle_no_intro TRAINER_VICTORIA, Route111_Text_VictoriaDefeat - applymovement LOCALID_VICTORIA, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_ROUTE111_VICTORIA, Common_Movement_WalkInPlaceFasterUp waitmovement 0 call Route111_EventScript_OpenWinstrateDoor msgbox Route111_Text_VictoriaPostBattle, MSGBOX_DEFAULT closemessage - applymovement LOCALID_VICTORIA, Route111_Movement_WinstrateEnterHouse + applymovement LOCALID_ROUTE111_VICTORIA, Route111_Movement_WinstrateEnterHouse waitmovement 0 - removeobject LOCALID_VICTORIA + removeobject LOCALID_ROUTE111_VICTORIA call Route111_EventScript_CloseWinstrateDoor - applymovement OBJ_EVENT_ID_PLAYER, Route111_Movement_WaitForNextWinstrate + applymovement LOCALID_PLAYER, Route111_Movement_WaitForNextWinstrate waitmovement 0 call Route111_EventScript_OpenWinstrateDoor - addobject LOCALID_VIVI - applymovement LOCALID_VIVI, Route111_Movement_WinstrateExitHouse + addobject LOCALID_ROUTE111_VIVI + applymovement LOCALID_ROUTE111_VIVI, Route111_Movement_WinstrateExitHouse waitmovement 0 call Route111_EventScript_CloseWinstrateDoor msgbox Route111_Text_ViviIntro, MSGBOX_DEFAULT trainerbattle_no_intro TRAINER_VIVI, Route111_Text_ViviDefeat - applymovement LOCALID_VIVI, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_ROUTE111_VIVI, Common_Movement_WalkInPlaceFasterUp waitmovement 0 call Route111_EventScript_OpenWinstrateDoor msgbox Route111_Text_ViviPostBattle, MSGBOX_DEFAULT closemessage - applymovement LOCALID_VIVI, Route111_Movement_WinstrateEnterHouse + applymovement LOCALID_ROUTE111_VIVI, Route111_Movement_WinstrateEnterHouse waitmovement 0 - removeobject LOCALID_VIVI + removeobject LOCALID_ROUTE111_VIVI call Route111_EventScript_CloseWinstrateDoor - applymovement OBJ_EVENT_ID_PLAYER, Route111_Movement_WaitForNextWinstrate + applymovement LOCALID_PLAYER, Route111_Movement_WaitForNextWinstrate waitmovement 0 call Route111_EventScript_OpenWinstrateDoor - addobject LOCALID_VICKY - applymovement LOCALID_VICKY, Route111_Movement_WinstrateExitHouse + addobject LOCALID_ROUTE111_VICKY + applymovement LOCALID_ROUTE111_VICKY, Route111_Movement_WinstrateExitHouse waitmovement 0 call Route111_EventScript_CloseWinstrateDoor msgbox Route111_Text_VickyIntro, MSGBOX_DEFAULT trainerbattle_no_intro TRAINER_VICKY, Route111_Text_VickyDefeat msgbox Route111_Text_VickyPostBattle, MSGBOX_DEFAULT closemessage - applymovement LOCALID_VICKY, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_ROUTE111_VICKY, Common_Movement_WalkInPlaceFasterUp waitmovement 0 call Route111_EventScript_OpenWinstrateDoor - applymovement LOCALID_VICKY, Route111_Movement_WinstrateEnterHouse + applymovement LOCALID_ROUTE111_VICKY, Route111_Movement_WinstrateEnterHouse waitmovement 0 - removeobject LOCALID_VICKY + removeobject LOCALID_ROUTE111_VICKY call Route111_EventScript_CloseWinstrateDoor release end @@ -427,11 +419,11 @@ Route111_EventScript_HikerMirageTowerVisible:: Route111_EventScript_RockSmashTipFatMan:: lockall - applymovement LOCALID_ROCK_SMASH_MAN, Common_Movement_FacePlayer + applymovement LOCALID_ROUTE111_ROCK_SMASH_MAN, Common_Movement_FacePlayer waitmovement 0 msgbox Route111_Text_MauvilleUncleToldMeToTakeRockSmash, MSGBOX_DEFAULT closemessage - applymovement LOCALID_ROCK_SMASH_MAN, Common_Movement_FaceOriginalDirection + applymovement LOCALID_ROUTE111_ROCK_SMASH_MAN, Common_Movement_FaceOriginalDirection waitmovement 0 releaseall end diff --git a/data/maps/Route111_WinstrateFamilysHouse/map.json b/data/maps/Route111_WinstrateFamilysHouse/map.json index 5e6f9d75e89e..3e061ae94ec5 100644 --- a/data/maps/Route111_WinstrateFamilysHouse/map.json +++ b/data/maps/Route111_WinstrateFamilysHouse/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_WINSTRATE_HOUSE_VIVI", "graphics_id": "OBJ_EVENT_GFX_LASS", "x": 7, "y": 5, @@ -28,6 +29,7 @@ "flag": "0" }, { + "local_id": "LOCALID_WINSTRATE_HOUSE_VICTOR", "graphics_id": "OBJ_EVENT_GFX_MAN_1", "x": 4, "y": 5, @@ -41,6 +43,7 @@ "flag": "0" }, { + "local_id": "LOCALID_WINSTRATE_HOUSE_VICTORIA", "graphics_id": "OBJ_EVENT_GFX_POKEFAN_F", "x": 7, "y": 4, @@ -54,6 +57,7 @@ "flag": "0" }, { + "local_id": "LOCALID_WINSTRATE_HOUSE_VICKY", "graphics_id": "OBJ_EVENT_GFX_EXPERT_F", "x": 4, "y": 4, diff --git a/data/maps/Route111_WinstrateFamilysHouse/scripts.inc b/data/maps/Route111_WinstrateFamilysHouse/scripts.inc index a163c7b4f2d7..4f44241cf98b 100644 --- a/data/maps/Route111_WinstrateFamilysHouse/scripts.inc +++ b/data/maps/Route111_WinstrateFamilysHouse/scripts.inc @@ -1,15 +1,10 @@ -.set LOCALID_VIVI, 1 -.set LOCALID_VICTOR, 2 -.set LOCALID_VICTORIA, 3 -.set LOCALID_VICKY, 4 - Route111_WinstrateFamilysHouse_MapScripts:: .byte 0 Route111_WinstrateFamilysHouse_EventScript_Victor:: lock faceplayer - setvar VAR_0x8008, LOCALID_VICTOR + setvar VAR_0x8008, LOCALID_WINSTRATE_HOUSE_VICTOR msgbox Route111_WinstrateFamilysHouse_Text_MySonIsStrongerThanYou, MSGBOX_DEFAULT goto Route111_WinstrateFamilysHouse_EventScript_FaceOriginalDirection end @@ -17,7 +12,7 @@ Route111_WinstrateFamilysHouse_EventScript_Victor:: Route111_WinstrateFamilysHouse_EventScript_Victoria:: lock faceplayer - setvar VAR_0x8008, LOCALID_VICTORIA + setvar VAR_0x8008, LOCALID_WINSTRATE_HOUSE_VICTORIA goto_if_set FLAG_RECEIVED_MACHO_BRACE, Route111_WinstrateFamilysHouse_EventScript_ReceivedMachoBrace msgbox Route111_WinstrateFamilysHouse_Text_LikeYouToHaveMachoBrace, MSGBOX_DEFAULT giveitem ITEM_MACHO_BRACE @@ -34,7 +29,7 @@ Route111_WinstrateFamilysHouse_EventScript_ReceivedMachoBrace:: Route111_WinstrateFamilysHouse_EventScript_Vivi:: lock faceplayer - setvar VAR_0x8008, LOCALID_VIVI + setvar VAR_0x8008, LOCALID_WINSTRATE_HOUSE_VIVI msgbox Route111_WinstrateFamilysHouse_Text_StrongerFamilyMembers, MSGBOX_DEFAULT goto Route111_WinstrateFamilysHouse_EventScript_FaceOriginalDirection end @@ -42,7 +37,7 @@ Route111_WinstrateFamilysHouse_EventScript_Vivi:: Route111_WinstrateFamilysHouse_EventScript_Vicky:: lock faceplayer - setvar VAR_0x8008, LOCALID_VICKY + setvar VAR_0x8008, LOCALID_WINSTRATE_HOUSE_VICKY goto_if_set FLAG_TEMP_4, Route111_WinstrateFamilysHouse_EventScript_AlreadySpokenTo msgbox Route111_WinstrateFamilysHouse_Text_GrandsonStrong, MSGBOX_DEFAULT setflag FLAG_TEMP_4 diff --git a/data/maps/Route112/map.json b/data/maps/Route112/map.json index 5340680ea5c3..d3260f27fef0 100644 --- a/data/maps/Route112/map.json +++ b/data/maps/Route112/map.json @@ -31,6 +31,7 @@ ], "object_events": [ { + "local_id": "LOCALID_ROUTE112_GRUNT_1", "graphics_id": "OBJ_EVENT_GFX_MAGMA_MEMBER_M", "x": 26, "y": 30, @@ -96,6 +97,7 @@ "flag": "0" }, { + "local_id": "LOCALID_ROUTE112_GRUNT_2", "graphics_id": "OBJ_EVENT_GFX_MAGMA_MEMBER_M", "x": 27, "y": 30, diff --git a/data/maps/Route112/scripts.inc b/data/maps/Route112/scripts.inc index a6c248e1f6dd..73e229532f40 100644 --- a/data/maps/Route112/scripts.inc +++ b/data/maps/Route112/scripts.inc @@ -1,6 +1,3 @@ -.set LOCALID_GRUNT_1, 1 -.set LOCALID_GRUNT_2, 6 - Route112_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, Route112_OnTransition .byte 0 @@ -13,36 +10,36 @@ Route112_OnTransition: Route112_EventScript_MagmaGrunts:: lockall delay 40 - applymovement LOCALID_GRUNT_1, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_ROUTE112_GRUNT_1, Common_Movement_WalkInPlaceFasterRight waitmovement 0 delay 20 msgbox Route112_Text_LeaderGoingToAwakenThing, MSGBOX_DEFAULT closemessage - applymovement LOCALID_GRUNT_1, Common_Movement_FaceOriginalDirection + applymovement LOCALID_ROUTE112_GRUNT_1, Common_Movement_FaceOriginalDirection waitmovement 0 delay 40 - applymovement LOCALID_GRUNT_2, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_ROUTE112_GRUNT_2, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 delay 20 msgbox Route112_Text_YeahWeNeedMeteorite, MSGBOX_DEFAULT closemessage - applymovement LOCALID_GRUNT_2, Common_Movement_FaceOriginalDirection + applymovement LOCALID_ROUTE112_GRUNT_2, Common_Movement_FaceOriginalDirection waitmovement 0 delay 40 - applymovement LOCALID_GRUNT_1, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_ROUTE112_GRUNT_1, Common_Movement_WalkInPlaceFasterRight waitmovement 0 delay 20 msgbox Route112_Text_OhThatsWhyCrewWentToFallarbor, MSGBOX_DEFAULT closemessage - applymovement LOCALID_GRUNT_1, Common_Movement_FaceOriginalDirection + applymovement LOCALID_ROUTE112_GRUNT_1, Common_Movement_FaceOriginalDirection waitmovement 0 delay 40 - applymovement LOCALID_GRUNT_2, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_ROUTE112_GRUNT_2, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 delay 20 msgbox Route112_Text_CantLetAnyonePassUntilTheyreBack, MSGBOX_DEFAULT closemessage - applymovement LOCALID_GRUNT_2, Common_Movement_FaceOriginalDirection + applymovement LOCALID_ROUTE112_GRUNT_2, Common_Movement_FaceOriginalDirection waitmovement 0 releaseall end diff --git a/data/maps/Route112_CableCarStation/map.json b/data/maps/Route112_CableCarStation/map.json index 09401d83b0e3..3aeadc6f1f59 100644 --- a/data/maps/Route112_CableCarStation/map.json +++ b/data/maps/Route112_CableCarStation/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_ROUTE112_CABLE_CAR_ATTENDANT", "graphics_id": "OBJ_EVENT_GFX_BEAUTY", "x": 6, "y": 6, diff --git a/data/maps/Route112_CableCarStation/scripts.inc b/data/maps/Route112_CableCarStation/scripts.inc index 3ce4f62e2a4a..63f6673f34ca 100644 --- a/data/maps/Route112_CableCarStation/scripts.inc +++ b/data/maps/Route112_CableCarStation/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_ATTENDANT, 1 - Route112_CableCarStation_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, Route112_CableCarStation_OnTransition map_script MAP_SCRIPT_ON_FRAME_TABLE, Route112_CableCarStation_OnFrame @@ -11,8 +9,8 @@ Route112_CableCarStation_OnTransition: end Route112_CableCarStation_EventScript_MoveAttendantAside:: - setobjectxyperm LOCALID_ATTENDANT, 7, 4 - setobjectmovementtype LOCALID_ATTENDANT, MOVEMENT_TYPE_FACE_LEFT + setobjectxyperm LOCALID_ROUTE112_CABLE_CAR_ATTENDANT, 7, 4 + setobjectmovementtype LOCALID_ROUTE112_CABLE_CAR_ATTENDANT, MOVEMENT_TYPE_FACE_LEFT return Route112_CableCarStation_OnFrame: @@ -21,12 +19,12 @@ Route112_CableCarStation_OnFrame: Route112_CableCarStation_EventScript_ExitCableCar:: lockall - applymovement OBJ_EVENT_ID_PLAYER, Route112_CableCarStation_Movement_ExitCableCar - applymovement LOCALID_ATTENDANT, Route112_CableCarStation_Movement_FollowPlayerOutFromCableCar + applymovement LOCALID_PLAYER, Route112_CableCarStation_Movement_ExitCableCar + applymovement LOCALID_ROUTE112_CABLE_CAR_ATTENDANT, Route112_CableCarStation_Movement_FollowPlayerOutFromCableCar waitmovement 0 setvar VAR_CABLE_CAR_STATION_STATE, 0 - setobjectxyperm LOCALID_ATTENDANT, 6, 7 - setobjectmovementtype LOCALID_ATTENDANT, MOVEMENT_TYPE_FACE_DOWN + setobjectxyperm LOCALID_ROUTE112_CABLE_CAR_ATTENDANT, 6, 7 + setobjectmovementtype LOCALID_ROUTE112_CABLE_CAR_ATTENDANT, MOVEMENT_TYPE_FACE_DOWN releaseall end @@ -41,8 +39,8 @@ Route112_CableCarStation_EventScript_Attendant:: Route112_CableCarStation_EventScript_RideCableCar:: msgbox Route112_CableCarStation_Text_StepThisWay, MSGBOX_DEFAULT closemessage - applymovement LOCALID_ATTENDANT, Route112_CableCarStation_Movement_LeadPlayerToCableCar - applymovement OBJ_EVENT_ID_PLAYER, Route112_CableCarStation_Movement_BoardCableCar + applymovement LOCALID_ROUTE112_CABLE_CAR_ATTENDANT, Route112_CableCarStation_Movement_LeadPlayerToCableCar + applymovement LOCALID_PLAYER, Route112_CableCarStation_Movement_BoardCableCar waitmovement 0 setvar VAR_0x8004, FALSE @ Going up setvar VAR_CABLE_CAR_STATION_STATE, 1 diff --git a/data/maps/Route114_FossilManiacsTunnel/map.json b/data/maps/Route114_FossilManiacsTunnel/map.json index 034545e6ba57..625c5afc0856 100644 --- a/data/maps/Route114_FossilManiacsTunnel/map.json +++ b/data/maps/Route114_FossilManiacsTunnel/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_FOSSIL_MANIAC", "graphics_id": "OBJ_EVENT_GFX_MANIAC", "x": 5, "y": 3, diff --git a/data/maps/Route114_FossilManiacsTunnel/scripts.inc b/data/maps/Route114_FossilManiacsTunnel/scripts.inc index 72138bbe4006..6961a14714fc 100644 --- a/data/maps/Route114_FossilManiacsTunnel/scripts.inc +++ b/data/maps/Route114_FossilManiacsTunnel/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_FOSSIL_MANIAC, 1 - Route114_FossilManiacsTunnel_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, Route114_FossilManiacsTunnel_OnTransition map_script MAP_SCRIPT_ON_LOAD, Route114_FossilManiacsTunnel_OnLoad @@ -26,7 +24,7 @@ Route114_FossilManiacsTunnel_EventScript_CloseDesertUnderpass:: Route114_FossilManiacsTunnel_EventScript_ManiacMentionCaveIn:: lockall applymovement LOCALID_FOSSIL_MANIAC, Common_Movement_WalkInPlaceFasterUp - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterDown + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterDown waitmovement 0 msgbox Route114_FossilManiacsTunnel_Text_NotSafeThatWay, MSGBOX_DEFAULT setvar VAR_FOSSIL_MANIAC_STATE, 2 diff --git a/data/maps/Route116/map.json b/data/maps/Route116/map.json index adf9a86d59ee..6e4da0ac0a0a 100644 --- a/data/maps/Route116/map.json +++ b/data/maps/Route116/map.json @@ -156,6 +156,7 @@ "flag": "0" }, { + "local_id": "LOCALID_ROUTE116_BRINEY", "graphics_id": "OBJ_EVENT_GFX_EXPERT_M", "x": 46, "y": 9, @@ -286,6 +287,7 @@ "flag": "FLAG_ITEM_ROUTE_116_X_SPECIAL" }, { + "local_id": "LOCALID_ROUTE116_WANDAS_BF", "graphics_id": "OBJ_EVENT_GFX_BLACK_BELT", "x": 38, "y": 9, diff --git a/data/maps/Route116/scripts.inc b/data/maps/Route116/scripts.inc index 2a464d199655..617ff90d19a6 100644 --- a/data/maps/Route116/scripts.inc +++ b/data/maps/Route116/scripts.inc @@ -1,6 +1,3 @@ -.set LOCALID_BRINEY, 11 -.set LOCALID_WANDAS_BF_OUTSIDE, 21 - Route116_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, Route116_OnTransition map_script MAP_SCRIPT_ON_LOAD, Route116_OnLoad @@ -15,7 +12,7 @@ Route116_OnTransition: end Route116_EventScript_SetWandasBoyfriendPos:: - setobjectxyperm LOCALID_WANDAS_BF_OUTSIDE, 38, 10 + setobjectxyperm LOCALID_ROUTE116_WANDAS_BF, 38, 10 return Route116_OnLoad: @@ -144,8 +141,8 @@ Route116_EventScript_Briney:: Route116_EventScript_BrineyTrigger:: lockall - applymovement LOCALID_BRINEY, Common_Movement_WalkInPlaceFasterRight - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_ROUTE116_BRINEY, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 msgbox Route116_Text_ScoundrelMadeOffWithPeeko, MSGBOX_DEFAULT setvar VAR_ROUTE116_STATE, 2 diff --git a/data/maps/Route117/map.json b/data/maps/Route117/map.json index 80304ddf4b7b..07a08500c72e 100644 --- a/data/maps/Route117/map.json +++ b/data/maps/Route117/map.json @@ -52,6 +52,7 @@ "flag": "0" }, { + "local_id": "LOCALID_DAYCARE_MAN", "graphics_id": "OBJ_EVENT_GFX_OLD_MAN", "x": 47, "y": 4, diff --git a/data/maps/Route117/scripts.inc b/data/maps/Route117/scripts.inc index 37d589ce316c..8c8addc63708 100644 --- a/data/maps/Route117/scripts.inc +++ b/data/maps/Route117/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_DAYCARE_MAN, 3 - Route117_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, Route117_OnTransition .byte 0 diff --git a/data/maps/Route117_PokemonDayCare/map.json b/data/maps/Route117_PokemonDayCare/map.json index 128c9f6e72be..31849863de58 100644 --- a/data/maps/Route117_PokemonDayCare/map.json +++ b/data/maps/Route117_PokemonDayCare/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_DAYCARE_LADY", "graphics_id": "OBJ_EVENT_GFX_OLD_WOMAN", "x": 2, "y": 2, diff --git a/data/maps/Route118/map.json b/data/maps/Route118/map.json index 1068e4a1a781..f1a292c00d47 100644 --- a/data/maps/Route118/map.json +++ b/data/maps/Route118/map.json @@ -83,6 +83,7 @@ "flag": "0" }, { + "local_id": "LOCALID_ROUTE118_GABBY_1", "graphics_id": "OBJ_EVENT_GFX_REPORTER_F", "x": 33, "y": 8, @@ -96,6 +97,7 @@ "flag": "FLAG_HIDE_ROUTE_118_GABBY_AND_TY_1" }, { + "local_id": "LOCALID_ROUTE118_TY_1", "graphics_id": "OBJ_EVENT_GFX_CAMERAMAN", "x": 34, "y": 8, @@ -122,6 +124,7 @@ "flag": "0" }, { + "local_id": "LOCALID_ROUTE118_GABBY_2", "graphics_id": "OBJ_EVENT_GFX_REPORTER_F", "x": 33, "y": 8, @@ -135,6 +138,7 @@ "flag": "FLAG_HIDE_ROUTE_118_GABBY_AND_TY_2" }, { + "local_id": "LOCALID_ROUTE118_TY_2", "graphics_id": "OBJ_EVENT_GFX_CAMERAMAN", "x": 34, "y": 8, @@ -148,6 +152,7 @@ "flag": "FLAG_HIDE_ROUTE_118_GABBY_AND_TY_2" }, { + "local_id": "LOCALID_ROUTE118_GABBY_3", "graphics_id": "OBJ_EVENT_GFX_REPORTER_F", "x": 33, "y": 8, @@ -161,6 +166,7 @@ "flag": "FLAG_HIDE_ROUTE_118_GABBY_AND_TY_3" }, { + "local_id": "LOCALID_ROUTE118_TY_3", "graphics_id": "OBJ_EVENT_GFX_CAMERAMAN", "x": 34, "y": 8, @@ -265,6 +271,7 @@ "flag": "0" }, { + "local_id": "LOCALID_ROUTE118_STEVEN", "graphics_id": "OBJ_EVENT_GFX_STEVEN", "x": 44, "y": 7, diff --git a/data/maps/Route118/scripts.inc b/data/maps/Route118/scripts.inc index 92dd8847d46a..3ea728d365b5 100644 --- a/data/maps/Route118/scripts.inc +++ b/data/maps/Route118/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_STEVEN, 19 - Route118_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, Route118_OnTransition map_script MAP_SCRIPT_ON_LOAD, Route118_OnLoad @@ -64,9 +62,9 @@ Route118_EventScript_RouteSign119:: Route118_EventScript_StevenTrigger0:: lockall setvar VAR_0x8008, 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_FaceUp + applymovement LOCALID_PLAYER, Common_Movement_FaceUp waitmovement 0 - applymovement LOCALID_STEVEN, Route118_Movement_StevenApproachLedge0 + applymovement LOCALID_ROUTE118_STEVEN, Route118_Movement_StevenApproachLedge0 waitmovement 0 goto Route118_EventScript_StevenTrigger end @@ -74,7 +72,7 @@ Route118_EventScript_StevenTrigger0:: Route118_EventScript_StevenTrigger1:: lockall setvar VAR_0x8008, 1 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_FaceUp + applymovement LOCALID_PLAYER, Common_Movement_FaceUp waitmovement 0 goto Route118_EventScript_StevenTrigger end @@ -82,16 +80,16 @@ Route118_EventScript_StevenTrigger1:: Route118_EventScript_StevenTrigger2:: lockall setvar VAR_0x8008, 2 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_FaceUp + applymovement LOCALID_PLAYER, Common_Movement_FaceUp waitmovement 0 - applymovement LOCALID_STEVEN, Route118_Movement_StevenApproachLedge2 + applymovement LOCALID_ROUTE118_STEVEN, Route118_Movement_StevenApproachLedge2 waitmovement 0 goto Route118_EventScript_StevenTrigger end Route118_EventScript_StevenTrigger:: playse SE_LEDGE - applymovement LOCALID_STEVEN, Route118_Movement_StevenJumpLedge + applymovement LOCALID_ROUTE118_STEVEN, Route118_Movement_StevenJumpLedge waitmovement 0 delay 30 msgbox Route118_Text_StevenQuestions, MSGBOX_DEFAULT @@ -100,25 +98,25 @@ Route118_EventScript_StevenTrigger:: call_if_eq VAR_0x8008, 1, Route118_EventScript_StevenExit1 call_if_eq VAR_0x8008, 2, Route118_EventScript_StevenExit2 setvar VAR_ROUTE118_STATE, 1 - removeobject LOCALID_STEVEN + removeobject LOCALID_ROUTE118_STEVEN releaseall end Route118_EventScript_StevenExit0:: - applymovement OBJ_EVENT_ID_PLAYER, Route118_Movement_PlayerWatchStevenExit - applymovement LOCALID_STEVEN, Route118_Movement_StevenExit0 + applymovement LOCALID_PLAYER, Route118_Movement_PlayerWatchStevenExit + applymovement LOCALID_ROUTE118_STEVEN, Route118_Movement_StevenExit0 waitmovement 0 return Route118_EventScript_StevenExit1:: - applymovement OBJ_EVENT_ID_PLAYER, Route118_Movement_PlayerWatchStevenExit - applymovement LOCALID_STEVEN, Route118_Movement_StevenExit1 + applymovement LOCALID_PLAYER, Route118_Movement_PlayerWatchStevenExit + applymovement LOCALID_ROUTE118_STEVEN, Route118_Movement_StevenExit1 waitmovement 0 return Route118_EventScript_StevenExit2:: - applymovement OBJ_EVENT_ID_PLAYER, Route118_Movement_PlayerWatchStevenExit - applymovement LOCALID_STEVEN, Route118_Movement_StevenExit2 + applymovement LOCALID_PLAYER, Route118_Movement_PlayerWatchStevenExit + applymovement LOCALID_ROUTE118_STEVEN, Route118_Movement_StevenExit2 waitmovement 0 return diff --git a/data/maps/Route119/map.json b/data/maps/Route119/map.json index f8591a5ba2f1..a2850b70ab14 100644 --- a/data/maps/Route119/map.json +++ b/data/maps/Route119/map.json @@ -221,6 +221,7 @@ "flag": "0" }, { + "local_id": "LOCALID_ROUTE119_RIVAL", "graphics_id": "OBJ_EVENT_GFX_VAR_0", "x": 25, "y": 32, @@ -338,6 +339,7 @@ "flag": "FLAG_HIDE_ROUTE_119_TEAM_AQUA" }, { + "local_id": "LOCALID_ROUTE119_RIVAL_ON_BIKE", "graphics_id": "OBJ_EVENT_GFX_VAR_3", "x": 17, "y": 33, @@ -572,6 +574,7 @@ "flag": "FLAG_ITEM_ROUTE_119_ELIXIR_2" }, { + "local_id": "LOCALID_ROUTE119_SCOTT", "graphics_id": "OBJ_EVENT_GFX_SCOTT", "x": 28, "y": 25, diff --git a/data/maps/Route119/scripts.inc b/data/maps/Route119/scripts.inc index 6c9767dcb625..d218fb60dc91 100644 --- a/data/maps/Route119/scripts.inc +++ b/data/maps/Route119/scripts.inc @@ -1,7 +1,3 @@ -.set LOCALID_RIVAL, 16 -.set LOCALID_RIVAL_ON_BIKE, 25 -.set LOCALID_SCOTT, 43 - Route119_MapScripts:: map_script MAP_SCRIPT_ON_RESUME, Route119_OnResume map_script MAP_SCRIPT_ON_TRANSITION, Route119_OnTransition @@ -42,20 +38,20 @@ Route119_EventScript_RivalTrigger2:: Route119_EventScript_RivalEncounter:: lockall - addobject LOCALID_RIVAL_ON_BIKE + addobject LOCALID_ROUTE119_RIVAL_ON_BIKE checkplayergender call_if_eq VAR_RESULT, MALE, Route119_EventScript_PlayMayMusic call_if_eq VAR_RESULT, FEMALE, Route119_EventScript_PlayBrendanMusic delay 65 call_if_eq VAR_TEMP_1, 1, Route119_EventScript_RivalEnter1 call_if_eq VAR_TEMP_1, 2, Route119_EventScript_RivalEnter2 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterDown + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterDown waitmovement 0 delay 30 call_if_eq VAR_TEMP_1, 1, Route119_EventScript_SetRivalPos1 call_if_eq VAR_TEMP_1, 2, Route119_EventScript_SetRivalPos2 - removeobject LOCALID_RIVAL_ON_BIKE - addobject LOCALID_RIVAL + removeobject LOCALID_ROUTE119_RIVAL_ON_BIKE + addobject LOCALID_ROUTE119_RIVAL delay 30 checkplayergender goto_if_eq VAR_RESULT, MALE, Route119_EventScript_BattleMay @@ -140,78 +136,78 @@ Route119_EventScript_RivalExitScottArrive:: closemessage call_if_eq VAR_TEMP_1, 1, Route119_EventScript_SetRivalPos1 call_if_eq VAR_TEMP_1, 2, Route119_EventScript_SetRivalPos2 - removeobject LOCALID_RIVAL - addobject LOCALID_RIVAL_ON_BIKE + removeobject LOCALID_ROUTE119_RIVAL + addobject LOCALID_ROUTE119_RIVAL_ON_BIKE delay 30 call_if_eq VAR_TEMP_1, 1, Route119_EventScript_RivalExit1 call_if_eq VAR_TEMP_1, 2, Route119_EventScript_RivalExit2 - removeobject LOCALID_RIVAL_ON_BIKE + removeobject LOCALID_ROUTE119_RIVAL_ON_BIKE setvar VAR_ROUTE119_STATE, 1 savebgm MUS_DUMMY fadedefaultbgm delay 60 call_if_eq VAR_TEMP_1, 1, Route119_EventScript_SetScottPos1 call_if_eq VAR_TEMP_1, 2, Route119_EventScript_SetScottPos2 - addobject LOCALID_SCOTT - applymovement LOCALID_SCOTT, Route119_Movement_ScottEnter + addobject LOCALID_ROUTE119_SCOTT + applymovement LOCALID_ROUTE119_SCOTT, Route119_Movement_ScottEnter waitmovement 0 addvar VAR_SCOTT_STATE, 1 msgbox Route119_Text_ScottWayToGoBeSeeingYou, MSGBOX_DEFAULT closemessage call_if_eq VAR_TEMP_1, 1, Route119_EventScript_ScottExit1 call_if_eq VAR_TEMP_1, 2, Route119_EventScript_ScottExit2 - removeobject LOCALID_SCOTT + removeobject LOCALID_ROUTE119_SCOTT releaseall end Route119_EventScript_SetScottPos1:: - setobjectxyperm LOCALID_SCOTT, 27, 25 + setobjectxyperm LOCALID_ROUTE119_SCOTT, 27, 25 return Route119_EventScript_SetScottPos2:: - setobjectxyperm LOCALID_SCOTT, 28, 25 + setobjectxyperm LOCALID_ROUTE119_SCOTT, 28, 25 return Route119_EventScript_ScottExit1:: - applymovement LOCALID_SCOTT, Route119_Movement_ScottExit1 + applymovement LOCALID_ROUTE119_SCOTT, Route119_Movement_ScottExit1 waitmovement 0 return Route119_EventScript_ScottExit2:: - applymovement LOCALID_SCOTT, Route119_Movement_ScottExit2 + applymovement LOCALID_ROUTE119_SCOTT, Route119_Movement_ScottExit2 waitmovement 0 return Route119_EventScript_RivalEnter1:: - applymovement LOCALID_RIVAL_ON_BIKE, Route119_Movement_RivalEnter1 + applymovement LOCALID_ROUTE119_RIVAL_ON_BIKE, Route119_Movement_RivalEnter1 waitmovement 0 return Route119_EventScript_RivalEnter2:: - applymovement LOCALID_RIVAL_ON_BIKE, Route119_Movement_RivalEnter2 + applymovement LOCALID_ROUTE119_RIVAL_ON_BIKE, Route119_Movement_RivalEnter2 waitmovement 0 return Route119_EventScript_RivalExit1:: - applymovement OBJ_EVENT_ID_PLAYER, Route119_Movement_PlayerWatchRivalExit1 - applymovement LOCALID_RIVAL_ON_BIKE, Route119_Movement_RivalExit1 + applymovement LOCALID_PLAYER, Route119_Movement_PlayerWatchRivalExit1 + applymovement LOCALID_ROUTE119_RIVAL_ON_BIKE, Route119_Movement_RivalExit1 waitmovement 0 return Route119_EventScript_RivalExit2:: - applymovement OBJ_EVENT_ID_PLAYER, Route119_Movement_PlayerWatchRivalExit2 - applymovement LOCALID_RIVAL_ON_BIKE, Route119_Movement_RivalExit2 + applymovement LOCALID_PLAYER, Route119_Movement_PlayerWatchRivalExit2 + applymovement LOCALID_ROUTE119_RIVAL_ON_BIKE, Route119_Movement_RivalExit2 waitmovement 0 return Route119_EventScript_SetRivalPos1:: - setobjectxyperm LOCALID_RIVAL, 25, 32 - setobjectxyperm LOCALID_RIVAL_ON_BIKE, 25, 32 + setobjectxyperm LOCALID_ROUTE119_RIVAL, 25, 32 + setobjectxyperm LOCALID_ROUTE119_RIVAL_ON_BIKE, 25, 32 return Route119_EventScript_SetRivalPos2:: - setobjectxyperm LOCALID_RIVAL, 26, 32 - setobjectxyperm LOCALID_RIVAL_ON_BIKE, 26, 32 + setobjectxyperm LOCALID_ROUTE119_RIVAL, 26, 32 + setobjectxyperm LOCALID_ROUTE119_RIVAL_ON_BIKE, 26, 32 return Route119_Movement_PlayerWatchRivalExit1: diff --git a/data/maps/Route119_WeatherInstitute_1F/map.json b/data/maps/Route119_WeatherInstitute_1F/map.json index 02f2ffe37fd5..a0d5e12ff343 100644 --- a/data/maps/Route119_WeatherInstitute_1F/map.json +++ b/data/maps/Route119_WeatherInstitute_1F/map.json @@ -67,6 +67,7 @@ "flag": "FLAG_HIDE_WEATHER_INSTITUTE_1F_WORKERS" }, { + "local_id": "LOCALID_WEATHER_INSTITUTE_LITTLE_BOY", "graphics_id": "OBJ_EVENT_GFX_NINJA_BOY", "x": 14, "y": 11, diff --git a/data/maps/Route119_WeatherInstitute_1F/scripts.inc b/data/maps/Route119_WeatherInstitute_1F/scripts.inc index cce41bfb5ff3..927984aebe2b 100644 --- a/data/maps/Route119_WeatherInstitute_1F/scripts.inc +++ b/data/maps/Route119_WeatherInstitute_1F/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_LITTLE_BOY, 5 - Route119_WeatherInstitute_1F_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, Route119_WeatherInstitute_1F_OnTransition .byte 0 @@ -9,8 +7,8 @@ Route119_WeatherInstitute_1F_OnTransition: end Route119_WeatherInstitute_1F_EventScript_SetLittleBoyPos:: - setobjectxyperm LOCALID_LITTLE_BOY, 0, 5 - setobjectmovementtype LOCALID_LITTLE_BOY, MOVEMENT_TYPE_FACE_RIGHT + setobjectxyperm LOCALID_WEATHER_INSTITUTE_LITTLE_BOY, 0, 5 + setobjectmovementtype LOCALID_WEATHER_INSTITUTE_LITTLE_BOY, MOVEMENT_TYPE_FACE_RIGHT return Route119_WeatherInstitute_1F_EventScript_LittleBoy:: diff --git a/data/maps/Route119_WeatherInstitute_2F/map.json b/data/maps/Route119_WeatherInstitute_2F/map.json index 935ea48dd959..8b62e63a91eb 100644 --- a/data/maps/Route119_WeatherInstitute_2F/map.json +++ b/data/maps/Route119_WeatherInstitute_2F/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_WEATHER_INSTITUTE_2F_GRUNT_1", "graphics_id": "OBJ_EVENT_GFX_AQUA_MEMBER_M", "x": 15, "y": 6, @@ -28,6 +29,7 @@ "flag": "FLAG_HIDE_ROUTE_119_TEAM_AQUA" }, { + "local_id": "LOCALID_WEATHER_INSTITUTE_2F_GRUNT_2", "graphics_id": "OBJ_EVENT_GFX_AQUA_MEMBER_M", "x": 10, "y": 8, @@ -41,6 +43,7 @@ "flag": "FLAG_HIDE_ROUTE_119_TEAM_AQUA" }, { + "local_id": "LOCALID_WEATHER_INSTITUTE_2F_SHELLY", "graphics_id": "OBJ_EVENT_GFX_AQUA_MEMBER_F", "x": 4, "y": 6, @@ -67,6 +70,7 @@ "flag": "FLAG_HIDE_WEATHER_INSTITUTE_2F_WORKERS" }, { + "local_id": "LOCALID_WEATHER_INSTITUTE_2F_SCIENTIST", "graphics_id": "OBJ_EVENT_GFX_SCIENTIST_1", "x": 18, "y": 6, @@ -93,6 +97,7 @@ "flag": "FLAG_HIDE_WEATHER_INSTITUTE_2F_WORKERS" }, { + "local_id": "LOCALID_WEATHER_INSTITUTE_2F_GRUNT_3", "graphics_id": "OBJ_EVENT_GFX_AQUA_MEMBER_M", "x": 16, "y": 6, @@ -106,6 +111,7 @@ "flag": "FLAG_HIDE_WEATHER_INSTITUTE_2F_AQUA_GRUNT_M" }, { + "local_id": "LOCALID_WEATHER_INSTITUTE_2F_GRUNT_4", "graphics_id": "OBJ_EVENT_GFX_AQUA_MEMBER_F", "x": 19, "y": 6, diff --git a/data/maps/Route119_WeatherInstitute_2F/scripts.inc b/data/maps/Route119_WeatherInstitute_2F/scripts.inc index e5df03d4a1ab..ce5e44d07707 100644 --- a/data/maps/Route119_WeatherInstitute_2F/scripts.inc +++ b/data/maps/Route119_WeatherInstitute_2F/scripts.inc @@ -1,10 +1,3 @@ -.set LOCALID_GRUNT_1, 1 -.set LOCALID_GRUNT_2, 2 -.set LOCALID_SHELLY, 3 -.set LOCALID_SCIENTIST, 5 -.set LOCALID_GRUNT_3, 7 -.set LOCALID_GRUNT_4, 8 - Route119_WeatherInstitute_2F_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, Route119_WeatherInstitute_2F_OnTransition .byte 0 @@ -16,18 +9,18 @@ Route119_WeatherInstitute_2F_OnTransition: end Route119_WeatherInstitute_2F_EventScript_SetScientistPosAquaHere:: - setobjectxyperm LOCALID_SCIENTIST, 1, 6 - setobjectmovementtype LOCALID_SCIENTIST, MOVEMENT_TYPE_FACE_RIGHT + setobjectxyperm LOCALID_WEATHER_INSTITUTE_2F_SCIENTIST, 1, 6 + setobjectmovementtype LOCALID_WEATHER_INSTITUTE_2F_SCIENTIST, MOVEMENT_TYPE_FACE_RIGHT return Route119_WeatherInstitute_2F_EventScript_SetScientistPosAquaGone:: - setobjectxyperm LOCALID_SCIENTIST, 4, 6 - setobjectmovementtype LOCALID_SCIENTIST, MOVEMENT_TYPE_FACE_RIGHT + setobjectxyperm LOCALID_WEATHER_INSTITUTE_2F_SCIENTIST, 4, 6 + setobjectmovementtype LOCALID_WEATHER_INSTITUTE_2F_SCIENTIST, MOVEMENT_TYPE_FACE_RIGHT return Route119_WeatherInstitute_2F_EventScript_SetScientistPosGameClear:: - setobjectxyperm LOCALID_SCIENTIST, 2, 2 - setobjectmovementtype LOCALID_SCIENTIST, MOVEMENT_TYPE_FACE_UP + setobjectxyperm LOCALID_WEATHER_INSTITUTE_2F_SCIENTIST, 2, 2 + setobjectmovementtype LOCALID_WEATHER_INSTITUTE_2F_SCIENTIST, MOVEMENT_TYPE_FACE_UP return Route119_WeatherInstitute_2F_EventScript_Grunt5:: @@ -53,16 +46,16 @@ Route119_WeatherInstitute_2F_EventScript_Shelly:: Route119_WeatherInstitute_2F_EventScript_ShellyDefeated:: msgbox Route119_WeatherInstitute_2F_Text_ShellyPostBattle, MSGBOX_DEFAULT closemessage - addobject LOCALID_GRUNT_3 - applymovement LOCALID_GRUNT_3, Route119_WeatherInstitute_2F_Movement_GruntApproachShelly - applymovement OBJ_EVENT_ID_PLAYER, Route119_WeatherInstitute_2F_Movement_ShovePlayerOutOfWay + addobject LOCALID_WEATHER_INSTITUTE_2F_GRUNT_3 + applymovement LOCALID_WEATHER_INSTITUTE_2F_GRUNT_3, Route119_WeatherInstitute_2F_Movement_GruntApproachShelly + applymovement LOCALID_PLAYER, Route119_WeatherInstitute_2F_Movement_ShovePlayerOutOfWay waitmovement 0 msgbox Route119_WeatherInstitute_2F_Text_TeamMagmaJustPassedBy, MSGBOX_DEFAULT closemessage playse SE_PIN - applymovement LOCALID_SHELLY, Common_Movement_ExclamationMark + applymovement LOCALID_WEATHER_INSTITUTE_2F_SHELLY, Common_Movement_ExclamationMark waitmovement 0 - applymovement LOCALID_SHELLY, Common_Movement_Delay48 + applymovement LOCALID_WEATHER_INSTITUTE_2F_SHELLY, Common_Movement_Delay48 waitmovement 0 msgbox Route119_WeatherInstitute_2F_Text_WeHaveToHurryToMtPyre, MSGBOX_DEFAULT closemessage @@ -72,17 +65,17 @@ Route119_WeatherInstitute_2F_EventScript_ShellyDefeated:: fadescreen FADE_TO_BLACK setflag FLAG_HIDE_ROUTE_119_TEAM_AQUA setflag FLAG_HIDE_WEATHER_INSTITUTE_2F_AQUA_GRUNT_M - removeobject LOCALID_GRUNT_1 - removeobject LOCALID_GRUNT_2 - removeobject LOCALID_SHELLY - removeobject LOCALID_GRUNT_4 - removeobject LOCALID_GRUNT_3 - applymovement OBJ_EVENT_ID_PLAYER, Route119_WeatherInstitute_2F_Movement_PlayerReturnToPosition + removeobject LOCALID_WEATHER_INSTITUTE_2F_GRUNT_1 + removeobject LOCALID_WEATHER_INSTITUTE_2F_GRUNT_2 + removeobject LOCALID_WEATHER_INSTITUTE_2F_SHELLY + removeobject LOCALID_WEATHER_INSTITUTE_2F_GRUNT_4 + removeobject LOCALID_WEATHER_INSTITUTE_2F_GRUNT_3 + applymovement LOCALID_PLAYER, Route119_WeatherInstitute_2F_Movement_PlayerReturnToPosition waitmovement 0 fadescreen FADE_FROM_BLACK - applymovement LOCALID_SCIENTIST, Route119_WeatherInstitute_2F_Movement_ScientistApproachPlayer + applymovement LOCALID_WEATHER_INSTITUTE_2F_SCIENTIST, Route119_WeatherInstitute_2F_Movement_ScientistApproachPlayer waitmovement 0 - copyobjectxytoperm LOCALID_SCIENTIST + copyobjectxytoperm LOCALID_WEATHER_INSTITUTE_2F_SCIENTIST goto Route119_WeatherInstitute_2F_EventScript_ReceiveCastform end diff --git a/data/maps/Route120/map.json b/data/maps/Route120/map.json index 6bb2c84c1a8e..0a12521c676c 100644 --- a/data/maps/Route120/map.json +++ b/data/maps/Route120/map.json @@ -234,6 +234,7 @@ "flag": "FLAG_ITEM_ROUTE_120_NUGGET" }, { + "local_id": "LOCALID_ROUTE120_TY_1", "graphics_id": "OBJ_EVENT_GFX_CAMERAMAN", "x": 37, "y": 5, @@ -247,6 +248,7 @@ "flag": "FLAG_HIDE_ROUTE_120_GABBY_AND_TY_1" }, { + "local_id": "LOCALID_ROUTE120_GABBY_1", "graphics_id": "OBJ_EVENT_GFX_REPORTER_F", "x": 36, "y": 5, @@ -260,6 +262,7 @@ "flag": "FLAG_HIDE_ROUTE_120_GABBY_AND_TY_1" }, { + "local_id": "LOCALID_ROUTE120_GABBY_2", "graphics_id": "OBJ_EVENT_GFX_REPORTER_F", "x": 36, "y": 5, @@ -273,6 +276,7 @@ "flag": "FLAG_HIDE_ROUTE_120_GABBY_AND_TY_2" }, { + "local_id": "LOCALID_ROUTE120_TY_2", "graphics_id": "OBJ_EVENT_GFX_CAMERAMAN", "x": 37, "y": 5, @@ -403,6 +407,7 @@ "flag": "FLAG_ITEM_ROUTE_120_HYPER_POTION" }, { + "local_id": "LOCALID_BRIDGE_KECLEON", "graphics_id": "OBJ_EVENT_GFX_KECLEON", "x": 12, "y": 16, @@ -416,6 +421,7 @@ "flag": "FLAG_HIDE_ROUTE_120_KECLEON_BRIDGE" }, { + "local_id": "LOCALID_ROUTE120_STEVEN", "graphics_id": "OBJ_EVENT_GFX_STEVEN", "x": 13, "y": 15, @@ -481,6 +487,7 @@ "flag": "0" }, { + "local_id": "LOCALID_BRIDGE_KECLEON_SHADOW", "graphics_id": "OBJ_EVENT_GFX_KECLEON_BRIDGE_SHADOW", "x": 12, "y": 16, diff --git a/data/maps/Route120/scripts.inc b/data/maps/Route120/scripts.inc index a0bfbc60c38f..c3162ecd9d15 100644 --- a/data/maps/Route120/scripts.inc +++ b/data/maps/Route120/scripts.inc @@ -1,7 +1,4 @@ -.set LOCALID_BRIDGE_KECLEON, 30 -.set LOCALID_STEVEN, 31 -.set LOCALID_BRIDGE_KECLEON_SHADOW, 36 @ They use a second object which is identical to Kecleon but has a reflection palette tag for the bridge shadow - +@ LOCALID_BRIDGE_KECLEON_SHADOW is a second object which is identical to LOCALID_BRIDGE_KECLEON but has a reflection palette tag for the bridge shadow Route120_MapScripts:: map_script MAP_SCRIPT_ON_RESUME, Route120_OnResume map_script MAP_SCRIPT_ON_TRANSITION, Route120_OnTransition @@ -180,7 +177,7 @@ Route120_EventScript_StevenBattleKecleon:: closemessage call_if_eq VAR_FACING, DIR_NORTH, Route120_EventScript_PlayerApproachKecleonNorth call_if_eq VAR_FACING, DIR_WEST, Route120_EventScript_PlayerApproachKecleonWest - applymovement LOCALID_STEVEN, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_ROUTE120_STEVEN, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 delay 20 msgbox Route120_Text_StevenUsedDevonScope, MSGBOX_DEFAULT @@ -214,21 +211,21 @@ Route120_EventScript_RemoveBridgeKecleonPostBattle:: end Route120_EventScript_StevenGiveDeconScope:: - applymovement LOCALID_STEVEN, Common_Movement_WalkInPlaceFasterDown - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_ROUTE120_STEVEN, Common_Movement_WalkInPlaceFasterDown + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 msgbox Route120_Text_StevenGiveDevonScope, MSGBOX_DEFAULT giveitem ITEM_DEVON_SCOPE setflag FLAG_RECEIVED_DEVON_SCOPE msgbox Route120_Text_StevenGoodbye, MSGBOX_DEFAULT closemessage - applymovement LOCALID_STEVEN, Common_Movement_WalkInPlaceFasterDown + applymovement LOCALID_ROUTE120_STEVEN, Common_Movement_WalkInPlaceFasterDown waitmovement 0 delay 50 setfieldeffectargument 0, 1 dofieldeffect FLDEFF_NPCFLY_OUT delay 15 - removeobject LOCALID_STEVEN + removeobject LOCALID_ROUTE120_STEVEN waitfieldeffect FLDEFF_NPCFLY_OUT setmetatile 13, 15, METATILE_Fortree_WoodBridge1_Top, FALSE setmetatile 12, 16, METATILE_Fortree_WoodBridge1_Bottom, FALSE @@ -239,12 +236,12 @@ Route120_EventScript_StevenGiveDeconScope:: end Route120_EventScript_PlayerApproachKecleonNorth:: - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 return Route120_EventScript_PlayerApproachKecleonWest:: - applymovement OBJ_EVENT_ID_PLAYER, Route120_Movement_ApproachKecleonWest + applymovement LOCALID_PLAYER, Route120_Movement_ApproachKecleonWest waitmovement 0 return diff --git a/data/maps/Route121/map.json b/data/maps/Route121/map.json index 4a73f3fdd9d2..9911a619c598 100644 --- a/data/maps/Route121/map.json +++ b/data/maps/Route121/map.json @@ -174,6 +174,7 @@ "flag": "0" }, { + "local_id": "LOCALID_ROUTE121_GRUNT_1", "graphics_id": "OBJ_EVENT_GFX_AQUA_MEMBER_M", "x": 30, "y": 8, @@ -187,6 +188,7 @@ "flag": "FLAG_HIDE_ROUTE_121_TEAM_AQUA_GRUNTS" }, { + "local_id": "LOCALID_ROUTE121_GRUNT_2", "graphics_id": "OBJ_EVENT_GFX_AQUA_MEMBER_M", "x": 30, "y": 7, @@ -200,6 +202,7 @@ "flag": "FLAG_HIDE_ROUTE_121_TEAM_AQUA_GRUNTS" }, { + "local_id": "LOCALID_ROUTE121_GRUNT_3", "graphics_id": "OBJ_EVENT_GFX_AQUA_MEMBER_M", "x": 31, "y": 7, diff --git a/data/maps/Route121/scripts.inc b/data/maps/Route121/scripts.inc index 317328825c2f..beb9e3a91dbb 100644 --- a/data/maps/Route121/scripts.inc +++ b/data/maps/Route121/scripts.inc @@ -1,7 +1,3 @@ -.set LOCALID_GRUNT_1, 12 -.set LOCALID_GRUNT_2, 13 -.set LOCALID_GRUNT_3, 14 - Route121_MapScripts:: .byte 0 @@ -20,18 +16,18 @@ Route121_EventScript_SafariZoneSign:: Route121_EventScript_AquaGruntsMoveOut:: lockall playbgm MUS_ENCOUNTER_AQUA, FALSE - applymovement LOCALID_GRUNT_2, Common_Movement_WalkInPlaceRight + applymovement LOCALID_ROUTE121_GRUNT_2, Common_Movement_WalkInPlaceRight waitmovement 0 msgbox Route121_Text_OkayMoveOutToMtPyre, MSGBOX_DEFAULT closemessage - applymovement LOCALID_GRUNT_1, Route121_Movement_Grunt1Exit - applymovement LOCALID_GRUNT_2, Route121_Movement_Grunt2Exit - applymovement LOCALID_GRUNT_3, Route121_Movement_Grunt3Exit + applymovement LOCALID_ROUTE121_GRUNT_1, Route121_Movement_Grunt1Exit + applymovement LOCALID_ROUTE121_GRUNT_2, Route121_Movement_Grunt2Exit + applymovement LOCALID_ROUTE121_GRUNT_3, Route121_Movement_Grunt3Exit waitmovement 0 fadedefaultbgm - removeobject LOCALID_GRUNT_1 - removeobject LOCALID_GRUNT_2 - removeobject LOCALID_GRUNT_3 + removeobject LOCALID_ROUTE121_GRUNT_1 + removeobject LOCALID_ROUTE121_GRUNT_2 + removeobject LOCALID_ROUTE121_GRUNT_3 setvar VAR_ROUTE121_STATE, 1 releaseall end diff --git a/data/maps/Route121_SafariZoneEntrance/scripts.inc b/data/maps/Route121_SafariZoneEntrance/scripts.inc index 92fdc2d0bd70..0fb6411406e6 100644 --- a/data/maps/Route121_SafariZoneEntrance/scripts.inc +++ b/data/maps/Route121_SafariZoneEntrance/scripts.inc @@ -8,7 +8,7 @@ Route121_SafariZoneEntrance_OnFrame: Route121_SafariZoneEntrance_EventScript_ExitSafariZone:: lockall - applymovement OBJ_EVENT_ID_PLAYER, Route121_SafariZoneEntrance_Movement_ExitSafariZone + applymovement LOCALID_PLAYER, Route121_SafariZoneEntrance_Movement_ExitSafariZone waitmovement 0 setvar VAR_SAFARI_ZONE_STATE, 0 releaseall @@ -45,7 +45,7 @@ Route121_SafariZoneEntrance_EventScript_FirstTimeInfo:: Route121_SafariZoneEntrance_EventScript_EntranceCounterTrigger:: lockall - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 showmoneybox 0, 0 msgbox Route121_SafariZoneEntrance_Text_WouldYouLikeToPlay, MSGBOX_YESNO @@ -71,7 +71,7 @@ Route121_SafariZoneEntrance_EventScript_TryEnterSafariZone:: msgbox Route121_SafariZoneEntrance_Text_PleaseEnjoyYourself, MSGBOX_DEFAULT closemessage hidemoneybox - applymovement OBJ_EVENT_ID_PLAYER, Route121_SafariZoneEntrance_Movement_EnterSafariZone + applymovement LOCALID_PLAYER, Route121_SafariZoneEntrance_Movement_EnterSafariZone waitmovement 0 special EnterSafariMode setvar VAR_SAFARI_ZONE_STATE, 2 @@ -105,7 +105,7 @@ Route121_SafariZoneEntrance_EventScript_NotEnoughMoney:: Route121_SafariZoneEntrance_EventScript_MovePlayerBackFromCounter:: closemessage hidemoneybox - applymovement OBJ_EVENT_ID_PLAYER, Route121_SafariZoneEntrance_Movement_BackAwayFromCounter + applymovement LOCALID_PLAYER, Route121_SafariZoneEntrance_Movement_BackAwayFromCounter waitmovement 0 releaseall end diff --git a/data/maps/Route128/map.json b/data/maps/Route128/map.json index 464aa83fccc6..6ca7fbc90817 100644 --- a/data/maps/Route128/map.json +++ b/data/maps/Route128/map.json @@ -62,6 +62,7 @@ "flag": "0" }, { + "local_id": "LOCALID_ROUTE128_STEVEN", "graphics_id": "OBJ_EVENT_GFX_STEVEN", "x": 40, "y": 22, @@ -75,6 +76,7 @@ "flag": "FLAG_HIDE_ROUTE_128_STEVEN" }, { + "local_id": "LOCALID_ROUTE128_ARCHIE", "graphics_id": "OBJ_EVENT_GFX_ARCHIE", "x": 37, "y": 22, @@ -88,6 +90,7 @@ "flag": "FLAG_HIDE_ROUTE_128_ARCHIE" }, { + "local_id": "LOCALID_ROUTE128_MAXIE", "graphics_id": "OBJ_EVENT_GFX_MAXIE", "x": 38, "y": 21, diff --git a/data/maps/Route128/scripts.inc b/data/maps/Route128/scripts.inc index d08605128a93..06a75d87c480 100644 --- a/data/maps/Route128/scripts.inc +++ b/data/maps/Route128/scripts.inc @@ -1,7 +1,3 @@ -.set LOCALID_STEVEN, 3 -.set LOCALID_ARCHIE, 4 -.set LOCALID_MAXIE, 5 - Route128_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, Route128_OnTransition map_script MAP_SCRIPT_ON_FRAME_TABLE, Route128_OnFrame @@ -18,64 +14,64 @@ Route128_OnFrame: Route128_EventScript_KyogreAwakenedScene:: lockall delay 20 - applymovement LOCALID_ARCHIE, Route128_Movement_ArchieLookAround + applymovement LOCALID_ROUTE128_ARCHIE, Route128_Movement_ArchieLookAround waitmovement 0 msgbox Route128_Text_ArchieWhatHappened, MSGBOX_DEFAULT closemessage - applymovement LOCALID_ARCHIE, Route128_Movement_ArchieBackUp + applymovement LOCALID_ROUTE128_ARCHIE, Route128_Movement_ArchieBackUp waitmovement 0 msgbox Route128_Text_ArchieIOnlyWanted, MSGBOX_DEFAULT closemessage - applymovement LOCALID_MAXIE, Route128_Movement_MaxieApproachArchie + applymovement LOCALID_ROUTE128_MAXIE, Route128_Movement_MaxieApproachArchie waitmovement 0 - applymovement LOCALID_ARCHIE, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_ROUTE128_ARCHIE, Common_Movement_WalkInPlaceFasterUp waitmovement 0 msgbox Route128_Text_MaxieDoYouUnderstandNow, MSGBOX_DEFAULT closemessage - applymovement LOCALID_MAXIE, Route128_Movement_MaxieApproachPlayer + applymovement LOCALID_ROUTE128_MAXIE, Route128_Movement_MaxieApproachPlayer waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 msgbox Route128_Text_MaxieResposibilityFallsToArchieAndMe, MSGBOX_DEFAULT closemessage - applymovement LOCALID_ARCHIE, Route128_Movement_ArchieRunLeft - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft - applymovement LOCALID_MAXIE, Route128_Movement_MaxieWalkLeft + applymovement LOCALID_ROUTE128_ARCHIE, Route128_Movement_ArchieRunLeft + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_ROUTE128_MAXIE, Route128_Movement_MaxieWalkLeft waitmovement 0 msgbox Route128_Text_MaxieThisDefiesBelief, MSGBOX_DEFAULT closemessage delay 40 - applymovement LOCALID_MAXIE, Route128_Movement_MaxieExit - applymovement LOCALID_ARCHIE, Route128_Movement_ArchieExit + applymovement LOCALID_ROUTE128_MAXIE, Route128_Movement_MaxieExit + applymovement LOCALID_ROUTE128_ARCHIE, Route128_Movement_ArchieExit waitmovement 0 - removeobject LOCALID_MAXIE - removeobject LOCALID_ARCHIE + removeobject LOCALID_ROUTE128_MAXIE + removeobject LOCALID_ROUTE128_ARCHIE delay 100 setfieldeffectargument 0, 1 dofieldeffect FLDEFF_NPCFLY_OUT waitfieldeffect FLDEFF_NPCFLY_OUT - addobject LOCALID_STEVEN - applymovement LOCALID_STEVEN, Route128_Movement_StevenApproachPlayer + addobject LOCALID_ROUTE128_STEVEN + applymovement LOCALID_ROUTE128_STEVEN, Route128_Movement_StevenApproachPlayer waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterRight waitmovement 0 msgbox Route128_Text_StevenWhatIsHappening, MSGBOX_DEFAULT closemessage - applymovement LOCALID_STEVEN, Route128_Movement_StevenWalkUp - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_ROUTE128_STEVEN, Route128_Movement_StevenWalkUp + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 msgbox Route128_Text_StevenWholeWorldWillDrown, MSGBOX_DEFAULT - applymovement LOCALID_STEVEN, Common_Movement_WalkInPlaceFasterDown + applymovement LOCALID_ROUTE128_STEVEN, Common_Movement_WalkInPlaceFasterDown waitmovement 0 msgbox Route128_Text_StevenImGoingToSootopolis, MSGBOX_DEFAULT closemessage - applymovement LOCALID_STEVEN, Common_Movement_WalkInPlaceFasterDown + applymovement LOCALID_ROUTE128_STEVEN, Common_Movement_WalkInPlaceFasterDown waitmovement 0 delay 50 setfieldeffectargument 0, 1 dofieldeffect FLDEFF_NPCFLY_OUT delay 15 - removeobject LOCALID_STEVEN + removeobject LOCALID_ROUTE128_STEVEN waitfieldeffect FLDEFF_NPCFLY_OUT clearflag FLAG_HIDE_MAP_NAME_POPUP setvar VAR_ROUTE128_STATE, 2 diff --git a/data/maps/RustboroCity/map.json b/data/maps/RustboroCity/map.json index 2d42b308501a..49f8a7d601c7 100644 --- a/data/maps/RustboroCity/map.json +++ b/data/maps/RustboroCity/map.json @@ -109,6 +109,7 @@ "flag": "0" }, { + "local_id": "LOCALID_RUSTBORO_LITTLE_BOY", "graphics_id": "OBJ_EVENT_GFX_LITTLE_BOY", "x": 24, "y": 51, @@ -122,6 +123,7 @@ "flag": "0" }, { + "local_id": "LOCALID_RUSTBORO_LITTLE_GIRL", "graphics_id": "OBJ_EVENT_GFX_LITTLE_GIRL", "x": 25, "y": 51, @@ -135,6 +137,7 @@ "flag": "0" }, { + "local_id": "LOCALID_RUSTBORO_DEVON_EMPLOYEE", "graphics_id": "OBJ_EVENT_GFX_MAN_2", "x": 30, "y": 10, @@ -148,6 +151,7 @@ "flag": "FLAG_HIDE_RUSTBORO_CITY_DEVON_EMPLOYEE_1" }, { + "local_id": "LOCALID_RUSTBORO_GRUNT", "graphics_id": "OBJ_EVENT_GFX_AQUA_MEMBER_M", "x": 13, "y": 21, @@ -200,6 +204,7 @@ "flag": "0" }, { + "local_id": "LOCALID_RUSTBORO_RIVAL", "graphics_id": "OBJ_EVENT_GFX_VAR_0", "x": 16, "y": 50, @@ -213,6 +218,7 @@ "flag": "FLAG_HIDE_RUSTBORO_CITY_RIVAL" }, { + "local_id": "LOCALID_RUSTBORO_SCIENTIST", "graphics_id": "OBJ_EVENT_GFX_SCIENTIST_1", "x": 11, "y": 15, diff --git a/data/maps/RustboroCity/scripts.inc b/data/maps/RustboroCity/scripts.inc index 28fd38921019..b502e7b61592 100644 --- a/data/maps/RustboroCity/scripts.inc +++ b/data/maps/RustboroCity/scripts.inc @@ -1,10 +1,3 @@ -.set LOCALID_LITTLE_BOY, 7 -.set LOCALID_LITTLE_GIRL, 8 -.set LOCALID_DEVON_EMPLOYEE, 9 -.set LOCALID_GRUNT, 10 -.set LOCALID_RIVAL, 14 -.set LOCALID_SCIENTIST, 15 - RustboroCity_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, RustboroCity_OnTransition map_script MAP_SCRIPT_ON_FRAME_TABLE, RustboroCity_OnFrame @@ -20,11 +13,11 @@ RustboroCity_OnTransition: RustboroCity_EventScript_PositionScientistForExit:: goto_if_eq VAR_TEMP_0, 11, RustboroCity_EventScript_PositionScientistLeftExit - setobjectxyperm LOCALID_SCIENTIST, 12, 15 + setobjectxyperm LOCALID_RUSTBORO_SCIENTIST, 12, 15 end RustboroCity_EventScript_PositionScientistLeftExit:: - setobjectxyperm LOCALID_SCIENTIST, 11, 15 + setobjectxyperm LOCALID_RUSTBORO_SCIENTIST, 11, 15 end RustboroCity_EventScript_HideMapNamePopup:: @@ -38,26 +31,26 @@ RustboroCity_OnFrame: RustboroCity_EventScript_ScientistAddMatchCall:: lockall setvar VAR_ROUTE104_STATE, 1 - applymovement OBJ_EVENT_ID_PLAYER, RustboroCity_Movement_PlayerWalkDown + applymovement LOCALID_PLAYER, RustboroCity_Movement_PlayerWalkDown waitmovement 0 playse SE_EXIT delay 10 - addobject LOCALID_SCIENTIST - applymovement LOCALID_SCIENTIST, RustboroCity_Movement_ScientistApproachPlayer + addobject LOCALID_RUSTBORO_SCIENTIST + applymovement LOCALID_RUSTBORO_SCIENTIST, RustboroCity_Movement_ScientistApproachPlayer waitmovement 0 playse SE_PIN - applymovement LOCALID_SCIENTIST, Common_Movement_ExclamationMark + applymovement LOCALID_RUSTBORO_SCIENTIST, Common_Movement_ExclamationMark waitmovement 0 - applymovement LOCALID_SCIENTIST, Common_Movement_Delay48 + applymovement LOCALID_RUSTBORO_SCIENTIST, Common_Movement_Delay48 waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 - applymovement LOCALID_SCIENTIST, RustboroCity_Movement_ScientistWalkInPlaceDown + applymovement LOCALID_RUSTBORO_SCIENTIST, RustboroCity_Movement_ScientistWalkInPlaceDown waitmovement 0 msgbox RustboroCity_Text_DevelopedNewPokenavFeature, MSGBOX_DEFAULT closemessage setflag FLAG_HAS_MATCH_CALL - applymovement LOCALID_SCIENTIST, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_RUSTBORO_SCIENTIST, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 playse SE_CLICK delay 10 @@ -67,7 +60,7 @@ RustboroCity_EventScript_ScientistAddMatchCall:: delay 10 playse SE_CLICK delay 20 - applymovement LOCALID_SCIENTIST, Common_Movement_WalkInPlaceFasterDown + applymovement LOCALID_RUSTBORO_SCIENTIST, Common_Movement_WalkInPlaceFasterDown waitmovement 0 msgbox RustboroCity_Text_AddedMatchCallPleaseCallMrStone, MSGBOX_DEFAULT closemessage @@ -98,10 +91,10 @@ RustboroCity_EventScript_MatchCallTutorial:: delay 20 msgbox RustboroCity_Text_IdBetterGetBackToWork, MSGBOX_DEFAULT closemessage - applymovement LOCALID_SCIENTIST, RustboroCity_Movement_ScientistLeave + applymovement LOCALID_RUSTBORO_SCIENTIST, RustboroCity_Movement_ScientistLeave waitmovement 0 playse SE_EXIT - removeobject LOCALID_SCIENTIST + removeobject LOCALID_RUSTBORO_SCIENTIST setflag FLAG_HIDE_RUSTBORO_CITY_SCIENTIST setvar VAR_RUSTBORO_CITY_STATE, 7 clearflag FLAG_HIDE_MAP_NAME_POPUP @@ -227,7 +220,7 @@ RustboroCity_EventScript_LittleBoy:: lock faceplayer msgbox RustboroCity_Text_PokemonCanChangeLookFromExp, MSGBOX_DEFAULT - applymovement LOCALID_LITTLE_BOY, Common_Movement_FaceOriginalDirection + applymovement LOCALID_RUSTBORO_LITTLE_BOY, Common_Movement_FaceOriginalDirection waitmovement 0 release end @@ -236,7 +229,7 @@ RustboroCity_EventScript_LittleGirl:: lock faceplayer msgbox RustboroCity_Text_PokemonChangeShape, MSGBOX_DEFAULT - applymovement LOCALID_LITTLE_GIRL, Common_Movement_FaceOriginalDirection + applymovement LOCALID_RUSTBORO_LITTLE_GIRL, Common_Movement_FaceOriginalDirection waitmovement 0 release end @@ -250,40 +243,40 @@ RustboroCity_EventScript_Man2:: RustboroCity_EventScript_StolenGoodsTrigger0:: lockall - setobjectxyperm LOCALID_DEVON_EMPLOYEE, 14, 21 - setobjectmovementtype LOCALID_DEVON_EMPLOYEE, MOVEMENT_TYPE_FACE_RIGHT + setobjectxyperm LOCALID_RUSTBORO_DEVON_EMPLOYEE, 14, 21 + setobjectmovementtype LOCALID_RUSTBORO_DEVON_EMPLOYEE, MOVEMENT_TYPE_FACE_RIGHT setvar VAR_0x8004, 0 goto RustboroCity_EventScript_StolenGoodsScene end RustboroCity_EventScript_StolenGoodsTrigger1:: lockall - setobjectxyperm LOCALID_DEVON_EMPLOYEE, 14, 21 - setobjectmovementtype LOCALID_DEVON_EMPLOYEE, MOVEMENT_TYPE_FACE_RIGHT + setobjectxyperm LOCALID_RUSTBORO_DEVON_EMPLOYEE, 14, 21 + setobjectmovementtype LOCALID_RUSTBORO_DEVON_EMPLOYEE, MOVEMENT_TYPE_FACE_RIGHT setvar VAR_0x8004, 1 goto RustboroCity_EventScript_StolenGoodsScene end RustboroCity_EventScript_StolenGoodsTrigger2:: lockall - setobjectxyperm LOCALID_DEVON_EMPLOYEE, 14, 21 - setobjectmovementtype LOCALID_DEVON_EMPLOYEE, MOVEMENT_TYPE_FACE_RIGHT + setobjectxyperm LOCALID_RUSTBORO_DEVON_EMPLOYEE, 14, 21 + setobjectmovementtype LOCALID_RUSTBORO_DEVON_EMPLOYEE, MOVEMENT_TYPE_FACE_RIGHT setvar VAR_0x8004, 2 goto RustboroCity_EventScript_StolenGoodsScene end RustboroCity_EventScript_StolenGoodsTrigger3:: lockall - setobjectxyperm LOCALID_DEVON_EMPLOYEE, 14, 21 - setobjectmovementtype LOCALID_DEVON_EMPLOYEE, MOVEMENT_TYPE_FACE_RIGHT + setobjectxyperm LOCALID_RUSTBORO_DEVON_EMPLOYEE, 14, 21 + setobjectmovementtype LOCALID_RUSTBORO_DEVON_EMPLOYEE, MOVEMENT_TYPE_FACE_RIGHT setvar VAR_0x8004, 3 goto RustboroCity_EventScript_StolenGoodsScene end RustboroCity_EventScript_StolenGoodsTrigger4:: lockall - setobjectxyperm LOCALID_DEVON_EMPLOYEE, 14, 21 - setobjectmovementtype LOCALID_DEVON_EMPLOYEE, MOVEMENT_TYPE_FACE_RIGHT + setobjectxyperm LOCALID_RUSTBORO_DEVON_EMPLOYEE, 14, 21 + setobjectmovementtype LOCALID_RUSTBORO_DEVON_EMPLOYEE, MOVEMENT_TYPE_FACE_RIGHT setvar VAR_0x8004, 4 goto RustboroCity_EventScript_StolenGoodsScene end @@ -292,20 +285,20 @@ RustboroCity_EventScript_StolenGoodsScene:: msgbox RustboroCity_Text_OutOfTheWay, MSGBOX_DEFAULT closemessage playbgm MUS_ENCOUNTER_AQUA, FALSE - addobject LOCALID_GRUNT - addobject LOCALID_DEVON_EMPLOYEE - applymovement LOCALID_GRUNT, RustboroCity_Movement_GruntEscape + addobject LOCALID_RUSTBORO_GRUNT + addobject LOCALID_RUSTBORO_DEVON_EMPLOYEE + applymovement LOCALID_RUSTBORO_GRUNT, RustboroCity_Movement_GruntEscape waitmovement 0 - removeobject LOCALID_GRUNT - applymovement LOCALID_DEVON_EMPLOYEE, RustboroCity_Movement_EmployeeChaseGrunt1 + removeobject LOCALID_RUSTBORO_GRUNT + applymovement LOCALID_RUSTBORO_DEVON_EMPLOYEE, RustboroCity_Movement_EmployeeChaseGrunt1 waitmovement 0 msgbox RustboroCity_Text_WaitDontTakeMyGoods, MSGBOX_DEFAULT closemessage - applymovement LOCALID_DEVON_EMPLOYEE, RustboroCity_Movement_EmployeeChaseGrunt2 + applymovement LOCALID_RUSTBORO_DEVON_EMPLOYEE, RustboroCity_Movement_EmployeeChaseGrunt2 waitmovement 0 fadedefaultbgm - removeobject LOCALID_DEVON_EMPLOYEE - setobjectxyperm LOCALID_DEVON_EMPLOYEE, 30, 10 + removeobject LOCALID_RUSTBORO_DEVON_EMPLOYEE + setobjectxyperm LOCALID_RUSTBORO_DEVON_EMPLOYEE, 30, 10 clearflag FLAG_HIDE_RUSTBORO_CITY_DEVON_EMPLOYEE_1 setflag FLAG_DEVON_GOODS_STOLEN setvar VAR_RUSTBORO_CITY_STATE, 2 @@ -331,33 +324,33 @@ RustboroCity_EventScript_YouGotItThankYou:: @ Unknown, unused employee movements. Based on the differences in movement theyre for approaching an object (probably the player) in different positions RustboroCity_EventScript_EmployeeApproachUp:: - applymovement LOCALID_DEVON_EMPLOYEE, RustboroCity_Movement_EmployeeApproachUp + applymovement LOCALID_RUSTBORO_DEVON_EMPLOYEE, RustboroCity_Movement_EmployeeApproachUp waitmovement 0 return @ Unused, see above RustboroCity_EventScript_EmployeeApproachLeft:: - applymovement LOCALID_DEVON_EMPLOYEE, RustboroCity_Movement_EmployeeApproachLeft + applymovement LOCALID_RUSTBORO_DEVON_EMPLOYEE, RustboroCity_Movement_EmployeeApproachLeft waitmovement 0 return @ Unused, see above RustboroCity_EventScript_EmployeeApproachRight:: - applymovement LOCALID_DEVON_EMPLOYEE, RustboroCity_Movement_EmployeeApproachRight + applymovement LOCALID_RUSTBORO_DEVON_EMPLOYEE, RustboroCity_Movement_EmployeeApproachRight waitmovement 0 return @ Unused, see above RustboroCity_EventScript_EmployeeApproachDown:: - applymovement LOCALID_DEVON_EMPLOYEE, RustboroCity_Movement_EmployeeApproachDown + applymovement LOCALID_RUSTBORO_DEVON_EMPLOYEE, RustboroCity_Movement_EmployeeApproachDown waitmovement 0 return @ Unused, similar movement to the above scripts RustboroCity_EventScript_EmployeeApproachPlayerFar:: - applymovement LOCALID_DEVON_EMPLOYEE, RustboroCity_Movement_EmployeeApproachPlayerFar + applymovement LOCALID_RUSTBORO_DEVON_EMPLOYEE, RustboroCity_Movement_EmployeeApproachPlayerFar waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 return @@ -509,59 +502,59 @@ RustboroCity_EventScript_EmployeeAskToGetGoods:: call_if_eq VAR_TEMP_1, 3, RustboroCity_EventScript_EmployeeApproachPlayerDown1 setflag FLAG_INTERACTED_WITH_DEVON_EMPLOYEE_GOODS_STOLEN setvar VAR_RUSTBORO_CITY_STATE, 3 - copyobjectxytoperm LOCALID_DEVON_EMPLOYEE + copyobjectxytoperm LOCALID_RUSTBORO_DEVON_EMPLOYEE msgbox RustboroCity_Text_HelpMeIWasRobbed, MSGBOX_DEFAULT releaseall end @ The below movement scripts are either partially or fully duplicated by the movement scripts when the player returns the goods RustboroCity_EventScript_EmployeeFacePlayerUp1:: - applymovement LOCALID_DEVON_EMPLOYEE, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_RUSTBORO_DEVON_EMPLOYEE, Common_Movement_WalkInPlaceFasterUp waitmovement 0 playse SE_PIN - applymovement LOCALID_DEVON_EMPLOYEE, Common_Movement_ExclamationMark + applymovement LOCALID_RUSTBORO_DEVON_EMPLOYEE, Common_Movement_ExclamationMark waitmovement 0 - applymovement LOCALID_DEVON_EMPLOYEE, Common_Movement_Delay48 + applymovement LOCALID_RUSTBORO_DEVON_EMPLOYEE, Common_Movement_Delay48 waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterDown + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterDown waitmovement 0 return RustboroCity_EventScript_EmployeeFacePlayerLeft1:: - applymovement LOCALID_DEVON_EMPLOYEE, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_RUSTBORO_DEVON_EMPLOYEE, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 playse SE_PIN - applymovement LOCALID_DEVON_EMPLOYEE, Common_Movement_ExclamationMark + applymovement LOCALID_RUSTBORO_DEVON_EMPLOYEE, Common_Movement_ExclamationMark waitmovement 0 - applymovement LOCALID_DEVON_EMPLOYEE, Common_Movement_Delay48 + applymovement LOCALID_RUSTBORO_DEVON_EMPLOYEE, Common_Movement_Delay48 waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_FaceRight + applymovement LOCALID_PLAYER, Common_Movement_FaceRight waitmovement 0 return RustboroCity_EventScript_EmployeeFacePlayerDown1:: - applymovement LOCALID_DEVON_EMPLOYEE, Common_Movement_WalkInPlaceFasterDown + applymovement LOCALID_RUSTBORO_DEVON_EMPLOYEE, Common_Movement_WalkInPlaceFasterDown waitmovement 0 playse SE_PIN - applymovement LOCALID_DEVON_EMPLOYEE, Common_Movement_ExclamationMark + applymovement LOCALID_RUSTBORO_DEVON_EMPLOYEE, Common_Movement_ExclamationMark waitmovement 0 - applymovement LOCALID_DEVON_EMPLOYEE, Common_Movement_Delay48 + applymovement LOCALID_RUSTBORO_DEVON_EMPLOYEE, Common_Movement_Delay48 waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 return RustboroCity_EventScript_EmployeeApproachPlayerDown1:: - applymovement LOCALID_DEVON_EMPLOYEE, Common_Movement_WalkInPlaceFasterDown + applymovement LOCALID_RUSTBORO_DEVON_EMPLOYEE, Common_Movement_WalkInPlaceFasterDown waitmovement 0 playse SE_PIN - applymovement LOCALID_DEVON_EMPLOYEE, Common_Movement_ExclamationMark + applymovement LOCALID_RUSTBORO_DEVON_EMPLOYEE, Common_Movement_ExclamationMark waitmovement 0 - applymovement LOCALID_DEVON_EMPLOYEE, Common_Movement_Delay48 + applymovement LOCALID_RUSTBORO_DEVON_EMPLOYEE, Common_Movement_Delay48 waitmovement 0 - applymovement LOCALID_DEVON_EMPLOYEE, RustboroCity_Movement_EmployeeApproachPlayerDown + applymovement LOCALID_RUSTBORO_DEVON_EMPLOYEE, RustboroCity_Movement_EmployeeApproachPlayerDown waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 return @@ -618,69 +611,69 @@ RustboroCity_EventScript_BagFull:: return RustboroCity_EventScript_EmployeeFacePlayerUp2:: - applymovement LOCALID_DEVON_EMPLOYEE, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_RUSTBORO_DEVON_EMPLOYEE, Common_Movement_WalkInPlaceFasterUp waitmovement 0 playse SE_PIN - applymovement LOCALID_DEVON_EMPLOYEE, Common_Movement_ExclamationMark + applymovement LOCALID_RUSTBORO_DEVON_EMPLOYEE, Common_Movement_ExclamationMark waitmovement 0 - applymovement LOCALID_DEVON_EMPLOYEE, Common_Movement_Delay48 + applymovement LOCALID_RUSTBORO_DEVON_EMPLOYEE, Common_Movement_Delay48 waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterDown + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterDown waitmovement 0 return RustboroCity_EventScript_EmployeeFacePlayerLeft2:: - applymovement LOCALID_DEVON_EMPLOYEE, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_RUSTBORO_DEVON_EMPLOYEE, Common_Movement_WalkInPlaceFasterRight waitmovement 0 playse SE_PIN - applymovement LOCALID_DEVON_EMPLOYEE, Common_Movement_ExclamationMark + applymovement LOCALID_RUSTBORO_DEVON_EMPLOYEE, Common_Movement_ExclamationMark waitmovement 0 - applymovement LOCALID_DEVON_EMPLOYEE, Common_Movement_Delay48 + applymovement LOCALID_RUSTBORO_DEVON_EMPLOYEE, Common_Movement_Delay48 waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_FaceLeft + applymovement LOCALID_PLAYER, Common_Movement_FaceLeft waitmovement 0 return RustboroCity_EventScript_EmployeeFacePlayerDown2:: - applymovement LOCALID_DEVON_EMPLOYEE, Common_Movement_WalkInPlaceFasterDown + applymovement LOCALID_RUSTBORO_DEVON_EMPLOYEE, Common_Movement_WalkInPlaceFasterDown waitmovement 0 playse SE_PIN - applymovement LOCALID_DEVON_EMPLOYEE, Common_Movement_ExclamationMark + applymovement LOCALID_RUSTBORO_DEVON_EMPLOYEE, Common_Movement_ExclamationMark waitmovement 0 - applymovement LOCALID_DEVON_EMPLOYEE, Common_Movement_Delay48 + applymovement LOCALID_RUSTBORO_DEVON_EMPLOYEE, Common_Movement_Delay48 waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 return RustboroCity_EventScript_EmployeeApproachPlayerDown2:: - applymovement LOCALID_DEVON_EMPLOYEE, Common_Movement_WalkInPlaceFasterDown + applymovement LOCALID_RUSTBORO_DEVON_EMPLOYEE, Common_Movement_WalkInPlaceFasterDown waitmovement 0 playse SE_PIN - applymovement LOCALID_DEVON_EMPLOYEE, Common_Movement_ExclamationMark + applymovement LOCALID_RUSTBORO_DEVON_EMPLOYEE, Common_Movement_ExclamationMark waitmovement 0 - applymovement LOCALID_DEVON_EMPLOYEE, Common_Movement_Delay48 + applymovement LOCALID_RUSTBORO_DEVON_EMPLOYEE, Common_Movement_Delay48 waitmovement 0 - applymovement LOCALID_DEVON_EMPLOYEE, RustboroCity_Movement_EmployeeApproachPlayerDown + applymovement LOCALID_RUSTBORO_DEVON_EMPLOYEE, RustboroCity_Movement_EmployeeApproachPlayerDown waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 return RustboroCity_EventScript_EmployeeFacePlayerRight:: - applymovement LOCALID_DEVON_EMPLOYEE, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_RUSTBORO_DEVON_EMPLOYEE, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 playse SE_PIN - applymovement LOCALID_DEVON_EMPLOYEE, Common_Movement_ExclamationMark + applymovement LOCALID_RUSTBORO_DEVON_EMPLOYEE, Common_Movement_ExclamationMark waitmovement 0 - applymovement LOCALID_DEVON_EMPLOYEE, Common_Movement_Delay48 + applymovement LOCALID_RUSTBORO_DEVON_EMPLOYEE, Common_Movement_Delay48 waitmovement 0 return RustboroCity_EventScript_Rival:: lockall call_if_unset FLAG_MET_RIVAL_RUSTBORO, RustboroCity_EventScript_PlayRivalMusic - applymovement LOCALID_RIVAL, Common_Movement_FacePlayer + applymovement LOCALID_RUSTBORO_RIVAL, Common_Movement_FacePlayer waitmovement 0 goto RustboroCity_EventScript_RivalEncounter @@ -701,128 +694,128 @@ RustboroCity_EventScript_PlayBrendanMusic:: RustboroCity_EventScript_RivalTrigger0:: lockall call RustboroCity_EventScript_PlayRivalMusic - applymovement LOCALID_RIVAL, Common_Movement_WalkInPlaceFasterDown + applymovement LOCALID_RUSTBORO_RIVAL, Common_Movement_WalkInPlaceFasterDown waitmovement 0 playse SE_PIN - applymovement LOCALID_RIVAL, Common_Movement_ExclamationMark + applymovement LOCALID_RUSTBORO_RIVAL, Common_Movement_ExclamationMark waitmovement 0 - applymovement LOCALID_RIVAL, Common_Movement_Delay48 + applymovement LOCALID_RUSTBORO_RIVAL, Common_Movement_Delay48 waitmovement 0 - applymovement LOCALID_RIVAL, RustboroCity_Movement_RivalApproachPlayer0 + applymovement LOCALID_RUSTBORO_RIVAL, RustboroCity_Movement_RivalApproachPlayer0 waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 goto RustboroCity_EventScript_RivalEncounter RustboroCity_EventScript_RivalTrigger1:: lockall call RustboroCity_EventScript_PlayRivalMusic - applymovement LOCALID_RIVAL, Common_Movement_WalkInPlaceFasterDown + applymovement LOCALID_RUSTBORO_RIVAL, Common_Movement_WalkInPlaceFasterDown waitmovement 0 playse SE_PIN - applymovement LOCALID_RIVAL, Common_Movement_ExclamationMark + applymovement LOCALID_RUSTBORO_RIVAL, Common_Movement_ExclamationMark waitmovement 0 - applymovement LOCALID_RIVAL, Common_Movement_Delay48 + applymovement LOCALID_RUSTBORO_RIVAL, Common_Movement_Delay48 waitmovement 0 - applymovement LOCALID_RIVAL, RustboroCity_Movement_RivalApproachPlayer1 + applymovement LOCALID_RUSTBORO_RIVAL, RustboroCity_Movement_RivalApproachPlayer1 waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 goto RustboroCity_EventScript_RivalEncounter RustboroCity_EventScript_RivalTrigger2:: lockall call RustboroCity_EventScript_PlayRivalMusic - applymovement LOCALID_RIVAL, Common_Movement_WalkInPlaceFasterDown + applymovement LOCALID_RUSTBORO_RIVAL, Common_Movement_WalkInPlaceFasterDown waitmovement 0 playse SE_PIN - applymovement LOCALID_RIVAL, Common_Movement_ExclamationMark + applymovement LOCALID_RUSTBORO_RIVAL, Common_Movement_ExclamationMark waitmovement 0 - applymovement LOCALID_RIVAL, Common_Movement_Delay48 + applymovement LOCALID_RUSTBORO_RIVAL, Common_Movement_Delay48 waitmovement 0 - applymovement LOCALID_RIVAL, RustboroCity_Movement_RivalApproachPlayer2 + applymovement LOCALID_RUSTBORO_RIVAL, RustboroCity_Movement_RivalApproachPlayer2 waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 goto RustboroCity_EventScript_RivalEncounter RustboroCity_EventScript_RivalTrigger3:: lockall call RustboroCity_EventScript_PlayRivalMusic - applymovement LOCALID_RIVAL, Common_Movement_WalkInPlaceFasterDown + applymovement LOCALID_RUSTBORO_RIVAL, Common_Movement_WalkInPlaceFasterDown waitmovement 0 playse SE_PIN - applymovement LOCALID_RIVAL, Common_Movement_ExclamationMark + applymovement LOCALID_RUSTBORO_RIVAL, Common_Movement_ExclamationMark waitmovement 0 - applymovement LOCALID_RIVAL, Common_Movement_Delay48 + applymovement LOCALID_RUSTBORO_RIVAL, Common_Movement_Delay48 waitmovement 0 - applymovement LOCALID_RIVAL, RustboroCity_Movement_RivalApproachPlayer3 + applymovement LOCALID_RUSTBORO_RIVAL, RustboroCity_Movement_RivalApproachPlayer3 waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 goto RustboroCity_EventScript_RivalEncounter RustboroCity_EventScript_RivalTrigger4:: lockall call RustboroCity_EventScript_PlayRivalMusic - applymovement LOCALID_RIVAL, Common_Movement_WalkInPlaceFasterDown + applymovement LOCALID_RUSTBORO_RIVAL, Common_Movement_WalkInPlaceFasterDown waitmovement 0 playse SE_PIN - applymovement LOCALID_RIVAL, Common_Movement_ExclamationMark + applymovement LOCALID_RUSTBORO_RIVAL, Common_Movement_ExclamationMark waitmovement 0 - applymovement LOCALID_RIVAL, Common_Movement_Delay48 + applymovement LOCALID_RUSTBORO_RIVAL, Common_Movement_Delay48 waitmovement 0 - applymovement LOCALID_RIVAL, RustboroCity_Movement_RivalApproachPlayer4 + applymovement LOCALID_RUSTBORO_RIVAL, RustboroCity_Movement_RivalApproachPlayer4 waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 goto RustboroCity_EventScript_RivalEncounter RustboroCity_EventScript_RivalTrigger5:: lockall call RustboroCity_EventScript_PlayRivalMusic - applymovement LOCALID_RIVAL, Common_Movement_WalkInPlaceFasterDown + applymovement LOCALID_RUSTBORO_RIVAL, Common_Movement_WalkInPlaceFasterDown waitmovement 0 playse SE_PIN - applymovement LOCALID_RIVAL, Common_Movement_ExclamationMark + applymovement LOCALID_RUSTBORO_RIVAL, Common_Movement_ExclamationMark waitmovement 0 - applymovement LOCALID_RIVAL, Common_Movement_Delay48 + applymovement LOCALID_RUSTBORO_RIVAL, Common_Movement_Delay48 waitmovement 0 - applymovement LOCALID_RIVAL, RustboroCity_Movement_RivalApproachPlayer5 + applymovement LOCALID_RUSTBORO_RIVAL, RustboroCity_Movement_RivalApproachPlayer5 waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 goto RustboroCity_EventScript_RivalEncounter RustboroCity_EventScript_RivalTrigger6:: lockall call RustboroCity_EventScript_PlayRivalMusic - applymovement LOCALID_RIVAL, Common_Movement_WalkInPlaceFasterDown + applymovement LOCALID_RUSTBORO_RIVAL, Common_Movement_WalkInPlaceFasterDown waitmovement 0 playse SE_PIN - applymovement LOCALID_RIVAL, Common_Movement_ExclamationMark + applymovement LOCALID_RUSTBORO_RIVAL, Common_Movement_ExclamationMark waitmovement 0 - applymovement LOCALID_RIVAL, Common_Movement_Delay48 + applymovement LOCALID_RUSTBORO_RIVAL, Common_Movement_Delay48 waitmovement 0 - applymovement LOCALID_RIVAL, RustboroCity_Movement_RivalApproachPlayer6 + applymovement LOCALID_RUSTBORO_RIVAL, RustboroCity_Movement_RivalApproachPlayer6 waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 goto RustboroCity_EventScript_RivalEncounter RustboroCity_EventScript_RivalTrigger7:: lockall call RustboroCity_EventScript_PlayRivalMusic - applymovement LOCALID_RIVAL, Common_Movement_WalkInPlaceFasterDown + applymovement LOCALID_RUSTBORO_RIVAL, Common_Movement_WalkInPlaceFasterDown waitmovement 0 playse SE_PIN - applymovement LOCALID_RIVAL, Common_Movement_ExclamationMark + applymovement LOCALID_RUSTBORO_RIVAL, Common_Movement_ExclamationMark waitmovement 0 - applymovement LOCALID_RIVAL, Common_Movement_Delay48 + applymovement LOCALID_RUSTBORO_RIVAL, Common_Movement_Delay48 waitmovement 0 - applymovement LOCALID_RIVAL, RustboroCity_Movement_RivalApproachPlayer7 + applymovement LOCALID_RUSTBORO_RIVAL, RustboroCity_Movement_RivalApproachPlayer7 waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 goto RustboroCity_EventScript_RivalEncounter diff --git a/data/maps/RustboroCity_DevonCorp_1F/map.json b/data/maps/RustboroCity_DevonCorp_1F/map.json index 64a8b917a169..ecbf54258905 100644 --- a/data/maps/RustboroCity_DevonCorp_1F/map.json +++ b/data/maps/RustboroCity_DevonCorp_1F/map.json @@ -28,6 +28,7 @@ "flag": "0" }, { + "local_id": "LOCALID_DEVON_CORP_STAIR_GUARD", "graphics_id": "OBJ_EVENT_GFX_DEVON_EMPLOYEE", "x": 15, "y": 5, diff --git a/data/maps/RustboroCity_DevonCorp_1F/scripts.inc b/data/maps/RustboroCity_DevonCorp_1F/scripts.inc index 11953d33868d..c9111d0e16b0 100644 --- a/data/maps/RustboroCity_DevonCorp_1F/scripts.inc +++ b/data/maps/RustboroCity_DevonCorp_1F/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_STAIR_GUARD, 2 - RustboroCity_DevonCorp_1F_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, RustboroCity_DevonCorp_1F_OnTransition .byte 0 @@ -9,8 +7,8 @@ RustboroCity_DevonCorp_1F_OnTransition: end RustboroCity_DevonCorp_1F_EventScript_BlockStairs:: - setobjectxyperm LOCALID_STAIR_GUARD, 14, 2 - setobjectmovementtype LOCALID_STAIR_GUARD, MOVEMENT_TYPE_FACE_DOWN + setobjectxyperm LOCALID_DEVON_CORP_STAIR_GUARD, 14, 2 + setobjectmovementtype LOCALID_DEVON_CORP_STAIR_GUARD, MOVEMENT_TYPE_FACE_DOWN return RustboroCity_DevonCorp_1F_EventScript_Employee:: diff --git a/data/maps/RustboroCity_DevonCorp_2F/map.json b/data/maps/RustboroCity_DevonCorp_2F/map.json index 3892ba40aed7..70a5312f9f75 100644 --- a/data/maps/RustboroCity_DevonCorp_2F/map.json +++ b/data/maps/RustboroCity_DevonCorp_2F/map.json @@ -67,6 +67,7 @@ "flag": "0" }, { + "local_id": "LOCALID_FOSSIL_SCIENTIST", "graphics_id": "OBJ_EVENT_GFX_SCIENTIST_1", "x": 14, "y": 8, diff --git a/data/maps/RustboroCity_DevonCorp_2F/scripts.inc b/data/maps/RustboroCity_DevonCorp_2F/scripts.inc index ba3a259ec33b..bd796aab6f55 100644 --- a/data/maps/RustboroCity_DevonCorp_2F/scripts.inc +++ b/data/maps/RustboroCity_DevonCorp_2F/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_FOSSIL_SCIENTIST, 5 - RustboroCity_DevonCorp_2F_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, RustboroCity_DevonCorp_2F_OnTransition .byte 0 diff --git a/data/maps/RustboroCity_DevonCorp_3F/map.json b/data/maps/RustboroCity_DevonCorp_3F/map.json index 4ddb7271858e..ffe289e75960 100644 --- a/data/maps/RustboroCity_DevonCorp_3F/map.json +++ b/data/maps/RustboroCity_DevonCorp_3F/map.json @@ -28,6 +28,7 @@ "flag": "0" }, { + "local_id": "LOCALID_DEVON_CORP_3F_EMPLOYEE", "graphics_id": "OBJ_EVENT_GFX_MAN_2", "x": 3, "y": 5, diff --git a/data/maps/RustboroCity_DevonCorp_3F/scripts.inc b/data/maps/RustboroCity_DevonCorp_3F/scripts.inc index ebf9044c54a1..91b1ad522249 100644 --- a/data/maps/RustboroCity_DevonCorp_3F/scripts.inc +++ b/data/maps/RustboroCity_DevonCorp_3F/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_DEVON_EMPLOYEE, 2 - RustboroCity_DevonCorp_3F_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, RustboroCity_DevonCorp_3F_OnTransition map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, RustboroCity_DevonCorp_3F_OnWarp @@ -11,8 +9,8 @@ RustboroCity_DevonCorp_3F_OnTransition: end RustboroCity_DevonCorp_3F_EventScript_SetEmployeePos:: - setobjectxyperm LOCALID_DEVON_EMPLOYEE, 3, 2 - setobjectmovementtype LOCALID_DEVON_EMPLOYEE, MOVEMENT_TYPE_FACE_LEFT + setobjectxyperm LOCALID_DEVON_CORP_3F_EMPLOYEE, 3, 2 + setobjectmovementtype LOCALID_DEVON_CORP_3F_EMPLOYEE, MOVEMENT_TYPE_FACE_LEFT return RustboroCity_DevonCorp_3F_OnWarp: @@ -20,7 +18,7 @@ RustboroCity_DevonCorp_3F_OnWarp: .2byte 0 RustboroCity_DevonCorp_3F_EventScript_PlayerFaceEast:: - turnobject OBJ_EVENT_ID_PLAYER, DIR_EAST + turnobject LOCALID_PLAYER, DIR_EAST end RustboroCity_DevonCorp_3F_OnFrame: @@ -31,22 +29,22 @@ RustboroCity_DevonCorp_3F_EventScript_MeetPresident:: lockall msgbox RustboroCity_DevonCorp_3F_Text_ThisIs3rdFloorWaitHere, MSGBOX_DEFAULT closemessage - applymovement LOCALID_DEVON_EMPLOYEE, RustboroCity_DevonCorp_3F_Movement_EmployeeWalkOffscreen + applymovement LOCALID_DEVON_CORP_3F_EMPLOYEE, RustboroCity_DevonCorp_3F_Movement_EmployeeWalkOffscreen waitmovement 0 delay 80 - applymovement LOCALID_DEVON_EMPLOYEE, RustboroCity_DevonCorp_3F_Movement_EmployeeReturnToPlayer + applymovement LOCALID_DEVON_CORP_3F_EMPLOYEE, RustboroCity_DevonCorp_3F_Movement_EmployeeReturnToPlayer waitmovement 0 msgbox RustboroCity_DevonCorp_3F_Text_WordWithPresidentComeWithMe, MSGBOX_DEFAULT closemessage playbgm MUS_FOLLOW_ME, FALSE - applymovement LOCALID_DEVON_EMPLOYEE, RustboroCity_DevonCorp_3F_Movement_LeadPlayerToPresident - applymovement OBJ_EVENT_ID_PLAYER, RustboroCity_DevonCorp_3F_Movement_PlayerFollowToPresident + applymovement LOCALID_DEVON_CORP_3F_EMPLOYEE, RustboroCity_DevonCorp_3F_Movement_LeadPlayerToPresident + applymovement LOCALID_PLAYER, RustboroCity_DevonCorp_3F_Movement_PlayerFollowToPresident waitmovement 0 msgbox RustboroCity_DevonCorp_3F_Text_PleaseGoAhead, MSGBOX_DEFAULT closemessage fadedefaultbgm - applymovement LOCALID_DEVON_EMPLOYEE, RustboroCity_DevonCorp_3F_Movement_EmployeeFaceDesk - applymovement OBJ_EVENT_ID_PLAYER, RustboroCity_DevonCorp_3F_Movement_PlayerApproachDesk + applymovement LOCALID_DEVON_CORP_3F_EMPLOYEE, RustboroCity_DevonCorp_3F_Movement_EmployeeFaceDesk + applymovement LOCALID_PLAYER, RustboroCity_DevonCorp_3F_Movement_PlayerApproachDesk waitmovement 0 msgbox RustboroCity_DevonCorp_3F_Text_MrStoneIHaveFavor, MSGBOX_DEFAULT giveitem ITEM_LETTER diff --git a/data/maps/RustboroCity_Flat1_2F/map.json b/data/maps/RustboroCity_Flat1_2F/map.json index bb87670627d7..5591c344ff41 100644 --- a/data/maps/RustboroCity_Flat1_2F/map.json +++ b/data/maps/RustboroCity_Flat1_2F/map.json @@ -80,6 +80,7 @@ "flag": "0" }, { + "local_id": "LOCALID_WALDAS_DAD", "graphics_id": "OBJ_EVENT_GFX_MAN_1", "x": 8, "y": 5, diff --git a/data/maps/RustboroCity_Flat1_2F/scripts.inc b/data/maps/RustboroCity_Flat1_2F/scripts.inc index 8e972182c131..038dfbf746d2 100644 --- a/data/maps/RustboroCity_Flat1_2F/scripts.inc +++ b/data/maps/RustboroCity_Flat1_2F/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_WALDAS_DAD, 6 - RustboroCity_Flat1_2F_MapScripts:: .byte 0 diff --git a/data/maps/RustboroCity_Mart/map.json b/data/maps/RustboroCity_Mart/map.json index 92a23b6bf012..886b500df6ce 100644 --- a/data/maps/RustboroCity_Mart/map.json +++ b/data/maps/RustboroCity_Mart/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_RUSTBORO_MART_CLERK", "graphics_id": "OBJ_EVENT_GFX_MART_EMPLOYEE", "x": 1, "y": 3, diff --git a/data/maps/RustboroCity_PokemonCenter_1F/map.json b/data/maps/RustboroCity_PokemonCenter_1F/map.json index d187d49a3236..be36274d8fe1 100644 --- a/data/maps/RustboroCity_PokemonCenter_1F/map.json +++ b/data/maps/RustboroCity_PokemonCenter_1F/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_RUSTBORO_NURSE", "graphics_id": "OBJ_EVENT_GFX_NURSE", "x": 7, "y": 2, diff --git a/data/maps/RustboroCity_PokemonCenter_1F/scripts.inc b/data/maps/RustboroCity_PokemonCenter_1F/scripts.inc index ff7d7656820e..363230eb4132 100644 --- a/data/maps/RustboroCity_PokemonCenter_1F/scripts.inc +++ b/data/maps/RustboroCity_PokemonCenter_1F/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_NURSE, 1 - RustboroCity_PokemonCenter_1F_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, RustboroCity_PokemonCenter_1F_OnTransition map_script MAP_SCRIPT_ON_RESUME, CableClub_OnResume @@ -11,7 +9,7 @@ RustboroCity_PokemonCenter_1F_OnTransition: end RustboroCity_PokemonCenter_1F_EventScript_Nurse:: - setvar VAR_0x800B, LOCALID_NURSE + setvar VAR_0x800B, LOCALID_RUSTBORO_NURSE call Common_EventScript_PkmnCenterNurse waitmessage waitbuttonpress diff --git a/data/maps/RusturfTunnel/map.json b/data/maps/RusturfTunnel/map.json index ef07714add26..9883ac306adf 100644 --- a/data/maps/RusturfTunnel/map.json +++ b/data/maps/RusturfTunnel/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_RUSTURF_TUNNEL_WANDAS_BF", "graphics_id": "OBJ_EVENT_GFX_BLACK_BELT", "x": 23, "y": 5, @@ -67,6 +68,7 @@ "flag": "FLAG_ITEM_RUSTURF_TUNNEL_MAX_ETHER" }, { + "local_id": "LOCALID_RUSTURF_TUNNEL_BRINEY", "graphics_id": "OBJ_EVENT_GFX_EXPERT_M", "x": 5, "y": 4, @@ -80,6 +82,7 @@ "flag": "FLAG_HIDE_RUSTURF_TUNNEL_BRINEY" }, { + "local_id": "LOCALID_RUSTURF_TUNNEL_GRUNT", "graphics_id": "OBJ_EVENT_GFX_AQUA_MEMBER_M", "x": 14, "y": 5, @@ -93,6 +96,7 @@ "flag": "FLAG_HIDE_RUSTURF_TUNNEL_AQUA_GRUNT" }, { + "local_id": "LOCALID_RUSTURF_TUNNEL_PEEKO", "graphics_id": "OBJ_EVENT_GFX_WINGULL", "x": 14, "y": 4, @@ -132,6 +136,7 @@ "flag": "0" }, { + "local_id": "LOCALID_RUSTURF_TUNNEL_WANDA", "graphics_id": "OBJ_EVENT_GFX_WOMAN_2", "x": 25, "y": 4, diff --git a/data/maps/RusturfTunnel/scripts.inc b/data/maps/RusturfTunnel/scripts.inc index a70510095679..de77c5a996a3 100644 --- a/data/maps/RusturfTunnel/scripts.inc +++ b/data/maps/RusturfTunnel/scripts.inc @@ -1,9 +1,3 @@ -.equ LOCALID_WANDAS_BF, 1 -.set LOCALID_BRINEY, 5 -.set LOCALID_GRUNT, 6 -.set LOCALID_PEEKO, 7 -.equ LOCALID_WANDA, 10 - RusturfTunnel_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, RusturfTunnel_OnTransition map_script MAP_SCRIPT_ON_FRAME_TABLE, RusturfTunnel_OnFrame @@ -19,8 +13,8 @@ RusturfTunnel_OnTransition: end RusturfTunnel_EventScript_SetAquaGruntAndPeekoPos:: - setobjectxyperm LOCALID_PEEKO, 13, 4 - setobjectxyperm LOCALID_GRUNT, 13, 5 + setobjectxyperm LOCALID_RUSTURF_TUNNEL_PEEKO, 13, 4 + setobjectxyperm LOCALID_RUSTURF_TUNNEL_GRUNT, 13, 5 return RusturfTunnel_EventScript_Wanda:: @@ -79,36 +73,36 @@ RusturfTunnel_EventScript_ClearTunnelScene:: end RusturfTunnel_EventScript_BoyfriendApproachWanda1:: - applymovement OBJ_EVENT_ID_PLAYER, RusturfTunnel_Movement_PlayerWatchBoyfriend1 - applymovement LOCALID_WANDAS_BF, RusturfTunnel_Movement_BoyfriendApproachWanda1 + applymovement LOCALID_PLAYER, RusturfTunnel_Movement_PlayerWatchBoyfriend1 + applymovement LOCALID_RUSTURF_TUNNEL_WANDAS_BF, RusturfTunnel_Movement_BoyfriendApproachWanda1 waitmovement 0 return RusturfTunnel_EventScript_BoyfriendApproachWanda2:: - applymovement OBJ_EVENT_ID_PLAYER, RusturfTunnel_Movement_PlayerWatchBoyfriend - applymovement LOCALID_WANDAS_BF, RusturfTunnel_Movement_BoyfriendApproachWanda + applymovement LOCALID_PLAYER, RusturfTunnel_Movement_PlayerWatchBoyfriend + applymovement LOCALID_RUSTURF_TUNNEL_WANDAS_BF, RusturfTunnel_Movement_BoyfriendApproachWanda waitmovement 0 - applymovement LOCALID_WANDA, Common_Movement_WalkInPlaceFasterDown + applymovement LOCALID_RUSTURF_TUNNEL_WANDA, Common_Movement_WalkInPlaceFasterDown waitmovement 0 return RusturfTunnel_EventScript_BoyfriendApproachWanda3:: - applymovement OBJ_EVENT_ID_PLAYER, RusturfTunnel_Movement_PlayerWatchBoyfriend - applymovement LOCALID_WANDAS_BF, RusturfTunnel_Movement_BoyfriendApproachWanda + applymovement LOCALID_PLAYER, RusturfTunnel_Movement_PlayerWatchBoyfriend + applymovement LOCALID_RUSTURF_TUNNEL_WANDAS_BF, RusturfTunnel_Movement_BoyfriendApproachWanda waitmovement 0 - applymovement LOCALID_WANDA, Common_Movement_WalkInPlaceFasterDown + applymovement LOCALID_RUSTURF_TUNNEL_WANDA, Common_Movement_WalkInPlaceFasterDown waitmovement 0 return RusturfTunnel_EventScript_FaceWandasBoyfriend1:: - applymovement LOCALID_WANDAS_BF, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_RUSTURF_TUNNEL_WANDAS_BF, Common_Movement_WalkInPlaceFasterUp waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterDown + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterDown waitmovement 0 return RusturfTunnel_EventScript_FaceWandasBoyfriend2:: - applymovement LOCALID_WANDAS_BF, RusturfTunnel_Movement_BoyfriendFaceRight + applymovement LOCALID_RUSTURF_TUNNEL_WANDAS_BF, RusturfTunnel_Movement_BoyfriendFaceRight waitmovement 0 return @@ -117,28 +111,28 @@ RusturfTunnel_EventScript_FaceWandasBoyfriend3:: RusturfTunnel_EventScript_WandasBoyfriendApproachPlayer:: closemessage - applymovement LOCALID_WANDAS_BF, RusturfTunnel_Movement_WandasBoyfriendApproachPlayer + applymovement LOCALID_RUSTURF_TUNNEL_WANDAS_BF, RusturfTunnel_Movement_WandasBoyfriendApproachPlayer waitmovement 0 return RusturfTunnel_EventScript_WandaAndBoyfriendExit1:: - applymovement LOCALID_WANDA, RusturfTunnel_Movement_WandaExit1 - applymovement LOCALID_WANDAS_BF, RusturfTunnel_Movement_WandasBoyfriendExit1 + applymovement LOCALID_RUSTURF_TUNNEL_WANDA, RusturfTunnel_Movement_WandaExit1 + applymovement LOCALID_RUSTURF_TUNNEL_WANDAS_BF, RusturfTunnel_Movement_WandasBoyfriendExit1 waitmovement 0 return RusturfTunnel_EventScript_WandaAndBoyfriendExit:: - applymovement OBJ_EVENT_ID_PLAYER, RusturfTunnel_Movement_PlayerWatchWandaExit - applymovement LOCALID_WANDA, RusturfTunnel_Movement_WandaExit - applymovement LOCALID_WANDAS_BF, RusturfTunnel_Movement_WandasBoyfriendExit + applymovement LOCALID_PLAYER, RusturfTunnel_Movement_PlayerWatchWandaExit + applymovement LOCALID_RUSTURF_TUNNEL_WANDA, RusturfTunnel_Movement_WandaExit + applymovement LOCALID_RUSTURF_TUNNEL_WANDAS_BF, RusturfTunnel_Movement_WandasBoyfriendExit waitmovement 0 return RusturfTunnel_EventScript_WandasBoyfriendNotice:: playse SE_PIN - applymovement LOCALID_WANDAS_BF, Common_Movement_ExclamationMark + applymovement LOCALID_RUSTURF_TUNNEL_WANDAS_BF, Common_Movement_ExclamationMark waitmovement 0 - applymovement LOCALID_WANDAS_BF, Common_Movement_Delay48 + applymovement LOCALID_RUSTURF_TUNNEL_WANDAS_BF, Common_Movement_Delay48 waitmovement 0 return @@ -276,11 +270,11 @@ RusturfTunnel_EventScript_AquaGruntBackUp:: lockall msgbox RusturfTunnel_Text_ComeAndGetSome, MSGBOX_DEFAULT closemessage - applymovement LOCALID_GRUNT, RusturfTunnel_Movement_GruntAndPeekoBackUp - applymovement LOCALID_PEEKO, RusturfTunnel_Movement_GruntAndPeekoBackUp + applymovement LOCALID_RUSTURF_TUNNEL_GRUNT, RusturfTunnel_Movement_GruntAndPeekoBackUp + applymovement LOCALID_RUSTURF_TUNNEL_PEEKO, RusturfTunnel_Movement_GruntAndPeekoBackUp waitmovement 0 - copyobjectxytoperm LOCALID_GRUNT - copyobjectxytoperm LOCALID_PEEKO + copyobjectxytoperm LOCALID_RUSTURF_TUNNEL_GRUNT + copyobjectxytoperm LOCALID_RUSTURF_TUNNEL_PEEKO setvar VAR_RUSTURF_TUNNEL_STATE, 3 releaseall end @@ -310,19 +304,19 @@ RusturfTunnel_EventScript_Grunt:: msgbox RusturfTunnel_Text_GruntTakePackage, MSGBOX_DEFAULT giveitem ITEM_DEVON_GOODS closemessage - applymovement OBJ_EVENT_ID_PLAYER, RusturfTunnel_Movement_PushPlayerAsideForGrunt - applymovement LOCALID_GRUNT, RusturfTunnel_Movement_GruntEscape + applymovement LOCALID_PLAYER, RusturfTunnel_Movement_PushPlayerAsideForGrunt + applymovement LOCALID_RUSTURF_TUNNEL_GRUNT, RusturfTunnel_Movement_GruntEscape waitmovement 0 - removeobject LOCALID_GRUNT + removeobject LOCALID_RUSTURF_TUNNEL_GRUNT delay 50 - addobject LOCALID_BRINEY - applymovement LOCALID_BRINEY, RusturfTunnel_Movement_BrineyApproachPeeko1 + addobject LOCALID_RUSTURF_TUNNEL_BRINEY + applymovement LOCALID_RUSTURF_TUNNEL_BRINEY, RusturfTunnel_Movement_BrineyApproachPeeko1 waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, RusturfTunnel_Movement_PlayerMoveAsideForBriney - applymovement LOCALID_BRINEY, RusturfTunnel_Movement_BrineyApproachPeeko2 + applymovement LOCALID_PLAYER, RusturfTunnel_Movement_PlayerMoveAsideForBriney + applymovement LOCALID_RUSTURF_TUNNEL_BRINEY, RusturfTunnel_Movement_BrineyApproachPeeko2 waitmovement 0 msgbox RusturfTunnel_Text_PeekoGladToSeeYouSafe, MSGBOX_DEFAULT - applymovement LOCALID_BRINEY, Common_Movement_FacePlayer + applymovement LOCALID_RUSTURF_TUNNEL_BRINEY, Common_Movement_FacePlayer waitmovement 0 message RusturfTunnel_Text_ThankYouLetsGoHomePeeko waitmessage @@ -331,12 +325,12 @@ RusturfTunnel_EventScript_Grunt:: waitbuttonpress waitmoncry closemessage - applymovement OBJ_EVENT_ID_PLAYER, RusturfTunnel_Movement_PlayerWatchBrineyExit - applymovement LOCALID_BRINEY, RusturfTunnel_Movement_BrineyExit - applymovement LOCALID_PEEKO, RusturfTunnel_Movement_PeekoExit + applymovement LOCALID_PLAYER, RusturfTunnel_Movement_PlayerWatchBrineyExit + applymovement LOCALID_RUSTURF_TUNNEL_BRINEY, RusturfTunnel_Movement_BrineyExit + applymovement LOCALID_RUSTURF_TUNNEL_PEEKO, RusturfTunnel_Movement_PeekoExit waitmovement 0 - removeobject LOCALID_BRINEY - removeobject LOCALID_PEEKO + removeobject LOCALID_RUSTURF_TUNNEL_BRINEY + removeobject LOCALID_RUSTURF_TUNNEL_PEEKO clearflag FLAG_DEVON_GOODS_STOLEN setflag FLAG_RECOVERED_DEVON_GOODS setvar VAR_RUSTBORO_CITY_STATE, 4 diff --git a/data/maps/SSTidalCorridor/map.json b/data/maps/SSTidalCorridor/map.json index 7a25d4450cae..460359a82c77 100644 --- a/data/maps/SSTidalCorridor/map.json +++ b/data/maps/SSTidalCorridor/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_SS_TIDAL_EXIT_SAILOR", "graphics_id": "OBJ_EVENT_GFX_SAILOR", "x": 1, "y": 11, @@ -67,6 +68,7 @@ "flag": "FLAG_HIDE_SS_TIDAL_CORRIDOR_MR_BRINEY" }, { + "local_id": "LOCALID_SS_TIDAL_SCOTT", "graphics_id": "OBJ_EVENT_GFX_SCOTT", "x": 9, "y": 10, diff --git a/data/maps/SSTidalCorridor/scripts.inc b/data/maps/SSTidalCorridor/scripts.inc index 0d425889a7aa..4d63b7dad8c1 100644 --- a/data/maps/SSTidalCorridor/scripts.inc +++ b/data/maps/SSTidalCorridor/scripts.inc @@ -1,6 +1,3 @@ -.set LOCALID_SAILOR, 1 -.set LOCALID_SCOTT, 5 - SSTidalCorridor_MapScripts:: map_script MAP_SCRIPT_ON_FRAME_TABLE, SSTidalCorridor_OnFrame .byte 0 @@ -188,20 +185,20 @@ SSTidalCorridor_EventScript_TrainerNotDefeated:: SSTidalCorridor_EventScript_ScottScene:: lockall - applymovement LOCALID_SCOTT, SSTidalCorridor_Movement_ScottApproachPlayer + applymovement LOCALID_SS_TIDAL_SCOTT, SSTidalCorridor_Movement_ScottApproachPlayer waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterRight waitmovement 0 msgbox SSTidalCorridor_Text_ScottBattleFrontierInvite, MSGBOX_DEFAULT closemessage - applymovement OBJ_EVENT_ID_PLAYER, SSTidalCorridor_Movement_PlayerWatchScottExit - applymovement LOCALID_SAILOR, SSTidalCorridor_Movement_SailorMoveForScott - applymovement LOCALID_SCOTT, SSTidalCorridor_Movement_ScottExit + applymovement LOCALID_PLAYER, SSTidalCorridor_Movement_PlayerWatchScottExit + applymovement LOCALID_SS_TIDAL_EXIT_SAILOR, SSTidalCorridor_Movement_SailorMoveForScott + applymovement LOCALID_SS_TIDAL_SCOTT, SSTidalCorridor_Movement_ScottExit waitmovement 0 playse SE_EXIT waitse - removeobject LOCALID_SCOTT - applymovement LOCALID_SAILOR, SSTidalCorridor_Movement_SailorReturn + removeobject LOCALID_SS_TIDAL_SCOTT + applymovement LOCALID_SS_TIDAL_EXIT_SAILOR, SSTidalCorridor_Movement_SailorReturn waitmovement 0 delay 30 setflag FLAG_MET_SCOTT_ON_SS_TIDAL diff --git a/data/maps/SafariZone_South/map.json b/data/maps/SafariZone_South/map.json index dee1e40629ff..4fffe8afb9e3 100644 --- a/data/maps/SafariZone_South/map.json +++ b/data/maps/SafariZone_South/map.json @@ -31,6 +31,7 @@ ], "object_events": [ { + "local_id": "LOCALID_SAFARI_EXIT_ATTENDANT", "graphics_id": "OBJ_EVENT_GFX_CAMPER", "x": 32, "y": 34, diff --git a/data/maps/SafariZone_South/scripts.inc b/data/maps/SafariZone_South/scripts.inc index 6b4c774c2ba5..446175add683 100644 --- a/data/maps/SafariZone_South/scripts.inc +++ b/data/maps/SafariZone_South/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_ATTENDANT, 1 - SafariZone_South_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, SafariZone_South_OnTransition map_script MAP_SCRIPT_ON_FRAME_TABLE, SafariZone_South_OnFrame @@ -11,11 +9,11 @@ SafariZone_South_OnFrame: SafariZone_South_EventScript_EnterSafariZone:: lockall - applymovement OBJ_EVENT_ID_PLAYER, SafariZone_South_Movement_PlayerEnter + applymovement LOCALID_PLAYER, SafariZone_South_Movement_PlayerEnter waitmovement 0 - applymovement LOCALID_ATTENDANT, SafariZone_South_Movement_ExitAttendantBlockDoor + applymovement LOCALID_SAFARI_EXIT_ATTENDANT, SafariZone_South_Movement_ExitAttendantBlockDoor waitmovement 0 - setobjectxyperm LOCALID_ATTENDANT, 32, 34 + setobjectxyperm LOCALID_SAFARI_EXIT_ATTENDANT, 32, 34 setvar VAR_SAFARI_ZONE_STATE, 0 releaseall end @@ -25,7 +23,7 @@ SafariZone_South_OnTransition: end SafariZone_South_EventScript_SetExitAttendantAside:: - setobjectxyperm LOCALID_ATTENDANT, 31, 34 + setobjectxyperm LOCALID_SAFARI_EXIT_ATTENDANT, 31, 34 return SafariZone_South_Movement_PlayerEnter: @@ -74,17 +72,17 @@ SafariZone_South_EventScript_ExitEarly:: end SafariZone_South_EventScript_ExitEarlyNorth:: - applymovement LOCALID_ATTENDANT, SafariZone_South_Movement_MoveExitAttendantNorth + applymovement LOCALID_SAFARI_EXIT_ATTENDANT, SafariZone_South_Movement_MoveExitAttendantNorth waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, SafariZone_South_Movement_PlayerExitNorth + applymovement LOCALID_PLAYER, SafariZone_South_Movement_PlayerExitNorth waitmovement 0 goto SafariZone_South_EventScript_Exit end SafariZone_South_EventScript_ExitEarlyEast:: - applymovement LOCALID_ATTENDANT, SafariZone_South_Movement_MoveExitAttendantEast + applymovement LOCALID_SAFARI_EXIT_ATTENDANT, SafariZone_South_Movement_MoveExitAttendantEast waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, SafariZone_South_Movement_PlayerExitEast + applymovement LOCALID_PLAYER, SafariZone_South_Movement_PlayerExitEast waitmovement 0 goto SafariZone_South_EventScript_Exit end diff --git a/data/maps/SeafloorCavern_Entrance/map.json b/data/maps/SeafloorCavern_Entrance/map.json index 5e88d71432e0..7968d7afe9ef 100644 --- a/data/maps/SeafloorCavern_Entrance/map.json +++ b/data/maps/SeafloorCavern_Entrance/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_SEAFLOOR_CAVERN_ENTRANCE_GRUNT", "graphics_id": "OBJ_EVENT_GFX_AQUA_MEMBER_M", "x": 10, "y": 2, diff --git a/data/maps/SeafloorCavern_Entrance/scripts.inc b/data/maps/SeafloorCavern_Entrance/scripts.inc index eec69e6f8011..05bf490e7d4c 100644 --- a/data/maps/SeafloorCavern_Entrance/scripts.inc +++ b/data/maps/SeafloorCavern_Entrance/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_GRUNT, 1 - SeafloorCavern_Entrance_MapScripts:: map_script MAP_SCRIPT_ON_RESUME, SeafloorCavern_Entrance_OnResume .byte 0 @@ -14,9 +12,9 @@ SeafloorCavern_Entrance_EventScript_Grunt:: goto_if_eq VAR_HAS_TALKED_TO_SEAFLOOR_CAVERN_ENTRANCE_GRUNT, 1, SeafloorCavern_Entrance_EventScript_GruntSpeechShort waitse playse SE_PIN - applymovement LOCALID_GRUNT, Common_Movement_ExclamationMark + applymovement LOCALID_SEAFLOOR_CAVERN_ENTRANCE_GRUNT, Common_Movement_ExclamationMark waitmovement 0 - applymovement LOCALID_GRUNT, Common_Movement_Delay48 + applymovement LOCALID_SEAFLOOR_CAVERN_ENTRANCE_GRUNT, Common_Movement_Delay48 waitmovement 0 delay 20 call_if_eq VAR_FACING, DIR_WEST, SeafloorCavern_Entrance_EventScript_GruntFacePlayerWest @@ -24,10 +22,10 @@ SeafloorCavern_Entrance_EventScript_Grunt:: call_if_eq VAR_FACING, DIR_NORTH, SeafloorCavern_Entrance_EventScript_GruntFacePlayerNorth delay 30 setvar VAR_HAS_TALKED_TO_SEAFLOOR_CAVERN_ENTRANCE_GRUNT, 1 - copyobjectxytoperm LOCALID_GRUNT + copyobjectxytoperm LOCALID_SEAFLOOR_CAVERN_ENTRANCE_GRUNT msgbox SeafloorCavern_Entrance_Text_HearMagmaNearMossdeep, MSGBOX_DEFAULT closemessage - applymovement LOCALID_GRUNT, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_SEAFLOOR_CAVERN_ENTRANCE_GRUNT, Common_Movement_WalkInPlaceFasterUp waitmovement 0 releaseall end @@ -38,23 +36,23 @@ SeafloorCavern_Entrance_EventScript_GruntSpeechShort:: call_if_eq VAR_FACING, DIR_NORTH, SeafloorCavern_Entrance_EventScript_GruntFacePlayerNorth msgbox SeafloorCavern_Entrance_Text_HearMagmaNearMossdeepShort, MSGBOX_DEFAULT closemessage - applymovement LOCALID_GRUNT, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_SEAFLOOR_CAVERN_ENTRANCE_GRUNT, Common_Movement_WalkInPlaceFasterUp waitmovement 0 releaseall end SeafloorCavern_Entrance_EventScript_GruntFacePlayerEast:: - applymovement LOCALID_GRUNT, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_SEAFLOOR_CAVERN_ENTRANCE_GRUNT, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 return SeafloorCavern_Entrance_EventScript_GruntFacePlayerWest:: - applymovement LOCALID_GRUNT, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_SEAFLOOR_CAVERN_ENTRANCE_GRUNT, Common_Movement_WalkInPlaceFasterRight waitmovement 0 return SeafloorCavern_Entrance_EventScript_GruntFacePlayerNorth:: - applymovement LOCALID_GRUNT, Common_Movement_WalkInPlaceFasterDown + applymovement LOCALID_SEAFLOOR_CAVERN_ENTRANCE_GRUNT, Common_Movement_WalkInPlaceFasterDown waitmovement 0 return diff --git a/data/maps/SeafloorCavern_Room9/map.json b/data/maps/SeafloorCavern_Room9/map.json index 04fb621df1a9..241a53fe692a 100644 --- a/data/maps/SeafloorCavern_Room9/map.json +++ b/data/maps/SeafloorCavern_Room9/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_SEAFLOOR_CAVERN_KYOGRE", "graphics_id": "OBJ_EVENT_GFX_KYOGRE_FRONT", "x": 17, "y": 38, @@ -28,6 +29,7 @@ "flag": "FLAG_HIDE_SEAFLOOR_CAVERN_ROOM_9_KYOGRE" }, { + "local_id": "LOCALID_SEAFLOOR_CAVERN_ARCHIE", "graphics_id": "OBJ_EVENT_GFX_ARCHIE", "x": 9, "y": 42, @@ -41,6 +43,7 @@ "flag": "FLAG_HIDE_SEAFLOOR_CAVERN_ROOM_9_ARCHIE" }, { + "local_id": "LOCALID_SEAFLOOR_CAVERN_MAXIE", "graphics_id": "OBJ_EVENT_GFX_MAXIE", "x": 9, "y": 42, @@ -54,6 +57,7 @@ "flag": "FLAG_HIDE_SEAFLOOR_CAVERN_ROOM_9_MAXIE" }, { + "local_id": "LOCALID_SEAFLOOR_CAVERN_GRUNT_1", "graphics_id": "OBJ_EVENT_GFX_MAGMA_MEMBER_M", "x": 8, "y": 41, @@ -67,6 +71,7 @@ "flag": "FLAG_HIDE_SEAFLOOR_CAVERN_ROOM_9_MAGMA_GRUNTS" }, { + "local_id": "LOCALID_SEAFLOOR_CAVERN_GRUNT_2", "graphics_id": "OBJ_EVENT_GFX_MAGMA_MEMBER_F", "x": 8, "y": 42, @@ -93,6 +98,7 @@ "flag": "FLAG_ITEM_SEAFLOOR_CAVERN_ROOM_9_TM_EARTHQUAKE" }, { + "local_id": "LOCALID_SEAFLOOR_CAVERN_KYOGRE_SLEEPING", "graphics_id": "OBJ_EVENT_GFX_KYOGRE_ASLEEP", "x": 17, "y": 38, diff --git a/data/maps/SeafloorCavern_Room9/scripts.inc b/data/maps/SeafloorCavern_Room9/scripts.inc index 63e6baf3c77e..a14faa71d5c4 100644 --- a/data/maps/SeafloorCavern_Room9/scripts.inc +++ b/data/maps/SeafloorCavern_Room9/scripts.inc @@ -1,28 +1,21 @@ -.set LOCALID_KYOGRE, 1 -.set LOCALID_ARCHIE, 2 -.set LOCALID_MAXIE, 3 -.set LOCALID_GRUNT_1, 4 -.set LOCALID_GRUNT_2, 5 -.set LOCALID_KYOGRE_SLEEPING, 7 - SeafloorCavern_Room9_MapScripts:: .byte 0 SeafloorCavern_Room9_EventScript_ArchieAwakenKyogre:: lockall - setvar VAR_0x8004, LOCALID_ARCHIE - setvar VAR_0x8005, LOCALID_MAXIE - setvar VAR_0x8006, LOCALID_GRUNT_1 - setvar VAR_0x8007, LOCALID_GRUNT_2 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp + setvar VAR_0x8004, LOCALID_SEAFLOOR_CAVERN_ARCHIE + setvar VAR_0x8005, LOCALID_SEAFLOOR_CAVERN_MAXIE + setvar VAR_0x8006, LOCALID_SEAFLOOR_CAVERN_GRUNT_1 + setvar VAR_0x8007, LOCALID_SEAFLOOR_CAVERN_GRUNT_2 + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, SeafloorCavern_Room9_Movement_Delay32 + applymovement LOCALID_PLAYER, SeafloorCavern_Room9_Movement_Delay32 waitmovement 0 playbgm MUS_ENCOUNTER_AQUA, FALSE msgbox SeafloorCavern_Room9_Text_ArchieHoldItRightThere, MSGBOX_DEFAULT closemessage addobject VAR_0x8004 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 applymovement VAR_0x8004, SeafloorCavern_Room9_Movement_ArchieApproachPlayer waitmovement 0 @@ -52,14 +45,14 @@ SeafloorCavern_Room9_EventScript_ArchieAwakenKyogre:: playse SE_ORB special DoOrbEffect applymovement VAR_0x8004, Common_Movement_WalkInPlaceFasterUp - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 delay 150 - removeobject LOCALID_KYOGRE_SLEEPING - addobject LOCALID_KYOGRE + removeobject LOCALID_SEAFLOOR_CAVERN_KYOGRE_SLEEPING + addobject LOCALID_SEAFLOOR_CAVERN_KYOGRE waitstate delay 60 - applymovement LOCALID_KYOGRE, SeafloorCavern_Room9_Movement_KyogreApproach + applymovement LOCALID_SEAFLOOR_CAVERN_KYOGRE, SeafloorCavern_Room9_Movement_KyogreApproach waitmovement 0 special FadeOutOrbEffect waitstate @@ -69,9 +62,9 @@ SeafloorCavern_Room9_EventScript_ArchieAwakenKyogre:: setvar VAR_0x8007, 5 @ shake delay special ShakeCamera waitstate - applymovement LOCALID_KYOGRE, SeafloorCavern_Room9_Movement_KyogreExit + applymovement LOCALID_SEAFLOOR_CAVERN_KYOGRE, SeafloorCavern_Room9_Movement_KyogreExit waitmovement 0 - removeobject LOCALID_KYOGRE + removeobject LOCALID_SEAFLOOR_CAVERN_KYOGRE delay 4 setvar VAR_0x8004, 2 @ vertical pan setvar VAR_0x8005, 2 @ horizontal pan @@ -80,13 +73,13 @@ SeafloorCavern_Room9_EventScript_ArchieAwakenKyogre:: special ShakeCamera waitstate delay 30 - setvar VAR_0x8004, LOCALID_ARCHIE - setvar VAR_0x8005, LOCALID_MAXIE - setvar VAR_0x8006, LOCALID_GRUNT_1 - setvar VAR_0x8007, LOCALID_GRUNT_2 + setvar VAR_0x8004, LOCALID_SEAFLOOR_CAVERN_ARCHIE + setvar VAR_0x8005, LOCALID_SEAFLOOR_CAVERN_MAXIE + setvar VAR_0x8006, LOCALID_SEAFLOOR_CAVERN_GRUNT_1 + setvar VAR_0x8007, LOCALID_SEAFLOOR_CAVERN_GRUNT_2 msgbox SeafloorCavern_Room9_Text_ArchieWhereDidKyogreGo, MSGBOX_DEFAULT playse SE_PC_LOGIN - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 msgbox SeafloorCavern_Room9_Text_ArchieAMessageFromOutside, MSGBOX_DEFAULT closemessage diff --git a/data/maps/SkyPillar_Outside/map.json b/data/maps/SkyPillar_Outside/map.json index d72441266e31..545ebcd25efb 100644 --- a/data/maps/SkyPillar_Outside/map.json +++ b/data/maps/SkyPillar_Outside/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_SKY_PILLAR_WALLACE", "graphics_id": "OBJ_EVENT_GFX_WALLACE", "x": 13, "y": 7, diff --git a/data/maps/SkyPillar_Outside/scripts.inc b/data/maps/SkyPillar_Outside/scripts.inc index f25c82df65fc..cfacf141d1ca 100644 --- a/data/maps/SkyPillar_Outside/scripts.inc +++ b/data/maps/SkyPillar_Outside/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_WALLACE, 1 - SkyPillar_Outside_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, SkyPillar_Outside_OnTransition map_script MAP_SCRIPT_ON_LOAD, SkyPillar_Outside_OnLoad @@ -34,9 +32,9 @@ SkyPillar_Outside_OnFrame: SkyPillar_Outside_EventScript_WallaceScene:: lockall - applymovement LOCALID_WALLACE, SkyPillar_Outside_Movement_WallaceApproachPlayer + applymovement LOCALID_SKY_PILLAR_WALLACE, SkyPillar_Outside_Movement_WallaceApproachPlayer waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 msgbox SkyPillar_Outside_Text_OpenedDoorToSkyPillar, MSGBOX_DEFAULT closemessage @@ -50,8 +48,8 @@ SkyPillar_Outside_EventScript_WallaceScene:: delay 40 msgbox SkyPillar_Outside_Text_EarthquakeNotMomentToWaste, MSGBOX_DEFAULT closemessage - applymovement OBJ_EVENT_ID_PLAYER, SkyPillar_Outside_Movement_PlayerClimbSkyPillar - applymovement LOCALID_WALLACE, SkyPillar_Outside_Movement_WallaceClimbSkyPillar + applymovement LOCALID_PLAYER, SkyPillar_Outside_Movement_PlayerClimbSkyPillar + applymovement LOCALID_SKY_PILLAR_WALLACE, SkyPillar_Outside_Movement_WallaceClimbSkyPillar waitmovement 0 setvar VAR_0x8004, 1 @ vertical pan setvar VAR_0x8005, 3 @ horizontal pan @@ -60,13 +58,13 @@ SkyPillar_Outside_EventScript_WallaceScene:: special ShakeCamera waitstate delay 20 - applymovement LOCALID_WALLACE, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_SKY_PILLAR_WALLACE, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 delay 10 - applymovement LOCALID_WALLACE, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_SKY_PILLAR_WALLACE, Common_Movement_WalkInPlaceFasterRight waitmovement 0 delay 20 - applymovement LOCALID_WALLACE, Common_Movement_WalkInPlaceFasterDown + applymovement LOCALID_SKY_PILLAR_WALLACE, Common_Movement_WalkInPlaceFasterDown waitmovement 0 delay 30 msgbox SkyPillar_Outside_Text_SituationGettingWorse, MSGBOX_DEFAULT @@ -83,7 +81,7 @@ SkyPillar_Outside_EventScript_WallaceScene:: fadescreenswapbuffers FADE_TO_BLACK clearflag FLAG_HIDE_MAP_NAME_POPUP setvar VAR_SOOTOPOLIS_CITY_STATE, 4 - removeobject LOCALID_WALLACE + removeobject LOCALID_SKY_PILLAR_WALLACE clearflag FLAG_HIDE_SOOTOPOLIS_CITY_WALLACE fadescreenswapbuffers FADE_FROM_BLACK releaseall diff --git a/data/maps/SkyPillar_Top/map.json b/data/maps/SkyPillar_Top/map.json index 4c7ea03d156b..888e05805ddd 100644 --- a/data/maps/SkyPillar_Top/map.json +++ b/data/maps/SkyPillar_Top/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_RAYQUAZA_SLEEPING", "graphics_id": "OBJ_EVENT_GFX_RAYQUAZA", "x": 14, "y": 7, diff --git a/data/maps/SkyPillar_Top/scripts.inc b/data/maps/SkyPillar_Top/scripts.inc index 19cd7e4f42b6..3975cc05126c 100644 --- a/data/maps/SkyPillar_Top/scripts.inc +++ b/data/maps/SkyPillar_Top/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_RAYQUAZA_SLEEPING, 1 - SkyPillar_Top_MapScripts:: map_script MAP_SCRIPT_ON_RESUME, SkyPillar_Top_OnResume map_script MAP_SCRIPT_ON_TRANSITION, SkyPillar_Top_OnTransition @@ -90,10 +88,10 @@ SkyPillar_Top_EventScript_RanFromRayquaza2:: SkyPillar_Top_EventScript_AwakenRayquaza:: lockall fadeoutbgm 1 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_FaceUp + applymovement LOCALID_PLAYER, Common_Movement_FaceUp waitmovement 0 special SpawnCameraObject - applymovement OBJ_EVENT_ID_CAMERA, SkyPillar_Top_Movement_CameraPanUp + applymovement LOCALID_CAMERA, SkyPillar_Top_Movement_CameraPanUp waitmovement 0 special RemoveCameraObject applymovement LOCALID_RAYQUAZA_SLEEPING, SkyPillar_Top_Movement_RayquazaStir @@ -123,7 +121,7 @@ SkyPillar_Top_EventScript_AwakenRayquaza:: delay 20 fadeinbgm 1 special SpawnCameraObject - applymovement OBJ_EVENT_ID_CAMERA, SkyPillar_Top_Movement_CameraPanDown + applymovement LOCALID_CAMERA, SkyPillar_Top_Movement_CameraPanDown waitmovement 0 special RemoveCameraObject setvar VAR_SOOTOPOLIS_CITY_STATE, 5 diff --git a/data/maps/SlateportCity/map.json b/data/maps/SlateportCity/map.json index b285f030eeb5..90835cef3b84 100644 --- a/data/maps/SlateportCity/map.json +++ b/data/maps/SlateportCity/map.json @@ -31,6 +31,7 @@ ], "object_events": [ { + "local_id": "LOCALID_SLATEPORT_FAT_MAN", "graphics_id": "OBJ_EVENT_GFX_FAT_MAN", "x": 21, "y": 11, @@ -44,6 +45,7 @@ "flag": "0" }, { + "local_id": "LOCALID_SLATEPORT_MAN_1", "graphics_id": "OBJ_EVENT_GFX_MAN_1", "x": 34, "y": 29, @@ -57,6 +59,7 @@ "flag": "0" }, { + "local_id": "LOCALID_SLATEPORT_RICH_BOY", "graphics_id": "OBJ_EVENT_GFX_RICH_BOY", "x": 5, "y": 13, @@ -83,6 +86,7 @@ "flag": "0" }, { + "local_id": "LOCALID_SLATEPORT_GRUNT_1", "graphics_id": "OBJ_EVENT_GFX_AQUA_MEMBER_F", "x": 31, "y": 27, @@ -96,6 +100,7 @@ "flag": "FLAG_HIDE_SLATEPORT_CITY_TEAM_AQUA" }, { + "local_id": "LOCALID_SLATEPORT_COOK", "graphics_id": "OBJ_EVENT_GFX_COOK", "x": 5, "y": 43, @@ -109,6 +114,7 @@ "flag": "0" }, { + "local_id": "LOCALID_SLATEPORT_OLD_WOMAN", "graphics_id": "OBJ_EVENT_GFX_OLD_WOMAN", "x": 20, "y": 37, @@ -122,6 +128,7 @@ "flag": "0" }, { + "local_id": "LOCALID_SLATEPORT_GIRL", "graphics_id": "OBJ_EVENT_GFX_GIRL_1", "x": 8, "y": 42, @@ -135,6 +142,7 @@ "flag": "0" }, { + "local_id": "LOCALID_SLATEPORT_TY", "graphics_id": "OBJ_EVENT_GFX_CAMERAMAN", "x": 29, "y": 13, @@ -148,6 +156,7 @@ "flag": "FLAG_HIDE_SLATEPORT_CITY_GABBY_AND_TY" }, { + "local_id": "LOCALID_SLATEPORT_GABBY", "graphics_id": "OBJ_EVENT_GFX_REPORTER_F", "x": 28, "y": 14, @@ -161,6 +170,7 @@ "flag": "FLAG_HIDE_SLATEPORT_CITY_GABBY_AND_TY" }, { + "local_id": "LOCALID_SLATEPORT_CAPT_STERN", "graphics_id": "OBJ_EVENT_GFX_SCIENTIST_1", "x": 28, "y": 13, @@ -252,6 +262,7 @@ "flag": "0" }, { + "local_id": "LOCALID_SLATEPORT_GRUNT_2", "graphics_id": "OBJ_EVENT_GFX_AQUA_MEMBER_M", "x": 30, "y": 27, @@ -265,6 +276,7 @@ "flag": "FLAG_HIDE_SLATEPORT_CITY_TEAM_AQUA" }, { + "local_id": "LOCALID_SLATEPORT_GRUNT_3", "graphics_id": "OBJ_EVENT_GFX_AQUA_MEMBER_M", "x": 29, "y": 27, @@ -343,6 +355,7 @@ "flag": "FLAG_HIDE_SLATEPORT_CITY_TM_SALESMAN" }, { + "local_id": "LOCALID_SLATEPORT_ENERGY_GURU", "graphics_id": "OBJ_EVENT_GFX_POKEFAN_M", "x": 5, "y": 47, @@ -356,6 +369,7 @@ "flag": "0" }, { + "local_id": "LOCALID_SLATEPORT_GRUNT_4", "graphics_id": "OBJ_EVENT_GFX_AQUA_MEMBER_M", "x": 22, "y": 27, @@ -369,6 +383,7 @@ "flag": "FLAG_HIDE_SLATEPORT_CITY_TEAM_AQUA" }, { + "local_id": "LOCALID_SLATEPORT_GRUNT_5", "graphics_id": "OBJ_EVENT_GFX_AQUA_MEMBER_M", "x": 23, "y": 27, @@ -382,6 +397,7 @@ "flag": "FLAG_HIDE_SLATEPORT_CITY_TEAM_AQUA" }, { + "local_id": "LOCALID_SLATEPORT_GRUNT_6", "graphics_id": "OBJ_EVENT_GFX_AQUA_MEMBER_M", "x": 24, "y": 27, @@ -395,6 +411,7 @@ "flag": "FLAG_HIDE_SLATEPORT_CITY_TEAM_AQUA" }, { + "local_id": "LOCALID_SLATEPORT_GRUNT_7", "graphics_id": "OBJ_EVENT_GFX_AQUA_MEMBER_M", "x": 21, "y": 26, @@ -408,6 +425,7 @@ "flag": "FLAG_HIDE_SLATEPORT_CITY_TEAM_AQUA" }, { + "local_id": "LOCALID_SLATEPORT_GRUNT_8", "graphics_id": "OBJ_EVENT_GFX_AQUA_MEMBER_M", "x": 20, "y": 26, @@ -421,6 +439,7 @@ "flag": "FLAG_HIDE_SLATEPORT_CITY_TEAM_AQUA" }, { + "local_id": "LOCALID_SLATEPORT_GRUNT_9", "graphics_id": "OBJ_EVENT_GFX_AQUA_MEMBER_M", "x": 26, "y": 27, @@ -447,6 +466,7 @@ "flag": "FLAG_HIDE_SLATEPORT_CITY_TEAM_AQUA" }, { + "local_id": "LOCALID_SLATEPORT_GRUNT_11", "graphics_id": "OBJ_EVENT_GFX_AQUA_MEMBER_M", "x": 25, "y": 27, @@ -473,6 +493,7 @@ "flag": "0" }, { + "local_id": "LOCALID_SLATEPORT_SCOTT", "graphics_id": "OBJ_EVENT_GFX_SCOTT", "x": 10, "y": 12, diff --git a/data/maps/SlateportCity/scripts.inc b/data/maps/SlateportCity/scripts.inc index ae3910750e6c..5af1446cf968 100644 --- a/data/maps/SlateportCity/scripts.inc +++ b/data/maps/SlateportCity/scripts.inc @@ -1,26 +1,3 @@ -.set LOCALID_FAT_MAN, 1 -.set LOCALID_MAN_1, 2 -.set LOCALID_RICH_BOY, 3 -.set LOCALID_GRUNT_1, 5 -.set LOCALID_COOK, 6 -.set LOCALID_OLD_WOMAN, 7 -.set LOCALID_GIRL, 8 -.set LOCALID_TY, 9 -.set LOCALID_GABBY, 10 -.set LOCALID_CAPT_STERN, 11 -.set LOCALID_GRUNT_2, 18 -.set LOCALID_GRUNT_3, 19 -.set LOCALID_GRUNT_4, 26 -.set LOCALID_GRUNT_5, 27 -.set LOCALID_GRUNT_6, 28 -.set LOCALID_GRUNT_7, 29 -.set LOCALID_GRUNT_8, 30 -.set LOCALID_GRUNT_9, 31 -.set LOCALID_GRUNT_11, 33 -.set LOCALID_SCOTT, 35 - -@ Note: LOCALID_SLATEPORT_ENERGY_GURU is a local id for this map used elsewhere. It's defined in event_objects.h - SlateportCity_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, SlateportCity_OnTransition map_script MAP_SCRIPT_ON_FRAME_TABLE, SlateportCity_OnFrame @@ -40,33 +17,33 @@ SlateportCity_EventScript_EnterSlateport:: return SlateportCity_EventScript_MovePeopleForSternInterview:: - setobjectxyperm LOCALID_CAPT_STERN, 28, 13 - setobjectxyperm LOCALID_OLD_WOMAN, 25, 13 - setobjectxyperm LOCALID_RICH_BOY, 25, 14 - setobjectxyperm LOCALID_COOK, 27, 16 - setobjectxyperm LOCALID_GIRL, 28, 16 - setobjectxyperm LOCALID_FAT_MAN, 29, 16 - setobjectxyperm LOCALID_MAN_1, 31, 14 - setobjectmovementtype LOCALID_CAPT_STERN, MOVEMENT_TYPE_FACE_DOWN - setobjectmovementtype LOCALID_OLD_WOMAN, MOVEMENT_TYPE_FACE_DOWN_AND_RIGHT - setobjectmovementtype LOCALID_RICH_BOY, MOVEMENT_TYPE_FACE_UP_AND_RIGHT - setobjectmovementtype LOCALID_COOK, MOVEMENT_TYPE_FACE_UP - setobjectmovementtype LOCALID_GIRL, MOVEMENT_TYPE_FACE_UP - setobjectmovementtype LOCALID_FAT_MAN, MOVEMENT_TYPE_FACE_UP - setobjectmovementtype LOCALID_MAN_1, MOVEMENT_TYPE_FACE_LEFT + setobjectxyperm LOCALID_SLATEPORT_CAPT_STERN, 28, 13 + setobjectxyperm LOCALID_SLATEPORT_OLD_WOMAN, 25, 13 + setobjectxyperm LOCALID_SLATEPORT_RICH_BOY, 25, 14 + setobjectxyperm LOCALID_SLATEPORT_COOK, 27, 16 + setobjectxyperm LOCALID_SLATEPORT_GIRL, 28, 16 + setobjectxyperm LOCALID_SLATEPORT_FAT_MAN, 29, 16 + setobjectxyperm LOCALID_SLATEPORT_MAN_1, 31, 14 + setobjectmovementtype LOCALID_SLATEPORT_CAPT_STERN, MOVEMENT_TYPE_FACE_DOWN + setobjectmovementtype LOCALID_SLATEPORT_OLD_WOMAN, MOVEMENT_TYPE_FACE_DOWN_AND_RIGHT + setobjectmovementtype LOCALID_SLATEPORT_RICH_BOY, MOVEMENT_TYPE_FACE_UP_AND_RIGHT + setobjectmovementtype LOCALID_SLATEPORT_COOK, MOVEMENT_TYPE_FACE_UP + setobjectmovementtype LOCALID_SLATEPORT_GIRL, MOVEMENT_TYPE_FACE_UP + setobjectmovementtype LOCALID_SLATEPORT_FAT_MAN, MOVEMENT_TYPE_FACE_UP + setobjectmovementtype LOCALID_SLATEPORT_MAN_1, MOVEMENT_TYPE_FACE_LEFT return SlateportCity_EventScript_SetReadyForScottScene:: setflag FLAG_HIDE_MAP_NAME_POPUP getplayerxy VAR_0x8004, VAR_0x8005 goto_if_eq VAR_0x8004, 30, SlateportCity_EventScript_MoveScottLeft - setobjectxyperm LOCALID_SCOTT, 23, 27 - setobjectmovementtype LOCALID_SCOTT, MOVEMENT_TYPE_FACE_RIGHT + setobjectxyperm LOCALID_SLATEPORT_SCOTT, 23, 27 + setobjectmovementtype LOCALID_SLATEPORT_SCOTT, MOVEMENT_TYPE_FACE_RIGHT return SlateportCity_EventScript_MoveScottLeft:: - setobjectxyperm LOCALID_SCOTT, 22, 27 - setobjectmovementtype LOCALID_SCOTT, MOVEMENT_TYPE_FACE_RIGHT + setobjectxyperm LOCALID_SLATEPORT_SCOTT, 22, 27 + setobjectmovementtype LOCALID_SLATEPORT_SCOTT, MOVEMENT_TYPE_FACE_RIGHT return SlateportCity_OnFrame: @@ -75,17 +52,17 @@ SlateportCity_OnFrame: SlateportCity_EventScript_ScottScene:: lockall - addobject LOCALID_SCOTT - applymovement OBJ_EVENT_ID_PLAYER, SlateportCity_Movement_PlayerFaceScott - applymovement LOCALID_SCOTT, SlateportCity_Movement_ScottApproachPlayer + addobject LOCALID_SLATEPORT_SCOTT + applymovement LOCALID_PLAYER, SlateportCity_Movement_PlayerFaceScott + applymovement LOCALID_SLATEPORT_SCOTT, SlateportCity_Movement_ScottApproachPlayer waitmovement 0 msgbox SlateportCity_Text_YouDroveTeamAquaAway, MSGBOX_DEFAULT closemessage - applymovement LOCALID_SCOTT, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_SLATEPORT_SCOTT, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 delay 60 msgbox SlateportCity_Text_MaybeThisTrainer, MSGBOX_DEFAULT - applymovement LOCALID_SCOTT, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_SLATEPORT_SCOTT, Common_Movement_WalkInPlaceFasterRight waitmovement 0 msgbox SlateportCity_Text_LetsRegisterEachOther, MSGBOX_DEFAULT closemessage @@ -98,11 +75,11 @@ SlateportCity_EventScript_ScottScene:: setflag FLAG_ENABLE_SCOTT_MATCH_CALL msgbox SlateportCity_Text_KeepEyeOnTrainersBeSeeingYou, MSGBOX_DEFAULT closemessage - applymovement LOCALID_SCOTT, SlateportCity_Movement_ScottExit + applymovement LOCALID_SLATEPORT_SCOTT, SlateportCity_Movement_ScottExit waitmovement 0 - removeobject LOCALID_SCOTT - setobjectxyperm LOCALID_SCOTT, 10, 12 - setobjectmovementtype LOCALID_SCOTT, MOVEMENT_TYPE_FACE_DOWN + removeobject LOCALID_SLATEPORT_SCOTT + setobjectxyperm LOCALID_SLATEPORT_SCOTT, 10, 12 + setobjectmovementtype LOCALID_SLATEPORT_SCOTT, MOVEMENT_TYPE_FACE_DOWN clearflag FLAG_HIDE_MAP_NAME_POPUP setvar VAR_SLATEPORT_OUTSIDE_MUSEUM_STATE, 2 addvar VAR_SCOTT_STATE, 1 @@ -372,7 +349,7 @@ SlateportCity_EventScript_AquaGrunt1:: faceplayer msgbox SlateportCity_Text_QuitPushing, MSGBOX_DEFAULT closemessage - applymovement LOCALID_GRUNT_1, Common_Movement_FaceOriginalDirection + applymovement LOCALID_SLATEPORT_GRUNT_1, Common_Movement_FaceOriginalDirection waitmovement 0 release end @@ -382,7 +359,7 @@ SlateportCity_EventScript_AquaGrunt2:: faceplayer msgbox SlateportCity_Text_AquaHasPolicy, MSGBOX_DEFAULT closemessage - applymovement LOCALID_GRUNT_2, Common_Movement_FaceOriginalDirection + applymovement LOCALID_SLATEPORT_GRUNT_2, Common_Movement_FaceOriginalDirection waitmovement 0 release end @@ -392,7 +369,7 @@ SlateportCity_EventScript_AquaGrunt3:: faceplayer msgbox SlateportCity_Text_BossIsBrilliant, MSGBOX_DEFAULT closemessage - applymovement LOCALID_GRUNT_3, Common_Movement_FaceOriginalDirection + applymovement LOCALID_SLATEPORT_GRUNT_3, Common_Movement_FaceOriginalDirection waitmovement 0 release end @@ -402,7 +379,7 @@ SlateportCity_EventScript_AquaGrunt4:: faceplayer msgbox SlateportCity_Text_WhatsNewSchemeIWonder, MSGBOX_DEFAULT closemessage - applymovement LOCALID_GRUNT_4, Common_Movement_FaceOriginalDirection + applymovement LOCALID_SLATEPORT_GRUNT_4, Common_Movement_FaceOriginalDirection waitmovement 0 release end @@ -412,7 +389,7 @@ SlateportCity_EventScript_AquaGrunt5:: faceplayer msgbox SlateportCity_Text_ShouldTakeItAll, MSGBOX_DEFAULT closemessage - applymovement LOCALID_GRUNT_5, Common_Movement_FaceOriginalDirection + applymovement LOCALID_SLATEPORT_GRUNT_5, Common_Movement_FaceOriginalDirection waitmovement 0 release end @@ -422,7 +399,7 @@ SlateportCity_EventScript_AquaGrunt6:: faceplayer msgbox SlateportCity_Text_DontButtIn, MSGBOX_DEFAULT closemessage - applymovement LOCALID_GRUNT_6, Common_Movement_FaceOriginalDirection + applymovement LOCALID_SLATEPORT_GRUNT_6, Common_Movement_FaceOriginalDirection waitmovement 0 release end @@ -432,7 +409,7 @@ SlateportCity_EventScript_AquaGrunt7:: faceplayer msgbox SlateportCity_Text_RemindsMeOfLongLineForGames, MSGBOX_DEFAULT closemessage - applymovement LOCALID_GRUNT_7, Common_Movement_FaceOriginalDirection + applymovement LOCALID_SLATEPORT_GRUNT_7, Common_Movement_FaceOriginalDirection waitmovement 0 release end @@ -442,7 +419,7 @@ SlateportCity_EventScript_AquaGrunt8:: faceplayer msgbox SlateportCity_Text_WhyAreWeLiningUp, MSGBOX_DEFAULT closemessage - applymovement LOCALID_GRUNT_8, Common_Movement_FaceOriginalDirection + applymovement LOCALID_SLATEPORT_GRUNT_8, Common_Movement_FaceOriginalDirection waitmovement 0 release end @@ -451,31 +428,31 @@ SlateportCity_EventScript_AquaGrunt9:: lock faceplayer playse SE_PIN - applymovement LOCALID_GRUNT_9, Common_Movement_ExclamationMark + applymovement LOCALID_SLATEPORT_GRUNT_9, Common_Movement_ExclamationMark waitmovement 0 - applymovement LOCALID_GRUNT_9, Common_Movement_Delay48 + applymovement LOCALID_SLATEPORT_GRUNT_9, Common_Movement_Delay48 waitmovement 0 msgbox SlateportCity_Text_WhatDoYouWant, MSGBOX_DEFAULT closemessage - applymovement LOCALID_GRUNT_9, Common_Movement_FaceOriginalDirection + applymovement LOCALID_SLATEPORT_GRUNT_9, Common_Movement_FaceOriginalDirection waitmovement 0 - applymovement LOCALID_GRUNT_9, SlateportCity_Movement_DelayAquaGrunt + applymovement LOCALID_SLATEPORT_GRUNT_9, SlateportCity_Movement_DelayAquaGrunt waitmovement 0 - applymovement LOCALID_GRUNT_9, Common_Movement_FacePlayer + applymovement LOCALID_SLATEPORT_GRUNT_9, Common_Movement_FacePlayer waitmovement 0 msgbox SlateportCity_Text_IllReadSignForYou, MSGBOX_DEFAULT closemessage - applymovement LOCALID_GRUNT_9, Common_Movement_FaceOriginalDirection + applymovement LOCALID_SLATEPORT_GRUNT_9, Common_Movement_FaceOriginalDirection waitmovement 0 - applymovement LOCALID_GRUNT_9, SlateportCity_Movement_DelayAquaGrunt + applymovement LOCALID_SLATEPORT_GRUNT_9, SlateportCity_Movement_DelayAquaGrunt waitmovement 0 msgbox SlateportCity_Text_SaysSomethingLikeSeaIsEndless, MSGBOX_DEFAULT closemessage - applymovement LOCALID_GRUNT_9, Common_Movement_FacePlayer + applymovement LOCALID_SLATEPORT_GRUNT_9, Common_Movement_FacePlayer waitmovement 0 - applymovement LOCALID_GRUNT_9, SlateportCity_Movement_DelayAquaGrunt + applymovement LOCALID_SLATEPORT_GRUNT_9, SlateportCity_Movement_DelayAquaGrunt waitmovement 0 - applymovement LOCALID_GRUNT_9, Common_Movement_FaceOriginalDirection + applymovement LOCALID_SLATEPORT_GRUNT_9, Common_Movement_FaceOriginalDirection waitmovement 0 release end @@ -494,7 +471,7 @@ SlateportCity_EventScript_AquaGrunt11:: faceplayer msgbox SlateportCity_Text_HotSpringsAfterOperation, MSGBOX_DEFAULT closemessage - applymovement LOCALID_GRUNT_11, Common_Movement_FaceOriginalDirection + applymovement LOCALID_SLATEPORT_GRUNT_11, Common_Movement_FaceOriginalDirection waitmovement 0 release end @@ -578,48 +555,48 @@ SlateportCity_EventScript_CaptStern:: msgbox SlateportCity_Text_SternMoveAheadWithExploration, MSGBOX_DEFAULT msgbox SlateportCity_Text_GabbyWonderfulThanksForInterview, MSGBOX_DEFAULT closemessage - applymovement LOCALID_GABBY, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_SLATEPORT_GABBY, Common_Movement_WalkInPlaceFasterRight waitmovement 0 delay 10 - applymovement LOCALID_TY, Common_Movement_WalkInPlaceFasterDown + applymovement LOCALID_SLATEPORT_TY, Common_Movement_WalkInPlaceFasterDown waitmovement 0 delay 25 - applymovement LOCALID_CAPT_STERN, SlateportCity_Movement_SternWatchGabbyAndTyExit - applymovement OBJ_EVENT_ID_PLAYER, SlateportCity_Movement_PlayerFaceStern - applymovement LOCALID_GABBY, SlateportCity_Movement_GabbyExit - applymovement LOCALID_TY, SlateportCity_Movement_TyExit + applymovement LOCALID_SLATEPORT_CAPT_STERN, SlateportCity_Movement_SternWatchGabbyAndTyExit + applymovement LOCALID_PLAYER, SlateportCity_Movement_PlayerFaceStern + applymovement LOCALID_SLATEPORT_GABBY, SlateportCity_Movement_GabbyExit + applymovement LOCALID_SLATEPORT_TY, SlateportCity_Movement_TyExit waitmovement 0 - removeobject LOCALID_GABBY - removeobject LOCALID_TY + removeobject LOCALID_SLATEPORT_GABBY + removeobject LOCALID_SLATEPORT_TY msgbox SlateportCity_Text_SternWhewFirstInterview, MSGBOX_DEFAULT - applymovement LOCALID_CAPT_STERN, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_SLATEPORT_CAPT_STERN, Common_Movement_WalkInPlaceFasterUp waitmovement 0 msgbox SlateportCity_Text_OhPlayerWeMadeDiscovery, MSGBOX_DEFAULT playbgm MUS_ENCOUNTER_AQUA, FALSE msgbox SlateportCity_Text_AquaWillAssumeControlOfSubmarine, MSGBOX_DEFAULT - applymovement LOCALID_COOK, Common_Movement_WalkInPlaceFasterLeft - applymovement LOCALID_FAT_MAN, Common_Movement_WalkInPlaceFasterLeft - applymovement LOCALID_OLD_WOMAN, SlateportCity_Movement_OldWomanConcern - applymovement LOCALID_RICH_BOY, Common_Movement_QuestionMark - applymovement LOCALID_MAN_1, SlateportCity_Movement_ManConcern + applymovement LOCALID_SLATEPORT_COOK, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_SLATEPORT_FAT_MAN, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_SLATEPORT_OLD_WOMAN, SlateportCity_Movement_OldWomanConcern + applymovement LOCALID_SLATEPORT_RICH_BOY, Common_Movement_QuestionMark + applymovement LOCALID_SLATEPORT_MAN_1, SlateportCity_Movement_ManConcern waitmovement 0 - applymovement LOCALID_CAPT_STERN, Common_Movement_WalkInPlaceFasterDown + applymovement LOCALID_SLATEPORT_CAPT_STERN, Common_Movement_WalkInPlaceFasterDown waitmovement 0 msgbox SlateportCity_Text_SternWhatWasAllThat, MSGBOX_DEFAULT playse SE_PIN - applymovement LOCALID_CAPT_STERN, Common_Movement_ExclamationMark + applymovement LOCALID_SLATEPORT_CAPT_STERN, Common_Movement_ExclamationMark waitmovement 0 - applymovement LOCALID_CAPT_STERN, Common_Movement_Delay48 + applymovement LOCALID_SLATEPORT_CAPT_STERN, Common_Movement_Delay48 waitmovement 0 - applymovement LOCALID_CAPT_STERN, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_SLATEPORT_CAPT_STERN, Common_Movement_WalkInPlaceFasterUp waitmovement 0 msgbox SlateportCity_Text_FromHarborTryingToTakeSub, MSGBOX_DEFAULT msgbox SlateportCity_Text_PleaseComeWithMe, MSGBOX_DEFAULT closemessage - applymovement LOCALID_CAPT_STERN, SlateportCity_Movement_SternEnterHarbor - applymovement OBJ_EVENT_ID_PLAYER, SlateportCity_Movement_PlayerEnterHarbor + applymovement LOCALID_SLATEPORT_CAPT_STERN, SlateportCity_Movement_SternEnterHarbor + applymovement LOCALID_PLAYER, SlateportCity_Movement_PlayerEnterHarbor waitmovement 0 - removeobject LOCALID_CAPT_STERN + removeobject LOCALID_SLATEPORT_CAPT_STERN clearflag FLAG_HIDE_SLATEPORT_CITY_HARBOR_CAPTAIN_STERN clearflag FLAG_HIDE_SLATEPORT_CITY_HARBOR_SUBMARINE_SHADOW clearflag FLAG_HIDE_SLATEPORT_CITY_HARBOR_AQUA_GRUNT @@ -895,22 +872,22 @@ SlateportCity_EventScript_NotEnoughBerryPowder:: SlateportCity_EventScript_ScottBattleTentScene:: lockall - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_FaceUp + applymovement LOCALID_PLAYER, Common_Movement_FaceUp waitmovement 0 opendoor 10, 12 waitdooranim - addobject LOCALID_SCOTT - applymovement OBJ_EVENT_ID_PLAYER, SlateportCity_Movement_PushPlayerDown - applymovement LOCALID_SCOTT, SlateportCity_Movement_ScottExitBattleTent + addobject LOCALID_SLATEPORT_SCOTT + applymovement LOCALID_PLAYER, SlateportCity_Movement_PushPlayerDown + applymovement LOCALID_SLATEPORT_SCOTT, SlateportCity_Movement_ScottExitBattleTent waitmovement 0 closedoor 10, 12 waitdooranim msgbox SlateportCity_Text_TakingBattleTentChallenge, MSGBOX_DEFAULT closemessage - applymovement OBJ_EVENT_ID_PLAYER, SlateportCity_Movement_PlayerWatchScottExit - applymovement LOCALID_SCOTT, SlateportCity_Movement_ScottExitAfterBattleTent + applymovement LOCALID_PLAYER, SlateportCity_Movement_PlayerWatchScottExit + applymovement LOCALID_SLATEPORT_SCOTT, SlateportCity_Movement_ScottExitAfterBattleTent waitmovement 0 - removeobject LOCALID_SCOTT + removeobject LOCALID_SLATEPORT_SCOTT addvar VAR_SCOTT_STATE, 1 setvar VAR_SLATEPORT_OUTSIDE_MUSEUM_STATE, 3 releaseall diff --git a/data/maps/SlateportCity_BattleTentBattleRoom/map.json b/data/maps/SlateportCity_BattleTentBattleRoom/map.json index 27cce84b49c0..13b8005364cc 100644 --- a/data/maps/SlateportCity_BattleTentBattleRoom/map.json +++ b/data/maps/SlateportCity_BattleTentBattleRoom/map.json @@ -28,6 +28,7 @@ "flag": "0" }, { + "local_id": "LOCALID_SLATEPORT_TENT_BATTLE_OPPONENT", "graphics_id": "OBJ_EVENT_GFX_VAR_0", "x": 5, "y": 1, @@ -41,6 +42,7 @@ "flag": "0" }, { + "local_id": "LOCALID_SLATEPORT_TENT_BATTLE_PLAYER", "graphics_id": "OBJ_EVENT_GFX_VAR_1", "x": 4, "y": 8, diff --git a/data/maps/SlateportCity_BattleTentBattleRoom/scripts.inc b/data/maps/SlateportCity_BattleTentBattleRoom/scripts.inc index 53514bb5e95d..ba73c89d0654 100644 --- a/data/maps/SlateportCity_BattleTentBattleRoom/scripts.inc +++ b/data/maps/SlateportCity_BattleTentBattleRoom/scripts.inc @@ -1,5 +1,7 @@ -.set LOCALID_OPPONENT, 2 -.set LOCALID_PLAYER, 3 +@ On this map the player will automatically walk into the room, but the camera is supposed to remain still. +@ To do this GF sets the player (LOCALID_PLAYER) invisible and creates a fake player object (LOCALID_SLATEPORT_TENT_BATTLE_PLAYER). +@ The graphics of this fake player object are represented with VAR_OBJ_GFX_ID_1. +@ The graphics of the opponent are represented with VAR_OBJ_GFX_ID_0, which will ultimately be set by factory_setopponentgfx. SlateportCity_BattleTentBattleRoom_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, SlateportCity_BattleTentBattleRoom_OnTransition @@ -7,9 +9,6 @@ SlateportCity_BattleTentBattleRoom_MapScripts:: map_script MAP_SCRIPT_ON_FRAME_TABLE, SlateportCity_BattleTentBattleRoom_OnFrame .byte 0 - @ On this map the player (OBJ_EVENT_ID_PLAYER) is hidden - @ The player is represented instead by LOCALID_PLAYER, which has the gfx id VAR_OBJ_GFX_ID_1 - SlateportCity_BattleTentBattleRoom_OnTransition: call SlateportCity_BattleTentBattleRoom_EventScript_SetPlayerGfx end @@ -34,8 +33,8 @@ SlateportCity_BattleTentBattleRoom_OnWarp: SlateportCity_BattleTentBattleRoom_EventScript_SetUpObjects:: setvar VAR_TEMP_1, 1 - hideobjectat OBJ_EVENT_ID_PLAYER, MAP_FALLARBOR_TOWN_BATTLE_TENT_BATTLE_ROOM - hideobjectat LOCALID_OPPONENT, MAP_SLATEPORT_CITY_BATTLE_TENT_BATTLE_ROOM + hideobjectat LOCALID_PLAYER, MAP_FALLARBOR_TOWN_BATTLE_TENT_BATTLE_ROOM + hideobjectat LOCALID_SLATEPORT_TENT_BATTLE_OPPONENT, MAP_SLATEPORT_CITY_BATTLE_TENT_BATTLE_ROOM end SlateportCity_BattleTentBattleRoom_OnFrame: @@ -43,13 +42,13 @@ SlateportCity_BattleTentBattleRoom_OnFrame: .2byte 0 SlateportCity_BattleTentBattleRoom_EventScript_EnterRoom:: - applymovement LOCALID_PLAYER, SlateportCity_BattleTentBattleRoom_Movement_PlayerEnter + applymovement LOCALID_SLATEPORT_TENT_BATTLE_PLAYER, SlateportCity_BattleTentBattleRoom_Movement_PlayerEnter waitmovement 0 factory_setopponentgfx - setobjectxyperm LOCALID_OPPONENT, 5, 1 - removeobject LOCALID_OPPONENT - addobject LOCALID_OPPONENT - applymovement LOCALID_OPPONENT, SlateportCity_BattleTentBattleRoom_Movement_OpponentEnter + setobjectxyperm LOCALID_SLATEPORT_TENT_BATTLE_OPPONENT, 5, 1 + removeobject LOCALID_SLATEPORT_TENT_BATTLE_OPPONENT + addobject LOCALID_SLATEPORT_TENT_BATTLE_OPPONENT + applymovement LOCALID_SLATEPORT_TENT_BATTLE_OPPONENT, SlateportCity_BattleTentBattleRoom_Movement_OpponentEnter waitmovement 0 battletent_getopponentintro lockall diff --git a/data/maps/SlateportCity_BattleTentCorridor/map.json b/data/maps/SlateportCity_BattleTentCorridor/map.json index c9cd4b1a71e8..a6f1e60de791 100644 --- a/data/maps/SlateportCity_BattleTentCorridor/map.json +++ b/data/maps/SlateportCity_BattleTentCorridor/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_SLATEPORT_TENT_CORRIDOR_ATTENDANT", "graphics_id": "OBJ_EVENT_GFX_SCIENTIST_1", "x": 2, "y": 6, diff --git a/data/maps/SlateportCity_BattleTentCorridor/scripts.inc b/data/maps/SlateportCity_BattleTentCorridor/scripts.inc index 75156f68f041..d0c90a8b7a89 100644 --- a/data/maps/SlateportCity_BattleTentCorridor/scripts.inc +++ b/data/maps/SlateportCity_BattleTentCorridor/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_ATTENDANT, 1 - SlateportCity_BattleTentCorridor_MapScripts:: map_script MAP_SCRIPT_ON_FRAME_TABLE, SlateportCity_BattleTentCorridor_OnFrame map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, SlateportCity_BattleTentCorridor_OnWarp @@ -14,10 +12,10 @@ SlateportCity_BattleTentCorridor_OnWarp: SlateportCity_BattleTentCorridor_EventScript_SetUpObjects:: setvar VAR_TEMP_1, 1 goto_if_ne VAR_0x8006, 1, SlateportCity_BattleTentCorridor_EventScript_TurnPlayerNorth - setobjectxy LOCALID_ATTENDANT, 2, 2 - turnobject LOCALID_ATTENDANT, DIR_SOUTH + setobjectxy LOCALID_SLATEPORT_TENT_CORRIDOR_ATTENDANT, 2, 2 + turnobject LOCALID_SLATEPORT_TENT_CORRIDOR_ATTENDANT, DIR_SOUTH SlateportCity_BattleTentCorridor_EventScript_TurnPlayerNorth:: - turnobject OBJ_EVENT_ID_PLAYER, DIR_NORTH + turnobject LOCALID_PLAYER, DIR_NORTH end SlateportCity_BattleTentCorridor_OnFrame: @@ -27,8 +25,8 @@ SlateportCity_BattleTentCorridor_OnFrame: SlateportCity_BattleTentCorridor_EventScript_EnterCorridor:: goto_if_eq VAR_0x8006, 1, SlateportCity_BattleTentCorridor_EventScript_ReturnToRoomFromBattle setvar VAR_TEMP_0, 1 - applymovement LOCALID_ATTENDANT, SlateportCity_BattleTentCorridor_Movement_AttendantEnter - applymovement OBJ_EVENT_ID_PLAYER, SlateportCity_BattleTentCorridor_Movement_PlayerEnter + applymovement LOCALID_SLATEPORT_TENT_CORRIDOR_ATTENDANT, SlateportCity_BattleTentCorridor_Movement_AttendantEnter + applymovement LOCALID_PLAYER, SlateportCity_BattleTentCorridor_Movement_PlayerEnter waitmovement 0 goto_if_eq VAR_0x8006, 2, SlateportCity_BattleTentCorridor_EventScript_ResumeChallenge slateporttent_generaterentalmons @@ -40,12 +38,12 @@ SlateportCity_BattleTentCorridor_EventScript_EnterCorridor:: SlateportCity_BattleTentCorridor_EventScript_EnterBattleRoom:: msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_RightThisWay, MSGBOX_DEFAULT closemessage - applymovement LOCALID_ATTENDANT, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_SLATEPORT_TENT_CORRIDOR_ATTENDANT, Common_Movement_WalkInPlaceFasterUp waitmovement 0 opendoor 2, 1 waitdooranim - applymovement LOCALID_ATTENDANT, SlateportCity_BattleTentCorridor_Movement_AttendantExit - applymovement OBJ_EVENT_ID_PLAYER, SlateportCity_BattleTentCorridor_Movement_PlayerExit + applymovement LOCALID_SLATEPORT_TENT_CORRIDOR_ATTENDANT, SlateportCity_BattleTentCorridor_Movement_AttendantExit + applymovement LOCALID_PLAYER, SlateportCity_BattleTentCorridor_Movement_PlayerExit waitmovement 0 closedoor 2, 1 waitdooranim diff --git a/data/maps/SlateportCity_BattleTentLobby/map.json b/data/maps/SlateportCity_BattleTentLobby/map.json index 6a599df8f3dc..227c0bb4147c 100644 --- a/data/maps/SlateportCity_BattleTentLobby/map.json +++ b/data/maps/SlateportCity_BattleTentLobby/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_SLATEPORT_TENT_ATTENDANT", "graphics_id": "OBJ_EVENT_GFX_SCIENTIST_1", "x": 6, "y": 5, diff --git a/data/maps/SlateportCity_BattleTentLobby/scripts.inc b/data/maps/SlateportCity_BattleTentLobby/scripts.inc index 88dd323da0de..26c6e56f4770 100644 --- a/data/maps/SlateportCity_BattleTentLobby/scripts.inc +++ b/data/maps/SlateportCity_BattleTentLobby/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_ATTENDANT, 1 - SlateportCity_BattleTentLobby_MapScripts:: map_script MAP_SCRIPT_ON_FRAME_TABLE, SlateportCity_BattleTentLobby_OnFrame map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, SlateportCity_BattleTentLobby_OnWarp @@ -11,7 +9,7 @@ SlateportCity_BattleTentLobby_OnWarp: SlateportCity_BattleTentLobby_EventScript_TurnPlayerNorth:: setvar VAR_TEMP_1, 1 - turnobject OBJ_EVENT_ID_PLAYER, DIR_NORTH + turnobject LOCALID_PLAYER, DIR_NORTH end SlateportCity_BattleTentLobby_OnFrame: @@ -138,13 +136,13 @@ SlateportCity_BattleTentLobby_EventScript_EnterChallenge:: end SlateportCity_BattleTentLobby_EventScript_WalkToDoor:: - applymovement LOCALID_ATTENDANT, SlateportCity_BattleTentLobby_Movement_AttendantWalkToDoor - applymovement OBJ_EVENT_ID_PLAYER, SlateportCity_BattleTentLobby_Movement_PlayerWalkToDoor + applymovement LOCALID_SLATEPORT_TENT_ATTENDANT, SlateportCity_BattleTentLobby_Movement_AttendantWalkToDoor + applymovement LOCALID_PLAYER, SlateportCity_BattleTentLobby_Movement_PlayerWalkToDoor waitmovement 0 opendoor 6, 1 waitdooranim - applymovement LOCALID_ATTENDANT, SlateportCity_BattleTentLobby_Movement_AttendantEnterDoor - applymovement OBJ_EVENT_ID_PLAYER, SlateportCity_BattleTentLobby_Movement_PlayerEnterDoor + applymovement LOCALID_SLATEPORT_TENT_ATTENDANT, SlateportCity_BattleTentLobby_Movement_AttendantEnterDoor + applymovement LOCALID_PLAYER, SlateportCity_BattleTentLobby_Movement_PlayerEnterDoor waitmovement 0 closedoor 6, 1 waitdooranim diff --git a/data/maps/SlateportCity_Harbor/map.json b/data/maps/SlateportCity_Harbor/map.json index 05fe77c61c4f..11b530cd1e7b 100644 --- a/data/maps/SlateportCity_Harbor/map.json +++ b/data/maps/SlateportCity_Harbor/map.json @@ -54,6 +54,7 @@ "flag": "FLAG_HIDE_SLATEPORT_CITY_HARBOR_PATRONS" }, { + "local_id": "LOCALID_SLATEPORT_HARBOR_CAPT_STERN", "graphics_id": "OBJ_EVENT_GFX_SCIENTIST_1", "x": 6, "y": 13, @@ -67,6 +68,7 @@ "flag": "FLAG_HIDE_SLATEPORT_CITY_HARBOR_CAPTAIN_STERN" }, { + "local_id": "LOCALID_SLATEPORT_HARBOR_SS_TIDAL", "graphics_id": "OBJ_EVENT_GFX_SS_TIDAL", "x": 8, "y": 9, @@ -80,6 +82,7 @@ "flag": "FLAG_HIDE_SLATEPORT_CITY_HARBOR_SS_TIDAL" }, { + "local_id": "LOCALID_SLATEPORT_HARBOR_GRUNT", "graphics_id": "OBJ_EVENT_GFX_AQUA_MEMBER_M", "x": 7, "y": 10, @@ -93,6 +96,7 @@ "flag": "FLAG_HIDE_SLATEPORT_CITY_HARBOR_AQUA_GRUNT" }, { + "local_id": "LOCALID_SLATEPORT_HARBOR_ARCHIE", "graphics_id": "OBJ_EVENT_GFX_ARCHIE", "x": 8, "y": 10, @@ -106,6 +110,7 @@ "flag": "FLAG_HIDE_SLATEPORT_CITY_HARBOR_ARCHIE" }, { + "local_id": "LOCALID_SLATEPORT_HARBOR_SUBMARINE", "graphics_id": "OBJ_EVENT_GFX_SUBMARINE_SHADOW", "x": 7, "y": 9, diff --git a/data/maps/SlateportCity_Harbor/scripts.inc b/data/maps/SlateportCity_Harbor/scripts.inc index b2a71f2b7c3c..ebcd40ab0caa 100644 --- a/data/maps/SlateportCity_Harbor/scripts.inc +++ b/data/maps/SlateportCity_Harbor/scripts.inc @@ -1,9 +1,3 @@ -.set LOCALID_CAPT_STERN, 4 -.set LOCALID_SS_TIDAL, 5 -.set LOCALID_GRUNT, 6 -.set LOCALID_ARCHIE, 7 -.set LOCALID_SUBMARINE, 8 - SlateportCity_Harbor_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, SlateportCity_Harbor_OnTransition .byte 0 @@ -21,8 +15,8 @@ SlateportCity_Harbor_EventScript_ShowSSTidal:: SlateportCity_Harbor_EventScript_ReadyAquaEscapeScene:: savebgm MUS_ENCOUNTER_AQUA - setobjectxyperm LOCALID_CAPT_STERN, 12, 13 - setobjectmovementtype LOCALID_CAPT_STERN, MOVEMENT_TYPE_FACE_LEFT + setobjectxyperm LOCALID_SLATEPORT_HARBOR_CAPT_STERN, 12, 13 + setobjectmovementtype LOCALID_SLATEPORT_HARBOR_CAPT_STERN, MOVEMENT_TYPE_FACE_LEFT setflag FLAG_HIDE_SLATEPORT_CITY_HARBOR_PATRONS return @@ -47,26 +41,26 @@ SlateportCity_Harbor_EventScript_AquaEscapeTrigger2:: SlateportCity_Harbor_EventScript_AquaEscapeTrigger3:: lockall setvar VAR_0x8008, 3 - applymovement OBJ_EVENT_ID_PLAYER, SlateportCity_Harbor_Movement_PlayerWalkUp + applymovement LOCALID_PLAYER, SlateportCity_Harbor_Movement_PlayerWalkUp waitmovement 0 goto SlateportCity_Harbor_EventScript_AquaEscapeScene end SlateportCity_Harbor_EventScript_AquaEscapeScene:: - applymovement LOCALID_ARCHIE, Common_Movement_WalkInPlaceFasterDown + applymovement LOCALID_SLATEPORT_HARBOR_ARCHIE, Common_Movement_WalkInPlaceFasterDown waitmovement 0 - applymovement LOCALID_GRUNT, Common_Movement_WalkInPlaceFasterDown - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_SLATEPORT_HARBOR_GRUNT, Common_Movement_WalkInPlaceFasterDown + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 msgbox SlateportCity_Harbor_Text_ArchieYouAgainHideoutInLilycove, MSGBOX_DEFAULT closemessage - applymovement LOCALID_GRUNT, SlateportCity_Harbor_Movement_AquaBoardSub - applymovement LOCALID_ARCHIE, SlateportCity_Harbor_Movement_AquaBoardSub - applymovement LOCALID_SUBMARINE, SlateportCity_Harbor_Movement_SubmarineExit + applymovement LOCALID_SLATEPORT_HARBOR_GRUNT, SlateportCity_Harbor_Movement_AquaBoardSub + applymovement LOCALID_SLATEPORT_HARBOR_ARCHIE, SlateportCity_Harbor_Movement_AquaBoardSub + applymovement LOCALID_SLATEPORT_HARBOR_SUBMARINE, SlateportCity_Harbor_Movement_SubmarineExit waitmovement 0 - removeobject LOCALID_GRUNT - removeobject LOCALID_ARCHIE - removeobject LOCALID_SUBMARINE + removeobject LOCALID_SLATEPORT_HARBOR_GRUNT + removeobject LOCALID_SLATEPORT_HARBOR_ARCHIE + removeobject LOCALID_SLATEPORT_HARBOR_SUBMARINE setvar VAR_SLATEPORT_HARBOR_STATE, 2 setflag FLAG_MET_TEAM_AQUA_HARBOR setflag FLAG_HIDE_LILYCOVE_MOTEL_SCOTT @@ -78,29 +72,29 @@ SlateportCity_Harbor_EventScript_AquaEscapeScene:: closemessage setflag FLAG_HIDE_AQUA_HIDEOUT_1F_GRUNT_1_BLOCKING_ENTRANCE setflag FLAG_HIDE_AQUA_HIDEOUT_1F_GRUNT_2_BLOCKING_ENTRANCE - copyobjectxytoperm LOCALID_CAPT_STERN - setobjectmovementtype LOCALID_CAPT_STERN, MOVEMENT_TYPE_FACE_RIGHT + copyobjectxytoperm LOCALID_SLATEPORT_HARBOR_CAPT_STERN + setobjectmovementtype LOCALID_SLATEPORT_HARBOR_CAPT_STERN, MOVEMENT_TYPE_FACE_RIGHT releaseall end SlateportCity_Harbor_EventScript_SternApproachPlayer0:: - applymovement LOCALID_CAPT_STERN, SlateportCity_Harbor_Movement_SternApproachPlayer0 + applymovement LOCALID_SLATEPORT_HARBOR_CAPT_STERN, SlateportCity_Harbor_Movement_SternApproachPlayer0 waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterDown + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterDown waitmovement 0 return SlateportCity_Harbor_EventScript_SternApproachPlayer1:: - applymovement LOCALID_CAPT_STERN, SlateportCity_Harbor_Movement_SternApproachPlayer1 + applymovement LOCALID_SLATEPORT_HARBOR_CAPT_STERN, SlateportCity_Harbor_Movement_SternApproachPlayer1 waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterRight waitmovement 0 return SlateportCity_Harbor_EventScript_SternApproachPlayer:: - applymovement LOCALID_CAPT_STERN, SlateportCity_Harbor_Movement_SternApproachPlayer + applymovement LOCALID_SLATEPORT_HARBOR_CAPT_STERN, SlateportCity_Harbor_Movement_SternApproachPlayer waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterRight waitmovement 0 return @@ -234,8 +228,8 @@ SlateportCity_Harbor_EventScript_BoardFerry:: call_if_eq VAR_FACING, DIR_NORTH, SlateportCity_Harbor_EventScript_BoardFerryNorth call_if_eq VAR_FACING, DIR_EAST, SlateportCity_Harbor_EventScript_BoardFerryEast delay 30 - hideobjectat OBJ_EVENT_ID_PLAYER, 0 - setvar VAR_0x8004, LOCALID_SS_TIDAL + hideobjectat LOCALID_PLAYER, 0 + setvar VAR_0x8004, LOCALID_SLATEPORT_HARBOR_SS_TIDAL call Common_EventScript_FerryDepart return @@ -245,12 +239,12 @@ SlateportCity_Harbor_EventScript_CancelDestinationSelect:: end SlateportCity_Harbor_EventScript_BoardFerryEast:: - applymovement OBJ_EVENT_ID_PLAYER, SlateportCity_Harbor_Movement_BoardFerryEast + applymovement LOCALID_PLAYER, SlateportCity_Harbor_Movement_BoardFerryEast waitmovement 0 return SlateportCity_Harbor_EventScript_BoardFerryNorth:: - applymovement OBJ_EVENT_ID_PLAYER, SlateportCity_Harbor_Movement_BoardFerryNorth + applymovement LOCALID_PLAYER, SlateportCity_Harbor_Movement_BoardFerryNorth waitmovement 0 return diff --git a/data/maps/SlateportCity_Mart/map.json b/data/maps/SlateportCity_Mart/map.json index a86614bd148d..d0f698013eaa 100644 --- a/data/maps/SlateportCity_Mart/map.json +++ b/data/maps/SlateportCity_Mart/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_SLATEPORT_MART_CLERK", "graphics_id": "OBJ_EVENT_GFX_MART_EMPLOYEE", "x": 1, "y": 3, diff --git a/data/maps/SlateportCity_OceanicMuseum_1F/map.json b/data/maps/SlateportCity_OceanicMuseum_1F/map.json index fd3468a52d3f..14d6b0583d09 100644 --- a/data/maps/SlateportCity_OceanicMuseum_1F/map.json +++ b/data/maps/SlateportCity_OceanicMuseum_1F/map.json @@ -171,6 +171,7 @@ "flag": "FLAG_HIDE_SLATEPORT_MUSEUM_POPULATION" }, { + "local_id": "LOCALID_OCEANIC_MUSEUM_FAMILIAR_GRUNT", "graphics_id": "OBJ_EVENT_GFX_AQUA_MEMBER_M", "x": 9, "y": 4, diff --git a/data/maps/SlateportCity_OceanicMuseum_1F/scripts.inc b/data/maps/SlateportCity_OceanicMuseum_1F/scripts.inc index 8b464f73ae6c..08c8c41ff165 100644 --- a/data/maps/SlateportCity_OceanicMuseum_1F/scripts.inc +++ b/data/maps/SlateportCity_OceanicMuseum_1F/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_FAMILIAR_GRUNT, 13 - SlateportCity_OceanicMuseum_1F_MapScripts:: .byte 0 @@ -9,14 +7,14 @@ SlateportCity_OceanicMuseum_1F_EventScript_EntranceAttendant:: SlateportCity_OceanicMuseum_1F_EventScript_PayEntranceFeeLeft:: lockall - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 goto SlateportCity_OceanicMuseum_1F_EventScript_PayEntranceFee end SlateportCity_OceanicMuseum_1F_EventScript_PayEntranceFeeRight:: lockall - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterRight waitmovement 0 goto SlateportCity_OceanicMuseum_1F_EventScript_PayEntranceFee end @@ -27,7 +25,7 @@ SlateportCity_OceanicMuseum_1F_EventScript_PayEntranceFee:: goto_if_eq VAR_RESULT, YES, SlateportCity_OceanicMuseum_1F_EventScript_CheckMoneyForFee closemessage hidemoneybox - applymovement OBJ_EVENT_ID_PLAYER, SlateportCity_OceanicMuseum_1F_Movement_PushPlayerBackFromCounter + applymovement LOCALID_PLAYER, SlateportCity_OceanicMuseum_1F_Movement_PushPlayerBackFromCounter waitmovement 0 releaseall end @@ -49,7 +47,7 @@ SlateportCity_OceanicMuseum_1F_EventScript_NotEnoughMoney:: msgbox SlateportCity_OceanicMuseum_1F_Text_NotEnoughMoney, MSGBOX_DEFAULT closemessage hidemoneybox - applymovement OBJ_EVENT_ID_PLAYER, SlateportCity_OceanicMuseum_1F_Movement_PushPlayerBackFromCounter + applymovement LOCALID_PLAYER, SlateportCity_OceanicMuseum_1F_Movement_PushPlayerBackFromCounter waitmovement 0 releaseall end @@ -146,9 +144,9 @@ SlateportCity_OceanicMuseum_1F_EventScript_FamiliarGrunt:: faceplayer delay 8 playse SE_PIN - applymovement LOCALID_FAMILIAR_GRUNT, Common_Movement_ExclamationMark + applymovement LOCALID_OCEANIC_MUSEUM_FAMILIAR_GRUNT, Common_Movement_ExclamationMark waitmovement 0 - applymovement LOCALID_FAMILIAR_GRUNT, Common_Movement_Delay48 + applymovement LOCALID_OCEANIC_MUSEUM_FAMILIAR_GRUNT, Common_Movement_Delay48 waitmovement 0 msgbox SlateportCity_OceanicMuseum_1F_Text_RememberMeTakeThis, MSGBOX_DEFAULT giveitem ITEM_TM_THIEF @@ -163,21 +161,21 @@ SlateportCity_OceanicMuseum_1F_EventScript_FamiliarGrunt:: end SlateportCity_OceanicMuseum_1F_EventScript_FamiliarGruntExitNorth:: - applymovement OBJ_EVENT_ID_PLAYER, SlateportCity_OceanicMuseum_1F_Movement_PlayerWatchGruntExitNorth - applymovement LOCALID_FAMILIAR_GRUNT, SlateportCity_OceanicMuseum_1F_Movement_FamiliarGruntExitNorth + applymovement LOCALID_PLAYER, SlateportCity_OceanicMuseum_1F_Movement_PlayerWatchGruntExitNorth + applymovement LOCALID_OCEANIC_MUSEUM_FAMILIAR_GRUNT, SlateportCity_OceanicMuseum_1F_Movement_FamiliarGruntExitNorth waitmovement 0 goto SlateportCity_OceanicMuseum_1F_EventScript_FamiliarGruntExited end SlateportCity_OceanicMuseum_1F_EventScript_FamiliarGruntExitSouth:: - applymovement LOCALID_FAMILIAR_GRUNT, SlateportCity_OceanicMuseum_1F_Movement_FamiliarGruntExit + applymovement LOCALID_OCEANIC_MUSEUM_FAMILIAR_GRUNT, SlateportCity_OceanicMuseum_1F_Movement_FamiliarGruntExit waitmovement 0 goto SlateportCity_OceanicMuseum_1F_EventScript_FamiliarGruntExited end SlateportCity_OceanicMuseum_1F_EventScript_FamiliarGruntExitWestEast:: - applymovement OBJ_EVENT_ID_PLAYER, SlateportCity_OceanicMuseum_1F_Movement_PlayerWatchGruntExitWestEast - applymovement LOCALID_FAMILIAR_GRUNT, SlateportCity_OceanicMuseum_1F_Movement_FamiliarGruntExit + applymovement LOCALID_PLAYER, SlateportCity_OceanicMuseum_1F_Movement_PlayerWatchGruntExitWestEast + applymovement LOCALID_OCEANIC_MUSEUM_FAMILIAR_GRUNT, SlateportCity_OceanicMuseum_1F_Movement_FamiliarGruntExit waitmovement 0 goto SlateportCity_OceanicMuseum_1F_EventScript_FamiliarGruntExited end @@ -185,7 +183,7 @@ SlateportCity_OceanicMuseum_1F_EventScript_FamiliarGruntExitWestEast:: SlateportCity_OceanicMuseum_1F_EventScript_FamiliarGruntExited:: setflag FLAG_HIDE_SLATEPORT_CITY_OCEANIC_MUSEUM_FAMILIAR_AQUA_GRUNT playse SE_EXIT - removeobject LOCALID_FAMILIAR_GRUNT + removeobject LOCALID_OCEANIC_MUSEUM_FAMILIAR_GRUNT release end diff --git a/data/maps/SlateportCity_OceanicMuseum_2F/map.json b/data/maps/SlateportCity_OceanicMuseum_2F/map.json index bab9c1ea5813..7ada1f8ac16f 100644 --- a/data/maps/SlateportCity_OceanicMuseum_2F/map.json +++ b/data/maps/SlateportCity_OceanicMuseum_2F/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_OCEANIC_MUSEUM_2F_CAPT_STERN", "graphics_id": "OBJ_EVENT_GFX_SCIENTIST_1", "x": 13, "y": 6, @@ -28,6 +29,7 @@ "flag": "FLAG_HIDE_SLATEPORT_CITY_OCEANIC_MUSEUM_2F_CAPTAIN_STERN" }, { + "local_id": "LOCALID_OCEANIC_MUSEUM_2F_ARCHIE", "graphics_id": "OBJ_EVENT_GFX_ARCHIE", "x": 6, "y": 1, @@ -41,6 +43,7 @@ "flag": "FLAG_HIDE_SLATEPORT_CITY_OCEANIC_MUSEUM_2F_ARCHIE" }, { + "local_id": "LOCALID_OCEANIC_MUSEUM_2F_GRUNT_1", "graphics_id": "OBJ_EVENT_GFX_AQUA_MEMBER_M", "x": 6, "y": 1, @@ -54,6 +57,7 @@ "flag": "FLAG_HIDE_SLATEPORT_CITY_OCEANIC_MUSEUM_2F_AQUA_GRUNT_1" }, { + "local_id": "LOCALID_OCEANIC_MUSEUM_2F_GRUNT_2", "graphics_id": "OBJ_EVENT_GFX_AQUA_MEMBER_M", "x": 6, "y": 1, diff --git a/data/maps/SlateportCity_OceanicMuseum_2F/scripts.inc b/data/maps/SlateportCity_OceanicMuseum_2F/scripts.inc index 59131fd7ee2a..dbc6307d8d58 100644 --- a/data/maps/SlateportCity_OceanicMuseum_2F/scripts.inc +++ b/data/maps/SlateportCity_OceanicMuseum_2F/scripts.inc @@ -1,8 +1,3 @@ -.set LOCALID_CAPT_STERN, 1 -.set LOCALID_ARCHIE, 2 -.set LOCALID_GRUNT_1, 3 -.set LOCALID_GRUNT_2, 4 - SlateportCity_OceanicMuseum_2F_MapScripts:: .byte 0 @@ -12,14 +7,14 @@ SlateportCity_OceanicMuseum_2F_EventScript_CaptStern:: msgbox SlateportCity_OceanicMuseum_2F_Text_ThankYouForTheParts, MSGBOX_DEFAULT closemessage playbgm MUS_ENCOUNTER_AQUA, TRUE - addobject LOCALID_GRUNT_1 - applymovement LOCALID_GRUNT_1, SlateportCity_OceanicMuseum_2F_Movement_FirstGruntEnter + addobject LOCALID_OCEANIC_MUSEUM_2F_GRUNT_1 + applymovement LOCALID_OCEANIC_MUSEUM_2F_GRUNT_1, SlateportCity_OceanicMuseum_2F_Movement_FirstGruntEnter waitmovement 0 - addobject LOCALID_GRUNT_2 - applymovement LOCALID_GRUNT_2, SlateportCity_OceanicMuseum_2F_Movement_SecondGruntEnter + addobject LOCALID_OCEANIC_MUSEUM_2F_GRUNT_2 + applymovement LOCALID_OCEANIC_MUSEUM_2F_GRUNT_2, SlateportCity_OceanicMuseum_2F_Movement_SecondGruntEnter waitmovement 0 - applymovement LOCALID_GRUNT_1, SlateportCity_OceanicMuseum_2F_Movement_FirstGruntApproach - applymovement LOCALID_GRUNT_2, SlateportCity_OceanicMuseum_2F_Movement_SecondGruntApproach + applymovement LOCALID_OCEANIC_MUSEUM_2F_GRUNT_1, SlateportCity_OceanicMuseum_2F_Movement_FirstGruntApproach + applymovement LOCALID_OCEANIC_MUSEUM_2F_GRUNT_2, SlateportCity_OceanicMuseum_2F_Movement_SecondGruntApproach waitmovement 0 call_if_eq VAR_FACING, DIR_SOUTH, SlateportCity_OceanicMuseum_2F_EventScript_PlayerFaceGrunts call_if_eq VAR_FACING, DIR_EAST, SlateportCity_OceanicMuseum_2F_EventScript_PlayerFaceGrunts @@ -28,47 +23,47 @@ SlateportCity_OceanicMuseum_2F_EventScript_CaptStern:: msgbox SlateportCity_OceanicMuseum_2F_Text_SternWhoAreYou, MSGBOX_DEFAULT msgbox SlateportCity_OceanicMuseum_2F_Text_WereTeamAqua, MSGBOX_DEFAULT closemessage - applymovement LOCALID_GRUNT_2, SlateportCity_OceanicMuseum_2F_Movement_GruntApproachToBattle + applymovement LOCALID_OCEANIC_MUSEUM_2F_GRUNT_2, SlateportCity_OceanicMuseum_2F_Movement_GruntApproachToBattle waitmovement 0 call_if_eq VAR_FACING, DIR_SOUTH, SlateportCity_OceanicMuseum_2F_EventScript_PlayerApproachGruntSouth call_if_eq VAR_FACING, DIR_WEST, SlateportCity_OceanicMuseum_2F_EventScript_PlayerApproachGruntWest trainerbattle_no_intro TRAINER_GRUNT_MUSEUM_1, SlateportCity_OceanicMuseum_2F_Text_Grunt1Defeat msgbox SlateportCity_OceanicMuseum_2F_Text_BossGoingToBeFurious, MSGBOX_DEFAULT closemessage - applymovement LOCALID_GRUNT_2, SlateportCity_OceanicMuseum_2F_Movement_GruntDefeated + applymovement LOCALID_OCEANIC_MUSEUM_2F_GRUNT_2, SlateportCity_OceanicMuseum_2F_Movement_GruntDefeated waitmovement 0 - applymovement LOCALID_GRUNT_1, SlateportCity_OceanicMuseum_2F_Movement_GruntApproachToBattle + applymovement LOCALID_OCEANIC_MUSEUM_2F_GRUNT_1, SlateportCity_OceanicMuseum_2F_Movement_GruntApproachToBattle waitmovement 0 msgbox SlateportCity_OceanicMuseum_2F_Text_LetMeTakeCareOfThis, MSGBOX_DEFAULT trainerbattle_no_intro TRAINER_GRUNT_MUSEUM_2, SlateportCity_OceanicMuseum_2F_Text_Grunt2Defeat - applymovement LOCALID_GRUNT_1, SlateportCity_OceanicMuseum_2F_Movement_GruntDefeated + applymovement LOCALID_OCEANIC_MUSEUM_2F_GRUNT_1, SlateportCity_OceanicMuseum_2F_Movement_GruntDefeated waitmovement 0 - applymovement LOCALID_GRUNT_1, Common_Movement_WalkInPlaceFasterDown - applymovement LOCALID_GRUNT_2, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_OCEANIC_MUSEUM_2F_GRUNT_1, Common_Movement_WalkInPlaceFasterDown + applymovement LOCALID_OCEANIC_MUSEUM_2F_GRUNT_2, Common_Movement_WalkInPlaceFasterUp waitmovement 0 msgbox SlateportCity_OceanicMuseum_2F_Text_MeddlingKid, MSGBOX_DEFAULT closemessage delay 35 - addobject LOCALID_ARCHIE - applymovement LOCALID_ARCHIE, SlateportCity_OceanicMuseum_2F_Movement_ArchieEnter - applymovement LOCALID_GRUNT_2, SlateportCity_OceanicMuseum_2F_Movement_GruntMoveForArchie + addobject LOCALID_OCEANIC_MUSEUM_2F_ARCHIE + applymovement LOCALID_OCEANIC_MUSEUM_2F_ARCHIE, SlateportCity_OceanicMuseum_2F_Movement_ArchieEnter + applymovement LOCALID_OCEANIC_MUSEUM_2F_GRUNT_2, SlateportCity_OceanicMuseum_2F_Movement_GruntMoveForArchie waitmovement 0 msgbox SlateportCity_OceanicMuseum_2F_Text_CameToSeeWhatsTakingSoLong, MSGBOX_DEFAULT closemessage - applymovement LOCALID_ARCHIE, SlateportCity_OceanicMuseum_2F_Movement_ArchieApproachPlayer + applymovement LOCALID_OCEANIC_MUSEUM_2F_ARCHIE, SlateportCity_OceanicMuseum_2F_Movement_ArchieApproachPlayer waitmovement 0 msgbox SlateportCity_OceanicMuseum_2F_Text_ArchieWarning, MSGBOX_DEFAULT closemessage savebgm MUS_DUMMY fadedefaultbgm fadescreen FADE_TO_BLACK - removeobject LOCALID_ARCHIE - removeobject LOCALID_GRUNT_1 - removeobject LOCALID_GRUNT_2 + removeobject LOCALID_OCEANIC_MUSEUM_2F_ARCHIE + removeobject LOCALID_OCEANIC_MUSEUM_2F_GRUNT_1 + removeobject LOCALID_OCEANIC_MUSEUM_2F_GRUNT_2 fadescreen FADE_FROM_BLACK delay 30 setflag FLAG_HIDE_SLATEPORT_CITY_OCEANIC_MUSEUM_AQUA_GRUNTS - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterRight waitmovement 0 msgbox SlateportCity_OceanicMuseum_2F_Text_SternThankYouForSavingUs, MSGBOX_DEFAULT setvar VAR_0x8004, ITEM_DEVON_GOODS @@ -79,7 +74,7 @@ SlateportCity_OceanicMuseum_2F_EventScript_CaptStern:: playfanfare MUS_HEAL waitfanfare special HealPlayerParty - removeobject LOCALID_CAPT_STERN + removeobject LOCALID_OCEANIC_MUSEUM_2F_CAPT_STERN setflag FLAG_HIDE_ROUTE_110_TEAM_AQUA call_if_eq VAR_REGISTER_BIRCH_STATE, 0, SlateportCity_OceanicMuseum_2F_EventScript_ReadyRegisterBirch setflag FLAG_DELIVERED_DEVON_GOODS @@ -95,22 +90,22 @@ SlateportCity_OceanicMuseum_2F_EventScript_ReadyRegisterBirch:: return SlateportCity_OceanicMuseum_2F_EventScript_PlayerFaceGrunts:: - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 return SlateportCity_OceanicMuseum_2F_EventScript_SternFaceGrunts:: - applymovement LOCALID_CAPT_STERN, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_OCEANIC_MUSEUM_2F_CAPT_STERN, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 return SlateportCity_OceanicMuseum_2F_EventScript_PlayerApproachGruntSouth:: - applymovement OBJ_EVENT_ID_PLAYER, SlateportCity_OceanicMuseum_2F_Movement_PlayerApproachGruntSouth + applymovement LOCALID_PLAYER, SlateportCity_OceanicMuseum_2F_Movement_PlayerApproachGruntSouth waitmovement 0 return SlateportCity_OceanicMuseum_2F_EventScript_PlayerApproachGruntWest:: - applymovement OBJ_EVENT_ID_PLAYER, SlateportCity_OceanicMuseum_2F_Movement_PlayerApproachGruntWest + applymovement LOCALID_PLAYER, SlateportCity_OceanicMuseum_2F_Movement_PlayerApproachGruntWest waitmovement 0 return diff --git a/data/maps/SlateportCity_PokemonCenter_1F/map.json b/data/maps/SlateportCity_PokemonCenter_1F/map.json index 418210f0bd91..458ab934e065 100644 --- a/data/maps/SlateportCity_PokemonCenter_1F/map.json +++ b/data/maps/SlateportCity_PokemonCenter_1F/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_SLATEPORT_NURSE", "graphics_id": "OBJ_EVENT_GFX_NURSE", "x": 7, "y": 2, diff --git a/data/maps/SlateportCity_PokemonCenter_1F/scripts.inc b/data/maps/SlateportCity_PokemonCenter_1F/scripts.inc index 295409df81b0..76f9d58fd58b 100644 --- a/data/maps/SlateportCity_PokemonCenter_1F/scripts.inc +++ b/data/maps/SlateportCity_PokemonCenter_1F/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_NURSE, 1 - SlateportCity_PokemonCenter_1F_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, SlateportCity_PokemonCenter_1F_OnTransition map_script MAP_SCRIPT_ON_RESUME, CableClub_OnResume @@ -11,7 +9,7 @@ SlateportCity_PokemonCenter_1F_OnTransition: end SlateportCity_PokemonCenter_1F_EventScript_Nurse:: - setvar VAR_0x800B, LOCALID_NURSE + setvar VAR_0x800B, LOCALID_SLATEPORT_NURSE call Common_EventScript_PkmnCenterNurse waitmessage waitbuttonpress diff --git a/data/maps/SlateportCity_SternsShipyard_1F/map.json b/data/maps/SlateportCity_SternsShipyard_1F/map.json index 4414fcfb1218..cd5bd174aac7 100644 --- a/data/maps/SlateportCity_SternsShipyard_1F/map.json +++ b/data/maps/SlateportCity_SternsShipyard_1F/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_DOCK", "graphics_id": "OBJ_EVENT_GFX_MAN_1", "x": 5, "y": 5, diff --git a/data/maps/SlateportCity_SternsShipyard_1F/scripts.inc b/data/maps/SlateportCity_SternsShipyard_1F/scripts.inc index 8b4a4de54a69..cf2752fd2ce8 100644 --- a/data/maps/SlateportCity_SternsShipyard_1F/scripts.inc +++ b/data/maps/SlateportCity_SternsShipyard_1F/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_DOCK, 1 - SlateportCity_SternsShipyard_1F_MapScripts:: .byte 0 diff --git a/data/maps/SootopolisCity/map.json b/data/maps/SootopolisCity/map.json index a436d72cb3b4..d1d9242a5797 100644 --- a/data/maps/SootopolisCity/map.json +++ b/data/maps/SootopolisCity/map.json @@ -15,6 +15,7 @@ "connections": [], "object_events": [ { + "local_id": "LOCALID_SOOTOPOLIS_EXPERT", "graphics_id": "OBJ_EVENT_GFX_EXPERT_M", "x": 31, "y": 18, @@ -28,6 +29,7 @@ "flag": "0" }, { + "local_id": "LOCALID_SOOTOPOLIS_WOMAN_2", "graphics_id": "OBJ_EVENT_GFX_WOMAN_4", "x": 47, "y": 33, @@ -41,6 +43,7 @@ "flag": "FLAG_HIDE_SOOTOPOLIS_CITY_RESIDENTS" }, { + "local_id": "LOCALID_KIRI", "graphics_id": "OBJ_EVENT_GFX_GIRL_2", "x": 9, "y": 43, @@ -54,6 +57,7 @@ "flag": "0" }, { + "local_id": "LOCALID_SOOTOPOLIS_NINJA_BOY", "graphics_id": "OBJ_EVENT_GFX_NINJA_BOY", "x": 51, "y": 14, @@ -67,6 +71,7 @@ "flag": "0" }, { + "local_id": "LOCALID_SOOTOPOLIS_BOY_1", "graphics_id": "OBJ_EVENT_GFX_BOY_1", "x": 43, "y": 26, @@ -93,6 +98,7 @@ "flag": "FLAG_HIDE_SOOTOPOLIS_CITY_MAN_1" }, { + "local_id": "LOCALID_SOOTOPOLIS_STEVEN", "graphics_id": "OBJ_EVENT_GFX_STEVEN", "x": 20, "y": 36, @@ -106,6 +112,7 @@ "flag": "FLAG_HIDE_SOOTOPOLIS_CITY_STEVEN" }, { + "local_id": "LOCALID_SOOTOPOLIS_WOMAN_1", "graphics_id": "OBJ_EVENT_GFX_WOMAN_5", "x": 49, "y": 34, @@ -119,6 +126,7 @@ "flag": "0" }, { + "local_id": "LOCALID_SOOTOPOLIS_GROUDON", "graphics_id": "OBJ_EVENT_GFX_GROUDON_SIDE", "x": 28, "y": 44, @@ -132,6 +140,7 @@ "flag": "FLAG_HIDE_SOOTOPOLIS_CITY_GROUDON" }, { + "local_id": "LOCALID_SOOTOPOLIS_KYOGRE", "graphics_id": "OBJ_EVENT_GFX_KYOGRE_SIDE", "x": 34, "y": 44, @@ -145,6 +154,7 @@ "flag": "FLAG_HIDE_SOOTOPOLIS_CITY_KYOGRE" }, { + "local_id": "LOCALID_SOOTOPOLIS_RAYQUAZA", "graphics_id": "OBJ_EVENT_GFX_RAYQUAZA", "x": 31, "y": 41, @@ -158,6 +168,7 @@ "flag": "FLAG_HIDE_SOOTOPOLIS_CITY_RAYQUAZA" }, { + "local_id": "LOCALID_SOOTOPOLIS_MANIAC", "graphics_id": "OBJ_EVENT_GFX_MANIAC", "x": 17, "y": 44, @@ -171,6 +182,7 @@ "flag": "FLAG_HIDE_SOOTOPOLIS_CITY_RESIDENTS" }, { + "local_id": "LOCALID_SOOTOPOLIS_GIRL", "graphics_id": "OBJ_EVENT_GFX_GIRL_3", "x": 14, "y": 42, @@ -184,6 +196,7 @@ "flag": "FLAG_HIDE_SOOTOPOLIS_CITY_RESIDENTS" }, { + "local_id": "LOCALID_SOOTOPOLIS_BLACK_BELT", "graphics_id": "OBJ_EVENT_GFX_BLACK_BELT", "x": 17, "y": 40, @@ -197,6 +210,7 @@ "flag": "FLAG_HIDE_SOOTOPOLIS_CITY_RESIDENTS" }, { + "local_id": "LOCALID_SOOTOPOLIS_BOY_2", "graphics_id": "OBJ_EVENT_GFX_BOY_2", "x": 19, "y": 37, @@ -210,6 +224,7 @@ "flag": "FLAG_HIDE_SOOTOPOLIS_CITY_RESIDENTS" }, { + "local_id": "LOCALID_SOOTOPOLIS_MAXIE", "graphics_id": "OBJ_EVENT_GFX_MAXIE", "x": 29, "y": 33, @@ -223,6 +238,7 @@ "flag": "FLAG_HIDE_SOOTOPOLIS_CITY_MAXIE" }, { + "local_id": "LOCALID_SOOTOPOLIS_ARCHIE", "graphics_id": "OBJ_EVENT_GFX_ARCHIE", "x": 31, "y": 33, @@ -236,6 +252,7 @@ "flag": "FLAG_HIDE_SOOTOPOLIS_CITY_ARCHIE" }, { + "local_id": "LOCALID_SOOTOPOLIS_WALLACE", "graphics_id": "OBJ_EVENT_GFX_WALLACE", "x": 31, "y": 18, diff --git a/data/maps/SootopolisCity/scripts.inc b/data/maps/SootopolisCity/scripts.inc index 16e2d0325276..7566fc0088b0 100644 --- a/data/maps/SootopolisCity/scripts.inc +++ b/data/maps/SootopolisCity/scripts.inc @@ -1,21 +1,3 @@ -.set LOCALID_EXPERT, 1 -.set LOCALID_WOMAN_2, 2 -.set LOCALID_KIRI, 3 -.set LOCALID_NINJA_BOY, 4 -.set LOCALID_BOY_1, 5 -.set LOCALID_STEVEN, 7 -.set LOCALID_WOMAN_1, 8 -.set LOCALID_GROUDON, 9 -.set LOCALID_KYOGRE, 10 -.set LOCALID_RAYQUAZA, 11 -.set LOCALID_MANIAC, 12 -.set LOCALID_GIRL, 13 -.set LOCALID_BLACK_BELT, 14 -.set LOCALID_BOY_2, 15 -.set LOCALID_MAXIE, 16 -.set LOCALID_ARCHIE, 17 -.set LOCALID_WALLACE, 18 - SootopolisCity_MapScripts:: map_script MAP_SCRIPT_ON_LOAD, SootopolisCity_OnLoad map_script MAP_SCRIPT_ON_TRANSITION, SootopolisCity_OnTransition @@ -73,13 +55,13 @@ SootopolisCity_EventScript_HideMapNamePopup:: SootopolisCity_EventScript_SetBattleSpectators:: setobjectxyperm LOCALID_KIRI, 13, 48 - setobjectxyperm LOCALID_BOY_1, 46, 32 - setobjectxyperm LOCALID_NINJA_BOY, 48, 41 - setobjectxyperm LOCALID_WOMAN_1, 45, 43 + setobjectxyperm LOCALID_SOOTOPOLIS_BOY_1, 46, 32 + setobjectxyperm LOCALID_SOOTOPOLIS_NINJA_BOY, 48, 41 + setobjectxyperm LOCALID_SOOTOPOLIS_WOMAN_1, 45, 43 setobjectmovementtype LOCALID_KIRI, MOVEMENT_TYPE_FACE_UP - setobjectmovementtype LOCALID_BOY_1, MOVEMENT_TYPE_FACE_LEFT - setobjectmovementtype LOCALID_NINJA_BOY, MOVEMENT_TYPE_FACE_LEFT - setobjectmovementtype LOCALID_WOMAN_1, MOVEMENT_TYPE_FACE_LEFT + setobjectmovementtype LOCALID_SOOTOPOLIS_BOY_1, MOVEMENT_TYPE_FACE_LEFT + setobjectmovementtype LOCALID_SOOTOPOLIS_NINJA_BOY, MOVEMENT_TYPE_FACE_LEFT + setobjectmovementtype LOCALID_SOOTOPOLIS_WOMAN_1, MOVEMENT_TYPE_FACE_LEFT return SootopolisCity_EventScript_SetLayout:: @@ -119,43 +101,43 @@ SootopolisCity_EventScript_CheckSetEnterCaveOfOriginObjPos:: return SootopolisCity_EventScript_SetEnterCaveOfOriginObjPos:: - setobjectxyperm LOCALID_EXPERT, 30, 18 - setobjectxyperm LOCALID_STEVEN, 32, 18 + setobjectxyperm LOCALID_SOOTOPOLIS_EXPERT, 30, 18 + setobjectxyperm LOCALID_SOOTOPOLIS_STEVEN, 32, 18 return SootopolisCity_EventScript_SetExitCaveOfOriginObjPos:: - setobjectxyperm LOCALID_EXPERT, 30, 18 - setobjectxyperm LOCALID_WALLACE, 31, 18 - setobjectxyperm LOCALID_STEVEN, 32, 18 + setobjectxyperm LOCALID_SOOTOPOLIS_EXPERT, 30, 18 + setobjectxyperm LOCALID_SOOTOPOLIS_WALLACE, 31, 18 + setobjectxyperm LOCALID_SOOTOPOLIS_STEVEN, 32, 18 end SootopolisCity_EventScript_SetOutsideGymObjPos:: - setobjectxyperm LOCALID_EXPERT, 31, 18 - setobjectxyperm LOCALID_STEVEN, 29, 33 - setobjectxyperm LOCALID_MAXIE, 33, 35 - setobjectxyperm LOCALID_ARCHIE, 34, 35 + setobjectxyperm LOCALID_SOOTOPOLIS_EXPERT, 31, 18 + setobjectxyperm LOCALID_SOOTOPOLIS_STEVEN, 29, 33 + setobjectxyperm LOCALID_SOOTOPOLIS_MAXIE, 33, 35 + setobjectxyperm LOCALID_SOOTOPOLIS_ARCHIE, 34, 35 call_if_eq VAR_SOOTOPOLIS_WALLACE_STATE, 0, SootopolisCity_EventScript_SetWallaceMiddle call_if_eq VAR_SOOTOPOLIS_WALLACE_STATE, 1, SootopolisCity_EventScript_SetWallaceRight call_if_eq VAR_SOOTOPOLIS_WALLACE_STATE, 2, SootopolisCity_EventScript_SetWallaceLeft return SootopolisCity_EventScript_SetWallaceMiddle:: - setobjectxyperm LOCALID_WALLACE, 31, 33 - setobjectmovementtype LOCALID_WALLACE, MOVEMENT_TYPE_FACE_DOWN + setobjectxyperm LOCALID_SOOTOPOLIS_WALLACE, 31, 33 + setobjectmovementtype LOCALID_SOOTOPOLIS_WALLACE, MOVEMENT_TYPE_FACE_DOWN return SootopolisCity_EventScript_SetWallaceRight:: - setobjectxyperm LOCALID_WALLACE, 32, 33 - setobjectmovementtype LOCALID_WALLACE, MOVEMENT_TYPE_FACE_DOWN + setobjectxyperm LOCALID_SOOTOPOLIS_WALLACE, 32, 33 + setobjectmovementtype LOCALID_SOOTOPOLIS_WALLACE, MOVEMENT_TYPE_FACE_DOWN return SootopolisCity_EventScript_SetWallaceLeft:: - setobjectxyperm LOCALID_WALLACE, 30, 33 - setobjectmovementtype LOCALID_WALLACE, MOVEMENT_TYPE_FACE_DOWN + setobjectxyperm LOCALID_SOOTOPOLIS_WALLACE, 30, 33 + setobjectmovementtype LOCALID_SOOTOPOLIS_WALLACE, MOVEMENT_TYPE_FACE_DOWN return SootopolisCity_EventScript_SetExpertBlockCaveEntrance:: - setobjectxyperm LOCALID_EXPERT, 31, 18 + setobjectxyperm LOCALID_SOOTOPOLIS_EXPERT, 31, 18 return SootopolisCity_OnWarp: @@ -168,11 +150,11 @@ SootopolisCity_EventScript_PlayerFaceLegendaries:: end SootopolisCity_EventScript_PlayerFaceLegendaries1:: - turnobject OBJ_EVENT_ID_PLAYER, DIR_NORTH + turnobject LOCALID_PLAYER, DIR_NORTH return SootopolisCity_EventScript_PlayerFaceLegendaries2:: - turnobject OBJ_EVENT_ID_PLAYER, DIR_NORTH + turnobject LOCALID_PLAYER, DIR_NORTH setvar VAR_SKY_PILLAR_STATE, 3 return @@ -197,7 +179,7 @@ SootopolisCity_EventScript_StartLegendariesScene:: SootopolisCity_EventScript_LegendariesSceneFromPokeCenter:: delay 60 special SpawnCameraObject - applymovement OBJ_EVENT_ID_CAMERA, SootopolisCity_Movement_PanToActionFromPokeCenter + applymovement LOCALID_CAMERA, SootopolisCity_Movement_PanToActionFromPokeCenter waitmovement 0 special RemoveCameraObject delay 60 @@ -207,14 +189,14 @@ SootopolisCity_EventScript_LegendariesSceneFromPokeCenter:: setvar VAR_0x8004, FALSE @ Just do Groudon/Kyogre fight scene special Script_DoRayquazaScene waitstate - applymovement LOCALID_KYOGRE, Common_Movement_WalkInPlaceFasterLeft - applymovement LOCALID_GROUDON, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_SOOTOPOLIS_KYOGRE, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_SOOTOPOLIS_GROUDON, Common_Movement_WalkInPlaceFasterRight waitmovement 0 delay 60 waitse playmoncry SPECIES_KYOGRE, CRY_MODE_ENCOUNTER - applymovement LOCALID_KYOGRE, SootopolisCity_Movement_KyogreAttack - applymovement LOCALID_GROUDON, SootopolisCity_Movement_GroudonDefend + applymovement LOCALID_SOOTOPOLIS_KYOGRE, SootopolisCity_Movement_KyogreAttack + applymovement LOCALID_SOOTOPOLIS_GROUDON, SootopolisCity_Movement_GroudonDefend waitmovement 0 setvar VAR_0x8004, 1 @ vertical pan setvar VAR_0x8005, 1 @ horizontal pan @@ -222,13 +204,13 @@ SootopolisCity_EventScript_LegendariesSceneFromPokeCenter:: setvar VAR_0x8007, 5 @ shake delay special ShakeCamera waitstate - applymovement LOCALID_KYOGRE, SootopolisCity_Movement_KyogreMoveBack - applymovement LOCALID_GROUDON, SootopolisCity_Movement_GroudonMoveBack + applymovement LOCALID_SOOTOPOLIS_KYOGRE, SootopolisCity_Movement_KyogreMoveBack + applymovement LOCALID_SOOTOPOLIS_GROUDON, SootopolisCity_Movement_GroudonMoveBack waitmovement 0 waitse playmoncry SPECIES_GROUDON, CRY_MODE_ENCOUNTER - applymovement LOCALID_KYOGRE, SootopolisCity_Movement_KyogreDefend - applymovement LOCALID_GROUDON, SootopolisCity_Movement_GroudonAttack + applymovement LOCALID_SOOTOPOLIS_KYOGRE, SootopolisCity_Movement_KyogreDefend + applymovement LOCALID_SOOTOPOLIS_GROUDON, SootopolisCity_Movement_GroudonAttack waitmovement 0 setvar VAR_0x8004, 1 @ vertical pan setvar VAR_0x8005, 1 @ horizontal pan @@ -236,13 +218,13 @@ SootopolisCity_EventScript_LegendariesSceneFromPokeCenter:: setvar VAR_0x8007, 5 @ shake delay special ShakeCamera waitstate - applymovement LOCALID_KYOGRE, SootopolisCity_Movement_KyogreMoveBack - applymovement LOCALID_GROUDON, SootopolisCity_Movement_GroudonMoveBack + applymovement LOCALID_SOOTOPOLIS_KYOGRE, SootopolisCity_Movement_KyogreMoveBack + applymovement LOCALID_SOOTOPOLIS_GROUDON, SootopolisCity_Movement_GroudonMoveBack waitmovement 0 waitse playmoncry SPECIES_KYOGRE, CRY_MODE_ENCOUNTER - applymovement LOCALID_KYOGRE, SootopolisCity_Movement_KyogreAttack - applymovement LOCALID_GROUDON, SootopolisCity_Movement_GroudonDefend + applymovement LOCALID_SOOTOPOLIS_KYOGRE, SootopolisCity_Movement_KyogreAttack + applymovement LOCALID_SOOTOPOLIS_GROUDON, SootopolisCity_Movement_GroudonDefend waitmovement 0 setvar VAR_0x8004, 1 @ vertical pan setvar VAR_0x8005, 1 @ horizontal pan @@ -250,13 +232,13 @@ SootopolisCity_EventScript_LegendariesSceneFromPokeCenter:: setvar VAR_0x8007, 5 @ shake delay special ShakeCamera waitstate - applymovement LOCALID_KYOGRE, SootopolisCity_Movement_KyogreMoveBack - applymovement LOCALID_GROUDON, SootopolisCity_Movement_GroudonMoveBack + applymovement LOCALID_SOOTOPOLIS_KYOGRE, SootopolisCity_Movement_KyogreMoveBack + applymovement LOCALID_SOOTOPOLIS_GROUDON, SootopolisCity_Movement_GroudonMoveBack waitmovement 0 special SpawnCameraObject - applymovement LOCALID_KYOGRE, SootopolisCity_Movement_KyogreIdle - applymovement LOCALID_GROUDON, SootopolisCity_Movement_GroudonIdle - applymovement OBJ_EVENT_ID_CAMERA, SootopolisCity_Movement_PanBackToPokeCenter + applymovement LOCALID_SOOTOPOLIS_KYOGRE, SootopolisCity_Movement_KyogreIdle + applymovement LOCALID_SOOTOPOLIS_GROUDON, SootopolisCity_Movement_GroudonIdle + applymovement LOCALID_CAMERA, SootopolisCity_Movement_PanBackToPokeCenter waitmovement 0 special RemoveCameraObject setvar VAR_SOOTOPOLIS_CITY_STATE, 2 @@ -297,7 +279,7 @@ SootopolisCity_Movement_PanBackToPokeCenter: SootopolisCity_EventScript_LegendariesSceneFromDive:: delay 60 special SpawnCameraObject - applymovement OBJ_EVENT_ID_CAMERA, SootopolisCity_Movement_PanToActionFromDive + applymovement LOCALID_CAMERA, SootopolisCity_Movement_PanToActionFromDive waitmovement 0 special RemoveCameraObject delay 60 @@ -307,14 +289,14 @@ SootopolisCity_EventScript_LegendariesSceneFromDive:: setvar VAR_0x8004, FALSE @ Just do Groudon/Kyogre fight scene special Script_DoRayquazaScene waitstate - applymovement LOCALID_KYOGRE, Common_Movement_WalkInPlaceFasterLeft - applymovement LOCALID_GROUDON, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_SOOTOPOLIS_KYOGRE, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_SOOTOPOLIS_GROUDON, Common_Movement_WalkInPlaceFasterRight waitmovement 0 delay 60 waitse playmoncry SPECIES_KYOGRE, CRY_MODE_ENCOUNTER - applymovement LOCALID_KYOGRE, SootopolisCity_Movement_KyogreAttack - applymovement LOCALID_GROUDON, SootopolisCity_Movement_GroudonDefend + applymovement LOCALID_SOOTOPOLIS_KYOGRE, SootopolisCity_Movement_KyogreAttack + applymovement LOCALID_SOOTOPOLIS_GROUDON, SootopolisCity_Movement_GroudonDefend waitmovement 0 setvar VAR_0x8004, 1 @ vertical pan setvar VAR_0x8005, 1 @ horizontal pan @@ -322,13 +304,13 @@ SootopolisCity_EventScript_LegendariesSceneFromDive:: setvar VAR_0x8007, 5 @ shake delay special ShakeCamera waitstate - applymovement LOCALID_KYOGRE, SootopolisCity_Movement_KyogreMoveBack - applymovement LOCALID_GROUDON, SootopolisCity_Movement_GroudonMoveBack + applymovement LOCALID_SOOTOPOLIS_KYOGRE, SootopolisCity_Movement_KyogreMoveBack + applymovement LOCALID_SOOTOPOLIS_GROUDON, SootopolisCity_Movement_GroudonMoveBack waitmovement 0 waitse playmoncry SPECIES_GROUDON, CRY_MODE_ENCOUNTER - applymovement LOCALID_KYOGRE, SootopolisCity_Movement_KyogreDefend - applymovement LOCALID_GROUDON, SootopolisCity_Movement_GroudonAttack + applymovement LOCALID_SOOTOPOLIS_KYOGRE, SootopolisCity_Movement_KyogreDefend + applymovement LOCALID_SOOTOPOLIS_GROUDON, SootopolisCity_Movement_GroudonAttack waitmovement 0 setvar VAR_0x8004, 1 @ vertical pan setvar VAR_0x8005, 1 @ horizontal pan @@ -336,13 +318,13 @@ SootopolisCity_EventScript_LegendariesSceneFromDive:: setvar VAR_0x8007, 5 @ shake delay special ShakeCamera waitstate - applymovement LOCALID_KYOGRE, SootopolisCity_Movement_KyogreMoveBack - applymovement LOCALID_GROUDON, SootopolisCity_Movement_GroudonMoveBack + applymovement LOCALID_SOOTOPOLIS_KYOGRE, SootopolisCity_Movement_KyogreMoveBack + applymovement LOCALID_SOOTOPOLIS_GROUDON, SootopolisCity_Movement_GroudonMoveBack waitmovement 0 waitse playmoncry SPECIES_KYOGRE, CRY_MODE_ENCOUNTER - applymovement LOCALID_KYOGRE, SootopolisCity_Movement_KyogreAttack - applymovement LOCALID_GROUDON, SootopolisCity_Movement_GroudonDefend + applymovement LOCALID_SOOTOPOLIS_KYOGRE, SootopolisCity_Movement_KyogreAttack + applymovement LOCALID_SOOTOPOLIS_GROUDON, SootopolisCity_Movement_GroudonDefend waitmovement 0 setvar VAR_0x8004, 1 @ vertical pan setvar VAR_0x8005, 1 @ horizontal pan @@ -350,13 +332,13 @@ SootopolisCity_EventScript_LegendariesSceneFromDive:: setvar VAR_0x8007, 5 @ shake delay special ShakeCamera waitstate - applymovement LOCALID_KYOGRE, SootopolisCity_Movement_KyogreMoveBack - applymovement LOCALID_GROUDON, SootopolisCity_Movement_GroudonMoveBack + applymovement LOCALID_SOOTOPOLIS_KYOGRE, SootopolisCity_Movement_KyogreMoveBack + applymovement LOCALID_SOOTOPOLIS_GROUDON, SootopolisCity_Movement_GroudonMoveBack waitmovement 0 special SpawnCameraObject - applymovement LOCALID_KYOGRE, SootopolisCity_Movement_KyogreIdle - applymovement LOCALID_GROUDON, SootopolisCity_Movement_GroudonIdle - applymovement OBJ_EVENT_ID_CAMERA, SootopolisCity_Movement_PanBackToDive + applymovement LOCALID_SOOTOPOLIS_KYOGRE, SootopolisCity_Movement_KyogreIdle + applymovement LOCALID_SOOTOPOLIS_GROUDON, SootopolisCity_Movement_GroudonIdle + applymovement LOCALID_CAMERA, SootopolisCity_Movement_PanBackToDive waitmovement 0 special RemoveCameraObject setvar VAR_SOOTOPOLIS_CITY_STATE, 2 @@ -486,21 +468,21 @@ SootopolisCity_EventScript_StartRayquazaScene:: SootopolisCity_EventScript_RayquazaSceneFromPokeCenter:: delay 60 special SpawnCameraObject - applymovement OBJ_EVENT_ID_CAMERA, SootopolisCity_Movement_PanToActionFromPokeCenter + applymovement LOCALID_CAMERA, SootopolisCity_Movement_PanToActionFromPokeCenter waitmovement 0 special RemoveCameraObject delay 60 fadescreenspeed FADE_TO_BLACK, 8 call SootopolisCity_EventScript_SetRoughWater - removeobject LOCALID_GROUDON - removeobject LOCALID_KYOGRE - addobject LOCALID_RAYQUAZA + removeobject LOCALID_SOOTOPOLIS_GROUDON + removeobject LOCALID_SOOTOPOLIS_KYOGRE + addobject LOCALID_SOOTOPOLIS_RAYQUAZA setvar VAR_0x8004, TRUE special Script_DoRayquazaScene waitstate playse SE_THUNDER special SpawnCameraObject - applymovement OBJ_EVENT_ID_CAMERA, SootopolisCity_Movement_PanUp + applymovement LOCALID_CAMERA, SootopolisCity_Movement_PanUp waitmovement 0 waitse playmoncry SPECIES_RAYQUAZA, CRY_MODE_ENCOUNTER @@ -521,9 +503,9 @@ SootopolisCity_EventScript_RayquazaSceneFromPokeCenter:: waitmoncry setweather WEATHER_NONE doweather - applymovement LOCALID_RAYQUAZA, SootopolisCity_Movement_RayquazaFlyOff + applymovement LOCALID_SOOTOPOLIS_RAYQUAZA, SootopolisCity_Movement_RayquazaFlyOff waitmovement 0 - removeobject LOCALID_RAYQUAZA + removeobject LOCALID_SOOTOPOLIS_RAYQUAZA special WaitWeather waitstate clearflag FLAG_SYS_WEATHER_CTRL @@ -539,21 +521,21 @@ SootopolisCity_EventScript_RayquazaSceneFromPokeCenter:: SootopolisCity_EventScript_RayquazaSceneFromDive:: delay 60 special SpawnCameraObject - applymovement OBJ_EVENT_ID_CAMERA, SootopolisCity_Movement_PanToActionFromDive + applymovement LOCALID_CAMERA, SootopolisCity_Movement_PanToActionFromDive waitmovement 0 special RemoveCameraObject delay 60 fadescreenspeed FADE_TO_BLACK, 8 call SootopolisCity_EventScript_SetRoughWater - removeobject LOCALID_GROUDON - removeobject LOCALID_KYOGRE - addobject LOCALID_RAYQUAZA + removeobject LOCALID_SOOTOPOLIS_GROUDON + removeobject LOCALID_SOOTOPOLIS_KYOGRE + addobject LOCALID_SOOTOPOLIS_RAYQUAZA setvar VAR_0x8004, TRUE special Script_DoRayquazaScene waitstate special SpawnCameraObject - applymovement OBJ_EVENT_ID_CAMERA, SootopolisCity_Movement_PanUp - applymovement OBJ_EVENT_ID_PLAYER, SootopolisCity_Movement_PlayerApproachLegendaries + applymovement LOCALID_CAMERA, SootopolisCity_Movement_PanUp + applymovement LOCALID_PLAYER, SootopolisCity_Movement_PlayerApproachLegendaries waitmovement 0 waitse playmoncry SPECIES_RAYQUAZA, CRY_MODE_ENCOUNTER @@ -574,9 +556,9 @@ SootopolisCity_EventScript_RayquazaSceneFromDive:: waitmoncry setweather WEATHER_NONE doweather - applymovement LOCALID_RAYQUAZA, SootopolisCity_Movement_RayquazaFlyOff + applymovement LOCALID_SOOTOPOLIS_RAYQUAZA, SootopolisCity_Movement_RayquazaFlyOff waitmovement 0 - removeobject LOCALID_RAYQUAZA + removeobject LOCALID_SOOTOPOLIS_RAYQUAZA special WaitWeather waitstate clearflag FLAG_SYS_WEATHER_CTRL @@ -771,12 +753,12 @@ SootopolisCity_EventScript_KiriLikeSeasonBornIn:: SootopolisCity_EventScript_Woman2:: lockall - applymovement LOCALID_WOMAN_2, Common_Movement_FacePlayer + applymovement LOCALID_SOOTOPOLIS_WOMAN_2, Common_Movement_FacePlayer waitmovement 0 goto_if_eq VAR_SOOTOPOLIS_CITY_STATE, 5, SootopolisCity_EventScript_Woman2Rayquaza msgbox SootopolisCity_Text_WeatherWentWild, MSGBOX_DEFAULT closemessage - applymovement LOCALID_WOMAN_2, Common_Movement_FaceOriginalDirection + applymovement LOCALID_SOOTOPOLIS_WOMAN_2, Common_Movement_FaceOriginalDirection waitmovement 0 releaseall end @@ -812,7 +794,7 @@ SootopolisCity_EventScript_Woman1:: SootopolisCity_EventScript_Woman1Legendaries:: msgbox SootopolisCity_Text_GiganticPokemonFight, MSGBOX_DEFAULT closemessage - applymovement LOCALID_WOMAN_1, Common_Movement_FaceOriginalDirection + applymovement LOCALID_SOOTOPOLIS_WOMAN_1, Common_Movement_FaceOriginalDirection waitmovement 0 release end @@ -829,14 +811,14 @@ SootopolisCity_EventScript_Woman1Rayquaza:: SootopolisCity_EventScript_NinjaBoy:: lockall - applymovement LOCALID_NINJA_BOY, Common_Movement_FacePlayer + applymovement LOCALID_SOOTOPOLIS_NINJA_BOY, Common_Movement_FacePlayer waitmovement 0 goto_if_eq VAR_SOOTOPOLIS_CITY_STATE, 5, SootopolisCity_EventScript_NinjaBoyRayquaza goto_if_ge VAR_SOOTOPOLIS_CITY_STATE, 6, SootopolisCity_EventScript_NinjaBoyNormal goto_if_le VAR_SOOTOPOLIS_CITY_STATE, 1, SootopolisCity_EventScript_NinjaBoyNormal msgbox SootopolisCity_Text_ThisIsWicked, MSGBOX_DEFAULT closemessage - applymovement LOCALID_NINJA_BOY, Common_Movement_FaceOriginalDirection + applymovement LOCALID_SOOTOPOLIS_NINJA_BOY, Common_Movement_FaceOriginalDirection waitmovement 0 release end @@ -853,7 +835,7 @@ SootopolisCity_EventScript_NinjaBoyRayquaza:: SootopolisCity_EventScript_Boy1:: lockall - applymovement LOCALID_BOY_1, Common_Movement_FacePlayer + applymovement LOCALID_SOOTOPOLIS_BOY_1, Common_Movement_FacePlayer waitmovement 0 goto_if_eq VAR_SOOTOPOLIS_CITY_STATE, 5, SootopolisCity_EventScript_Boy1Rayquaza goto_if_set FLAG_SYS_GAME_CLEAR, SootopolisCity_EventScript_Boy1GameClear @@ -861,7 +843,7 @@ SootopolisCity_EventScript_Boy1:: goto_if_le VAR_SOOTOPOLIS_CITY_STATE, 1, SootopolisCity_EventScript_Boy1Normal msgbox SootopolisCity_Text_GiantPokemonSuddenlyAppeared, MSGBOX_DEFAULT closemessage - applymovement LOCALID_BOY_1, Common_Movement_FaceOriginalDirection + applymovement LOCALID_SOOTOPOLIS_BOY_1, Common_Movement_FaceOriginalDirection waitmovement 0 release end @@ -895,7 +877,7 @@ EventScript_ClosedSootopolisDoor:: SootopolisCity_EventScript_Steven:: lockall - applymovement LOCALID_STEVEN, Common_Movement_FacePlayer + applymovement LOCALID_SOOTOPOLIS_STEVEN, Common_Movement_FacePlayer waitmovement 0 call_if_unset FLAG_STEVEN_GUIDES_TO_CAVE_OF_ORIGIN, SootopolisCity_EventScript_StevenLeadPlayerCaveOfOrigin goto_if_eq VAR_SOOTOPOLIS_CITY_STATE, 2, SootopolisCity_EventScript_StevenHelpWallace @@ -928,33 +910,33 @@ SootopolisCity_EventScript_StevenLeadPlayerCaveOfOrigin:: call_if_eq VAR_FACING, DIR_NORTH, SootopolisCity_EventScript_StartWalkToCaveOfOriginNorth msgbox SootopolisCity_Text_DoesThisMakeYourFearPokemon, MSGBOX_DEFAULT closemessage - applymovement LOCALID_STEVEN, SootopolisCity_Movement_StevenWalkToCaveOfOrigin - applymovement OBJ_EVENT_ID_PLAYER, SootopolisCity_Movement_PlayerWalkToCaveOfOrigin + applymovement LOCALID_SOOTOPOLIS_STEVEN, SootopolisCity_Movement_StevenWalkToCaveOfOrigin + applymovement LOCALID_PLAYER, SootopolisCity_Movement_PlayerWalkToCaveOfOrigin waitmovement 0 delay 120 - applymovement LOCALID_EXPERT, SootopolisCity_Movement_ExpertMoveAside + applymovement LOCALID_SOOTOPOLIS_EXPERT, SootopolisCity_Movement_ExpertMoveAside waitmovement 0 - applymovement LOCALID_STEVEN, SootopolisCity_Movement_StevenArriveCaveEntrance - applymovement OBJ_EVENT_ID_PLAYER, SootopolisCity_Movement_PlayerArriveCaveEntrance + applymovement LOCALID_SOOTOPOLIS_STEVEN, SootopolisCity_Movement_StevenArriveCaveEntrance + applymovement LOCALID_PLAYER, SootopolisCity_Movement_PlayerArriveCaveEntrance waitmovement 0 msgbox SootopolisCity_Text_HereWereAreHelpWallace, MSGBOX_DEFAULT closemessage setflag FLAG_STEVEN_GUIDES_TO_CAVE_OF_ORIGIN - applymovement OBJ_EVENT_ID_PLAYER, SootopolisCity_Movement_PlayerEnterCaveOfOrigin + applymovement LOCALID_PLAYER, SootopolisCity_Movement_PlayerEnterCaveOfOrigin waitmovement 0 warp MAP_CAVE_OF_ORIGIN_ENTRANCE, 9, 20 waitstate end SootopolisCity_EventScript_StartWalkToCaveOfOriginWest:: - applymovement LOCALID_STEVEN, SootopolisCity_Movement_StevenStartWalkToCaveOfOrigin - applymovement OBJ_EVENT_ID_PLAYER, SootopolisCity_Movement_PlayerStartWalkToCaveOfOriginWest + applymovement LOCALID_SOOTOPOLIS_STEVEN, SootopolisCity_Movement_StevenStartWalkToCaveOfOrigin + applymovement LOCALID_PLAYER, SootopolisCity_Movement_PlayerStartWalkToCaveOfOriginWest waitmovement 0 return SootopolisCity_EventScript_StartWalkToCaveOfOriginNorth:: - applymovement LOCALID_STEVEN, SootopolisCity_Movement_StevenStartWalkToCaveOfOrigin - applymovement OBJ_EVENT_ID_PLAYER, SootopolisCity_Movement_PlayerStartWalkToCaveOfOriginNorth + applymovement LOCALID_SOOTOPOLIS_STEVEN, SootopolisCity_Movement_StevenStartWalkToCaveOfOrigin + applymovement LOCALID_PLAYER, SootopolisCity_Movement_PlayerStartWalkToCaveOfOriginNorth waitmovement 0 return @@ -1224,12 +1206,12 @@ SootopolisCity_Movement_PlayerEnterCaveOfOrigin: SootopolisCity_EventScript_Boy2:: lockall - applymovement LOCALID_BOY_2, Common_Movement_FacePlayer + applymovement LOCALID_SOOTOPOLIS_BOY_2, Common_Movement_FacePlayer waitmovement 0 goto_if_eq VAR_SOOTOPOLIS_CITY_STATE, 5, SootopolisCity_EventScript_Boy2Rayquaza msgbox SootopolisCity_Text_TwoPokemonArentAngry, MSGBOX_DEFAULT closemessage - applymovement LOCALID_BOY_2, Common_Movement_FaceOriginalDirection + applymovement LOCALID_SOOTOPOLIS_BOY_2, Common_Movement_FaceOriginalDirection waitmovement 0 releaseall end @@ -1245,17 +1227,17 @@ SootopolisCity_EventScript_BlackBelt:: goto_if_eq VAR_SOOTOPOLIS_CITY_STATE, 5, SootopolisCity_EventScript_BlackBeltRayquaza msgbox SootopolisCity_Text_GoRedAndBlueMon, MSGBOX_DEFAULT closemessage - applymovement LOCALID_BLACK_BELT, Common_Movement_FacePlayer + applymovement LOCALID_SOOTOPOLIS_BLACK_BELT, Common_Movement_FacePlayer waitmovement 0 msgbox SootopolisCity_Text_DoYouKnowMonNames, MSGBOX_DEFAULT closemessage - applymovement LOCALID_BLACK_BELT, Common_Movement_FaceOriginalDirection + applymovement LOCALID_SOOTOPOLIS_BLACK_BELT, Common_Movement_FaceOriginalDirection waitmovement 0 releaseall end SootopolisCity_EventScript_BlackBeltRayquaza:: - applymovement LOCALID_BLACK_BELT, Common_Movement_FacePlayer + applymovement LOCALID_SOOTOPOLIS_BLACK_BELT, Common_Movement_FacePlayer waitmovement 0 msgbox SootopolisCity_Text_GreenOneSettlesThings, MSGBOX_DEFAULT releaseall @@ -1263,12 +1245,12 @@ SootopolisCity_EventScript_BlackBeltRayquaza:: SootopolisCity_EventScript_Girl:: lockall - applymovement LOCALID_GIRL, Common_Movement_FacePlayer + applymovement LOCALID_SOOTOPOLIS_GIRL, Common_Movement_FacePlayer waitmovement 0 goto_if_eq VAR_SOOTOPOLIS_CITY_STATE, 5, SootopolisCity_EventScript_GirlRayquaza msgbox SootopolisCity_Text_SootopolisWillBeWrecked, MSGBOX_DEFAULT closemessage - applymovement LOCALID_GIRL, Common_Movement_FaceOriginalDirection + applymovement LOCALID_SOOTOPOLIS_GIRL, Common_Movement_FaceOriginalDirection waitmovement 0 releaseall end @@ -1281,12 +1263,12 @@ SootopolisCity_EventScript_GirlRayquaza:: SootopolisCity_EventScript_Maniac:: lockall - applymovement LOCALID_MANIAC, Common_Movement_FacePlayer + applymovement LOCALID_SOOTOPOLIS_MANIAC, Common_Movement_FacePlayer waitmovement 0 goto_if_eq VAR_SOOTOPOLIS_CITY_STATE, 5, SootopolisCity_EventScript_ManiacRayquaza msgbox SootopolisCity_Text_SeeingLegendWithOwnEyes, MSGBOX_DEFAULT closemessage - applymovement LOCALID_MANIAC, Common_Movement_FaceOriginalDirection + applymovement LOCALID_SOOTOPOLIS_MANIAC, Common_Movement_FaceOriginalDirection waitmovement 0 releaseall end @@ -1319,16 +1301,16 @@ SootopolisCity_EventScript_GiveWaterfall:: end SootopolisCity_EventScript_WallaceMoveFromGym:: - applymovement LOCALID_WALLACE, SootopolisCity_Movement_WallaceMoveFromGym + applymovement LOCALID_SOOTOPOLIS_WALLACE, SootopolisCity_Movement_WallaceMoveFromGym waitmovement 0 - copyobjectxytoperm LOCALID_WALLACE + copyobjectxytoperm LOCALID_SOOTOPOLIS_WALLACE setvar VAR_SOOTOPOLIS_WALLACE_STATE, 1 return SootopolisCity_EventScript_WallaceMoveFromGymWest:: - applymovement LOCALID_WALLACE, SootopolisCity_Movement_WallaceMoveFromGymWest + applymovement LOCALID_SOOTOPOLIS_WALLACE, SootopolisCity_Movement_WallaceMoveFromGymWest waitmovement 0 - copyobjectxytoperm LOCALID_WALLACE + copyobjectxytoperm LOCALID_SOOTOPOLIS_WALLACE setvar VAR_SOOTOPOLIS_WALLACE_STATE, 2 return diff --git a/data/maps/SootopolisCity_Gym_1F/scripts.inc b/data/maps/SootopolisCity_Gym_1F/scripts.inc index 5ae8145299da..22fae5922c3c 100644 --- a/data/maps/SootopolisCity_Gym_1F/scripts.inc +++ b/data/maps/SootopolisCity_Gym_1F/scripts.inc @@ -67,7 +67,7 @@ SootopolisCity_Gym_1F_EventScript_UnlockThirdStairs:: SootopolisCity_Gym_1F_EventScript_FallThroughIce:: lockall delay 20 - applymovement OBJ_EVENT_ID_PLAYER, SootopolisCity_Gym_1F_Movement_FallThroughIce + applymovement LOCALID_PLAYER, SootopolisCity_Gym_1F_Movement_FallThroughIce waitmovement 0 playse SE_FALL delay 60 diff --git a/data/maps/SootopolisCity_Mart/map.json b/data/maps/SootopolisCity_Mart/map.json index 1f75af5de437..cf8dbae571ec 100644 --- a/data/maps/SootopolisCity_Mart/map.json +++ b/data/maps/SootopolisCity_Mart/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_SOOTOPOLIS_MART_CLERK", "graphics_id": "OBJ_EVENT_GFX_MART_EMPLOYEE", "x": 1, "y": 3, diff --git a/data/maps/SootopolisCity_MysteryEventsHouse_1F/map.json b/data/maps/SootopolisCity_MysteryEventsHouse_1F/map.json index 0b2ad974c0fa..f9307a231bd6 100644 --- a/data/maps/SootopolisCity_MysteryEventsHouse_1F/map.json +++ b/data/maps/SootopolisCity_MysteryEventsHouse_1F/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_MYSTERY_EVENTS_OLD_MAN", "graphics_id": "OBJ_EVENT_GFX_OLD_MAN", "x": 6, "y": 4, diff --git a/data/maps/SootopolisCity_MysteryEventsHouse_1F/scripts.inc b/data/maps/SootopolisCity_MysteryEventsHouse_1F/scripts.inc index 374adbfc66ad..9553fd9f774c 100644 --- a/data/maps/SootopolisCity_MysteryEventsHouse_1F/scripts.inc +++ b/data/maps/SootopolisCity_MysteryEventsHouse_1F/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_OLD_MAN, 1 - SootopolisCity_MysteryEventsHouse_1F_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, SootopolisCity_MysteryEventsHouse_1F_OnTransition map_script MAP_SCRIPT_ON_FRAME_TABLE, SootopolisCity_MysteryEventsHouse_1F_OnFrame @@ -13,14 +11,14 @@ SootopolisCity_MysteryEventsHouse_1F_OnTransition: SootopolisCity_MysteryEventsHouse_1F_EventScript_SetTrainerVisitingLayout:: setvar VAR_TEMP_1, 1 - setobjectxyperm LOCALID_OLD_MAN, 3, 2 - setobjectmovementtype LOCALID_OLD_MAN, MOVEMENT_TYPE_FACE_DOWN + setobjectxyperm LOCALID_MYSTERY_EVENTS_OLD_MAN, 3, 2 + setobjectmovementtype LOCALID_MYSTERY_EVENTS_OLD_MAN, MOVEMENT_TYPE_FACE_DOWN setmaplayoutindex LAYOUT_SOOTOPOLIS_CITY_MYSTERY_EVENTS_HOUSE_1F_STAIRS_UNBLOCKED return SootopolisCity_MysteryEventsHouse_1F_EventScript_MoveOldManToDoor:: - setobjectxyperm LOCALID_OLD_MAN, 2, 2 - setobjectmovementtype LOCALID_OLD_MAN, MOVEMENT_TYPE_FACE_RIGHT + setobjectxyperm LOCALID_MYSTERY_EVENTS_OLD_MAN, 2, 2 + setobjectmovementtype LOCALID_MYSTERY_EVENTS_OLD_MAN, MOVEMENT_TYPE_FACE_RIGHT return SootopolisCity_MysteryEventsHouse_1F_OnFrame: @@ -31,12 +29,12 @@ SootopolisCity_MysteryEventsHouse_1F_OnFrame: SootopolisCity_MysteryEventsHouse_1F_EventScript_OldManCommentOnBattle:: lockall - applymovement OBJ_EVENT_ID_PLAYER, SootopolisCity_MysteryEventsHouse_1F_Movement_PlayerExitStairs + applymovement LOCALID_PLAYER, SootopolisCity_MysteryEventsHouse_1F_Movement_PlayerExitStairs waitmovement 0 - applymovement LOCALID_OLD_MAN, SootopolisCity_MysteryEventsHouse_1F_Movement_OldManWalkBehindPlayer + applymovement LOCALID_MYSTERY_EVENTS_OLD_MAN, SootopolisCity_MysteryEventsHouse_1F_Movement_OldManWalkBehindPlayer waitmovement 0 - copyobjectxytoperm LOCALID_OLD_MAN - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp + copyobjectxytoperm LOCALID_MYSTERY_EVENTS_OLD_MAN + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 call_if_eq VAR_SOOTOPOLIS_MYSTERY_EVENTS_STATE, 1, SootopolisCity_MysteryEventsHouse_1F_EventScript_BattleWonComment call_if_eq VAR_SOOTOPOLIS_MYSTERY_EVENTS_STATE, 2, SootopolisCity_MysteryEventsHouse_1F_EventScript_BattleLostComment @@ -121,19 +119,19 @@ SootopolisCity_MysteryEventsHouse_1F_EventScript_ChooseParty:: SootopolisCity_MysteryEventsHouse_1F_EventScript_EnterBasementNorth:: applymovement VAR_LAST_TALKED, SootopolisCity_MysteryEventsHouse_1F_Movement_OldManMoveAsideLeft - applymovement OBJ_EVENT_ID_PLAYER, SootopolisCity_MysteryEventsHouse_1F_Movement_PlayerEnterBasementNorth + applymovement LOCALID_PLAYER, SootopolisCity_MysteryEventsHouse_1F_Movement_PlayerEnterBasementNorth waitmovement 0 return SootopolisCity_MysteryEventsHouse_1F_EventScript_EnterBasementEast:: applymovement VAR_LAST_TALKED, SootopolisCity_MysteryEventsHouse_1F_Movement_OldManMoveAsideRight - applymovement OBJ_EVENT_ID_PLAYER, SootopolisCity_MysteryEventsHouse_1F_Movement_PlayerEnterBasementEast + applymovement LOCALID_PLAYER, SootopolisCity_MysteryEventsHouse_1F_Movement_PlayerEnterBasementEast waitmovement 0 return SootopolisCity_MysteryEventsHouse_1F_EventScript_EnterBasementWest:: applymovement VAR_LAST_TALKED, SootopolisCity_MysteryEventsHouse_1F_Movement_OldManMoveAsideLeft - applymovement OBJ_EVENT_ID_PLAYER, SootopolisCity_MysteryEventsHouse_1F_Movement_PlayerEnterBasementWest + applymovement LOCALID_PLAYER, SootopolisCity_MysteryEventsHouse_1F_Movement_PlayerEnterBasementWest waitmovement 0 return diff --git a/data/maps/SootopolisCity_MysteryEventsHouse_B1F/scripts.inc b/data/maps/SootopolisCity_MysteryEventsHouse_B1F/scripts.inc index 533eb7cfa51a..32ee8da2b9c0 100644 --- a/data/maps/SootopolisCity_MysteryEventsHouse_B1F/scripts.inc +++ b/data/maps/SootopolisCity_MysteryEventsHouse_B1F/scripts.inc @@ -13,7 +13,7 @@ SootopolisCity_MysteryEventsHouse_B1F_OnFrame: SootopolisCity_MysteryEventsHouse_B1F_EventScript_BattleVisitingTrainer:: lockall - applymovement OBJ_EVENT_ID_PLAYER, SootopolisCity_MysteryEventsHouse_B1F_Movement_PlayerEnterBasement + applymovement LOCALID_PLAYER, SootopolisCity_MysteryEventsHouse_B1F_Movement_PlayerEnterBasement waitmovement 0 special CopyEReaderTrainerGreeting msgbox gStringVar4, MSGBOX_DEFAULT @@ -27,7 +27,7 @@ SootopolisCity_MysteryEventsHouse_B1F_EventScript_BattleVisitingTrainer:: call_if_eq VAR_RESULT, B_OUTCOME_LOST, SootopolisCity_MysteryEventsHouse_B1F_EventScript_BattleLost closemessage special HealPlayerParty - applymovement OBJ_EVENT_ID_PLAYER, SootopolisCity_MysteryEventsHouse_B1F_Movement_PlayerExitBasement + applymovement LOCALID_PLAYER, SootopolisCity_MysteryEventsHouse_B1F_Movement_PlayerExitBasement waitmovement 0 special LoadPlayerParty setvar VAR_TEMP_1, 1 diff --git a/data/maps/SootopolisCity_PokemonCenter_1F/map.json b/data/maps/SootopolisCity_PokemonCenter_1F/map.json index 0fa27599da31..8db695278d37 100644 --- a/data/maps/SootopolisCity_PokemonCenter_1F/map.json +++ b/data/maps/SootopolisCity_PokemonCenter_1F/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_SOOTOPOLIS_NURSE", "graphics_id": "OBJ_EVENT_GFX_NURSE", "x": 7, "y": 2, diff --git a/data/maps/SootopolisCity_PokemonCenter_1F/scripts.inc b/data/maps/SootopolisCity_PokemonCenter_1F/scripts.inc index e1e13b35c830..757c9063e46f 100644 --- a/data/maps/SootopolisCity_PokemonCenter_1F/scripts.inc +++ b/data/maps/SootopolisCity_PokemonCenter_1F/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_NURSE, 1 - SootopolisCity_PokemonCenter_1F_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, SootopolisCity_PokemonCenter_1F_OnTransition map_script MAP_SCRIPT_ON_RESUME, CableClub_OnResume @@ -10,7 +8,7 @@ SootopolisCity_PokemonCenter_1F_OnTransition: end SootopolisCity_PokemonCenter_1F_EventScript_Nurse:: - setvar VAR_0x800B, LOCALID_NURSE + setvar VAR_0x800B, LOCALID_SOOTOPOLIS_NURSE call Common_EventScript_PkmnCenterNurse waitmessage waitbuttonpress diff --git a/data/maps/SouthernIsland_Exterior/map.json b/data/maps/SouthernIsland_Exterior/map.json index 6912e3f4bda6..d7cdb1238a89 100644 --- a/data/maps/SouthernIsland_Exterior/map.json +++ b/data/maps/SouthernIsland_Exterior/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_SOUTHERN_ISLAND_SAILOR", "graphics_id": "OBJ_EVENT_GFX_SAILOR", "x": 13, "y": 23, @@ -28,6 +29,7 @@ "flag": "0" }, { + "local_id": "LOCALID_SOUTHERN_ISLAND_SS_TIDAL", "graphics_id": "OBJ_EVENT_GFX_SS_TIDAL", "x": 13, "y": 25, diff --git a/data/maps/SouthernIsland_Exterior/scripts.inc b/data/maps/SouthernIsland_Exterior/scripts.inc index 6e7009a1f295..f6d8436dbe73 100644 --- a/data/maps/SouthernIsland_Exterior/scripts.inc +++ b/data/maps/SouthernIsland_Exterior/scripts.inc @@ -1,6 +1,3 @@ -.set LOCALID_SAILOR, 1 -.set LOCALID_SS_TIDAL, 2 - SouthernIsland_Exterior_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, SouthernIsland_Exterior_OnTransition .byte 0 @@ -19,8 +16,8 @@ SouthernIsland_Exterior_EventScript_Sailor:: applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceFasterDown waitmovement 0 delay 30 - hideobjectat LOCALID_SAILOR, MAP_SOUTHERN_ISLAND_EXTERIOR - setvar VAR_0x8004, LOCALID_SS_TIDAL + hideobjectat LOCALID_SOUTHERN_ISLAND_SAILOR, MAP_SOUTHERN_ISLAND_EXTERIOR + setvar VAR_0x8004, LOCALID_SOUTHERN_ISLAND_SS_TIDAL call Common_EventScript_FerryDepartIsland warp MAP_LILYCOVE_CITY_HARBOR, 8, 11 waitstate @@ -33,12 +30,12 @@ SouthernIsland_Exterior_EventScript_AsYouLike:: end Ferry_EventScript_DepartIslandSouth:: - applymovement OBJ_EVENT_ID_PLAYER, Ferry_Movement_DepartIslandBoardSouth + applymovement LOCALID_PLAYER, Ferry_Movement_DepartIslandBoardSouth waitmovement 0 return Ferry_EventScript_DepartIslandWest:: - applymovement OBJ_EVENT_ID_PLAYER, Ferry_Movement_DepartIslandBoardWest + applymovement LOCALID_PLAYER, Ferry_Movement_DepartIslandBoardWest waitmovement 0 return diff --git a/data/maps/SouthernIsland_Interior/map.json b/data/maps/SouthernIsland_Interior/map.json index 76212cbbd15e..6871b7704fbf 100644 --- a/data/maps/SouthernIsland_Interior/map.json +++ b/data/maps/SouthernIsland_Interior/map.json @@ -28,6 +28,7 @@ "flag": "FLAG_HIDE_SOUTHERN_ISLAND_EON_STONE" }, { + "local_id": "LOCALID_SOUTHERN_ISLAND_LATI", "graphics_id": "OBJ_EVENT_GFX_VAR_1", "x": 13, "y": 2, diff --git a/data/maps/SouthernIsland_Interior/scripts.inc b/data/maps/SouthernIsland_Interior/scripts.inc index 8486739d93dc..f92d3f080ea2 100644 --- a/data/maps/SouthernIsland_Interior/scripts.inc +++ b/data/maps/SouthernIsland_Interior/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_LATI, 2 - SouthernIsland_Interior_MapScripts:: map_script MAP_SCRIPT_ON_RESUME, SouthernIsland_Interior_OnResume map_script MAP_SCRIPT_ON_TRANSITION, SouthernIsland_Interior_OnTransition @@ -12,7 +10,7 @@ SouthernIsland_Interior_OnResume: SouthernIsland_Interior_EventScript_TryRemoveLati:: specialvar VAR_RESULT, GetBattleOutcome goto_if_ne VAR_RESULT, B_OUTCOME_CAUGHT, Common_EventScript_NopReturn - removeobject LOCALID_LATI + removeobject LOCALID_SOUTHERN_ISLAND_LATI return SouthernIsland_Interior_OnTransition: @@ -59,21 +57,21 @@ SouthernIsland_Interior_EventScript_Lati:: setflag FLAG_ENCOUNTERED_LATIAS_OR_LATIOS setflag FLAG_TEMP_2 special SpawnCameraObject - applymovement OBJ_EVENT_ID_CAMERA, SouthernIsland_Interior_Movement_CameraPanUp + applymovement LOCALID_CAMERA, SouthernIsland_Interior_Movement_CameraPanUp waitmovement 0 delay 50 waitse playmoncry VAR_TEMP_4, CRY_MODE_NORMAL delay 30 waitmoncry - addobject LOCALID_LATI + addobject LOCALID_SOUTHERN_ISLAND_LATI delay 30 - applymovement OBJ_EVENT_ID_CAMERA, SouthernIsland_Interior_Movement_CameraPanDown - applymovement LOCALID_LATI, SouthernIsland_Interior_Movement_LatiApproach + applymovement LOCALID_CAMERA, SouthernIsland_Interior_Movement_CameraPanDown + applymovement LOCALID_SOUTHERN_ISLAND_LATI, SouthernIsland_Interior_Movement_LatiApproach waitmovement 0 delay 50 special RemoveCameraObject - setvar VAR_LAST_TALKED, LOCALID_LATI + setvar VAR_LAST_TALKED, LOCALID_SOUTHERN_ISLAND_LATI call_if_eq VAR_ROAMER_POKEMON, 0, SouthernIsland_Interior_EventScript_SetLatiosBattleVars call_if_ne VAR_ROAMER_POKEMON, 0, SouthernIsland_Interior_EventScript_SetLatiasBattleVars setflag FLAG_SYS_CTRL_OBJ_DELETE diff --git a/data/maps/TerraCave_End/map.json b/data/maps/TerraCave_End/map.json index 264b35af2314..78cf26b168f4 100644 --- a/data/maps/TerraCave_End/map.json +++ b/data/maps/TerraCave_End/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_TERRA_CAVE_GROUDON", "graphics_id": "OBJ_EVENT_GFX_GROUDON_FRONT", "x": 17, "y": 22, diff --git a/data/maps/TerraCave_End/scripts.inc b/data/maps/TerraCave_End/scripts.inc index 8b2732d45ef2..e1e1cd684b66 100644 --- a/data/maps/TerraCave_End/scripts.inc +++ b/data/maps/TerraCave_End/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_GROUDON, 1 - TerraCave_End_MapScripts:: map_script MAP_SCRIPT_ON_RESUME, TerraCave_End_OnResume map_script MAP_SCRIPT_ON_TRANSITION, TerraCave_End_OnTransition @@ -12,7 +10,7 @@ TerraCave_End_OnResume: TerraCave_End_EventScript_TryRemoveGroudon:: specialvar VAR_RESULT, GetBattleOutcome goto_if_ne VAR_RESULT, B_OUTCOME_CAUGHT, Common_EventScript_NopReturn - removeobject LOCALID_GROUDON + removeobject LOCALID_TERRA_CAVE_GROUDON return TerraCave_End_OnTransition: @@ -26,15 +24,15 @@ TerraCave_End_EventScript_ShowGroudon:: TerraCave_End_EventScript_Groudon:: lockall - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_FaceUp + applymovement LOCALID_PLAYER, Common_Movement_FaceUp waitmovement 0 - applymovement LOCALID_GROUDON, TerraCave_End_Movement_GroudonApproach + applymovement LOCALID_TERRA_CAVE_GROUDON, TerraCave_End_Movement_GroudonApproach waitmovement 0 waitse playmoncry SPECIES_GROUDON, CRY_MODE_ENCOUNTER delay 40 waitmoncry - setvar VAR_LAST_TALKED, LOCALID_GROUDON + setvar VAR_LAST_TALKED, LOCALID_TERRA_CAVE_GROUDON setwildbattle SPECIES_GROUDON, 70 setflag FLAG_SYS_CTRL_OBJ_DELETE special BattleSetup_StartLegendaryBattle diff --git a/data/maps/TrainerHill_Elevator/map.json b/data/maps/TrainerHill_Elevator/map.json index a611cbf64145..c24a06363328 100644 --- a/data/maps/TrainerHill_Elevator/map.json +++ b/data/maps/TrainerHill_Elevator/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_TRAINER_HILL_ELEVATOR_ATTENDANT", "graphics_id": "OBJ_EVENT_GFX_TEALA", "x": 0, "y": 6, diff --git a/data/maps/TrainerHill_Elevator/scripts.inc b/data/maps/TrainerHill_Elevator/scripts.inc index bec1ffbff1c9..c394fc4736f6 100644 --- a/data/maps/TrainerHill_Elevator/scripts.inc +++ b/data/maps/TrainerHill_Elevator/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_ATTENDANT, 1 - TrainerHill_Elevator_MapScripts:: map_script MAP_SCRIPT_ON_FRAME_TABLE, TrainerHill_Elevator_OnFrame .byte 0 @@ -12,7 +10,7 @@ TrainerHill_Elevator_EventScript_Attendant:: end TrainerHill_Elevator_EventScript_ExitToRoof:: - applymovement OBJ_EVENT_ID_PLAYER, TrainerHill_Elevator_Movement_PlayerExitElevatorToRoof + applymovement LOCALID_PLAYER, TrainerHill_Elevator_Movement_PlayerExitElevatorToRoof waitmovement 0 releaseall warp MAP_TRAINER_HILL_ROOF, 15, 5 @@ -20,21 +18,21 @@ TrainerHill_Elevator_EventScript_ExitToRoof:: end TrainerHill_Elevator_EventScript_EnterElevator:: - applymovement OBJ_EVENT_ID_PLAYER, TrainerHill_Elevator_Movement_PlayerApproachAttendant + applymovement LOCALID_PLAYER, TrainerHill_Elevator_Movement_PlayerApproachAttendant waitmovement 0 - applymovement LOCALID_ATTENDANT, TrainerHill_Elevator_Movement_AttendantFacePlayer + applymovement LOCALID_TRAINER_HILL_ELEVATOR_ATTENDANT, TrainerHill_Elevator_Movement_AttendantFacePlayer waitmovement 0 lockall msgbox TrainerHill_Elevator_Text_ReturnToReception, MSGBOX_YESNO goto_if_eq VAR_RESULT, NO, TrainerHill_Elevator_EventScript_ExitToRoof releaseall - applymovement LOCALID_ATTENDANT, TrainerHill_Elevator_Movement_AttendantFaceDown + applymovement LOCALID_TRAINER_HILL_ELEVATOR_ATTENDANT, TrainerHill_Elevator_Movement_AttendantFaceDown waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, TrainerHill_Elevator_Movement_PlayerMoveToCenterOfElevator + applymovement LOCALID_PLAYER, TrainerHill_Elevator_Movement_PlayerMoveToCenterOfElevator waitmovement 0 call TrainerHill_Elevator_EventScript_MoveElevator delay 25 - applymovement OBJ_EVENT_ID_PLAYER, TrainerHill_Elevator_Movement_PlayerExitElevator + applymovement LOCALID_PLAYER, TrainerHill_Elevator_Movement_PlayerExitElevator waitmovement 0 warp MAP_TRAINER_HILL_ENTRANCE, 17, 8 waitstate diff --git a/data/maps/TrainerHill_Entrance/map.json b/data/maps/TrainerHill_Entrance/map.json index 0f2b4ec5588f..5c931215c43b 100644 --- a/data/maps/TrainerHill_Entrance/map.json +++ b/data/maps/TrainerHill_Entrance/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_TRAINER_HILL_ATTENDANT", "graphics_id": "OBJ_EVENT_GFX_TEALA", "x": 11, "y": 6, @@ -28,6 +29,7 @@ "flag": "0" }, { + "local_id": "LOCALID_TRAINER_HILL_NURSE", "graphics_id": "OBJ_EVENT_GFX_NURSE", "x": 4, "y": 9, @@ -54,6 +56,7 @@ "flag": "0" }, { + "local_id": "LOCALID_TRAINER_HILL_GIRL", "graphics_id": "OBJ_EVENT_GFX_GIRL_3", "x": 5, "y": 14, @@ -67,6 +70,7 @@ "flag": "0" }, { + "local_id": "LOCALID_TRAINER_HILL_MAN", "graphics_id": "OBJ_EVENT_GFX_MAN_3", "x": 14, "y": 15, diff --git a/data/maps/TrainerHill_Entrance/scripts.inc b/data/maps/TrainerHill_Entrance/scripts.inc index 2dd001a3baba..8b9a3f9a02fb 100644 --- a/data/maps/TrainerHill_Entrance/scripts.inc +++ b/data/maps/TrainerHill_Entrance/scripts.inc @@ -1,8 +1,3 @@ -.set LOCALID_ATTENDANT, 1 -.set LOCALID_NURSE, 2 -.set LOCALID_GIRL, 4 -.set LOCALID_MAN, 5 - TrainerHill_Entrance_MapScripts:: map_script MAP_SCRIPT_ON_RESUME, TrainerHill_Entrance_OnResume map_script MAP_SCRIPT_ON_RETURN_TO_FIELD, TrainerHill_Entrance_OnReturn @@ -25,24 +20,24 @@ TrainerHill_Entrance_OnResume: setvar VAR_TEMP_0, 0 trainerhill_getusingereader goto_if_eq VAR_RESULT, FALSE, TrainerHill_Entrance_EventScript_TryFaceAttendant @ VAR_RESULT always FALSE here - setobjectxy OBJ_EVENT_ID_PLAYER, 9, 6 - applymovement OBJ_EVENT_ID_PLAYER, TrainerHill_Entrance_Movement_PlayerFaceAttendant + setobjectxy LOCALID_PLAYER, 9, 6 + applymovement LOCALID_PLAYER, TrainerHill_Entrance_Movement_PlayerFaceAttendant end TrainerHill_Entrance_EventScript_TryFaceAttendant:: trainerhill_getwon goto_if_eq VAR_RESULT, TRUE, TrainerHill_Entrance_EventScript_PlayerDontFaceAttendant - applymovement OBJ_EVENT_ID_PLAYER, TrainerHill_Entrance_Movement_PlayerFaceAttendant + applymovement LOCALID_PLAYER, TrainerHill_Entrance_Movement_PlayerFaceAttendant end TrainerHill_Entrance_EventScript_PlayerDontFaceAttendant:: end TrainerHill_Entrance_OnReturn: - addobject LOCALID_NURSE - addobject LOCALID_ATTENDANT - addobject LOCALID_MAN - addobject LOCALID_GIRL + addobject LOCALID_TRAINER_HILL_NURSE + addobject LOCALID_TRAINER_HILL_ATTENDANT + addobject LOCALID_TRAINER_HILL_MAN + addobject LOCALID_TRAINER_HILL_GIRL end TrainerHill_Entrance_OnLoad: @@ -62,7 +57,7 @@ TrainerHill_Entrance_OnFrame: TrainerHill_Entrance_EventScript_ExitElevator:: lockall - applymovement OBJ_EVENT_ID_PLAYER, TrainerHill_Entrance_Movement_PlayerExitElevator + applymovement LOCALID_PLAYER, TrainerHill_Entrance_Movement_PlayerExitElevator waitmovement 0 setmetatile 17, 10, METATILE_TrainerHill_CounterDoor, TRUE special DrawWholeMapView @@ -82,17 +77,17 @@ TrainerHill_Entrance_EventScript_ExitChallenge:: TrainerHill_Entrance_EventScript_ExitChallengeLost:: lockall - applymovement OBJ_EVENT_ID_PLAYER, TrainerHill_Entrance_Movement_PlayerFaceAttendant + applymovement LOCALID_PLAYER, TrainerHill_Entrance_Movement_PlayerFaceAttendant msgbox TrainerHill_Entrance_Text_TooBadTremendousEffort, MSGBOX_DEFAULT goto TrainerHill_Entrance_EventScript_PlayerExitChallenge TrainerHill_Entrance_EventScript_ExitChallengeECard:: lockall - applymovement OBJ_EVENT_ID_PLAYER, TrainerHill_Entrance_Movement_PlayerFaceAttendant + applymovement LOCALID_PLAYER, TrainerHill_Entrance_Movement_PlayerFaceAttendant msgbox TrainerHill_Entrance_Text_MovedReceptionHereForSwitch, MSGBOX_DEFAULT TrainerHill_Entrance_EventScript_PlayerExitChallenge:: closemessage - applymovement OBJ_EVENT_ID_PLAYER, TrainerHill_Entrance_Movement_PushPlayerBackFromCounter + applymovement LOCALID_PLAYER, TrainerHill_Entrance_Movement_PushPlayerBackFromCounter waitmovement 0 setvar VAR_TRAINER_HILL_IS_ACTIVE, 0 special HealPlayerParty @@ -101,7 +96,7 @@ TrainerHill_Entrance_EventScript_EndExitChallenge:: end TrainerHill_Entrance_EventScript_Nurse:: - setvar VAR_0x800B, LOCALID_NURSE + setvar VAR_0x800B, LOCALID_TRAINER_HILL_NURSE call Common_EventScript_PkmnCenterNurse waitmessage waitbuttonpress @@ -124,7 +119,7 @@ TrainerHill_Entrance_EventScript_AttendantEnd:: TrainerHill_Entrance_EventScript_EntryTrigger:: lockall - applymovement OBJ_EVENT_ID_PLAYER, TrainerHill_Entrance_Movement_PlayerFaceAttendant + applymovement LOCALID_PLAYER, TrainerHill_Entrance_Movement_PlayerFaceAttendant goto_if_unset FLAG_SYS_GAME_CLEAR, TrainerHill_Entrance_EventScript_Closed msgbox TrainerHill_Entrance_Text_WelcomeToTrainerHill, MSGBOX_DEFAULT trainerhill_getsaved @@ -170,7 +165,7 @@ TrainerHill_Entrance_EventScript_CancelEntry:: setvar VAR_TEMP_5, 0 msgbox TrainerHill_Entrance_Text_PleaseVisitUsAgain, MSGBOX_DEFAULT closemessage - applymovement OBJ_EVENT_ID_PLAYER, TrainerHill_Entrance_Movement_PushPlayerBackFromCounter + applymovement LOCALID_PLAYER, TrainerHill_Entrance_Movement_PushPlayerBackFromCounter waitmovement 0 releaseall end @@ -192,7 +187,7 @@ TrainerHill_Entrance_EventScript_SaveFailed:: TrainerHill_Entrance_EventScript_Closed:: msgbox TrainerHill_Entrance_Text_StillGettingReady, MSGBOX_DEFAULT closemessage - applymovement OBJ_EVENT_ID_PLAYER, TrainerHill_Entrance_Movement_PushPlayerBackFromCounter + applymovement LOCALID_PLAYER, TrainerHill_Entrance_Movement_PushPlayerBackFromCounter waitmovement 0 releaseall end diff --git a/data/maps/UnionRoom/map.json b/data/maps/UnionRoom/map.json index 8c663eb42efe..e54ac0c228fb 100644 --- a/data/maps/UnionRoom/map.json +++ b/data/maps/UnionRoom/map.json @@ -28,6 +28,7 @@ "flag": "0" }, { + "local_id": "LOCALID_UNION_ROOM_PLAYER_4", "graphics_id": "OBJ_EVENT_GFX_VAR_3", "x": 1, "y": 8, @@ -41,6 +42,7 @@ "flag": "FLAG_HIDE_UNION_ROOM_PLAYER_4" }, { + "local_id": "LOCALID_UNION_ROOM_PLAYER_8", "graphics_id": "OBJ_EVENT_GFX_VAR_7", "x": 7, "y": 8, @@ -54,6 +56,7 @@ "flag": "FLAG_HIDE_UNION_ROOM_PLAYER_8" }, { + "local_id": "LOCALID_UNION_ROOM_PLAYER_7", "graphics_id": "OBJ_EVENT_GFX_VAR_6", "x": 1, "y": 4, @@ -67,6 +70,7 @@ "flag": "FLAG_HIDE_UNION_ROOM_PLAYER_7" }, { + "local_id": "LOCALID_UNION_ROOM_PLAYER_6", "graphics_id": "OBJ_EVENT_GFX_VAR_5", "x": 7, "y": 4, @@ -80,6 +84,7 @@ "flag": "FLAG_HIDE_UNION_ROOM_PLAYER_6" }, { + "local_id": "LOCALID_UNION_ROOM_PLAYER_5", "graphics_id": "OBJ_EVENT_GFX_VAR_4", "x": 13, "y": 4, @@ -93,6 +98,7 @@ "flag": "FLAG_HIDE_UNION_ROOM_PLAYER_5" }, { + "local_id": "LOCALID_UNION_ROOM_PLAYER_3", "graphics_id": "OBJ_EVENT_GFX_VAR_2", "x": 10, "y": 6, @@ -106,6 +112,7 @@ "flag": "FLAG_HIDE_UNION_ROOM_PLAYER_3" }, { + "local_id": "LOCALID_UNION_ROOM_PLAYER_2", "graphics_id": "OBJ_EVENT_GFX_VAR_1", "x": 13, "y": 8, @@ -119,6 +126,7 @@ "flag": "FLAG_HIDE_UNION_ROOM_PLAYER_2" }, { + "local_id": "LOCALID_UNION_ROOM_PLAYER_1", "graphics_id": "OBJ_EVENT_GFX_VAR_0", "x": 4, "y": 6, diff --git a/data/maps/UnionRoom/scripts.inc b/data/maps/UnionRoom/scripts.inc index 8a9e7682a5d6..3c73afd12e43 100644 --- a/data/maps/UnionRoom/scripts.inc +++ b/data/maps/UnionRoom/scripts.inc @@ -1,5 +1,3 @@ -@ Note: LOCALID_UNION_ROOM_PLAYER_# are local ids for this map used elsewhere. They're defined in event_objects.h - UnionRoom_MapScripts:: map_script MAP_SCRIPT_ON_RESUME, UnionRoom_OnResume map_script MAP_SCRIPT_ON_TRANSITION, UnionRoom_OnTransition diff --git a/data/maps/VerdanturfTown/map.json b/data/maps/VerdanturfTown/map.json index c8395b10c070..60e9d1b9be5a 100644 --- a/data/maps/VerdanturfTown/map.json +++ b/data/maps/VerdanturfTown/map.json @@ -39,6 +39,7 @@ "flag": "0" }, { + "local_id": "LOCALID_VERDANTURF_TWIN", "graphics_id": "OBJ_EVENT_GFX_TWIN", "x": 9, "y": 2, diff --git a/data/maps/VerdanturfTown/scripts.inc b/data/maps/VerdanturfTown/scripts.inc index 133fd62865d2..1e115e676275 100644 --- a/data/maps/VerdanturfTown/scripts.inc +++ b/data/maps/VerdanturfTown/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_TWIN, 2 - VerdanturfTown_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, VerdanturfTown_OnTransition .byte 0 @@ -14,14 +12,14 @@ VerdanturfTown_EventScript_Twin:: faceplayer goto_if_set FLAG_RUSTURF_TUNNEL_OPENED, VerdanturfTown_EventScript_TwinTunnelOpen msgbox VerdanturfTown_Text_ManTryingToDigTunnel, MSGBOX_DEFAULT - applymovement LOCALID_TWIN, Common_Movement_FaceOriginalDirection + applymovement LOCALID_VERDANTURF_TWIN, Common_Movement_FaceOriginalDirection waitmovement 0 release end VerdanturfTown_EventScript_TwinTunnelOpen:: msgbox VerdanturfTown_Text_ManDugTunnelForLove, MSGBOX_DEFAULT - applymovement LOCALID_TWIN, Common_Movement_FaceOriginalDirection + applymovement LOCALID_VERDANTURF_TWIN, Common_Movement_FaceOriginalDirection waitmovement 0 release end diff --git a/data/maps/VerdanturfTown_BattleTentBattleRoom/map.json b/data/maps/VerdanturfTown_BattleTentBattleRoom/map.json index 72eca1d95c59..7913b66e98fe 100644 --- a/data/maps/VerdanturfTown_BattleTentBattleRoom/map.json +++ b/data/maps/VerdanturfTown_BattleTentBattleRoom/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_VERDANTURF_TENT_BATTLE_PLAYER", "graphics_id": "OBJ_EVENT_GFX_VAR_1", "x": 2, "y": 8, @@ -28,6 +29,7 @@ "flag": "0" }, { + "local_id": "LOCALID_VERDANTURF_TENT_BATTLE_OPPONENT", "graphics_id": "OBJ_EVENT_GFX_VAR_0", "x": 11, "y": 1, @@ -41,6 +43,7 @@ "flag": "0" }, { + "local_id": "LOCALID_VERDANTURF_TENT_BATTLE_ATTENDANT", "graphics_id": "OBJ_EVENT_GFX_EXPERT_M", "x": 2, "y": 4, diff --git a/data/maps/VerdanturfTown_BattleTentBattleRoom/scripts.inc b/data/maps/VerdanturfTown_BattleTentBattleRoom/scripts.inc index 29008b7c0f4a..8caf65eebcb9 100644 --- a/data/maps/VerdanturfTown_BattleTentBattleRoom/scripts.inc +++ b/data/maps/VerdanturfTown_BattleTentBattleRoom/scripts.inc @@ -1,17 +1,13 @@ -.set LOCALID_PLAYER, 1 -.set LOCALID_OPPONENT, 2 -.set LOCALID_ATTENDANT, 3 - +@ On this map the player will automatically walk into the room, but the camera is supposed to remain still. +@ To do this GF sets the player (LOCALID_PLAYER) invisible and creates a fake player object (LOCALID_VERDANTURF_TENT_BATTLE_PLAYER). +@ The graphics of this fake player object are represented with VAR_OBJ_GFX_ID_1. +@ The graphics of the opponent are represented with VAR_OBJ_GFX_ID_0, which will ultimately be set by tower_setopponent. VerdanturfTown_BattleTentBattleRoom_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, VerdanturfTown_BattleTentBattleRoom_OnTransition map_script MAP_SCRIPT_ON_FRAME_TABLE, VerdanturfTown_BattleTentBattleRoom_OnFrame map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, VerdanturfTown_BattleTentBattleRoom_OnWarp .byte 0 - @ On this map the player (OBJ_EVENT_ID_PLAYER) is hidden - @ The player is represented instead by object event 1, which has the gfx id VAR_OBJ_GFX_ID_1 - @ The opponent is represented by object event 2, which has the gfx id VAR_OBJ_GFX_ID_0 - VerdanturfTown_BattleTentBattleRoom_OnTransition: call VerdanturfTown_BattleTentBattleRoom_EventScript_SetPlayerGfx end @@ -37,15 +33,15 @@ VerdanturfTown_BattleTentBattleRoom_OnFrame: .2byte 0 VerdanturfTown_BattleTentBattleRoom_EventScript_EnterRoom:: - showobjectat LOCALID_PLAYER, MAP_VERDANTURF_TOWN_BATTLE_TENT_BATTLE_ROOM - applymovement LOCALID_PLAYER, VerdanturfTown_BattleTentBattleRoom_Movement_PlayerEnter + showobjectat LOCALID_VERDANTURF_TENT_BATTLE_PLAYER, MAP_VERDANTURF_TOWN_BATTLE_TENT_BATTLE_ROOM + applymovement LOCALID_VERDANTURF_TENT_BATTLE_PLAYER, VerdanturfTown_BattleTentBattleRoom_Movement_PlayerEnter waitmovement 0 frontier_get FRONTIER_DATA_BATTLE_NUM goto_if_ne VAR_RESULT, 0, VerdanturfTown_BattleTentBattleRoom_EventScript_AskContinueChallenge VerdanturfTown_BattleTentBattleRoom_EventScript_NextOpponentEnter:: tower_setopponent - addobject LOCALID_OPPONENT - applymovement LOCALID_OPPONENT, VerdanturfTown_BattleTentBattleRoom_Movement_OpponentEnter + addobject LOCALID_VERDANTURF_TENT_BATTLE_OPPONENT + applymovement LOCALID_VERDANTURF_TENT_BATTLE_OPPONENT, VerdanturfTown_BattleTentBattleRoom_Movement_OpponentEnter waitmovement 0 battletent_getopponentintro msgbox gStringVar4, MSGBOX_DEFAULT @@ -65,11 +61,11 @@ VerdanturfTown_BattleTentBattleRoom_EventScript_DefeatedOpponent:: frontier_set FRONTIER_DATA_BATTLE_NUM, VAR_RESULT switch VAR_RESULT case 3, VerdanturfTown_BattleTentBattleRoom_EventScript_WarpToLobbyWon - applymovement LOCALID_OPPONENT, VerdanturfTown_BattleTentBattleRoom_Movement_OpponentExit + applymovement LOCALID_VERDANTURF_TENT_BATTLE_OPPONENT, VerdanturfTown_BattleTentBattleRoom_Movement_OpponentExit waitmovement 0 - removeobject LOCALID_OPPONENT - applymovement LOCALID_ATTENDANT, Common_Movement_WalkInPlaceFasterDown - applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterUp + removeobject LOCALID_VERDANTURF_TENT_BATTLE_OPPONENT + applymovement LOCALID_VERDANTURF_TENT_BATTLE_ATTENDANT, Common_Movement_WalkInPlaceFasterDown + applymovement LOCALID_VERDANTURF_TENT_BATTLE_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 msgbox BattleFrontier_BattlePalaceBattleRoom_Text_LetMeRestoreYourMons, MSGBOX_DEFAULT special LoadPlayerParty @@ -106,8 +102,8 @@ VerdanturfTown_BattleTentBattleRoom_EventScript_AskRetireChallenge:: case MULTI_B_PRESSED, VerdanturfTown_BattleTentBattleRoom_EventScript_AskContinueChallenge VerdanturfTown_BattleTentBattleRoom_EventScript_ContinueChallenge:: - applymovement LOCALID_ATTENDANT, Common_Movement_WalkInPlaceFasterRight - applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_VERDANTURF_TENT_BATTLE_ATTENDANT, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_VERDANTURF_TENT_BATTLE_PLAYER, Common_Movement_WalkInPlaceFasterRight waitmovement 0 closemessage goto VerdanturfTown_BattleTentBattleRoom_EventScript_NextOpponentEnter @@ -133,11 +129,11 @@ VerdanturfTown_BattleTentBattleRoom_OnWarp: .2byte 0 VerdanturfTown_BattleTentBattleRoom_EventScript_SetUpObjects:: - hideobjectat LOCALID_PLAYER, MAP_VERDANTURF_TOWN_BATTLE_TENT_BATTLE_ROOM + hideobjectat LOCALID_VERDANTURF_TENT_BATTLE_PLAYER, MAP_VERDANTURF_TOWN_BATTLE_TENT_BATTLE_ROOM call VerdanturfTown_BattleTentBattleRoom_EventScript_SetPlayerGfx setvar VAR_TEMP_1, 1 - applymovement OBJ_EVENT_ID_PLAYER, VerdanturfTown_BattleTentBattleRoom_Movement_SetInvisible - removeobject LOCALID_OPPONENT + applymovement LOCALID_PLAYER, VerdanturfTown_BattleTentBattleRoom_Movement_SetInvisible + removeobject LOCALID_VERDANTURF_TENT_BATTLE_OPPONENT end VerdanturfTown_BattleTentBattleRoom_EventScript_ReadyFor2ndOpponent:: diff --git a/data/maps/VerdanturfTown_BattleTentCorridor/map.json b/data/maps/VerdanturfTown_BattleTentCorridor/map.json index 2b875b9009ec..95c0dffc5a44 100644 --- a/data/maps/VerdanturfTown_BattleTentCorridor/map.json +++ b/data/maps/VerdanturfTown_BattleTentCorridor/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_VERDANTURF_TENT_CORRIDOR_ATTENDANT", "graphics_id": "OBJ_EVENT_GFX_EXPERT_M", "x": 2, "y": 6, diff --git a/data/maps/VerdanturfTown_BattleTentCorridor/scripts.inc b/data/maps/VerdanturfTown_BattleTentCorridor/scripts.inc index debf1b177f37..028e56037a50 100644 --- a/data/maps/VerdanturfTown_BattleTentCorridor/scripts.inc +++ b/data/maps/VerdanturfTown_BattleTentCorridor/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_ATTENDANT, 1 - VerdanturfTown_BattleTentCorridor_MapScripts:: map_script MAP_SCRIPT_ON_FRAME_TABLE, VerdanturfTown_BattleTentCorridor_OnFrame .byte 0 @@ -11,13 +9,13 @@ VerdanturfTown_BattleTentCorridor_OnFrame: VerdanturfTown_BattleTentCorridor_EventScript_EnterCorridor:: lockall setvar VAR_TEMP_0, 1 - applymovement LOCALID_ATTENDANT, VerdanturfTown_BattleTentCorridor_Movement_WalkToDoor - applymovement OBJ_EVENT_ID_PLAYER, VerdanturfTown_BattleTentCorridor_Movement_WalkToDoor + applymovement LOCALID_VERDANTURF_TENT_CORRIDOR_ATTENDANT, VerdanturfTown_BattleTentCorridor_Movement_WalkToDoor + applymovement LOCALID_PLAYER, VerdanturfTown_BattleTentCorridor_Movement_WalkToDoor waitmovement 0 opendoor 2, 1 waitdooranim - applymovement LOCALID_ATTENDANT, VerdanturfTown_BattleTentCorridor_Movement_AttendantEnterDoor - applymovement OBJ_EVENT_ID_PLAYER, VerdanturfTown_BattleTentCorridor_Movement_PlayerEnterDoor + applymovement LOCALID_VERDANTURF_TENT_CORRIDOR_ATTENDANT, VerdanturfTown_BattleTentCorridor_Movement_AttendantEnterDoor + applymovement LOCALID_PLAYER, VerdanturfTown_BattleTentCorridor_Movement_PlayerEnterDoor waitmovement 0 closedoor 2, 1 waitdooranim diff --git a/data/maps/VerdanturfTown_BattleTentLobby/map.json b/data/maps/VerdanturfTown_BattleTentLobby/map.json index ddb4b9dd3578..132e08c9c0fc 100644 --- a/data/maps/VerdanturfTown_BattleTentLobby/map.json +++ b/data/maps/VerdanturfTown_BattleTentLobby/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_VERDANTURF_TENT_ATTENDANT", "graphics_id": "OBJ_EVENT_GFX_EXPERT_M", "x": 6, "y": 5, diff --git a/data/maps/VerdanturfTown_BattleTentLobby/scripts.inc b/data/maps/VerdanturfTown_BattleTentLobby/scripts.inc index f70baac84f96..61901bbfaa4b 100644 --- a/data/maps/VerdanturfTown_BattleTentLobby/scripts.inc +++ b/data/maps/VerdanturfTown_BattleTentLobby/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_ATTENDANT, 1 - VerdanturfTown_BattleTentLobby_MapScripts:: map_script MAP_SCRIPT_ON_FRAME_TABLE, VerdanturfTown_BattleTentLobby_OnFrame map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, VerdanturfTown_BattleTentLobby_OnWarp @@ -11,7 +9,7 @@ VerdanturfTown_BattleTentLobby_OnWarp: VerdanturfTown_BattleTentLobby_EventScript_TurnPlayerNorth:: setvar VAR_TEMP_1, 1 - turnobject OBJ_EVENT_ID_PLAYER, DIR_NORTH + turnobject LOCALID_PLAYER, DIR_NORTH end VerdanturfTown_BattleTentLobby_OnFrame: @@ -193,13 +191,13 @@ VerdanturfTown_BattleTentLobby_EventScript_EndCancelChallenge:: end VerdanturfTown_BattleTentLobby_EventScript_WalkToDoor:: - applymovement LOCALID_ATTENDANT, VerdanturfTown_BattleTentLobby_Movement_WalkToDoor - applymovement OBJ_EVENT_ID_PLAYER, VerdanturfTown_BattleTentLobby_Movement_WalkToDoor + applymovement LOCALID_VERDANTURF_TENT_ATTENDANT, VerdanturfTown_BattleTentLobby_Movement_WalkToDoor + applymovement LOCALID_PLAYER, VerdanturfTown_BattleTentLobby_Movement_WalkToDoor waitmovement 0 opendoor 6, 1 waitdooranim - applymovement LOCALID_ATTENDANT, VerdanturfTown_BattleTentLobby_Movement_AttendantEnterDoor - applymovement OBJ_EVENT_ID_PLAYER, VerdanturfTown_BattleTentLobby_Movement_PlayerEnterDoor + applymovement LOCALID_VERDANTURF_TENT_ATTENDANT, VerdanturfTown_BattleTentLobby_Movement_AttendantEnterDoor + applymovement LOCALID_PLAYER, VerdanturfTown_BattleTentLobby_Movement_PlayerEnterDoor waitmovement 0 closedoor 6, 1 waitdooranim diff --git a/data/maps/VerdanturfTown_Mart/map.json b/data/maps/VerdanturfTown_Mart/map.json index 096d63552e06..0faadcf26604 100644 --- a/data/maps/VerdanturfTown_Mart/map.json +++ b/data/maps/VerdanturfTown_Mart/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_VERDANTURF_MART_CLERK", "graphics_id": "OBJ_EVENT_GFX_MART_EMPLOYEE", "x": 1, "y": 3, diff --git a/data/maps/VerdanturfTown_PokemonCenter_1F/map.json b/data/maps/VerdanturfTown_PokemonCenter_1F/map.json index 20a144afb969..4bae6ce2f45c 100644 --- a/data/maps/VerdanturfTown_PokemonCenter_1F/map.json +++ b/data/maps/VerdanturfTown_PokemonCenter_1F/map.json @@ -15,6 +15,7 @@ "connections": null, "object_events": [ { + "local_id": "LOCALID_VERDANTURF_NURSE", "graphics_id": "OBJ_EVENT_GFX_NURSE", "x": 7, "y": 2, diff --git a/data/maps/VerdanturfTown_PokemonCenter_1F/scripts.inc b/data/maps/VerdanturfTown_PokemonCenter_1F/scripts.inc index 5fbdba42f42a..2531a7501b25 100644 --- a/data/maps/VerdanturfTown_PokemonCenter_1F/scripts.inc +++ b/data/maps/VerdanturfTown_PokemonCenter_1F/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_NURSE, 1 - VerdanturfTown_PokemonCenter_1F_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, VerdanturfTown_PokemonCenter_1F_OnTransition map_script MAP_SCRIPT_ON_RESUME, CableClub_OnResume @@ -11,7 +9,7 @@ VerdanturfTown_PokemonCenter_1F_OnTransition: end VerdanturfTown_PokemonCenter_1F_EventScript_Nurse:: - setvar VAR_0x800B, LOCALID_NURSE + setvar VAR_0x800B, LOCALID_VERDANTURF_NURSE call Common_EventScript_PkmnCenterNurse waitmessage waitbuttonpress diff --git a/data/maps/VictoryRoad_1F/map.json b/data/maps/VictoryRoad_1F/map.json index 44a2bca660a2..469981cde0d0 100644 --- a/data/maps/VictoryRoad_1F/map.json +++ b/data/maps/VictoryRoad_1F/map.json @@ -54,6 +54,7 @@ "flag": "0" }, { + "local_id": "LOCALID_VICTORY_ROAD_ENTRANCE_WALLY", "graphics_id": "OBJ_EVENT_GFX_WALLY", "x": 12, "y": 25, diff --git a/data/maps/VictoryRoad_1F/scripts.inc b/data/maps/VictoryRoad_1F/scripts.inc index 4bce6b4c1dce..3b16f26d9094 100644 --- a/data/maps/VictoryRoad_1F/scripts.inc +++ b/data/maps/VictoryRoad_1F/scripts.inc @@ -1,5 +1,3 @@ -.set LOCALID_WALLY_ENTRANCE, 4 - VictoryRoad_1F_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, VictoryRoad_1F_OnTransition .byte 0 @@ -10,20 +8,20 @@ VictoryRoad_1F_OnTransition: end VictoryRoad_1F_EventScript_SetEntranceWallyPos1:: - setobjectxyperm LOCALID_WALLY_ENTRANCE, 2, 24 - setobjectmovementtype LOCALID_WALLY_ENTRANCE, MOVEMENT_TYPE_FACE_DOWN + setobjectxyperm LOCALID_VICTORY_ROAD_ENTRANCE_WALLY, 2, 24 + setobjectmovementtype LOCALID_VICTORY_ROAD_ENTRANCE_WALLY, MOVEMENT_TYPE_FACE_DOWN return VictoryRoad_1F_EventScript_SetEntranceWallyPos2:: - setobjectxyperm LOCALID_WALLY_ENTRANCE, 3, 24 - setobjectmovementtype LOCALID_WALLY_ENTRANCE, MOVEMENT_TYPE_FACE_DOWN + setobjectxyperm LOCALID_VICTORY_ROAD_ENTRANCE_WALLY, 3, 24 + setobjectmovementtype LOCALID_VICTORY_ROAD_ENTRANCE_WALLY, MOVEMENT_TYPE_FACE_DOWN return VictoryRoad_1F_EventScript_WallyBattleTrigger1:: lockall setvar VAR_0x8008, 1 - addobject LOCALID_WALLY_ENTRANCE - applymovement LOCALID_WALLY_ENTRANCE, VictoryRoad_1F_Movement_WallyApproachPlayer1 + addobject LOCALID_VICTORY_ROAD_ENTRANCE_WALLY + applymovement LOCALID_VICTORY_ROAD_ENTRANCE_WALLY, VictoryRoad_1F_Movement_WallyApproachPlayer1 waitmovement 0 goto VictoryRoad_1F_EventScript_WallyEntranceBattle end @@ -31,20 +29,20 @@ VictoryRoad_1F_EventScript_WallyBattleTrigger1:: VictoryRoad_1F_EventScript_WallyBattleTrigger2:: lockall setvar VAR_0x8008, 2 - addobject LOCALID_WALLY_ENTRANCE - applymovement LOCALID_WALLY_ENTRANCE, VictoryRoad_1F_Movement_WallyApproachPlayer2 + addobject LOCALID_VICTORY_ROAD_ENTRANCE_WALLY + applymovement LOCALID_VICTORY_ROAD_ENTRANCE_WALLY, VictoryRoad_1F_Movement_WallyApproachPlayer2 waitmovement 0 goto VictoryRoad_1F_EventScript_WallyEntranceBattle end VictoryRoad_1F_EventScript_WallyEntranceBattle:: - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterDown + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterDown waitmovement 0 msgbox VictoryRoad_1F_Text_WallyNotGoingToLoseAnymore, MSGBOX_DEFAULT trainerbattle_no_intro TRAINER_WALLY_VR_1, VictoryRoad_1F_Text_WallyEntranceDefeat msgbox VictoryRoad_1F_Text_WallyPostEntranceBattle, MSGBOX_DEFAULT clearflag FLAG_HIDE_VICTORY_ROAD_ENTRANCE_WALLY - copyobjectxytoperm LOCALID_WALLY_ENTRANCE + copyobjectxytoperm LOCALID_VICTORY_ROAD_ENTRANCE_WALLY setflag FLAG_DEFEATED_WALLY_VICTORY_ROAD copyvar VAR_VICTORY_ROAD_1F_STATE, VAR_0x8008 releaseall diff --git a/data/scripts/apprentice.inc b/data/scripts/apprentice.inc index 6b3a99e728c8..246922f7f27e 100644 --- a/data/scripts/apprentice.inc +++ b/data/scripts/apprentice.inc @@ -1,5 +1,3 @@ -.set LOCALID_APPRENTICE, 6 - BattleFrontier_BattleTowerLobby_EventScript_Apprentice:: lock faceplayer diff --git a/data/scripts/battle_pike.inc b/data/scripts/battle_pike.inc index 8ca7f5b1af9d..c39b255eca5c 100644 --- a/data/scripts/battle_pike.inc +++ b/data/scripts/battle_pike.inc @@ -1,4 +1,3 @@ -@ Note: LOCALIDs shared with BattleFrontier_BattlePikeRoomNormal BattleFrontier_BattlePikeRoom_MapScripts: map_script MAP_SCRIPT_ON_TRANSITION, BattleFrontier_BattlePikeRoom_OnTransition map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, BattleFrontier_BattlePikeRoom_OnWarp @@ -18,28 +17,28 @@ BattleFrontier_BattlePikeRoom_OnTransition: end BattleFrontier_BattlePikeRoomNormal_EventScript_SetDoubleBattleObjPos:: - setobjectxyperm LOCALID_OBJ_0, 2, 5 - setobjectxyperm LOCALID_OBJ_1, 6, 5 + setobjectxyperm LOCALID_PIKE_ROOM_NPC_1, 2, 5 + setobjectxyperm LOCALID_PIKE_ROOM_NPC_2, 6, 5 end BattleFrontier_BattlePikeRoomNormal_EventScript_SetTwoObjectRoomPos:: - setobjectxyperm LOCALID_OBJ_0, 4, 4 - setobjectxyperm LOCALID_OBJ_1, 3, 4 + setobjectxyperm LOCALID_PIKE_ROOM_NPC_1, 4, 4 + setobjectxyperm LOCALID_PIKE_ROOM_NPC_2, 3, 4 end BattleFrontier_BattlePikeRoomNormal_EventScript_SetOneObjectRoomPos:: - setobjectxyperm LOCALID_OBJ_0, 4, 4 - setobjectxyperm LOCALID_OBJ_1, 0, 0 + setobjectxyperm LOCALID_PIKE_ROOM_NPC_1, 4, 4 + setobjectxyperm LOCALID_PIKE_ROOM_NPC_2, 0, 0 end BattleFrontier_BattlePikeRoomNormal_EventScript_SetNPCRoomObjPos:: - setobjectxyperm LOCALID_OBJ_0, 5, 5 - setobjectxyperm LOCALID_OBJ_1, 0, 0 + setobjectxyperm LOCALID_PIKE_ROOM_NPC_1, 5, 5 + setobjectxyperm LOCALID_PIKE_ROOM_NPC_2, 0, 0 end BattleFrontier_BattlePikeRoomNormal_EventScript_SetBrainRoomObjPos:: - setobjectxyperm LOCALID_OBJ_0, 4, 3 - setobjectxyperm LOCALID_OBJ_1, 4, 4 + setobjectxyperm LOCALID_PIKE_ROOM_NPC_1, 4, 3 + setobjectxyperm LOCALID_PIKE_ROOM_NPC_2, 4, 4 end BattleFrontier_BattlePikeRoom_OnWarp: @@ -54,20 +53,20 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_InitRoomObjects:: goto_if_eq VAR_RESULT, PIKE_ROOM_HARD_BATTLE, BattleFrontier_BattlePikeRoomNormal_EventScript_InitTwoObjectRoom goto_if_eq VAR_RESULT, PIKE_ROOM_DOUBLE_BATTLE, BattleFrontier_BattlePikeRoomNormal_EventScript_InitTwoObjectRoom goto_if_eq VAR_RESULT, PIKE_ROOM_BRAIN, BattleFrontier_BattlePikeRoomNormal_EventScript_InitBrainRoomObjects - hideobjectat LOCALID_OBJ_1, MAP_BATTLE_FRONTIER_BATTLE_PIKE_ROOM_NORMAL + hideobjectat LOCALID_PIKE_ROOM_NPC_2, MAP_BATTLE_FRONTIER_BATTLE_PIKE_ROOM_NORMAL setvar VAR_TEMP_4, 1 - turnobject OBJ_EVENT_ID_PLAYER, DIR_NORTH + turnobject LOCALID_PLAYER, DIR_NORTH end BattleFrontier_BattlePikeRoomNormal_EventScript_InitTwoObjectRoom:: setvar VAR_TEMP_4, 1 - turnobject OBJ_EVENT_ID_PLAYER, DIR_NORTH + turnobject LOCALID_PLAYER, DIR_NORTH end BattleFrontier_BattlePikeRoomNormal_EventScript_InitBrainRoomObjects:: setvar VAR_TEMP_4, 1 - turnobject OBJ_EVENT_ID_PLAYER, DIR_NORTH - hideobjectat LOCALID_OBJ_0, MAP_BATTLE_FRONTIER_BATTLE_PIKE_ROOM_NORMAL @ Pike Queen hidden initially + turnobject LOCALID_PLAYER, DIR_NORTH + hideobjectat LOCALID_PIKE_ROOM_NPC_1, MAP_BATTLE_FRONTIER_BATTLE_PIKE_ROOM_NORMAL @ Pike Queen hidden initially end BattleFrontier_BattlePikeThreePathRoom_EventScript_LeftRoomWarp:: @@ -107,7 +106,7 @@ BattleFrontier_BattlePikeThreePathRoom_EventScript_RoomWarp:: end BattleFrontier_BattlePikeThreePathRoom_EventScript_WarpNPCRoom:: - applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattlePikeRoom_Movement_HidePlayer + applymovement LOCALID_PLAYER, BattleFrontier_BattlePikeRoom_Movement_HidePlayer waitmovement 0 call BattleFrontier_BattlePike_EventScript_CloseCurtain warpsilent MAP_BATTLE_FRONTIER_BATTLE_PIKE_ROOM_NORMAL, 4, 7 @@ -115,7 +114,7 @@ BattleFrontier_BattlePikeThreePathRoom_EventScript_WarpNPCRoom:: end BattleFrontier_BattlePikeThreePathRoom_EventScript_WarpWildMonRoom:: - applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattlePikeRoom_Movement_HidePlayer + applymovement LOCALID_PLAYER, BattleFrontier_BattlePikeRoom_Movement_HidePlayer waitmovement 0 call BattleFrontier_BattlePike_EventScript_CloseCurtain warpsilent MAP_BATTLE_FRONTIER_BATTLE_PIKE_ROOM_WILD_MONS, 4, 19 @@ -173,14 +172,14 @@ BattleFrontier_BattlePikeRoom_EventScript_EnableHealing:: return BattleFrontier_BattlePikeRoom_EventScript_WarpToFinalRoom:: - applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattlePikeRoom_Movement_HidePlayer + applymovement LOCALID_PLAYER, BattleFrontier_BattlePikeRoom_Movement_HidePlayer waitmovement 0 call BattleFrontier_BattlePike_EventScript_CloseCurtain warpsilent MAP_BATTLE_FRONTIER_BATTLE_PIKE_ROOM_FINAL, 2, 7 return BattleFrontier_BattlePikeRoom_EventScript_WarpToThreePathRoom:: - applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattlePikeRoom_Movement_HidePlayer + applymovement LOCALID_PLAYER, BattleFrontier_BattlePikeRoom_Movement_HidePlayer waitmovement 0 call BattleFrontier_BattlePike_EventScript_CloseCurtain warpsilent MAP_BATTLE_FRONTIER_BATTLE_PIKE_THREE_PATH_ROOM, 6, 10 diff --git a/data/scripts/berry_blender.inc b/data/scripts/berry_blender.inc index f860ef066c01..3fab60a58b21 100644 --- a/data/scripts/berry_blender.inc +++ b/data/scripts/berry_blender.inc @@ -1,11 +1,3 @@ -@ 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 - .set NUM_OPPONENTS, VAR_0x8009 BerryBlender_Text_WantToMakePokeblocks: @@ -246,7 +238,7 @@ BerryBlender_EventScript_BerryBlender1:: lockall goto_if_unset FLAG_HIDE_LILYCOVE_CONTEST_HALL_BLEND_MASTER, BerryBlender_EventScript_BlendMasterPresent setvar NUM_OPPONENTS, 1 - applymovement LOCALID_EXPERT_M, BerryBlender_Movement_BlendLeaderWalkInPlace + applymovement LOCALID_BLEND_MASTER, BerryBlender_Movement_BlendLeaderWalkInPlace waitmovement 0 msgbox BerryBlender_Text_WantToMakePokeblocks, MSGBOX_YESNO goto_if_eq VAR_RESULT, YES, BerryBlender_EventScript_TryUseBerryBlender1 @@ -325,8 +317,8 @@ BerryBlender_EventScript_Blender1NoCase: BerryBlender_EventScript_BerryBlender2:: lockall setvar NUM_OPPONENTS, 2 - applymovement LOCALID_TWIN, Common_Movement_FaceOriginalDirection - applymovement LOCALID_MAN, BerryBlender_Movement_BlendLeaderWalkInPlace + applymovement LOCALID_CONTEST_LOBBY_BLENDER_2_PARTICIPANT, Common_Movement_FaceOriginalDirection + applymovement LOCALID_CONTEST_LOBBY_BLENDER_2_LEADER, BerryBlender_Movement_BlendLeaderWalkInPlace waitmovement 0 msgbox BerryBlender_Text_WantToBlendPokeblocksWithUs, MSGBOX_YESNO goto_if_eq VAR_RESULT, YES, BerryBlender_EventScript_TryUseBerryBlender2 @@ -382,10 +374,10 @@ BerryBlender_EventScript_Blender2NoCase: BerryBlender_EventScript_BerryBlender3:: lockall - setvar VAR_0x8008, LOCALID_POKEFAN_F + setvar VAR_0x8008, LOCALID_CONTEST_LOBBY_BLENDER_3_LEADER setvar NUM_OPPONENTS, 3 - applymovement LOCALID_BOY, Common_Movement_FaceOriginalDirection - applymovement LOCALID_GIRL, Common_Movement_FaceOriginalDirection + applymovement LOCALID_CONTEST_LOBBY_BLENDER_3_PARTICIPANT_1, Common_Movement_FaceOriginalDirection + applymovement LOCALID_CONTEST_LOBBY_BLENDER_3_PARTICIPANT_2, Common_Movement_FaceOriginalDirection applymovement VAR_0x8008, BerryBlender_Movement_BlendLeaderWalkInPlace waitmovement 0 msgbox BerryBlender_Text_LookGoodAtBlendingJoinUs, MSGBOX_YESNO diff --git a/data/scripts/cable_club.inc b/data/scripts/cable_club.inc index e810e354a5b8..68d619097f98 100644 --- a/data/scripts/cable_club.inc +++ b/data/scripts/cable_club.inc @@ -138,7 +138,7 @@ CableClub_EventScript_CloseLinkAndExitLinkRoom:: goto_if_eq VAR_0x8007, 0, CableClub_EventScript_PlayerExitLinkRoom applymovement VAR_0x8007, Movement_AttendantFaceLeft waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Movement_PlayerExitLinkRoom + applymovement LOCALID_PLAYER, Movement_PlayerExitLinkRoom waitmovement 0 applymovement VAR_0x8007, Movement_AttendantFaceDown waitmovement 0 @@ -158,7 +158,7 @@ CableClub_EventScript_PlayerExitTradeCenter:: special CloseLink setvar VAR_CABLE_CLUB_STATE, 0 goto_if_eq VAR_0x8007, 0, CableClub_EventScript_PlayerExitLinkRoom - applymovement OBJ_EVENT_ID_PLAYER, Movement_PlayerFaceAttendantRight + applymovement LOCALID_PLAYER, Movement_PlayerFaceAttendantRight waitmovement 0 applymovement VAR_0x8007, Movement_AttendantFaceLeft waitmovement 0 @@ -178,7 +178,7 @@ CableClub_EventScript_ExitRecordCorner:: CableClub_EventScript_PlayerExitRecordCorner:: special CloseLink setvar VAR_CABLE_CLUB_STATE, 0 - applymovement OBJ_EVENT_ID_PLAYER, Movement_PlayerExitLinkRoom + applymovement LOCALID_PLAYER, Movement_PlayerExitLinkRoom waitmovement 0 goto_if_eq VAR_0x8007, 0, CableClub_EventScript_ExitRecordCornerRet applymovement VAR_0x8007, Movement_AttendantFaceDown @@ -199,7 +199,7 @@ CableClub_EventScript_ExitUnionRoom:: CableClub_EventScript_PlayerExitUnionRoom:: setvar VAR_CABLE_CLUB_STATE, 0 goto_if_eq VAR_0x8007, 0, CableClub_EventScript_PlayerExitLinkRoom - applymovement OBJ_EVENT_ID_PLAYER, Movement_PlayerFaceAttendantRight + applymovement LOCALID_PLAYER, Movement_PlayerFaceAttendantRight waitmovement 0 applymovement VAR_0x8007, Movement_AttendantFaceLeft waitmovement 0 @@ -213,24 +213,24 @@ CableClub_EventScript_TrainerCardDataOverwritten:: delay 60 message CableClub_Text_HopeToSeeYouAgain waitmessage - applymovement OBJ_EVENT_ID_PLAYER, Movement_PlayerExitLinkRoom + applymovement LOCALID_PLAYER, Movement_PlayerExitLinkRoom waitmovement 0 applymovement VAR_0x8007, Movement_AttendantFaceDown waitmovement 0 return CableClub_EventScript_PlayerExitLinkRoom:: - applymovement OBJ_EVENT_ID_PLAYER, Movement_PlayerExitLinkRoom + applymovement LOCALID_PLAYER, Movement_PlayerExitLinkRoom waitmovement 0 return CableClub_EventScript_Tutorial:: lockall - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 msgbox CableClub_Text_FirstTimeRightThisWay, MSGBOX_DEFAULT closemessage - applymovement OBJ_EVENT_ID_PLAYER, CableClub_Movement_PlayerApproachCounter + applymovement LOCALID_PLAYER, CableClub_Movement_PlayerApproachCounter waitmovement 0 delay 30 msgbox CableClub_Text_ExplainWirelessClubFirstTime, MSGBOX_DEFAULT @@ -350,13 +350,13 @@ CableClub_EventScript_EnterColosseum:: applymovement VAR_LAST_TALKED, Movement_AttendantFaceLeft waitmovement 0 closemessage - applymovement OBJ_EVENT_ID_PLAYER, Movement_PlayerApproachLinkRoomLeft + applymovement LOCALID_PLAYER, Movement_PlayerApproachLinkRoomLeft waitmovement 0 opendoor 9, 1 waitdooranim - applymovement OBJ_EVENT_ID_PLAYER, Movement_PlayerEnterLinkRoom + applymovement LOCALID_PLAYER, Movement_PlayerEnterLinkRoom waitmovement 0 - hideobjectat OBJ_EVENT_ID_PLAYER, 0 + hideobjectat LOCALID_PLAYER, 0 closedoor 9, 1 waitdooranim release @@ -369,7 +369,7 @@ CableClub_EventScript_EnterColosseum:: @ Unused CableClub_EventScript_PlayerApproachLinkRoomRight:: - applymovement OBJ_EVENT_ID_PLAYER, Movement_PlayerApproachLinkRoomRight + applymovement LOCALID_PLAYER, Movement_PlayerApproachLinkRoomRight waitmovement 0 return @@ -444,13 +444,13 @@ CableClub_EventScript_EnterTradeCenter:: applymovement VAR_LAST_TALKED, Movement_AttendantFaceLeft waitmovement 0 closemessage - applymovement OBJ_EVENT_ID_PLAYER, Movement_PlayerApproachLinkRoomLeft + applymovement LOCALID_PLAYER, Movement_PlayerApproachLinkRoomLeft waitmovement 0 opendoor 9, 1 waitdooranim - applymovement OBJ_EVENT_ID_PLAYER, Movement_PlayerEnterLinkRoom + applymovement LOCALID_PLAYER, Movement_PlayerEnterLinkRoom waitmovement 0 - hideobjectat OBJ_EVENT_ID_PLAYER, 0 + hideobjectat LOCALID_PLAYER, 0 closedoor 9, 1 waitdooranim release @@ -509,13 +509,13 @@ CableClub_EventScript_EnterRecordCorner:: applymovement VAR_LAST_TALKED, Movement_AttendantFaceLeft waitmovement 0 closemessage - applymovement OBJ_EVENT_ID_PLAYER, Movement_PlayerApproachLinkRoomLeft + applymovement LOCALID_PLAYER, Movement_PlayerApproachLinkRoomLeft waitmovement 0 opendoor 9, 1 waitdooranim - applymovement OBJ_EVENT_ID_PLAYER, Movement_PlayerEnterLinkRoom + applymovement LOCALID_PLAYER, Movement_PlayerEnterLinkRoom waitmovement 0 - hideobjectat OBJ_EVENT_ID_PLAYER, 0 + hideobjectat LOCALID_PLAYER, 0 closedoor 9, 1 waitdooranim release @@ -896,13 +896,13 @@ CableClub_EventScript_EnterUnionRoom:: delay 60 applymovement VAR_LAST_TALKED, Movement_AttendantFaceLeft waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Movement_PlayerApproachLinkRoomLeft + applymovement LOCALID_PLAYER, Movement_PlayerApproachLinkRoomLeft waitmovement 0 opendoor 5, 1 waitdooranim - applymovement OBJ_EVENT_ID_PLAYER, Movement_PlayerEnterLinkRoom + applymovement LOCALID_PLAYER, Movement_PlayerEnterLinkRoom waitmovement 0 - hideobjectat OBJ_EVENT_ID_PLAYER, 0 + hideobjectat LOCALID_PLAYER, 0 closedoor 5, 1 waitdooranim special Script_ResetUnionRoomTrade @@ -1196,13 +1196,13 @@ CableClub_EventScript_EnterWirelessLinkRoom:: applymovement VAR_LAST_TALKED, Movement_AttendantFaceLeft waitmovement 0 closemessage - applymovement OBJ_EVENT_ID_PLAYER, Movement_PlayerApproachLinkRoomLeft + applymovement LOCALID_PLAYER, Movement_PlayerApproachLinkRoomLeft waitmovement 0 opendoor 9, 1 waitdooranim - applymovement OBJ_EVENT_ID_PLAYER, Movement_PlayerEnterLinkRoom + applymovement LOCALID_PLAYER, Movement_PlayerEnterLinkRoom waitmovement 0 - hideobjectat OBJ_EVENT_ID_PLAYER, 0 + hideobjectat LOCALID_PLAYER, 0 closedoor 9, 1 waitdooranim release @@ -1378,9 +1378,9 @@ MossdeepCity_GameCorner_1F_EventScript_EnterMinigameRoom:: applymovement VAR_LAST_TALKED, Movement_AttendantFaceLeft waitmovement 0 closemessage - applymovement OBJ_EVENT_ID_PLAYER, Movement_PlayerEnterMinigameRoom + applymovement LOCALID_PLAYER, Movement_PlayerEnterMinigameRoom waitmovement 0 - hideobjectat OBJ_EVENT_ID_PLAYER, 0 + hideobjectat LOCALID_PLAYER, 0 release waitstate end diff --git a/data/scripts/cave_hole.inc b/data/scripts/cave_hole.inc index d7acf29d96cb..fc4962912af3 100644 --- a/data/scripts/cave_hole.inc +++ b/data/scripts/cave_hole.inc @@ -9,7 +9,7 @@ CaveHole_FixCrackedGround: EventScript_FallDownHole:: lockall delay 20 - applymovement OBJ_EVENT_ID_PLAYER, Movement_SetInvisible + applymovement LOCALID_PLAYER, Movement_SetInvisible waitmovement 0 playse SE_FALL delay 60 @@ -20,7 +20,7 @@ EventScript_FallDownHole:: EventScript_FallDownHoleMtPyre:: lockall delay 20 - applymovement OBJ_EVENT_ID_PLAYER, Movement_SetInvisible + applymovement LOCALID_PLAYER, Movement_SetInvisible waitmovement 0 playse SE_FALL delay 60 diff --git a/data/scripts/contest_hall.inc b/data/scripts/contest_hall.inc index 04c62a6de317..61beb94a1258 100644 --- a/data/scripts/contest_hall.inc +++ b/data/scripts/contest_hall.inc @@ -1,19 +1,3 @@ -.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:: lock @@ -203,7 +187,7 @@ ContestHall_EventScript_DoContest:: lockall applymovement LOCALID_CONTESTANT_4, ContestHall_Movement_Player4FaceUp waitmovement 0 - applymovement LOCALID_MC, ContestHall_Movement_MCWalkDown + applymovement LOCALID_CONTEST_MC, ContestHall_Movement_MCWalkDown waitmovement 0 releaseall call ContestHall_EventScript_TryWaitForLink @@ -279,7 +263,7 @@ ContestHall_EventScript_ContestGettingStarted:: bufferstdstring STR_VAR_3, VAR_0x8009 call ContestHall_EventScript_GettingStarted lockall - applymovement LOCALID_MC, ContestHall_Movement_MCBackUp + applymovement LOCALID_CONTEST_MC, ContestHall_Movement_MCBackUp waitmovement 0 releaseall return @@ -384,7 +368,7 @@ ContestHall_EventScript_ShowContestMonPic:: releaseall call ContestHall_EventScript_TryWaitForLink call ContestHall_EventScript_CheckIfContestWithRSPlayer - addobject LOCALID_POKEBALL + addobject LOCALID_CONTEST_POKEBALL playse SE_LEDGE lockall applymovement VAR_0x800B, ContestHall_Movement_ContestantDelay32 @@ -413,13 +397,13 @@ ContestHall_EventScript_AudienceVote:: playse SE_M_ENCORE2 waitmessage call ContestHall_EventScript_AudienceLookAround - applymovement LOCALID_MC, ContestHall_Movement_MCFaceJudge2 + applymovement LOCALID_CONTEST_MC, ContestHall_Movement_MCFaceJudge2 waitmovement 0 - applymovement LOCALID_JUDGE, ContestHall_Movement_JudgeFaceMC + applymovement LOCALID_CONTEST_JUDGE, ContestHall_Movement_JudgeFaceMC waitmovement 0 delay 20 - applymovement LOCALID_MC, ContestHall_Movement_FaceContestants - applymovement LOCALID_JUDGE, ContestHall_Movement_FaceContestants + applymovement LOCALID_CONTEST_MC, ContestHall_Movement_FaceContestants + applymovement LOCALID_CONTEST_JUDGE, ContestHall_Movement_FaceContestants waitmovement 0 return @@ -459,25 +443,25 @@ ContestHall_EventScript_VotingUnderWayLink:: ContestHall_EventScript_AudienceReactToContestant:: call ContestHall_EventScript_TryWaitForLink - applymovement LOCALID_MC, ContestHall_Movement_AudienceMemberLookLeft + applymovement LOCALID_CONTEST_MC, ContestHall_Movement_AudienceMemberLookLeft waitmovement 0 playse SE_M_ENCORE2 call ContestHall_EventScript_VObjectAudienceLookAround - applymovement LOCALID_AUDIENCE_5, ContestHall_Movement_AudienceMemberLookRight - applymovement LOCALID_AUDIENCE_2, ContestHall_Movement_AudienceMemberLookDown - applymovement LOCALID_AUDIENCE_3, ContestHall_Movement_AudienceMemberLookRight + applymovement LOCALID_CONTEST_AUDIENCE_5, ContestHall_Movement_AudienceMemberLookRight + applymovement LOCALID_CONTEST_AUDIENCE_2, ContestHall_Movement_AudienceMemberLookDown + applymovement LOCALID_CONTEST_AUDIENCE_3, ContestHall_Movement_AudienceMemberLookRight waitmovement 0 - applymovement LOCALID_MC, ContestHall_Movement_AudienceMemberLookRight + applymovement LOCALID_CONTEST_MC, ContestHall_Movement_AudienceMemberLookRight waitmovement 0 - 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 + applymovement LOCALID_CONTEST_AUDIENCE_6, ContestHall_Movement_AudienceMemberLookLeft + applymovement LOCALID_CONTEST_AUDIENCE_7, ContestHall_Movement_AudienceMemberLookDown + applymovement LOCALID_CONTEST_AUDIENCE_1, ContestHall_Movement_AudienceMemberLookUp + applymovement LOCALID_CONTEST_AUDIENCE_4, ContestHall_Movement_AudienceMemberLookLeft waitmovement 0 - applymovement LOCALID_MC, ContestHall_Movement_MCLookAtJudge + applymovement LOCALID_CONTEST_MC, ContestHall_Movement_MCLookAtJudge waitmovement 0 - applymovement LOCALID_MC, ContestHall_Movement_MCWalkInPlaceDown - applymovement LOCALID_JUDGE, ContestHall_Movement_JudgeLookAtMC + applymovement LOCALID_CONTEST_MC, ContestHall_Movement_MCWalkInPlaceDown + applymovement LOCALID_CONTEST_JUDGE, ContestHall_Movement_JudgeLookAtMC waitmovement 0 releaseall call ContestHall_EventScript_TryWaitForLink @@ -623,7 +607,7 @@ ContestHall_EventScript_Set8Hearts:: ContestHall_EventScript_TryDisplayHeartAudienceMember1:: goto_if_eq VAR_TEMP_1, 1, ContestHall_EventScript_AudienceMember1AlreadyEmoted - applymovement LOCALID_AUDIENCE_1, ContestHall_Movement_Heart + applymovement LOCALID_CONTEST_AUDIENCE_1, ContestHall_Movement_Heart playse SE_PIN delay 14 setvar VAR_TEMP_1, 1 @@ -635,7 +619,7 @@ ContestHall_EventScript_AudienceMember1AlreadyEmoted:: ContestHall_EventScript_TryDisplayHeartAudienceMember2:: goto_if_eq VAR_TEMP_2, 1, ContestHall_EventScript_AudienceMember2AlreadyEmoted - applymovement LOCALID_AUDIENCE_2, ContestHall_Movement_Heart + applymovement LOCALID_CONTEST_AUDIENCE_2, ContestHall_Movement_Heart playse SE_PIN delay 14 setvar VAR_TEMP_2, 1 @@ -647,7 +631,7 @@ ContestHall_EventScript_AudienceMember2AlreadyEmoted:: ContestHall_EventScript_TryDisplayHeartAudienceMember3:: goto_if_eq VAR_TEMP_3, 1, ContestHall_EventScript_AudienceMember3AlreadyEmoted - applymovement LOCALID_AUDIENCE_3, ContestHall_Movement_Heart + applymovement LOCALID_CONTEST_AUDIENCE_3, ContestHall_Movement_Heart playse SE_PIN delay 14 setvar VAR_TEMP_3, 1 @@ -659,7 +643,7 @@ ContestHall_EventScript_AudienceMember3AlreadyEmoted:: ContestHall_EventScript_TryDisplayHeartAudienceMember4:: goto_if_eq VAR_TEMP_4, 1, ContestHall_EventScript_Audience4MemberAlreadyEmoted - applymovement LOCALID_AUDIENCE_4, ContestHall_Movement_Heart + applymovement LOCALID_CONTEST_AUDIENCE_4, ContestHall_Movement_Heart playse SE_PIN delay 14 setvar VAR_TEMP_4, 1 @@ -671,7 +655,7 @@ ContestHall_EventScript_Audience4MemberAlreadyEmoted:: ContestHall_EventScript_TryDisplayHeartAudienceMember5:: goto_if_eq VAR_TEMP_5, 1, ContestHall_EventScript_AudienceMember5AlreadyEmoted - applymovement LOCALID_AUDIENCE_5, ContestHall_Movement_Heart + applymovement LOCALID_CONTEST_AUDIENCE_5, ContestHall_Movement_Heart playse SE_PIN delay 14 setvar VAR_TEMP_5, 1 @@ -683,7 +667,7 @@ ContestHall_EventScript_AudienceMember5AlreadyEmoted:: ContestHall_EventScript_TryDisplayHeartAudienceMember6:: goto_if_eq VAR_TEMP_6, 1, ContestHall_EventScript_AudienceMember6AlreadyEmoted - applymovement LOCALID_AUDIENCE_6, ContestHall_Movement_Heart + applymovement LOCALID_CONTEST_AUDIENCE_6, ContestHall_Movement_Heart playse SE_PIN delay 14 setvar VAR_TEMP_6, 1 @@ -695,7 +679,7 @@ ContestHall_EventScript_AudienceMember6AlreadyEmoted:: ContestHall_EventScript_TryDisplayHeartAudienceMember7:: goto_if_eq VAR_TEMP_7, 1, ContestHall_EventScript_AudienceMember7AlreadyEmoted - applymovement LOCALID_AUDIENCE_7, ContestHall_Movement_Heart + applymovement LOCALID_CONTEST_AUDIENCE_7, ContestHall_Movement_Heart playse SE_PIN delay 14 setvar VAR_TEMP_7, 1 @@ -707,7 +691,7 @@ ContestHall_EventScript_AudienceMember7AlreadyEmoted:: ContestHall_EventScript_TryDisplayHeartAudienceMember8:: goto_if_eq VAR_TEMP_8, 1, ContestHall_EventScript_AudienceMember8AlreadyEmoted - applymovement LOCALID_ARTIST, ContestHall_Movement_Heart + applymovement LOCALID_CONTEST_ARTIST, ContestHall_Movement_Heart playse SE_PIN delay 14 setvar VAR_TEMP_8, 1 @@ -720,7 +704,7 @@ ContestHall_EventScript_AudienceMember8AlreadyEmoted:: ContestHall_EventScript_ContestantReturn:: closemessage release - removeobject LOCALID_POKEBALL + removeobject LOCALID_CONTEST_POKEBALL special HideContestEntryMonPic call ContestHall_EventScript_TryWaitForLink switch VAR_0x8006 @@ -764,13 +748,13 @@ ContestHall_EventScript_Player4WalkBack:: ContestHall_EventScript_DoContestAppeals:: lockall - applymovement LOCALID_MC, ContestHall_Movement_FaceContestants2 + applymovement LOCALID_CONTEST_MC, ContestHall_Movement_FaceContestants2 waitmovement 0 call ContestHall_EventScript_TryWaitForLink call ContestHall_EventScript_LetsAppeal waitmessage - applymovement LOCALID_MC, ContestHall_Movement_WalkStageLeft - applymovement LOCALID_JUDGE, ContestHall_Movement_WalkStageRight + applymovement LOCALID_CONTEST_MC, ContestHall_Movement_WalkStageLeft + applymovement LOCALID_CONTEST_JUDGE, ContestHall_Movement_WalkStageRight waitmovement 0 releaseall call ContestHall_EventScript_TryWaitForLink @@ -780,8 +764,8 @@ ContestHall_EventScript_DoContestAppeals:: special LinkContestTryShowWirelessIndicator setvar VAR_TEMP_9, 0 lockall - applymovement LOCALID_MC, ContestHall_Movement_WalkStageRight - applymovement LOCALID_JUDGE, ContestHall_Movement_WalkStageLeft + applymovement LOCALID_CONTEST_MC, ContestHall_Movement_WalkStageRight + applymovement LOCALID_CONTEST_JUDGE, ContestHall_Movement_WalkStageLeft waitmovement 0 releaseall return @@ -817,13 +801,13 @@ ContestHall_EventScript_ContestResults:: call ContestHall_EventScript_TryWaitForLink call ContestHall_EventScript_ThankYouForAppeals call ContestHall_EventScript_TryWaitForLink - applymovement LOCALID_MC, ContestHall_Movement_MCFaceJudge + applymovement LOCALID_CONTEST_MC, ContestHall_Movement_MCFaceJudge waitmovement 0 call ContestHall_EventScript_JudgeLooksReady call ContestHall_EventScript_TryWaitForLink call ContestHall_EventScript_WeWillDeclareWinner call ContestHall_EventScript_TryWaitForLink - applymovement LOCALID_MC, ContestHall_Movement_FaceContestants + applymovement LOCALID_CONTEST_MC, ContestHall_Movement_FaceContestants waitmovement 0 closemessage releaseall @@ -934,14 +918,14 @@ ContestHall_EventScript_AudienceLookAround:: addvar VAR_TEMP_1, 1 lockall call_if_gt VAR_CONTEST_TYPE, CONTEST_TYPE_NPC_NORMAL, ContestHall_EventScript_VObjectAudienceLookAround - applymovement LOCALID_AUDIENCE_5, ContestHall_Movement_AudienceMemberLookRight - applymovement LOCALID_AUDIENCE_2, ContestHall_Movement_AudienceMemberLookDown - applymovement LOCALID_AUDIENCE_3, ContestHall_Movement_AudienceMemberLookRight + applymovement LOCALID_CONTEST_AUDIENCE_5, ContestHall_Movement_AudienceMemberLookRight + applymovement LOCALID_CONTEST_AUDIENCE_2, ContestHall_Movement_AudienceMemberLookDown + applymovement LOCALID_CONTEST_AUDIENCE_3, ContestHall_Movement_AudienceMemberLookRight delay 30 - 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 + applymovement LOCALID_CONTEST_AUDIENCE_6, ContestHall_Movement_AudienceMemberLookLeft + applymovement LOCALID_CONTEST_AUDIENCE_7, ContestHall_Movement_AudienceMemberLookDown + applymovement LOCALID_CONTEST_AUDIENCE_1, ContestHall_Movement_AudienceMemberLookUp + applymovement LOCALID_CONTEST_AUDIENCE_4, ContestHall_Movement_AudienceMemberLookLeft goto_if_ne VAR_TEMP_1, 4, ContestHall_EventScript_AudienceLookAround delay 30 return diff --git a/data/scripts/day_care.inc b/data/scripts/day_care.inc index cb053f2c401d..c9af7f5a3a42 100644 --- a/data/scripts/day_care.inc +++ b/data/scripts/day_care.inc @@ -1,5 +1,3 @@ -.set LOCALID_DAYCARE_LADY, 1 - Route117_EventScript_DaycareMan:: lock faceplayer diff --git a/data/scripts/elite_four.inc b/data/scripts/elite_four.inc index 97d7f413149f..1d1f7ab3eb52 100644 --- a/data/scripts/elite_four.inc +++ b/data/scripts/elite_four.inc @@ -1,5 +1,5 @@ PokemonLeague_EliteFour_SetAdvanceToNextRoomMetatiles:: - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_Delay32 + applymovement LOCALID_PLAYER, Common_Movement_Delay32 waitmovement 0 playse SE_DOOR setmetatile 6, 1, METATILE_EliteFour_OpenDoor_Frame, FALSE @@ -18,7 +18,7 @@ PokemonLeague_EliteFour_SetAdvanceToNextRoomMetatiles:: return PokemonLeague_EliteFour_EventScript_WalkInCloseDoor:: - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkUp6 + applymovement LOCALID_PLAYER, Common_Movement_WalkUp6 waitmovement 0 playse SE_TRUCK_DOOR setmetatile 5, 12, METATILE_EliteFour_EntryDoor_ClosedTop, TRUE diff --git a/data/scripts/gabby_and_ty.inc b/data/scripts/gabby_and_ty.inc index 260526c4b61f..06e1010589e4 100644 --- a/data/scripts/gabby_and_ty.inc +++ b/data/scripts/gabby_and_ty.inc @@ -1,8 +1,15 @@ -@ 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 GetGabbyAndTyLocalIds +@ Gabby and Ty can appear in a fixed location on 3 different routes. +@ Each time they are battled they will disappear from the route they're on +@ and relocate to the next one, in the order Route 111 -> Route 118 -> Route 120. +@ Gabby and Ty have 6 different parties which will get cycled on each appearance. +@ After they're defeated 6 times they will stick to their 6th party but continue +@ cycling between the 3 routes. To determine which trainer party gets used GF created +@ multiple object events for Gabby and Ty on each of the 3 routes. The scripts below +@ handle hiding and showing these objects so the correct party appears on the correct route. +@ Route 111 and Route 118 have 3 object events each (parties 1,4,6 and 2,5,6 respectively) +@ and Route 120 has 2 object events each (parties 3 and 6). GabbyAndTy_EventScript_UpdateLocation:: - cleartrainerflag TRAINER_GABBY_AND_TY_6 + cleartrainerflag TRAINER_GABBY_AND_TY_6 @ Clear flag for their final party to allow infinite rematches. specialvar VAR_RESULT, GabbyAndTyGetBattleNum switch VAR_RESULT case 0, GabbyAndTy_EventScript_MoveForBattle1 @@ -31,13 +38,13 @@ GabbyAndTy_EventScript_MoveForBattle3:: return GabbyAndTy_EventScript_MoveForBattle4:: - call GabbyAndTy_EventScript_ShowAtRoute111_3 + call GabbyAndTy_EventScript_ShowAtRoute111_2 call GabbyAndTy_EventScript_HideAtRoute120_1 return GabbyAndTy_EventScript_MoveForBattle5:: call GabbyAndTy_EventScript_ShowAtRoute118_2 - call GabbyAndTy_EventScript_HideAtRoute111_3 + call GabbyAndTy_EventScript_HideAtRoute111_2 return GabbyAndTy_EventScript_MoveForBattle6:: @@ -46,13 +53,13 @@ GabbyAndTy_EventScript_MoveForBattle6:: return GabbyAndTy_EventScript_MoveForBattle7:: - call GabbyAndTy_EventScript_ShowAtRoute111_2 + call GabbyAndTy_EventScript_ShowAtRoute111_3 call GabbyAndTy_EventScript_HideAtRoute120_2 return GabbyAndTy_EventScript_MoveForBattle8:: call GabbyAndTy_EventScript_ShowAtRoute118_3 - call GabbyAndTy_EventScript_HideAtRoute111_2 + call GabbyAndTy_EventScript_HideAtRoute111_3 return GabbyAndTy_EventScript_MoveForBattle9:: @@ -84,12 +91,12 @@ GabbyAndTy_EventScript_ShowAtRoute120_1:: clearflag FLAG_HIDE_ROUTE_120_GABBY_AND_TY_1 return -GabbyAndTy_EventScript_HideAtRoute111_3:: - setflag FLAG_HIDE_ROUTE_111_GABBY_AND_TY_3 +GabbyAndTy_EventScript_HideAtRoute111_2:: + setflag FLAG_HIDE_ROUTE_111_GABBY_AND_TY_2 return -GabbyAndTy_EventScript_ShowAtRoute111_3:: - clearflag FLAG_HIDE_ROUTE_111_GABBY_AND_TY_3 +GabbyAndTy_EventScript_ShowAtRoute111_2:: + clearflag FLAG_HIDE_ROUTE_111_GABBY_AND_TY_2 return GabbyAndTy_EventScript_HideAtRoute118_2:: @@ -108,12 +115,12 @@ GabbyAndTy_EventScript_ShowAtRoute120_2:: clearflag FLAG_HIDE_ROUTE_120_GABBY_AND_TY_2 return -GabbyAndTy_EventScript_HideAtRoute111_2:: - setflag FLAG_HIDE_ROUTE_111_GABBY_AND_TY_2 +GabbyAndTy_EventScript_HideAtRoute111_3:: + setflag FLAG_HIDE_ROUTE_111_GABBY_AND_TY_3 return -GabbyAndTy_EventScript_ShowAtRoute111_2:: - clearflag FLAG_HIDE_ROUTE_111_GABBY_AND_TY_2 +GabbyAndTy_EventScript_ShowAtRoute111_3:: + clearflag FLAG_HIDE_ROUTE_111_GABBY_AND_TY_3 return GabbyAndTy_EventScript_HideAtRoute118_3:: diff --git a/data/scripts/lilycove_lady.inc b/data/scripts/lilycove_lady.inc index 5519de9791aa..0eb8be19ba23 100644 --- a/data/scripts/lilycove_lady.inc +++ b/data/scripts/lilycove_lady.inc @@ -1,6 +1,3 @@ -.set LOCALID_LILYCOVE_LADY, 4 -.set LOCALID_LADYS_MON, 5 - LilycoveCity_PokemonCenter_1F_EventScript_LilycoveLady:: special Script_GetLilycoveLadyId switch VAR_RESULT @@ -390,7 +387,7 @@ LilycoveCity_PokemonCenter_1F_EventScript_FeedPokeblock:: applymovement LOCALID_LILYCOVE_LADY, LilycoveCity_PokemonCenter_1F_Movement_LadyFaceMon waitmovement 0 delay 60 - applymovement LOCALID_LADYS_MON, LilycoveCity_PokemonCenter_1F_Movement_MonFaceLady + applymovement LOCALID_LILYCOVE_LADYS_MON, LilycoveCity_PokemonCenter_1F_Movement_MonFaceLady waitmovement 0 delay 60 waitse @@ -403,7 +400,7 @@ LilycoveCity_PokemonCenter_1F_EventScript_FeedPokeblock:: @ VAR_0x8004 here is the return value from GivePokeblockToContestLady LilycoveCity_PokemonCenter_1F_EventScript_MonEnjoyPokeblock:: - applymovement LOCALID_LADYS_MON, LilycoveCity_PokemonCenter_1F_Movement_MonJump + applymovement LOCALID_LILYCOVE_LADYS_MON, LilycoveCity_PokemonCenter_1F_Movement_MonJump waitmovement 0 delay 60 LilycoveCity_PokemonCenter_1F_EventScript_FinishFeedPokeblock:: diff --git a/data/scripts/new_game.inc b/data/scripts/new_game.inc index e9c8dd8d56c0..1803199e4285 100644 --- a/data/scripts/new_game.inc +++ b/data/scripts/new_game.inc @@ -161,10 +161,10 @@ EventScript_ResetAllMapFlags:: setflag FLAG_HIDE_LILYCOVE_FAN_CLUB_INTERVIEWER setflag FLAG_HIDE_ROUTE_118_GABBY_AND_TY_1 setflag FLAG_HIDE_ROUTE_120_GABBY_AND_TY_1 - setflag FLAG_HIDE_ROUTE_111_GABBY_AND_TY_3 + setflag FLAG_HIDE_ROUTE_111_GABBY_AND_TY_2 setflag FLAG_HIDE_ROUTE_118_GABBY_AND_TY_2 setflag FLAG_HIDE_ROUTE_120_GABBY_AND_TY_2 - setflag FLAG_HIDE_ROUTE_111_GABBY_AND_TY_2 + setflag FLAG_HIDE_ROUTE_111_GABBY_AND_TY_3 setflag FLAG_HIDE_ROUTE_118_GABBY_AND_TY_3 setflag FLAG_HIDE_SLATEPORT_CITY_CONTEST_REPORTER setflag FLAG_HIDE_LILYCOVE_CONTEST_HALL_REPORTER diff --git a/data/scripts/players_house.inc b/data/scripts/players_house.inc index caa4e69551ec..4bcb31aa246c 100644 --- a/data/scripts/players_house.inc +++ b/data/scripts/players_house.inc @@ -1,8 +1,3 @@ -@ 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:: setvar VAR_LITTLEROOT_INTRO_STATE, 5 return @@ -16,19 +11,19 @@ PlayersHouse_1F_EventScript_EnterHouseMovingIn:: msgbox PlayersHouse_1F_Text_MoversPokemonGoSetClock, MSGBOX_DEFAULT closemessage setvar VAR_LITTLEROOT_INTRO_STATE, 4 - applymovement OBJ_EVENT_ID_PLAYER, PlayersHouse_1F_Movement_PlayerWalkIn + applymovement LOCALID_PLAYER, PlayersHouse_1F_Movement_PlayerWalkIn applymovement VAR_0x8004, Common_Movement_WalkInPlaceFasterUp waitmovement 0 releaseall end PlayersHouse_1F_EventScript_MomFacePlayerMovingInMale:: - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterRight waitmovement 0 return PlayersHouse_1F_EventScript_MomFacePlayerMovingInFemale:: - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 return @@ -40,7 +35,7 @@ PlayersHouse_1F_EventScript_MomGoSeeRoom:: msgbox PlayersHouse_1F_Text_ArentYouInterestedInRoom, MSGBOX_DEFAULT closemessage applymovement VAR_0x8004, Common_Movement_WalkInPlaceFasterUp - applymovement OBJ_EVENT_ID_PLAYER, PlayersHouse_1F_Movement_MovePlayerAwayFromDoor + applymovement LOCALID_PLAYER, PlayersHouse_1F_Movement_MovePlayerAwayFromDoor waitmovement 0 releaseall end @@ -75,11 +70,11 @@ PlayersHouse_2F_EventScript_WallClock:: end PlayersHouse_2F_EventScript_MomComesUpstairsMale:: - setvar VAR_0x8008, LOCALID_MOM_2F + setvar VAR_0x8008, LOCALID_PLAYERS_HOUSE_2F_MOM addobject VAR_0x8008 applymovement VAR_0x8008, PlayersHouse_2F_Movement_MomEntersMale waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterRight waitmovement 0 msgbox PlayersHouse_2F_Text_HowDoYouLikeYourRoom, MSGBOX_DEFAULT closemessage @@ -88,11 +83,11 @@ PlayersHouse_2F_EventScript_MomComesUpstairsMale:: return PlayersHouse_2F_EventScript_MomComesUpstairsFemale:: - setvar VAR_0x8008, LOCALID_MOM_2F + setvar VAR_0x8008, LOCALID_PLAYERS_HOUSE_2F_MOM addobject VAR_0x8008 applymovement VAR_0x8008, PlayersHouse_2F_Movement_MomEntersFemale waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 msgbox PlayersHouse_2F_Text_HowDoYouLikeYourRoom, MSGBOX_DEFAULT closemessage @@ -153,17 +148,17 @@ PlayersHouse_1F_EventScript_PetalburgGymReportMale:: applymovement VAR_0x8005, Common_Movement_WalkInPlaceFasterRight waitmovement 0 call PlayersHouse_1F_EventScript_MomNoticeGymBroadcast - applymovement OBJ_EVENT_ID_PLAYER, PlayersHouse_1F_Movement_PlayerApproachTVForGymMale + applymovement LOCALID_PLAYER, PlayersHouse_1F_Movement_PlayerApproachTVForGymMale waitmovement 0 playbgm MUS_ENCOUNTER_INTERVIEWER, FALSE msgbox PlayersHouse_1F_Text_MaybeDadWillBeOn, MSGBOX_DEFAULT closemessage applymovement VAR_0x8005, PlayersHouse_1F_Movement_MomMakeRoomToSeeTVMale waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, PlayersHouse_1F_Movement_PlayerMoveToTVMale + applymovement LOCALID_PLAYER, PlayersHouse_1F_Movement_PlayerMoveToTVMale waitmovement 0 call PlayersHouse_1F_EventScript_WatchGymBroadcast - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 msgbox PlayersHouse_1F_Text_ItsOverWeMissedHim, MSGBOX_DEFAULT msgbox PlayersHouse_1F_Text_GoIntroduceYourselfNextDoor, MSGBOX_DEFAULT @@ -178,17 +173,17 @@ PlayersHouse_1F_EventScript_PetalburgGymReportFemale:: applymovement VAR_0x8005, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 call PlayersHouse_1F_EventScript_MomNoticeGymBroadcast - applymovement OBJ_EVENT_ID_PLAYER, PlayersHouse_1F_Movement_PlayerApproachTVForGymFemale + applymovement LOCALID_PLAYER, PlayersHouse_1F_Movement_PlayerApproachTVForGymFemale waitmovement 0 playbgm MUS_ENCOUNTER_INTERVIEWER, FALSE msgbox PlayersHouse_1F_Text_MaybeDadWillBeOn, MSGBOX_DEFAULT closemessage applymovement VAR_0x8005, PlayersHouse_1F_Movement_MomMakeRoomToSeeTVFemale waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, PlayersHouse_1F_Movement_PlayerMoveToTVFemale + applymovement LOCALID_PLAYER, PlayersHouse_1F_Movement_PlayerMoveToTVFemale waitmovement 0 call PlayersHouse_1F_EventScript_WatchGymBroadcast - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterRight waitmovement 0 msgbox PlayersHouse_1F_Text_ItsOverWeMissedHim, MSGBOX_DEFAULT msgbox PlayersHouse_1F_Text_GoIntroduceYourselfNextDoor, MSGBOX_DEFAULT @@ -210,7 +205,7 @@ PlayersHouse_1F_EventScript_MomNoticeGymBroadcast:: return PlayersHouse_1F_EventScript_WatchGymBroadcast:: - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 msgbox PlayersHouse_1F_Text_ReportFromPetalburgGym, MSGBOX_DEFAULT fadedefaultbgm @@ -492,14 +487,14 @@ PlayersHouse_1F_EventScript_AirLatiBroadcast:: PlayersHouse_1F_EventScript_SetUpObjectEventVarsMale:: setvar VAR_0x8008, MALE - setvar VAR_0x8009, LOCALID_DAD - setvar VAR_0x800A, LOCALID_MOM + setvar VAR_0x8009, LOCALID_PLAYERS_HOUSE_1F_DAD + setvar VAR_0x800A, LOCALID_PLAYERS_HOUSE_1F_MOM return PlayersHouse_1F_EventScript_SetUpObjectEventVarsFemale:: setvar VAR_0x8008, FEMALE - setvar VAR_0x8009, LOCALID_DAD - setvar VAR_0x800A, LOCALID_MOM + setvar VAR_0x8009, LOCALID_PLAYERS_HOUSE_1F_DAD + setvar VAR_0x800A, LOCALID_PLAYERS_HOUSE_1F_MOM return PlayersHouse_1F_EventScript_DadApproachPlayerMale:: @@ -527,38 +522,38 @@ PlayersHouse_1F_EventScript_MomApproachDadFemale:: return PlayersHouse_1F_EventScript_DadExitsMale:: - applymovement OBJ_EVENT_ID_PLAYER, PlayersHouse_1F_Movement_MomAndPlayerWatchDadExit + applymovement LOCALID_PLAYER, PlayersHouse_1F_Movement_MomAndPlayerWatchDadExit applymovement VAR_0x800A, PlayersHouse_1F_Movement_MomAndPlayerWatchDadExit applymovement VAR_0x8009, PlayersHouse_1F_Movement_DadExitsMale waitmovement 0 return PlayersHouse_1F_EventScript_DadExitsFemale:: - applymovement OBJ_EVENT_ID_PLAYER, PlayersHouse_1F_Movement_MomAndPlayerWatchDadExit + applymovement LOCALID_PLAYER, PlayersHouse_1F_Movement_MomAndPlayerWatchDadExit applymovement VAR_0x800A, PlayersHouse_1F_Movement_MomAndPlayerWatchDadExit applymovement VAR_0x8009, PlayersHouse_1F_Movement_DadExitsFemale waitmovement 0 return PlayersHouse_1F_EventScript_PlayerEnterRoomMale:: - applymovement OBJ_EVENT_ID_PLAYER, PlayersHouse_1F_Movement_PlayerEnterRoomMale + applymovement LOCALID_PLAYER, PlayersHouse_1F_Movement_PlayerEnterRoomMale waitmovement 0 return PlayersHouse_1F_EventScript_PlayerEnterRoomFemale:: - applymovement OBJ_EVENT_ID_PLAYER, PlayersHouse_1F_Movement_PlayerEnterRoomFemale + applymovement LOCALID_PLAYER, PlayersHouse_1F_Movement_PlayerEnterRoomFemale waitmovement 0 return PlayersHouse_1F_EventScript_PlayerApproachTVForLatiMale:: - applymovement OBJ_EVENT_ID_PLAYER, PlayersHouse_1F_Movement_PlayerApproachTVForLatiMale + applymovement LOCALID_PLAYER, PlayersHouse_1F_Movement_PlayerApproachTVForLatiMale waitmovement 0 applymovement VAR_0x800A, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 return PlayersHouse_1F_EventScript_PlayerApproachTVForLatiFemale:: - applymovement OBJ_EVENT_ID_PLAYER, PlayersHouse_1F_Movement_PlayerApproachTVForLatiFemale + applymovement LOCALID_PLAYER, PlayersHouse_1F_Movement_PlayerApproachTVForLatiFemale waitmovement 0 applymovement VAR_0x800A, Common_Movement_WalkInPlaceFasterRight waitmovement 0 @@ -567,14 +562,14 @@ PlayersHouse_1F_EventScript_PlayerApproachTVForLatiFemale:: PlayersHouse_1F_EventScript_MomApproachPlayerMale:: applymovement VAR_0x800A, PlayersHouse_1F_Movement_MomApproachPlayerMale waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 return PlayersHouse_1F_EventScript_MomApproachPlayerFemale:: applymovement VAR_0x800A, PlayersHouse_1F_Movement_MomApproachPlayerFemale waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterRight waitmovement 0 return @@ -591,14 +586,14 @@ PlayersHouse_1F_EventScript_MomNoticesLatiBroadcastFemale:: PlayersHouse_1F_EventScript_MomApproachPlayerAfterTVMale:: applymovement VAR_0x800A, PlayersHouse_1F_Movement_MomApproachPlayerAfterTVMale waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterRight waitmovement 0 return PlayersHouse_1F_EventScript_MomApproachPlayerAfterTVFemale:: applymovement VAR_0x800A, PlayersHouse_1F_Movement_MomApproachPlayerAfterTVFemale waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 return diff --git a/data/scripts/secret_base.inc b/data/scripts/secret_base.inc index 918a9d630127..3387e380efd0 100644 --- a/data/scripts/secret_base.inc +++ b/data/scripts/secret_base.inc @@ -144,7 +144,7 @@ SecretBase_EventScript_InitSecretBase:: end SecretBase_EventScript_FirstEntrance:: - applymovement OBJ_EVENT_ID_PLAYER, SecretBase_Movement_EnterBase + applymovement LOCALID_PLAYER, SecretBase_Movement_EnterBase waitmovement 0 setvar VAR_INIT_SECRET_BASE, 1 msgbox SecretBase_Text_WantToMakeYourSecretBaseHere, MSGBOX_YESNO diff --git a/include/constants/.gitignore b/include/constants/.gitignore index 761af9db7625..87f4babc6101 100644 --- a/include/constants/.gitignore +++ b/include/constants/.gitignore @@ -1,3 +1,4 @@ # Will be moved to build/ eventually map_groups.h -layouts.h \ No newline at end of file +layouts.h +map_event_ids.h diff --git a/include/constants/event_objects.h b/include/constants/event_objects.h index c8fa942655a6..60a23041faea 100644 --- a/include/constants/event_objects.h +++ b/include/constants/event_objects.h @@ -1,6 +1,9 @@ #ifndef GUARD_CONSTANTS_EVENT_OBJECTS_H #define GUARD_CONSTANTS_EVENT_OBJECTS_H +#include "constants/global.h" +#include "constants/map_event_ids.h" + #define OBJ_EVENT_GFX_BRENDAN_NORMAL 0 #define OBJ_EVENT_GFX_BRENDAN_MACH_BIKE 1 #define OBJ_EVENT_GFX_BRENDAN_SURFING 2 @@ -291,38 +294,18 @@ #define OBJ_KIND_NORMAL 0 #define OBJ_KIND_CLONE 255 // Exclusive to FRLG -// Special object event local ids -#define OBJ_EVENT_ID_PLAYER 0xFF -#define OBJ_EVENT_ID_CAMERA 0x7F +// Each object event template gets an ID that can be used to refer to it in scripts and elsewhere. +// This is referred to as the "local id" (and it's really just 1 + its index in the templates array). +// There are a few special IDs reserved for objects that don't have templates in the map data -- one for the player +// in regular offline play, five for linked players while playing Berry Blender, and one for an invisible object that +// can be spawned for the camera to track instead of the player. Additionally, the value 0 is reserved as an "empty" indicator. +#define LOCALID_NONE 0 +#define LOCALID_CAMERA 127 +#define LOCALID_BERRY_BLENDER_PLAYER_END 240 // This will use 5 (MAX_RFU_PLAYERS) IDs ending at 240, i.e. 236-240 +#define LOCALID_PLAYER 255 -// Object event local ids referenced in C files -#define LOCALID_ROUTE111_PLAYER_FALLING 45 -#define LOCALID_BIRTH_ISLAND_EXTERIOR_ROCK 1 -#define LOCALID_FARAWAY_ISLAND_MEW 1 -#define LOCALID_UNION_ROOM_PLAYER_4 2 -#define LOCALID_UNION_ROOM_PLAYER_8 3 -#define LOCALID_UNION_ROOM_PLAYER_7 4 -#define LOCALID_UNION_ROOM_PLAYER_6 5 -#define LOCALID_UNION_ROOM_PLAYER_5 6 -#define LOCALID_UNION_ROOM_PLAYER_3 7 -#define LOCALID_UNION_ROOM_PLAYER_2 8 -#define LOCALID_UNION_ROOM_PLAYER_1 9 -#define LOCALID_BATTLE_TOWER_LOBBY_REPORTER 5 -#define LOCALID_TRUCK_BOX_TOP 1 -#define LOCALID_TRUCK_BOX_BOTTOM_L 2 -#define LOCALID_TRUCK_BOX_BOTTOM_R 3 -#define LOCALID_OLDALE_MART_CLERK 1 -#define LOCALID_LAVARIDGE_MART_CLERK 1 -#define LOCALID_FALLARBOR_MART_CLERK 1 -#define LOCALID_VERDANTURF_MART_CLERK 1 -#define LOCALID_PETALBURG_MART_CLERK 1 -#define LOCALID_SLATEPORT_MART_CLERK 1 -#define LOCALID_MAUVILLE_MART_CLERK 1 -#define LOCALID_RUSTBORO_MART_CLERK 1 -#define LOCALID_FORTREE_MART_CLERK 1 -#define LOCALID_MOSSDEEP_MART_CLERK 1 -#define LOCALID_SOOTOPOLIS_MART_CLERK 1 -#define LOCALID_BATTLE_FRONTIER_MART_CLERK 1 -#define LOCALID_SLATEPORT_ENERGY_GURU 25 +// Aliases for old names. "object event id" normally refers to an index into gObjectEvents, which these are not. +#define OBJ_EVENT_ID_CAMERA LOCALID_CAMERA +#define OBJ_EVENT_ID_PLAYER LOCALID_PLAYER #endif // GUARD_CONSTANTS_EVENT_OBJECTS_H diff --git a/include/constants/flags.h b/include/constants/flags.h index f291a6187192..7b5c5edb453b 100644 --- a/include/constants/flags.h +++ b/include/constants/flags.h @@ -847,7 +847,7 @@ #define FLAG_HIDE_ROUTE_111_GABBY_AND_TY_1 0x31C #define FLAG_HIDE_ROUTE_118_GABBY_AND_TY_1 0x31D #define FLAG_HIDE_ROUTE_120_GABBY_AND_TY_1 0x31E -#define FLAG_HIDE_ROUTE_111_GABBY_AND_TY_3 0x31F +#define FLAG_HIDE_ROUTE_111_GABBY_AND_TY_2 0x31F #define FLAG_HIDE_LUGIA 0x320 #define FLAG_HIDE_HO_OH 0x321 #define FLAG_HIDE_LILYCOVE_CONTEST_HALL_REPORTER 0x322 @@ -951,7 +951,7 @@ #define FLAG_HIDE_ROUTE_110_TEAM_AQUA 0x384 #define FLAG_HIDE_ROUTE_118_GABBY_AND_TY_2 0x385 #define FLAG_HIDE_ROUTE_120_GABBY_AND_TY_2 0x386 -#define FLAG_HIDE_ROUTE_111_GABBY_AND_TY_2 0x387 +#define FLAG_HIDE_ROUTE_111_GABBY_AND_TY_3 0x387 #define FLAG_HIDE_ROUTE_118_GABBY_AND_TY_3 0x388 #define FLAG_HIDE_SLATEPORT_CITY_HARBOR_PATRONS 0x389 #define FLAG_HIDE_ROUTE_104_WHITE_HERB_FLORIST 0x38A diff --git a/include/global.h b/include/global.h index 00d608e672ad..1005862d54a4 100644 --- a/include/global.h +++ b/include/global.h @@ -618,7 +618,7 @@ struct RamScriptData u8 magic; u8 mapGroup; u8 mapNum; - u8 objectId; + u8 localId; u8 script[995]; //u8 padding; }; diff --git a/map_data_rules.mk b/map_data_rules.mk index 199991ad568a..4c255c098b7d 100755 --- a/map_data_rules.mk +++ b/map_data_rules.mk @@ -11,6 +11,7 @@ INCLUDECONSTS_OUTDIR := include/constants AUTO_GEN_TARGETS += $(INCLUDECONSTS_OUTDIR)/map_groups.h AUTO_GEN_TARGETS += $(INCLUDECONSTS_OUTDIR)/layouts.h +AUTO_GEN_TARGETS += $(INCLUDECONSTS_OUTDIR)/map_event_ids.h AUTO_GEN_TARGETS += $(DATA_SRC_SUBDIR)/heal_locations.h MAP_DIRS := $(dir $(wildcard $(MAPS_DIR)/*/map.json)) @@ -34,5 +35,11 @@ $(MAPS_OUTDIR)/connections.inc $(MAPS_OUTDIR)/groups.inc $(MAPS_OUTDIR)/events.i $(LAYOUTS_OUTDIR)/layouts.inc $(LAYOUTS_OUTDIR)/layouts_table.inc $(INCLUDECONSTS_OUTDIR)/layouts.h: $(LAYOUTS_DIR)/layouts.json $(MAPJSON) layouts emerald $< $(LAYOUTS_OUTDIR) $(INCLUDECONSTS_OUTDIR) -$(DATA_SRC_SUBDIR)/heal_locations.h: $(MAP_JSONS) - @$(MAPJSON) heal_locations emerald $^ $(DATA_SRC_SUBDIR)/heal_locations.h +# Generate files that depends on data that's distributed across the map.json files. +# There's a lot of map.json files, so we print an abbreviated output with echo. +# We're also not using a pattern rule, and we only want this to run once for both targets, +# so we use a separate target 'event_constants'. +$(INCLUDECONSTS_OUTDIR)/map_event_ids.h $(DATA_SRC_SUBDIR)/heal_locations.h: .event_constants ; +.event_constants: $(MAP_JSONS) + @$(MAPJSON) event_constants emerald $^ $(INCLUDECONSTS_OUTDIR)/map_event_ids.h $(DATA_SRC_SUBDIR)/heal_locations.h + @echo "$(MAPJSON) event_constants emerald $(INCLUDECONSTS_OUTDIR)/map_event_ids.h $(DATA_SRC_SUBDIR)/heal_locations.h" diff --git a/src/battle_pyramid.c b/src/battle_pyramid.c index 9212dcfa6db3..c675a5e60064 100644 --- a/src/battle_pyramid.c +++ b/src/battle_pyramid.c @@ -1023,7 +1023,7 @@ static void HidePyramidItem(void) break; } i++; - if (events[i].localId == 0) + if (events[i].localId == LOCALID_NONE) break; } } @@ -1934,7 +1934,7 @@ u8 GetNumBattlePyramidObjectEvents(void) for (i = 0; i < OBJECT_EVENTS_COUNT; i++) { - if (events[i].localId == 0) + if (events[i].localId == LOCALID_NONE) break; } diff --git a/src/battle_setup.c b/src/battle_setup.c index cf91131993c4..21a9ff3ec825 100644 --- a/src/battle_setup.c +++ b/src/battle_setup.c @@ -39,6 +39,7 @@ #include "data.h" #include "constants/battle_frontier.h" #include "constants/battle_setup.h" +#include "constants/event_objects.h" #include "constants/game_stat.h" #include "constants/items.h" #include "constants/songs.h" @@ -1092,7 +1093,7 @@ static void TrainerBattleLoadArgs(const struct TrainerBattleParameter *specs, co void SetMapVarsToTrainer(void) { - if (sTrainerObjectEventLocalId != 0) + if (sTrainerObjectEventLocalId != LOCALID_NONE) { gSpecialVar_LastTalked = sTrainerObjectEventLocalId; gSelectedObjectEvent = GetObjectEventIdByLocalIdAndMap(sTrainerObjectEventLocalId, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup); diff --git a/src/contest_util.c b/src/contest_util.c index e0e80a70912a..7e49ce33c64b 100644 --- a/src/contest_util.c +++ b/src/contest_util.c @@ -2306,13 +2306,13 @@ void GetNpcContestantLocalId(void) switch (contestant) { case 0: - localId = 3; + localId = LOCALID_CONTESTANT_1; break; case 1: - localId = 4; + localId = LOCALID_CONTESTANT_2; break; case 2: - localId = 5; + localId = LOCALID_CONTESTANT_3; break; default: // Invalid localId = 100; @@ -2512,7 +2512,12 @@ void LoadLinkContestPlayerPalettes(void) u8 objectEventId; int version; struct Sprite *sprite; - static const u8 sContestantLocalIds[CONTESTANT_COUNT] = { 3, 4, 5, 14 }; + static const u8 sContestantLocalIds[CONTESTANT_COUNT] = { + LOCALID_CONTESTANT_1, + LOCALID_CONTESTANT_2, + LOCALID_CONTESTANT_3, + LOCALID_CONTESTANT_4, + }; gReservedSpritePaletteCount = 12; if (gLinkContestFlags & LINK_CONTEST_FLAG_IS_LINK) diff --git a/src/event_object_lock.c b/src/event_object_lock.c index 29575111fbba..7cb260757c42 100644 --- a/src/event_object_lock.c +++ b/src/event_object_lock.c @@ -98,7 +98,7 @@ void FreezeObjects_WaitForPlayerAndSelected(void) void ScriptUnfreezeObjectEvents(void) { - u8 playerObjectId = GetObjectEventIdByLocalIdAndMap(OBJ_EVENT_ID_PLAYER, 0, 0); + u8 playerObjectId = GetObjectEventIdByLocalIdAndMap(LOCALID_PLAYER, 0, 0); ObjectEventClearHeldMovementIfFinished(&gObjectEvents[playerObjectId]); ScriptMovement_UnfreezeObjectEvents(); UnfreezeObjectEvents(); @@ -110,7 +110,7 @@ void UnionRoom_UnlockPlayerAndChatPartner(void) if (gObjectEvents[gSelectedObjectEvent].active) ObjectEventClearHeldMovementIfFinished(&gObjectEvents[gSelectedObjectEvent]); - playerObjectId = GetObjectEventIdByLocalIdAndMap(OBJ_EVENT_ID_PLAYER, 0, 0); + playerObjectId = GetObjectEventIdByLocalIdAndMap(LOCALID_PLAYER, 0, 0); ObjectEventClearHeldMovementIfFinished(&gObjectEvents[playerObjectId]); ScriptMovement_UnfreezeObjectEvents(); UnfreezeObjectEvents(); diff --git a/src/event_object_movement.c b/src/event_object_movement.c index 7b8d783c3c39..626e96897129 100644 --- a/src/event_object_movement.c +++ b/src/event_object_movement.c @@ -30,6 +30,17 @@ #include "constants/trainer_types.h" #include "constants/union_room.h" +#define SPECIAL_LOCALIDS_START (min(LOCALID_CAMERA, \ + min(LOCALID_PLAYER, \ + LOCALID_BERRY_BLENDER_PLAYER_END - MAX_RFU_PLAYERS + 1))) + +// The object event templates on a map cannot use the special IDs listed above or they can behave unexpectedly. +// For more details on these special IDs see their definitions in 'include/constants/event_objects.h'. +// OBJECT_EVENT_TEMPLATES_COUNT should always be low enough that it doesn't overlap with these IDs. +#if OBJECT_EVENT_TEMPLATES_COUNT >= SPECIAL_LOCALIDS_START +#error "OBJECT_EVENT_TEMPLATES_COUNT is too large. Object event local IDs may overlap with reserved IDs." +#endif + // this file was known as evobjmv.c in Game Freak's original source enum { @@ -1171,7 +1182,7 @@ static const u8 sPlayerDirectionToCopyDirection[][4] = { static void ClearObjectEvent(struct ObjectEvent *objectEvent) { *objectEvent = (struct ObjectEvent){}; - objectEvent->localId = OBJ_EVENT_ID_PLAYER; + objectEvent->localId = LOCALID_PLAYER; objectEvent->mapNum = MAP_NUM(MAP_UNDEFINED); objectEvent->mapGroup = MAP_GROUP(MAP_UNDEFINED); objectEvent->movementActionId = MOVEMENT_ACTION_NONE; @@ -1222,7 +1233,7 @@ u8 GetFirstInactiveObjectEventId(void) u8 GetObjectEventIdByLocalIdAndMap(u8 localId, u8 mapNum, u8 mapGroupId) { - if (localId < OBJ_EVENT_ID_PLAYER) + if (localId < LOCALID_PLAYER) return GetObjectEventIdByLocalIdAndMapInternal(localId, mapNum, mapGroupId); return GetObjectEventIdByLocalId(localId); @@ -6171,7 +6182,7 @@ bool8 MovementAction_FacePlayer_Step0(struct ObjectEvent *objectEvent, struct Sp { u8 playerObjectId; - if (!TryGetObjectEventIdByLocalIdAndMap(OBJ_EVENT_ID_PLAYER, 0, 0, &playerObjectId)) + if (!TryGetObjectEventIdByLocalIdAndMap(LOCALID_PLAYER, 0, 0, &playerObjectId)) FaceDirection(objectEvent, sprite, GetDirectionToFace(objectEvent->currentCoords.x, objectEvent->currentCoords.y, gObjectEvents[playerObjectId].currentCoords.x, @@ -6184,7 +6195,7 @@ bool8 MovementAction_FaceAwayPlayer_Step0(struct ObjectEvent *objectEvent, struc { u8 playerObjectId; - if (!TryGetObjectEventIdByLocalIdAndMap(OBJ_EVENT_ID_PLAYER, 0, 0, &playerObjectId)) + if (!TryGetObjectEventIdByLocalIdAndMap(LOCALID_PLAYER, 0, 0, &playerObjectId)) FaceDirection(objectEvent, sprite, GetOppositeDirection(GetDirectionToFace(objectEvent->currentCoords.x, objectEvent->currentCoords.y, gObjectEvents[playerObjectId].currentCoords.x, @@ -8814,7 +8825,7 @@ u8 MovementAction_LockAnim_Step0(struct ObjectEvent *objectEvent, struct Sprite bool32 found = FALSE; for (i = 0; i < OBJECT_EVENTS_COUNT; i++) { - if (firstFreeSlot == OBJECT_EVENTS_COUNT && sLockedAnimObjectEvents->localIds[i] == 0) + if (firstFreeSlot == OBJECT_EVENTS_COUNT && sLockedAnimObjectEvents->localIds[i] == LOCALID_NONE) firstFreeSlot = i; if (sLockedAnimObjectEvents->localIds[i] == objectEvent->localId) @@ -8854,7 +8865,7 @@ u8 MovementAction_UnlockAnim_Step0(struct ObjectEvent *objectEvent, struct Sprit index = FindLockedObjectEventIndex(objectEvent); if (index != OBJECT_EVENTS_COUNT) { - sLockedAnimObjectEvents->localIds[index] = 0; + sLockedAnimObjectEvents->localIds[index] = LOCALID_NONE; sLockedAnimObjectEvents->count--; ableToStore = TRUE; } diff --git a/src/field_control_avatar.c b/src/field_control_avatar.c index 26fbd1997d2c..8ddeda77ac56 100644 --- a/src/field_control_avatar.c +++ b/src/field_control_avatar.c @@ -137,7 +137,7 @@ int ProcessPlayerFieldInput(struct FieldInput *input) u8 playerDirection; u16 metatileBehavior; - gSpecialVar_LastTalked = 0; + gSpecialVar_LastTalked = LOCALID_NONE; gSelectedObjectEvent = 0; playerDirection = GetPlayerFacingDirection(); @@ -268,7 +268,7 @@ const u8 *GetInteractedLinkPlayerScript(struct MapPosition *position, u8 metatil else objectEventId = GetObjectEventIdByPosition(position->x + gDirectionToVectors[direction].x, position->y + gDirectionToVectors[direction].y, position->elevation); - if (objectEventId == OBJECT_EVENTS_COUNT || gObjectEvents[objectEventId].localId == OBJ_EVENT_ID_PLAYER) + if (objectEventId == OBJECT_EVENTS_COUNT || gObjectEvents[objectEventId].localId == LOCALID_PLAYER) return NULL; for (i = 0; i < 4; i++) @@ -289,14 +289,14 @@ static const u8 *GetInteractedObjectEventScript(struct MapPosition *position, u8 const u8 *script; objectEventId = GetObjectEventIdByPosition(position->x, position->y, position->elevation); - if (objectEventId == OBJECT_EVENTS_COUNT || gObjectEvents[objectEventId].localId == OBJ_EVENT_ID_PLAYER) + if (objectEventId == OBJECT_EVENTS_COUNT || gObjectEvents[objectEventId].localId == LOCALID_PLAYER) { if (MetatileBehavior_IsCounter(metatileBehavior) != TRUE) return NULL; // Look for an object event on the other side of the counter. objectEventId = GetObjectEventIdByPosition(position->x + gDirectionToVectors[direction].x, position->y + gDirectionToVectors[direction].y, position->elevation); - if (objectEventId == OBJECT_EVENTS_COUNT || gObjectEvents[objectEventId].localId == OBJ_EVENT_ID_PLAYER) + if (objectEventId == OBJECT_EVENTS_COUNT || gObjectEvents[objectEventId].localId == LOCALID_PLAYER) return NULL; } diff --git a/src/field_player_avatar.c b/src/field_player_avatar.c index 0f01aed246a4..36dfcb0ff8fc 100644 --- a/src/field_player_avatar.c +++ b/src/field_player_avatar.c @@ -777,7 +777,7 @@ bool8 IsPlayerCollidingWithFarawayIslandMew(u8 direction) playerY = object->currentCoords.y; MoveCoords(direction, &playerX, &playerY); - mewObjectId = GetObjectEventIdByLocalIdAndMap(1, MAP_NUM(MAP_FARAWAY_ISLAND_INTERIOR), MAP_GROUP(MAP_FARAWAY_ISLAND_INTERIOR)); + mewObjectId = GetObjectEventIdByLocalIdAndMap(LOCALID_FARAWAY_ISLAND_MEW, MAP_NUM(MAP_FARAWAY_ISLAND_INTERIOR), MAP_GROUP(MAP_FARAWAY_ISLAND_INTERIOR)); if (mewObjectId == OBJECT_EVENTS_COUNT) return FALSE; @@ -1363,7 +1363,7 @@ void InitPlayerAvatar(s16 x, s16 y, u8 direction, u8 gender) u8 objectEventId; struct ObjectEvent *objectEvent; - playerObjEventTemplate.localId = OBJ_EVENT_ID_PLAYER; + playerObjEventTemplate.localId = LOCALID_PLAYER; playerObjEventTemplate.graphicsId = GetPlayerAvatarGraphicsIdByStateIdAndGender(PLAYER_AVATAR_STATE_NORMAL, gender); playerObjEventTemplate.x = x - MAP_OFFSET; playerObjEventTemplate.y = y - MAP_OFFSET; diff --git a/src/field_screen_effect.c b/src/field_screen_effect.c index 616444116cee..bd354c8a44a4 100644 --- a/src/field_screen_effect.c +++ b/src/field_screen_effect.c @@ -334,7 +334,7 @@ static void Task_ExitDoor(u8 taskId) { u8 objEventId; SetPlayerVisibility(TRUE); - objEventId = GetObjectEventIdByLocalIdAndMap(OBJ_EVENT_ID_PLAYER, 0, 0); + objEventId = GetObjectEventIdByLocalIdAndMap(LOCALID_PLAYER, 0, 0); ObjectEventSetHeldMovement(&gObjectEvents[objEventId], MOVEMENT_ACTION_WALK_NORMAL_DOWN); task->tState = 2; } @@ -344,7 +344,7 @@ static void Task_ExitDoor(u8 taskId) { u8 objEventId; task->data[1] = FieldAnimateDoorClose(*x, *y); - objEventId = GetObjectEventIdByLocalIdAndMap(OBJ_EVENT_ID_PLAYER, 0, 0); + objEventId = GetObjectEventIdByLocalIdAndMap(LOCALID_PLAYER, 0, 0); ObjectEventClearHeldMovementIfFinished(&gObjectEvents[objEventId]); task->tState = 3; } @@ -382,7 +382,7 @@ static void Task_ExitNonAnimDoor(u8 taskId) { u8 objEventId; SetPlayerVisibility(TRUE); - objEventId = GetObjectEventIdByLocalIdAndMap(OBJ_EVENT_ID_PLAYER, 0, 0); + objEventId = GetObjectEventIdByLocalIdAndMap(LOCALID_PLAYER, 0, 0); ObjectEventSetHeldMovement(&gObjectEvents[objEventId], GetWalkNormalMovementAction(GetPlayerFacingDirection())); task->tState = 2; } @@ -693,9 +693,9 @@ static void Task_DoDoorWarp(u8 taskId) if (task->data[1] < 0 || gTasks[task->data[1]].isActive != TRUE) { u8 objEventId; - objEventId = GetObjectEventIdByLocalIdAndMap(OBJ_EVENT_ID_PLAYER, 0, 0); + objEventId = GetObjectEventIdByLocalIdAndMap(LOCALID_PLAYER, 0, 0); ObjectEventClearHeldMovementIfActive(&gObjectEvents[objEventId]); - objEventId = GetObjectEventIdByLocalIdAndMap(OBJ_EVENT_ID_PLAYER, 0, 0); + objEventId = GetObjectEventIdByLocalIdAndMap(LOCALID_PLAYER, 0, 0); ObjectEventSetHeldMovement(&gObjectEvents[objEventId], MOVEMENT_ACTION_WALK_NORMAL_UP); task->tState = 2; } @@ -705,7 +705,7 @@ static void Task_DoDoorWarp(u8 taskId) { u8 objEventId; task->data[1] = FieldAnimateDoorClose(*x, *y - 1); - objEventId = GetObjectEventIdByLocalIdAndMap(OBJ_EVENT_ID_PLAYER, 0, 0); + objEventId = GetObjectEventIdByLocalIdAndMap(LOCALID_PLAYER, 0, 0); ObjectEventClearHeldMovementIfFinished(&gObjectEvents[objEventId]); SetPlayerVisibility(FALSE); task->tState = 3; diff --git a/src/field_special_scene.c b/src/field_special_scene.c index a2b3d6366fa7..ccb15f02b4d4 100644 --- a/src/field_special_scene.c +++ b/src/field_special_scene.c @@ -312,7 +312,7 @@ void Task_HandlePorthole(u8 taskId) case IDLE_CHECK: if (JOY_NEW(A_BUTTON)) data[1] = 1; - if (!ScriptMovement_IsObjectMovementFinished(OBJ_EVENT_ID_PLAYER, location->mapNum, location->mapGroup)) + if (!ScriptMovement_IsObjectMovementFinished(LOCALID_PLAYER, location->mapNum, location->mapGroup)) return; if (CountSSTidalStep(1) == TRUE) { @@ -334,12 +334,12 @@ void Task_HandlePorthole(u8 taskId) if (*cruiseState == SS_TIDAL_DEPART_SLATEPORT) { - ScriptMovement_StartObjectMovementScript(OBJ_EVENT_ID_PLAYER, location->mapNum, location->mapGroup, sSSTidalSailEastMovementScript); + ScriptMovement_StartObjectMovementScript(LOCALID_PLAYER, location->mapNum, location->mapGroup, sSSTidalSailEastMovementScript); data[0] = IDLE_CHECK; } else { - ScriptMovement_StartObjectMovementScript(OBJ_EVENT_ID_PLAYER, location->mapNum, location->mapGroup, sSSTidalSailWestMovementScript); + ScriptMovement_StartObjectMovementScript(LOCALID_PLAYER, location->mapNum, location->mapGroup, sSSTidalSailWestMovementScript); data[0] = IDLE_CHECK; } break; diff --git a/src/field_specials.c b/src/field_specials.c index eea3a9451d92..98384d52abf2 100644 --- a/src/field_specials.c +++ b/src/field_specials.c @@ -563,8 +563,8 @@ void SpawnLinkPartnerObjectEvent(void) linkSpriteId = OBJ_EVENT_GFX_RIVAL_MAY_NORMAL; break; } - SpawnSpecialObjectEventParameterized(linkSpriteId, movementTypes[j], 240 - i, coordOffsets[j][0] + x + MAP_OFFSET, coordOffsets[j][1] + y + MAP_OFFSET, 0); - LoadLinkPartnerObjectEventSpritePalette(linkSpriteId, 240 - i, i); + SpawnSpecialObjectEventParameterized(linkSpriteId, movementTypes[j], LOCALID_BERRY_BLENDER_PLAYER_END - i, coordOffsets[j][0] + x + MAP_OFFSET, coordOffsets[j][1] + y + MAP_OFFSET, 0); + LoadLinkPartnerObjectEventSpritePalette(linkSpriteId, LOCALID_BERRY_BLENDER_PLAYER_END - i, i); j++; if (j == MAX_LINK_PLAYERS) j = 0; @@ -1252,7 +1252,7 @@ void SpawnCameraObject(void) { u8 obj = SpawnSpecialObjectEventParameterized(OBJ_EVENT_GFX_BOY_1, MOVEMENT_TYPE_FACE_DOWN, - OBJ_EVENT_ID_CAMERA, + LOCALID_CAMERA, gSaveBlock1Ptr->pos.x + MAP_OFFSET, gSaveBlock1Ptr->pos.y + MAP_OFFSET, 3); // elevation @@ -1263,7 +1263,7 @@ void SpawnCameraObject(void) void RemoveCameraObject(void) { CameraObjectSetFollowedSpriteId(GetPlayerAvatarSpriteId()); - RemoveObjectEventByLocalIdAndMap(OBJ_EVENT_ID_CAMERA, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup); + RemoveObjectEventByLocalIdAndMap(LOCALID_CAMERA, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup); } u8 GetPokeblockNameByMonNature(void) @@ -3600,7 +3600,7 @@ u32 GetMartEmployeeObjectEventId(void) { MAP_GROUP(MAP_FORTREE_CITY_MART), MAP_NUM(MAP_FORTREE_CITY_MART), LOCALID_FORTREE_MART_CLERK }, { MAP_GROUP(MAP_MOSSDEEP_CITY_MART), MAP_NUM(MAP_MOSSDEEP_CITY_MART), LOCALID_MOSSDEEP_MART_CLERK }, { MAP_GROUP(MAP_SOOTOPOLIS_CITY_MART), MAP_NUM(MAP_SOOTOPOLIS_CITY_MART), LOCALID_SOOTOPOLIS_MART_CLERK }, - { MAP_GROUP(MAP_BATTLE_FRONTIER_MART), MAP_NUM(MAP_BATTLE_FRONTIER_MART), LOCALID_BATTLE_FRONTIER_MART_CLERK } + { MAP_GROUP(MAP_BATTLE_FRONTIER_MART), MAP_NUM(MAP_BATTLE_FRONTIER_MART), LOCALID_FRONTIER_MART_CLERK }, }; u8 i; diff --git a/src/item_use.c b/src/item_use.c index abd80e0eae3b..f1e0708b2875 100755 --- a/src/item_use.c +++ b/src/item_use.c @@ -569,15 +569,15 @@ static u8 GetDirectionToHiddenItem(s16 itemDistanceX, s16 itemDistanceY) static void PlayerFaceHiddenItem(u8 direction) { - ObjectEventClearHeldMovementIfFinished(&gObjectEvents[GetObjectEventIdByLocalIdAndMap(OBJ_EVENT_ID_PLAYER, 0, 0)]); - ObjectEventClearHeldMovement(&gObjectEvents[GetObjectEventIdByLocalIdAndMap(OBJ_EVENT_ID_PLAYER, 0, 0)]); - UnfreezeObjectEvent(&gObjectEvents[GetObjectEventIdByLocalIdAndMap(OBJ_EVENT_ID_PLAYER, 0, 0)]); + ObjectEventClearHeldMovementIfFinished(&gObjectEvents[GetObjectEventIdByLocalIdAndMap(LOCALID_PLAYER, 0, 0)]); + ObjectEventClearHeldMovement(&gObjectEvents[GetObjectEventIdByLocalIdAndMap(LOCALID_PLAYER, 0, 0)]); + UnfreezeObjectEvent(&gObjectEvents[GetObjectEventIdByLocalIdAndMap(LOCALID_PLAYER, 0, 0)]); PlayerTurnInPlace(direction); } static void Task_HiddenItemNearby(u8 taskId) { - if (ObjectEventCheckHeldMovementStatus(&gObjectEvents[GetObjectEventIdByLocalIdAndMap(OBJ_EVENT_ID_PLAYER, 0, 0)]) == TRUE) + if (ObjectEventCheckHeldMovementStatus(&gObjectEvents[GetObjectEventIdByLocalIdAndMap(LOCALID_PLAYER, 0, 0)]) == TRUE) DisplayItemMessageOnField(taskId, gText_ItemFinderNearby, Task_CloseItemfinderMessage); } @@ -585,7 +585,7 @@ static void Task_StandingOnHiddenItem(u8 taskId) { s16 *data = gTasks[taskId].data; - if (ObjectEventCheckHeldMovementStatus(&gObjectEvents[GetObjectEventIdByLocalIdAndMap(OBJ_EVENT_ID_PLAYER, 0, 0)]) == TRUE + if (ObjectEventCheckHeldMovementStatus(&gObjectEvents[GetObjectEventIdByLocalIdAndMap(LOCALID_PLAYER, 0, 0)]) == TRUE || tItemFound == FALSE) { // Spin player around on item diff --git a/src/match_call.c b/src/match_call.c index 88766d516baa..e6a141a1bc7f 100644 --- a/src/match_call.c +++ b/src/match_call.c @@ -1368,7 +1368,7 @@ static bool32 MatchCall_EndCall(u8 taskId) if (!sMatchCallState.triggeredFromScript) { LoadMessageBoxAndBorderGfx(); - playerObjectId = GetObjectEventIdByLocalIdAndMap(OBJ_EVENT_ID_PLAYER, 0, 0); + playerObjectId = GetObjectEventIdByLocalIdAndMap(LOCALID_PLAYER, 0, 0); ObjectEventClearHeldMovementIfFinished(&gObjectEvents[playerObjectId]); ScriptMovement_UnfreezeObjectEvents(); UnfreezeObjectEvents(); diff --git a/src/rotating_tile_puzzle.c b/src/rotating_tile_puzzle.c index 7581b81072a4..0eb58f9c1e72 100644 --- a/src/rotating_tile_puzzle.c +++ b/src/rotating_tile_puzzle.c @@ -100,7 +100,7 @@ void FreeRotatingTilePuzzle(void) TRY_FREE_AND_SET_NULL(sRotatingTilePuzzle); - id = GetObjectEventIdByLocalIdAndMap(OBJ_EVENT_ID_PLAYER, 0, 0); + id = GetObjectEventIdByLocalIdAndMap(LOCALID_PLAYER, 0, 0); ObjectEventClearHeldMovementIfFinished(&gObjectEvents[id]); ScriptMovement_UnfreezeObjectEvents(); } @@ -109,7 +109,7 @@ u16 MoveRotatingTileObjects(u8 puzzleNumber) { u8 i; struct ObjectEventTemplate *objectEvents = gSaveBlock1Ptr->objectEventTemplates; - u16 localId = 0; + u16 localId = LOCALID_NONE; for (i = 0; i < OBJECT_EVENT_TEMPLATES_COUNT; i++) { diff --git a/src/scrcmd.c b/src/scrcmd.c index 88c6ffefb76b..fde75e3d0e04 100644 --- a/src/scrcmd.c +++ b/src/scrcmd.c @@ -1020,7 +1020,7 @@ bool8 ScrCmd_waitmovement(struct ScriptContext *ctx) { u16 localId = VarGet(ScriptReadHalfword(ctx)); - if (localId != 0) + if (localId != LOCALID_NONE) sMovingNpcId = localId; sMovingNpcMapGroup = gSaveBlock1Ptr->location.mapGroup; sMovingNpcMapNum = gSaveBlock1Ptr->location.mapNum; @@ -1034,7 +1034,7 @@ bool8 ScrCmd_waitmovementat(struct ScriptContext *ctx) u8 mapGroup; u8 mapNum; - if (localId != 0) + if (localId != LOCALID_NONE) sMovingNpcId = localId; mapGroup = ScriptReadByte(ctx); mapNum = ScriptReadByte(ctx); @@ -1241,7 +1241,7 @@ bool8 ScrCmd_releaseall(struct ScriptContext *ctx) u8 playerObjectId; HideFieldMessageBox(); - playerObjectId = GetObjectEventIdByLocalIdAndMap(OBJ_EVENT_ID_PLAYER, 0, 0); + playerObjectId = GetObjectEventIdByLocalIdAndMap(LOCALID_PLAYER, 0, 0); ObjectEventClearHeldMovementIfFinished(&gObjectEvents[playerObjectId]); ScriptMovement_UnfreezeObjectEvents(); UnfreezeObjectEvents(); @@ -1255,7 +1255,7 @@ bool8 ScrCmd_release(struct ScriptContext *ctx) HideFieldMessageBox(); if (gObjectEvents[gSelectedObjectEvent].active) ObjectEventClearHeldMovementIfFinished(&gObjectEvents[gSelectedObjectEvent]); - playerObjectId = GetObjectEventIdByLocalIdAndMap(OBJ_EVENT_ID_PLAYER, 0, 0); + playerObjectId = GetObjectEventIdByLocalIdAndMap(LOCALID_PLAYER, 0, 0); ObjectEventClearHeldMovementIfFinished(&gObjectEvents[playerObjectId]); ScriptMovement_UnfreezeObjectEvents(); UnfreezeObjectEvents(); diff --git a/src/script.c b/src/script.c index eb5dccb1755a..130ad5315b49 100644 --- a/src/script.c +++ b/src/script.c @@ -378,7 +378,7 @@ void ClearRamScript(void) CpuFill32(0, &gSaveBlock1Ptr->ramScript, sizeof(struct RamScript)); } -bool8 InitRamScript(const u8 *script, u16 scriptSize, u8 mapGroup, u8 mapNum, u8 objectId) +bool8 InitRamScript(const u8 *script, u16 scriptSize, u8 mapGroup, u8 mapNum, u8 localId) { struct RamScriptData *scriptData = &gSaveBlock1Ptr->ramScript.data; @@ -390,13 +390,13 @@ bool8 InitRamScript(const u8 *script, u16 scriptSize, u8 mapGroup, u8 mapNum, u8 scriptData->magic = RAM_SCRIPT_MAGIC; scriptData->mapGroup = mapGroup; scriptData->mapNum = mapNum; - scriptData->objectId = objectId; + scriptData->localId = localId; memcpy(scriptData->script, script, scriptSize); gSaveBlock1Ptr->ramScript.checksum = CalculateRamScriptChecksum(); return TRUE; } -const u8 *GetRamScript(u8 objectId, const u8 *script) +const u8 *GetRamScript(u8 localId, const u8 *script) { struct RamScriptData *scriptData = &gSaveBlock1Ptr->ramScript.data; gRamScriptRetAddr = NULL; @@ -406,7 +406,7 @@ const u8 *GetRamScript(u8 objectId, const u8 *script) return script; if (scriptData->mapNum != gSaveBlock1Ptr->location.mapNum) return script; - if (scriptData->objectId != objectId) + if (scriptData->localId != localId) return script; if (CalculateRamScriptChecksum() != gSaveBlock1Ptr->ramScript.checksum) { @@ -420,7 +420,7 @@ const u8 *GetRamScript(u8 objectId, const u8 *script) } } -#define NO_OBJECT OBJ_EVENT_ID_PLAYER +#define NO_OBJECT LOCALID_PLAYER bool32 ValidateSavedRamScript(void) { @@ -431,7 +431,7 @@ bool32 ValidateSavedRamScript(void) return FALSE; if (scriptData->mapNum != MAP_NUM(MAP_UNDEFINED)) return FALSE; - if (scriptData->objectId != NO_OBJECT) + if (scriptData->localId != NO_OBJECT) return FALSE; if (CalculateRamScriptChecksum() != gSaveBlock1Ptr->ramScript.checksum) return FALSE; @@ -449,7 +449,7 @@ u8 *GetSavedRamScriptIfValid(void) return NULL; if (scriptData->mapNum != MAP_NUM(MAP_UNDEFINED)) return NULL; - if (scriptData->objectId != NO_OBJECT) + if (scriptData->localId != NO_OBJECT) return NULL; if (CalculateRamScriptChecksum() != gSaveBlock1Ptr->ramScript.checksum) { diff --git a/src/script_movement.c b/src/script_movement.c index 10517dfc8e58..19e058aa1968 100644 --- a/src/script_movement.c +++ b/src/script_movement.c @@ -89,7 +89,7 @@ static bool8 ScriptMovement_TryAddNewMovement(u8 taskId, u8 objEventId, const u8 return FALSE; } } - moveScrId = GetMovementScriptIdFromObjectEventId(taskId, OBJ_EVENT_ID_PLAYER); + moveScrId = GetMovementScriptIdFromObjectEventId(taskId, LOCALID_PLAYER); if (moveScrId == OBJECT_EVENTS_COUNT) { return TRUE; diff --git a/src/trainer_hill.c b/src/trainer_hill.c index 8a03e8752a1d..0dbef13995fa 100644 --- a/src/trainer_hill.c +++ b/src/trainer_hill.c @@ -366,13 +366,13 @@ static void FreeDataStruct(void) TRY_FREE_AND_SET_NULL(sHillData); } -void CopyTrainerHillTrainerText(u8 which, u16 trainerId) +void CopyTrainerHillTrainerText(u8 which, u16 localId) { u8 id, floorId; SetUpDataStruct(); floorId = GetFloorId(); - id = trainerId - 1; + id = localId - 1; switch (which) { diff --git a/src/trainer_see.c b/src/trainer_see.c index 212cbbdec354..2afd37d4de6d 100644 --- a/src/trainer_see.c +++ b/src/trainer_see.c @@ -800,15 +800,15 @@ void PlayerFaceTrainerAfterBattle(void) objEvent = &gObjectEvents[gApproachingTrainers[gWhichTrainerToFaceAfterBattle].objectEventId]; gPostBattleMovementScript[0] = GetFaceDirectionMovementAction(GetOppositeDirection(objEvent->facingDirection)); gPostBattleMovementScript[1] = MOVEMENT_ACTION_STEP_END; - ScriptMovement_StartObjectMovementScript(OBJ_EVENT_ID_PLAYER, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, gPostBattleMovementScript); + ScriptMovement_StartObjectMovementScript(LOCALID_PLAYER, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, gPostBattleMovementScript); } else { objEvent = &gObjectEvents[gPlayerAvatar.objectEventId]; gPostBattleMovementScript[0] = GetFaceDirectionMovementAction(objEvent->facingDirection); gPostBattleMovementScript[1] = MOVEMENT_ACTION_STEP_END; - ScriptMovement_StartObjectMovementScript(OBJ_EVENT_ID_PLAYER, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, gPostBattleMovementScript); + ScriptMovement_StartObjectMovementScript(LOCALID_PLAYER, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, gPostBattleMovementScript); } - SetMovingNpcId(OBJ_EVENT_ID_PLAYER); + SetMovingNpcId(LOCALID_PLAYER); } diff --git a/src/tv.c b/src/tv.c index 87e9384c9c6b..557c7744d620 100644 --- a/src/tv.c +++ b/src/tv.c @@ -992,6 +992,7 @@ static void TakeGabbyAndTyOffTheAir(void) gSaveBlock1Ptr->gabbyAndTyData.onAir = FALSE; } +// See gabby_and_ty.inc for details u8 GabbyAndTyGetBattleNum(void) { if (gSaveBlock1Ptr->gabbyAndTyData.battleNum > 5) @@ -1033,41 +1034,42 @@ u8 GabbyAndTyGetLastBattleTrivia(void) return 0; } +// See gabby_and_ty.inc for details void GetGabbyAndTyLocalIds(void) { switch (GabbyAndTyGetBattleNum()) { case 1: - gSpecialVar_0x8004 = 14; - gSpecialVar_0x8005 = 13; + gSpecialVar_0x8004 = LOCALID_ROUTE111_GABBY_1; + gSpecialVar_0x8005 = LOCALID_ROUTE111_TY_1; break; case 2: - gSpecialVar_0x8004 = 5; - gSpecialVar_0x8005 = 6; + gSpecialVar_0x8004 = LOCALID_ROUTE118_GABBY_1; + gSpecialVar_0x8005 = LOCALID_ROUTE118_TY_1; break; case 3: - gSpecialVar_0x8004 = 18; - gSpecialVar_0x8005 = 17; + gSpecialVar_0x8004 = LOCALID_ROUTE120_GABBY_1; + gSpecialVar_0x8005 = LOCALID_ROUTE120_TY_1; break; case 4: - gSpecialVar_0x8004 = 21; - gSpecialVar_0x8005 = 22; + gSpecialVar_0x8004 = LOCALID_ROUTE111_GABBY_2; + gSpecialVar_0x8005 = LOCALID_ROUTE111_TY_2; break; case 5: - gSpecialVar_0x8004 = 8; - gSpecialVar_0x8005 = 9; + gSpecialVar_0x8004 = LOCALID_ROUTE118_GABBY_2; + gSpecialVar_0x8005 = LOCALID_ROUTE118_TY_2; break; case 6: - gSpecialVar_0x8004 = 19; - gSpecialVar_0x8005 = 20; + gSpecialVar_0x8004 = LOCALID_ROUTE120_GABBY_2; + gSpecialVar_0x8005 = LOCALID_ROUTE120_TY_2; break; case 7: - gSpecialVar_0x8004 = 23; - gSpecialVar_0x8005 = 24; + gSpecialVar_0x8004 = LOCALID_ROUTE111_GABBY_3; + gSpecialVar_0x8005 = LOCALID_ROUTE111_TY_3; break; case 8: - gSpecialVar_0x8004 = 10; - gSpecialVar_0x8005 = 11; + gSpecialVar_0x8004 = LOCALID_ROUTE118_GABBY_3; + gSpecialVar_0x8005 = LOCALID_ROUTE118_TY_3; break; } } @@ -3440,7 +3442,7 @@ void GetMomOrDadStringForTVMessage(void) void HideBattleTowerReporter(void) { VarSet(VAR_BRAVO_TRAINER_BATTLE_TOWER_ON, 0); - RemoveObjectEventByLocalIdAndMap(LOCALID_BATTLE_TOWER_LOBBY_REPORTER, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup); + RemoveObjectEventByLocalIdAndMap(LOCALID_TOWER_LOBBY_REPORTER, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup); FlagSet(FLAG_HIDE_BATTLE_TOWER_REPORTER); } diff --git a/tools/mapjson/mapjson.cpp b/tools/mapjson/mapjson.cpp index 3a427f98c2f6..99b67d82eace 100644 --- a/tools/mapjson/mapjson.cpp +++ b/tools/mapjson/mapjson.cpp @@ -96,6 +96,29 @@ string json_to_string(const Json &data, const string &field = "", bool silent = return output; } +string get_generated_warning(const string &filename, bool isAsm) { + string comment = isAsm ? "@" : "//"; + + ostringstream warning; + warning << comment << "\n" + << comment << " DO NOT MODIFY THIS FILE! It is auto-generated from " << filename << "\n" + << comment << "\n\n"; + return warning.str(); +} + +string get_include_guard_start(const string &name) { + ostringstream guard; + guard << "#ifndef GUARD_" << name << "_H\n" + << "#define GUARD_" << name << "_H\n\n"; + return guard.str(); +} + +string get_include_guard_end(const string &name) { + ostringstream guard; + guard << "#endif // GUARD_" << name << "_H\n"; + return guard.str(); +} + string generate_map_header_text(Json map_data, Json layouts_data) { string map_layout_id = json_to_string(map_data, "layout"); @@ -114,8 +137,7 @@ string generate_map_header_text(Json map_data, Json layouts_data) { ostringstream text; string mapName = json_to_string(map_data, "name"); - - text << "@\n@ DO NOT MODIFY THIS FILE! It is auto-generated from data/maps/" << mapName << "/map.json\n@\n\n"; + text << get_generated_warning("data/maps/" + mapName + "/map.json", true); text << mapName << ":\n" << "\t.4byte " << json_to_string(layout, "name") << "\n"; @@ -167,12 +189,10 @@ string generate_map_connections_text(Json map_data) { if (map_data["connections"] == Json()) return string("\n"); - ostringstream text; - string mapName = json_to_string(map_data, "name"); - text << "@\n@ DO NOT MODIFY THIS FILE! It is auto-generated from data/maps/" << mapName << "/map.json\n@\n\n"; - + ostringstream text; + text << get_generated_warning("data/maps/" + mapName + "/map.json", true); text << mapName << "_MapConnectionsList:\n"; for (auto &connection : map_data["connections"].array_items()) { @@ -193,11 +213,11 @@ string generate_map_events_text(Json map_data) { if (map_data.object_items().find("shared_events_map") != map_data.object_items().end()) return string("\n"); - ostringstream text; - string mapName = json_to_string(map_data, "name"); - text << "@\n@ DO NOT MODIFY THIS FILE! It is auto-generated from data/maps/" << mapName << "/map.json\n@\n\n\t.align 2\n\n"; + ostringstream text; + text << get_generated_warning("data/maps/" + mapName + "/map.json", true); + text << "\t.align 2\n\n"; string objects_label, warps_label, coords_label, bgs_label; @@ -371,10 +391,16 @@ void process_map(string map_filepath, string layouts_filepath, string output_dir write_text_file(out_dir + "connections.inc", connections_text); } -void process_heal_locations(const vector &map_filepaths, string output_file) { - ostringstream heal_locations_text; - ostringstream respawn_maps_text; - ostringstream respawn_npcs_text; +void process_event_constants(const vector &map_filepaths, string output_ids_file, string output_heal_locations_file) { + string warning = get_generated_warning("data/maps/*/map.json", false); + + ostringstream heal_locations_arr_text; + ostringstream respawn_maps_arr_text; + ostringstream respawn_npcs_arr_text; + + string guard_name = "CONSTANTS_MAP_EVENT_IDS"; + ostringstream ids_file_text; + ids_file_text << get_include_guard_start(guard_name) << warning; // Get heal location data from each map for (const string &filepath : map_filepaths) { @@ -382,62 +408,89 @@ void process_heal_locations(const vector &map_filepaths, string output_f string map_json_text = read_text_file(filepath); Json map_data = Json::parse(map_json_text, err); if (map_data == Json()) - FATAL_ERROR("Failed to read '%s' while generating '%s': %s\n", filepath.c_str(), output_file.c_str(), err.c_str()); - - // Skip if no heal locations present - if (map_data.object_items().find("heal_locations") == map_data.object_items().end() || map_data["heal_locations"].array_items().size() <= 0) - continue; + FATAL_ERROR("Failed to read '%s' while generating map event constants: %s\n", filepath.c_str(), err.c_str()); string map_id = json_to_string(map_data, "id"); - for (auto &heal_location : map_data["heal_locations"].array_items()) { - // Each array is indexed with the heal location's ID, e.g. '[HEAL_LOCATION_NAME - 1] = ' - string index_text = "\t[" + json_to_string(heal_location, "id") + " - 1] ="; - - // Add element to main heal locations array - heal_locations_text << index_text << "\n\t{\n" - << "\t\t.mapGroup = MAP_GROUP(" << map_id << "),\n" - << "\t\t.mapNum = MAP_NUM(" << map_id << "),\n" - << "\t\t.x = " << json_to_string(heal_location, "x") << ",\n" - << "\t\t.y = " << json_to_string(heal_location, "y") << ",\n" - << "\t},\n"; - - // Add element to respawn map array (if field is present) - if (heal_location.object_items().find("respawn_map") != heal_location.object_items().end()) { - string respawn_map_id = json_to_string(heal_location, "respawn_map"); - respawn_maps_text << index_text << " {" - << "MAP_GROUP(" << respawn_map_id << "), " - << "MAP_NUM(" << respawn_map_id << ")" - << "},\n"; - } - // Add element to respawn NPC array (if field is present) - if (heal_location.object_items().find("respawn_npc") != heal_location.object_items().end()) { - respawn_npcs_text << index_text << " " << json_to_string(heal_location, "respawn_npc") << ",\n"; + // Get IDs from the object/clone events. + ostringstream map_ids_text; + auto obj_events = map_data["object_events"].array_items(); + for (unsigned int i = 0; i < obj_events.size(); i++) { + auto obj_event = obj_events[i]; + if (obj_event.object_items().find("local_id") != obj_event.object_items().end()) + map_ids_text << "#define " << json_to_string(obj_event, "local_id") << " " << i + 1 << "\n"; + } + // Get IDs from the warp events. + auto warp_events = map_data["warp_events"].array_items(); + for (unsigned int i = 0; i < warp_events.size(); i++) { + auto warp_event = warp_events[i]; + if (warp_event.object_items().find("warp_id") != warp_event.object_items().end()) + map_ids_text << "#define " << json_to_string(warp_event, "warp_id") << " " << i << "\n"; + } + // Only output if we found any IDs + string temp = map_ids_text.str(); + if (!temp.empty()) { + ids_file_text << "// " << map_id << "\n" << temp << "\n"; + } + + // Process heal locations. Maps are not required to have a heal locations array, so we check if it exists first. + if (map_data.object_items().find("heal_locations") != map_data.object_items().end()) { + for (auto &heal_location : map_data["heal_locations"].array_items()) { + // Each array is indexed with the heal location's ID, e.g. '[HEAL_LOCATION_NAME - 1] = ' + string index_text = "\t[" + json_to_string(heal_location, "id") + " - 1] ="; + + // Add element to main heal locations array + heal_locations_arr_text << index_text << "\n\t{\n" + << "\t\t.mapGroup = MAP_GROUP(" << map_id << "),\n" + << "\t\t.mapNum = MAP_NUM(" << map_id << "),\n" + << "\t\t.x = " << json_to_string(heal_location, "x") << ",\n" + << "\t\t.y = " << json_to_string(heal_location, "y") << ",\n" + << "\t},\n"; + + // Add element to respawn map array (if field is present) + if (heal_location.object_items().find("respawn_map") != heal_location.object_items().end()) { + string respawn_map_id = json_to_string(heal_location, "respawn_map"); + respawn_maps_arr_text << index_text << " {" + << "MAP_GROUP(" << respawn_map_id << "), " + << "MAP_NUM(" << respawn_map_id << ")" + << "},\n"; + } + + // Add element to respawn NPC array (if field is present) + if (heal_location.object_items().find("respawn_npc") != heal_location.object_items().end()) { + respawn_npcs_arr_text << index_text << " " << json_to_string(heal_location, "respawn_npc") << ",\n"; + } } } } - ostringstream text; - text << "//\n// DO NOT MODIFY THIS FILE! It is auto-generated from data/maps/*/map.json\n//\n\n"; + // Write event ids file + ids_file_text << get_include_guard_end(guard_name); + write_text_file(output_ids_file, ids_file_text.str()); + + + // Write heal locations data file + ostringstream heal_locations_file_text; + heal_locations_file_text << warning; - string arr_body = heal_locations_text.str(); - text << "static const struct HealLocation sHealLocations[] =\n{\n" << arr_body << "};\n\n"; + string arr_body = heal_locations_arr_text.str(); + heal_locations_file_text << "static const struct HealLocation sHealLocations[] =\n{\n" << arr_body << "};\n\n"; - arr_body = respawn_maps_text.str(); + arr_body = respawn_maps_arr_text.str(); if (!arr_body.empty()) - text << "static const u16 sWhiteoutRespawnHealCenterMapIdxs[][2] =\n{\n" << arr_body << "};\n\n"; + heal_locations_file_text << "static const u16 sWhiteoutRespawnHealCenterMapIdxs[][2] =\n{\n" << arr_body << "};\n\n"; - arr_body = respawn_npcs_text.str(); + arr_body = respawn_npcs_arr_text.str(); if (!arr_body.empty()) - text << "static const u8 sWhiteoutRespawnHealerNpcIds[] =\n{\n" << arr_body << "};\n\n"; + heal_locations_file_text << "static const u8 sWhiteoutRespawnHealerNpcIds[] =\n{\n" << arr_body << "};\n\n"; - write_text_file(output_file, text.str()); + write_text_file(output_heal_locations_file, heal_locations_file_text.str()); } string generate_groups_text(Json groups_data) { ostringstream text; - text << "@\n@ DO NOT MODIFY THIS FILE! It is auto-generated from data/maps/map_groups.json\n@\n\n"; + text << get_generated_warning("data/maps/map_groups.json", true); for (auto &key : groups_data["group_order"].array_items()) { string group = json_to_string(key); @@ -478,7 +531,7 @@ string generate_connections_text(Json groups_data, string include_path) { ostringstream text; - text << "@\n@ DO NOT MODIFY THIS FILE! It is auto-generated from data/maps/map_groups.json\n@\n\n"; + text << get_generated_warning("data/maps/map_groups.json", true); for (Json map_name : map_names) text << "\t.include \"" << include_path << "/" << json_to_string(map_name) << "/connections.inc\"\n"; @@ -495,7 +548,7 @@ string generate_headers_text(Json groups_data, string include_path) { ostringstream text; - text << "@\n@ DO NOT MODIFY THIS FILE! It is auto-generated from data/maps/map_groups.json\n@\n\n"; + text << get_generated_warning("data/maps/map_groups.json", true); for (string map_name : map_names) text << "\t.include \"" << include_path << "/" << map_name << "/header.inc\"\n"; @@ -512,7 +565,7 @@ string generate_events_text(Json groups_data, string include_path) { ostringstream text; - text << "@\n@ DO NOT MODIFY THIS FILE! It is auto-generated from " << include_path << "/map_groups.json\n@\n\n"; + text << get_generated_warning(include_path + "/map_groups.json", true); for (string map_name : map_names) text << "\t.include \"" << include_path << "/" << map_name << "/events.inc\"\n"; @@ -523,12 +576,9 @@ string generate_events_text(Json groups_data, string include_path) { string generate_map_constants_text(string groups_filepath, Json groups_data) { string file_dir = file_parent(groups_filepath) + sep; + string guard_name = "CONSTANTS_MAP_GROUPS"; ostringstream text; - - text << "#ifndef GUARD_CONSTANTS_MAP_GROUPS_H\n" - << "#define GUARD_CONSTANTS_MAP_GROUPS_H\n\n"; - - text << "//\n// DO NOT MODIFY THIS FILE! It is auto-generated from data/maps/map_groups.json\n//\n\n"; + text << get_include_guard_start(guard_name) << get_generated_warning("data/maps/map_groups.json", false); int group_num = 0; @@ -561,7 +611,7 @@ string generate_map_constants_text(string groups_filepath, Json groups_data) { } text << "#define MAP_GROUPS_COUNT " << group_num << "\n\n"; - text << "#endif // GUARD_CONSTANTS_MAP_GROUPS_H\n"; + text << get_include_guard_end(guard_name); return text.str(); } @@ -593,7 +643,7 @@ void process_groups(string groups_filepath, string output_asm, string output_c) string generate_layout_headers_text(Json layouts_data) { ostringstream text; - text << "@\n@ DO NOT MODIFY THIS FILE! It is auto-generated from data/layouts/layouts.json\n@\n\n"; + text << get_generated_warning("data/layouts/layouts.json", true); for (auto &layout : layouts_data["layouts"].array_items()) { if (layout == Json::object()) continue; @@ -626,7 +676,7 @@ string generate_layout_headers_text(Json layouts_data) { string generate_layouts_table_text(Json layouts_data) { ostringstream text; - text << "@\n@ DO NOT MODIFY THIS FILE! It is auto-generated from data/layouts/layouts.json\n@\n\n"; + text << get_generated_warning("data/layouts/layouts.json", true); text << "\t.align 2\n" << json_to_string(layouts_data, "layouts_table_label") << "::\n"; @@ -641,12 +691,9 @@ string generate_layouts_table_text(Json layouts_data) { } string generate_layouts_constants_text(Json layouts_data) { + string guard_name = "CONSTANTS_LAYOUTS"; ostringstream text; - - text << "#ifndef GUARD_CONSTANTS_LAYOUTS_H\n" - << "#define GUARD_CONSTANTS_LAYOUTS_H\n\n"; - - text << "//\n// DO NOT MODIFY THIS FILE! It is auto-generated from data/layouts/layouts.json\n//\n\n"; + text << get_include_guard_start(guard_name) << get_generated_warning("data/layouts/layouts.json", false); int i = 1; for (auto &layout : layouts_data["layouts"].array_items()) { @@ -655,7 +702,7 @@ string generate_layouts_constants_text(Json layouts_data) { i++; } - text << "\n#endif // GUARD_CONSTANTS_LAYOUTS_H\n"; + text << get_include_guard_end(guard_name); return text.str(); } @@ -723,24 +770,25 @@ int main(int argc, char *argv[]) { process_layouts(filepath, output_asm, output_c); } - else if (mode == "heal_locations") { - if (argc < 5) - FATAL_ERROR("USAGE: mapjson heal_locations [additional_map_files] "); + else if (mode == "event_constants") { + if (argc < 6) + FATAL_ERROR("USAGE: mapjson event_constants [additional_map_files] "); infer_separator(argv[3]); vector filepaths; const int firstMapFileArg = 3; - const int lastMapFileArg = argc - 2; + const int lastMapFileArg = argc - 3; for (int i = firstMapFileArg; i <= lastMapFileArg; i++) { filepaths.push_back(argv[i]); } - string output_file(argv[argc - 1]); + string output_ids_file(argv[argc - 2]); + string output_heal_locations_file(argv[argc - 1]); - process_heal_locations(filepaths, output_file); + process_event_constants(filepaths, output_ids_file, output_heal_locations_file); } else { - FATAL_ERROR("ERROR: must be 'layouts', 'map', 'heal_locations', or 'groups'.\n"); + FATAL_ERROR("ERROR: must be 'layouts', 'map', 'event_constants', or 'groups'.\n"); } return 0;