diff --git a/Makefile b/Makefile index ee36562b1389..c3739b89485b 100644 --- a/Makefile +++ b/Makefile @@ -273,7 +273,8 @@ generated: $(AUTO_GEN_TARGETS) # NOTE: Tools must have been built prior (FIXME) generated: tools $(AUTO_GEN_TARGETS) 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/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_BattlePikeCorridor/map.json b/data/maps/BattleFrontier_BattlePikeCorridor/map.json index 1a5faadeab67..5abcd4409898 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_BATTLE_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..b8b4097b8374 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 @@ -15,7 +13,7 @@ BattleFrontier_BattlePikeCorridor_EventScript_EnterCorridor:: pike_cleartrainerids pike_nohealing TRUE applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattlePikeCorridor_Movement_PlayerEnterCorridor - applymovement LOCALID_ATTENDANT, BattleFrontier_BattlePikeCorridor_Movement_AttendantEnterCorridor + applymovement LOCALID_BATTLE_PIKE_CORRIDOR_ATTENDANT, BattleFrontier_BattlePikeCorridor_Movement_AttendantEnterCorridor waitmovement 0 lockall msgbox BattleFrontier_BattlePikeCorridor_Text_YourChallengeHasBegun, MSGBOX_DEFAULT diff --git a/data/maps/BattleFrontier_BattleTowerCorridor/map.json b/data/maps/BattleFrontier_BattleTowerCorridor/map.json index 10d5ca7f71d3..86c7d83957ea 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_BATTLE_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..1cbbf61fbbfd 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,13 +21,13 @@ 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 LOCALID_BATTLE_TOWER_CORRIDOR_ATTENDANT, BattleFrontier_BattleTowerCorridor_Movement_AttendantWalkToDoor applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattleTowerCorridor_Movement_PlayerWalkToDoor waitmovement 0 goto BattleFrontier_BattleTowerCorridor_EventScript_WarpToBattleRoom BattleFrontier_BattleTowerCorridor_EventScript_WalkToFarDoor:: - applymovement LOCALID_ATTENDANT, BattleFrontier_BattleTowerCorridor_Movement_AttendantWalkToFarDoor + applymovement LOCALID_BATTLE_TOWER_CORRIDOR_ATTENDANT, BattleFrontier_BattleTowerCorridor_Movement_AttendantWalkToFarDoor applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattleTowerCorridor_Movement_PlayerWalkToFarDoor waitmovement 0 diff --git a/data/maps/BattleFrontier_BattleTowerLobby/map.json b/data/maps/BattleFrontier_BattleTowerLobby/map.json index d672f07189fb..19790034fbc9 100644 --- a/data/maps/BattleFrontier_BattleTowerLobby/map.json +++ b/data/maps/BattleFrontier_BattleTowerLobby/map.json @@ -67,6 +67,7 @@ "flag": "0" }, { + "local_id": "LOCALID_BATTLE_TOWER_LOBBY_REPORTER", "graphics_id": "OBJ_EVENT_GFX_REPORTER_F", "x": 11, "y": 9, @@ -80,6 +81,7 @@ "flag": "FLAG_HIDE_BATTLE_TOWER_REPORTER" }, { + "local_id": "LOCALID_APPRENTICE", "graphics_id": "OBJ_EVENT_GFX_VAR_0", "x": 1, "y": 5, diff --git a/data/maps/BattleFrontier_Mart/map.json b/data/maps/BattleFrontier_Mart/map.json index 28261958ab33..7fab54636a25 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_BATTLE_FRONTIER_MART_CLERK", "graphics_id": "OBJ_EVENT_GFX_MART_EMPLOYEE", "x": 1, "y": 3, 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/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/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_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..ad588cdf3bd5 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 @@ -19,24 +17,24 @@ EverGrandeCity_HallOfFame_OnFrame: EverGrandeCity_HallOfFame_EventScript_EnterHallOfFame:: lockall - applymovement LOCALID_WALLACE, EverGrandeCity_HallOfFame_Movement_WalkIntoHallOfFame1 + applymovement LOCALID_HALL_OF_FAME_WALLACE, EverGrandeCity_HallOfFame_Movement_WalkIntoHallOfFame1 applymovement OBJ_EVENT_ID_PLAYER, EverGrandeCity_HallOfFame_Movement_WalkIntoHallOfFame1 waitmovement 0 - applymovement LOCALID_WALLACE, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_HALL_OF_FAME_WALLACE, Common_Movement_WalkInPlaceFasterRight applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 msgbox EverGrandeCity_HallOfFame_Text_HereWeHonorLeagueChampions, MSGBOX_DEFAULT closemessage - applymovement LOCALID_WALLACE, EverGrandeCity_HallOfFame_Movement_WalkIntoHallOfFame2 + applymovement LOCALID_HALL_OF_FAME_WALLACE, EverGrandeCity_HallOfFame_Movement_WalkIntoHallOfFame2 applymovement OBJ_EVENT_ID_PLAYER, EverGrandeCity_HallOfFame_Movement_WalkIntoHallOfFame2 waitmovement 0 delay 20 - applymovement LOCALID_WALLACE, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_HALL_OF_FAME_WALLACE, Common_Movement_WalkInPlaceFasterRight applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 msgbox EverGrandeCity_HallOfFame_Text_LetsRecordYouAndYourPartnersNames, MSGBOX_DEFAULT closemessage - applymovement LOCALID_WALLACE, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_HALL_OF_FAME_WALLACE, Common_Movement_WalkInPlaceFasterUp applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 delay 20 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 93204a215a0d..32a29a758d88 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/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..f9d2908f8fe1 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_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_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_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/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..4ea1b9eee9e8 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,9 +34,9 @@ LilycoveCity_ContestLobby_EventScript_TryDoContestArtist:: LilycoveCity_ContestLobby_EventScript_ContestArtist:: lockall - addobject LOCALID_ARTIST - applymovement LOCALID_ARTIST, LilycoveCity_ContestLobby_Movement_ArtistApproachPlayer - waitmovement LOCALID_ARTIST + addobject LOCALID_CONTEST_LOBBY_ARTIST + applymovement LOCALID_CONTEST_LOBBY_ARTIST, LilycoveCity_ContestLobby_Movement_ArtistApproachPlayer + waitmovement LOCALID_CONTEST_LOBBY_ARTIST applymovement OBJ_EVENT_ID_PLAYER, LilycoveCity_ContestLobby_Movement_PlayerFaceArtist waitmovement 0 msgbox LilycoveCity_ContestLobby_Text_YourPokemonSpurredMeToPaint, MSGBOX_DEFAULT @@ -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,9 +204,9 @@ 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 + addobject LOCALID_CONTEST_LOBBY_LINK_ARTIST + applymovement LOCALID_CONTEST_LOBBY_LINK_ARTIST, LilycoveCity_ContestLobby_Movement_LinkArtistApproachPlayer + waitmovement LOCALID_CONTEST_LOBBY_LINK_ARTIST applymovement OBJ_EVENT_ID_PLAYER, LilycoveCity_ContestLobby_Movement_PlayerFaceLinkArtist waitmovement 0 msgbox LilycoveCity_ContestLobby_Text_YourPokemonSpurredMeToPaint, MSGBOX_DEFAULT @@ -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,26 +399,26 @@ 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 waitmovement 0 msgbox LilycoveCity_ContestLobby_Text_ComeThroughHere, MSGBOX_DEFAULT closemessage - applymovement LOCALID_RECEPTIONIST, LilycoveCity_ContestLobby_Movement_ReceptionistWalkToContestHall + applymovement LOCALID_CONTEST_LOBBY_RECEPTIONIST, LilycoveCity_ContestLobby_Movement_ReceptionistWalkToContestHall applymovement OBJ_EVENT_ID_PLAYER, LilycoveCity_ContestLobby_Movement_PlayerWalkToContestHall waitmovement 0 releaseall @@ -896,20 +890,20 @@ 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 waitmovement 0 @@ -918,7 +912,7 @@ LilycoveCity_ContestLobby_EventScript_LeadToLinkContestHall:: delay 20 closemessage call LilycoveCity_ContestLobby_EventScript_DelayIfContestWithRSPlayer - applymovement LOCALID_LINK_RECEPTIONIST, LilycoveCity_ContestLobby_Movement_LinkReceptionistWalkToContestHall + applymovement LOCALID_CONTEST_LOBBY_LINK_RECEPTIONIST, LilycoveCity_ContestLobby_Movement_LinkReceptionistWalkToContestHall applymovement OBJ_EVENT_ID_PLAYER, LilycoveCity_ContestLobby_Movement_PlayerWalkToLinkContestHall waitmovement 0 release 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_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..27124b7f2d85 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 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 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..ed7caf127c17 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: @@ -141,22 +136,22 @@ LittlerootTown_EventScript_GoInsideWithMom:: 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 LOCALID_LITTLEROOT_MOM, LittlerootTown_Movement_MomApproachDoor applymovement OBJ_EVENT_ID_PLAYER, LittlerootTown_Movement_PlayerApproachDoor waitmovement 0 opendoor VAR_0x8004, VAR_0x8005 waitdooranim - applymovement LOCALID_MOM, LittlerootTown_Movement_MomEnterHouse + applymovement LOCALID_LITTLEROOT_MOM, LittlerootTown_Movement_MomEnterHouse applymovement OBJ_EVENT_ID_PLAYER, LittlerootTown_Movement_PlayerEnterHouse waitmovement 0 setflag FLAG_HIDE_LITTLEROOT_TOWN_MOM_OUTSIDE @@ -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,7 +293,7 @@ LittlerootTown_EventScript_NeedPokemonTriggerLeft:: LittlerootTown_EventScript_DangerousWithoutPokemon:: msgbox LittlerootTown_Text_IfYouGoInGrassPokemonWillJumpOut, MSGBOX_DEFAULT closemessage - applymovement LOCALID_TWIN, LittlerootTown_Movement_TwinPushPlayerFromRoute + applymovement LOCALID_LITTLEROOT_TWIN, LittlerootTown_Movement_TwinPushPlayerFromRoute applymovement OBJ_EVENT_ID_PLAYER, LittlerootTown_Movement_PushPlayerBackFromRoute waitmovement 0 msgbox LittlerootTown_Text_DangerousIfYouDontHavePokemon, MSGBOX_DEFAULT @@ -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 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 @@ -530,70 +525,70 @@ LittlerootTown_EventScript_MomApproachPlayerFemale:: LittlerootTown_EventScript_MomApproachPlayer0:: applymovement OBJ_EVENT_ID_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 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 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 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 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 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 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 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 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 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..7c98a43f2327 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 @@ -63,7 +59,7 @@ LittlerootTown_BrendansHouse_1F_EventScript_GoUpstairsToSetClock:: 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_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_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 @@ -180,17 +176,17 @@ LittlerootTown_BrendansHouse_1F_EventScript_PlayerFaceBrendan:: 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 @@ -222,19 +218,19 @@ LittlerootTown_BrendansHouse_1F_Movement_BrendanApproachPlayer2: 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_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_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_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..abed328fba89 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 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_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 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_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 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_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 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..35feceefdfec 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 @@ -62,7 +58,7 @@ LittlerootTown_MaysHouse_1F_EventScript_GoUpstairsToSetClock:: 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_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_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 @@ -213,17 +209,17 @@ LittlerootTown_MaysHouse_1F_EventScript_PlayerFaceMay:: 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 @@ -255,19 +251,19 @@ LittlerootTown_MaysHouse_1F_Movement_MayApproachPlayer2: 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_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_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_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..8af2eae11475 100644 --- a/data/maps/LittlerootTown_MaysHouse_2F/map.json +++ b/data/maps/LittlerootTown_MaysHouse_2F/map.json @@ -184,6 +184,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_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..22e5ac549ed4 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: @@ -71,35 +64,35 @@ LittlerootTown_ProfessorBirchsLab_EventScript_SetPlayerPosForReceiveStarter:: 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 + 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: @@ -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,7 +174,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_UpgradeToNationalDex:: delay 10 playse SE_CLICK delay 20 - applymovement LOCALID_RIVAL, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_BIRCHS_LAB_RIVAL, Common_Movement_WalkInPlaceFasterRight applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 checkplayergender @@ -190,9 +183,9 @@ 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 LOCALID_BIRCHS_LAB_RIVAL, Common_Movement_WalkInPlaceFasterUp applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 msgbox LittlerootTown_ProfessorBirchsLab_Text_OkayAllDone, MSGBOX_DEFAULT @@ -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,7 +508,7 @@ 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 waitmovement 0 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..1b91ef609d94 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 @@ -117,46 +113,46 @@ MauvilleCity_EventScript_BattleWallyPrompt:: 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_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_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_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_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_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 @@ -171,45 +167,45 @@ MauvilleCity_EventScript_DefeatedWally:: 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_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_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..490dee9efec0 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": "LOCAL_ID_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..1d4a52b58c8c 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, LOCAL_ID_MAUVILLE_NURSE call Common_EventScript_PkmnCenterNurse waitmessage waitbuttonpress 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_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..07888c6e43b3 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: @@ -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 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 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_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..e662716f6358 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: @@ -21,11 +19,11 @@ 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_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,7 +38,7 @@ MtChimney_CableCarStation_EventScript_Attendant:: MtChimney_CableCarStation_EventScript_RideCableCar:: msgbox MtChimney_CableCarStation_Text_StepThisWay, MSGBOX_DEFAULT closemessage - applymovement LOCALID_ATTENDANT, MtChimney_CableCarStation_Movement_LeadPlayerToCableCar + applymovement LOCALID_MT_CHIMNEY_CABLE_CAR_ATTENDANT, MtChimney_CableCarStation_Movement_LeadPlayerToCableCar applymovement OBJ_EVENT_ID_PLAYER, MtChimney_CableCarStation_Movement_BoardCableCar waitmovement 0 setvar VAR_0x8004, TRUE @ Going down 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_Top/map.json b/data/maps/NavelRock_Top/map.json index c818fc39948e..f63c57840554 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": "LOCAL_ID_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..628f581e29ec 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 LOCAL_ID_NAVEL_ROCK_HO_OH return NavelRock_Top_EventScript_HoOh:: @@ -39,7 +37,7 @@ 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 LOCAL_ID_NAVEL_ROCK_HO_OH, NavelRock_Top_Movement_HoOhAppear applymovement OBJ_EVENT_ID_CAMERA, NavelRock_Top_Movement_CameraPanUp waitmovement 0 delay 50 @@ -54,7 +52,7 @@ NavelRock_Top_EventScript_HoOh:: 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 LOCAL_ID_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, LOCAL_ID_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/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/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/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..5ab46fa7ec9f 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 @@ -111,35 +109,35 @@ Route103_EventScript_RivalExit:: Route103_EventScript_RivalExitFacingNorth:: applymovement OBJ_EVENT_ID_PLAYER, Route103_Movement_WatchRivalExitFacingNorth - applymovement LOCALID_RIVAL, Route103_Movement_RivalExitFacingNorth1 + 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_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/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..1649a11f6078 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,33 +199,33 @@ 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 @@ -237,7 +235,7 @@ Route110_TrickHouseEnd_EventScript_TrickMasterExitTrigger:: applymovement OBJ_EVENT_ID_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..5a020854db38 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 diff --git a/data/maps/Route111/map.json b/data/maps/Route111/map.json index 6efa1770e280..054e846c4ada 100644 --- a/data/maps/Route111/map.json +++ b/data/maps/Route111/map.json @@ -187,6 +187,7 @@ "flag": "0" }, { + "local_id": "LOCALID_ROUTE111_TY_1", "graphics_id": "OBJ_EVENT_GFX_CAMERAMAN", "x": 14, "y": 86, @@ -200,6 +201,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 +293,7 @@ "flag": "0" }, { + "local_id": "LOCALID_ROUTE111_GABBY_2", "graphics_id": "OBJ_EVENT_GFX_REPORTER_F", "x": 13, "y": 86, @@ -301,9 +304,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 +318,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 +332,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 +346,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 +609,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, 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..e1e2b288d636 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, diff --git a/data/maps/Route120/map.json b/data/maps/Route120/map.json index 6bb2c84c1a8e..f8799a74ef37 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, 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..5816d09df6c5 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 waitmovement 0 msgbox Route128_Text_MaxieResposibilityFallsToArchieAndMe, MSGBOX_DEFAULT closemessage - applymovement LOCALID_ARCHIE, Route128_Movement_ArchieRunLeft + applymovement LOCALID_ROUTE128_ARCHIE, Route128_Movement_ArchieRunLeft applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft - applymovement LOCALID_MAXIE, Route128_Movement_MaxieWalkLeft + 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 waitmovement 0 msgbox Route128_Text_StevenWhatIsHappening, MSGBOX_DEFAULT closemessage - applymovement LOCALID_STEVEN, Route128_Movement_StevenWalkUp + applymovement LOCALID_ROUTE128_STEVEN, Route128_Movement_StevenWalkUp applymovement OBJ_EVENT_ID_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_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_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/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..4309c3dd4da1 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,7 +32,7 @@ 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 waitmovement 0 @@ -51,7 +49,7 @@ SkyPillar_Outside_EventScript_WallaceScene:: 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_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/SlateportCity/map.json b/data/maps/SlateportCity/map.json index b285f030eeb5..eb01d3c16653 100644 --- a/data/maps/SlateportCity/map.json +++ b/data/maps/SlateportCity/map.json @@ -343,6 +343,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, 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_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/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/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..e635441e4308 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: @@ -28,13 +26,13 @@ TerraCave_End_EventScript_Groudon:: lockall applymovement OBJ_EVENT_ID_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/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_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/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..4a069960ad39 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,8 +29,8 @@ 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 @@ -44,7 +42,7 @@ VictoryRoad_1F_EventScript_WallyEntranceBattle:: 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/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/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/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..2d906e57052d 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 @@ -75,7 +70,7 @@ 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 @@ -88,7 +83,7 @@ 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 @@ -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:: 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..8ede403c15ff 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,14 @@ #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 - -// 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 +// 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 a 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 OBJ_EVENT_ID_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 OBJ_EVENT_ID_PLAYER 255 #endif // GUARD_CONSTANTS_EVENT_OBJECTS_H diff --git a/include/constants/flags.h b/include/constants/flags.h index 5b1b5efd190d..d973705f30c3 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..7c26c1f76957 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,8 @@ $(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. +$(INCLUDECONSTS_OUTDIR)/map_event_ids.h $(DATA_SRC_SUBDIR)/heal_locations.h: $(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_movement.c b/src/event_object_movement.c index 7b8d783c3c39..df399d2c23e6 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(OBJ_EVENT_ID_CAMERA, \ + min(OBJ_EVENT_ID_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 { @@ -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 d094c8678bd2..db362179dd2c 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(); diff --git a/src/field_player_avatar.c b/src/field_player_avatar.c index 0f01aed246a4..9636a2f5adf6 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; diff --git a/src/field_specials.c b/src/field_specials.c index f50309849b59..5d52e5542e52 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; diff --git a/src/rotating_tile_puzzle.c b/src/rotating_tile_puzzle.c index 7581b81072a4..65ef687fdbe6 100644 --- a/src/rotating_tile_puzzle.c +++ b/src/rotating_tile_puzzle.c @@ -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..bc741b3e4361 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); diff --git a/src/script.c b/src/script.c index eb5dccb1755a..1f70bf37da6d 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) { @@ -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/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/tv.c b/src/tv.c index 8c70711dd20f..e802a3245826 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; } } diff --git a/tools/mapjson/mapjson.cpp b/tools/mapjson/mapjson.cpp index 3a427f98c2f6..597118db8ea3 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,91 @@ 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"; + + // 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(); + if (warp_events.size()) { + 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_text << index_text << " " << json_to_string(heal_location, "respawn_npc") << ",\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()); + - string arr_body = heal_locations_text.str(); - text << "static const struct HealLocation sHealLocations[] =\n{\n" << arr_body << "};\n\n"; + // Write heal locations data file + ostringstream heal_locations_file_text; + heal_locations_file_text << warning; - arr_body = respawn_maps_text.str(); + 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_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 +533,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 +550,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 +567,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 +578,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 +613,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 +645,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 +678,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 +693,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 +704,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 +772,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;