Merge remote-tracking branch 'merrp_origin/followers-expanded-id' into merrp/followers_RHH_merge3
# Conflicts: # .github/workflows/build.yml # README.md # gflib/sprite.c # graphics/pokemon/banette/anim_front.png # graphics/pokemon/banette/normal.pal # graphics/pokemon/sentret/normal.pal # graphics/pokemon/togetic/anim_front.png # graphics/pokemon/togetic/normal.pal # include/battle_script_commands.h # include/data.h # ld_script.txt # src/battle_controller_player.c # src/bike.c # src/event_object_movement.c
7
Makefile
@ -347,6 +347,11 @@ ifeq ($(DINFO),1)
|
|||||||
override CFLAGS += -g
|
override CFLAGS += -g
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(DDEBUG),1)
|
||||||
|
override ASFLAGS += --defsym DEBUG=1
|
||||||
|
override CPPFLAGS += -D DEBUG=1
|
||||||
|
endif
|
||||||
|
|
||||||
# The dep rules have to be explicit or else missing files won't be reported.
|
# The dep rules have to be explicit or else missing files won't be reported.
|
||||||
# As a side effect, they're evaluated immediately instead of when the rule is invoked.
|
# As a side effect, they're evaluated immediately instead of when the rule is invoked.
|
||||||
# It doesn't look like $(shell) can be deferred so there might not be a better way.
|
# It doesn't look like $(shell) can be deferred so there might not be a better way.
|
||||||
@ -474,7 +479,7 @@ $(ELF): $(OBJ_DIR)/ld_script.ld $(OBJS) libagbsyscall
|
|||||||
|
|
||||||
$(ROM): $(ELF)
|
$(ROM): $(ELF)
|
||||||
$(OBJCOPY) -O binary $< $@
|
$(OBJCOPY) -O binary $< $@
|
||||||
$(FIX) $@ -p --silent
|
$(FIX) $@ --silent
|
||||||
|
|
||||||
modern: all
|
modern: all
|
||||||
|
|
||||||
|
|||||||
@ -1735,6 +1735,11 @@
|
|||||||
.2byte \quantity
|
.2byte \quantity
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
|
@ Like callnative, but function expects a ctx
|
||||||
|
.macro callfunc func:req
|
||||||
|
.byte 0xe3
|
||||||
|
.4byte \func
|
||||||
|
.endm
|
||||||
|
|
||||||
@ Supplementary
|
@ Supplementary
|
||||||
|
|
||||||
|
|||||||
@ -22,9 +22,8 @@
|
|||||||
@ Defines an object event template for map data, to be used by a normal object. Mirrors the struct layout of ObjectEventTemplate in include/global.fieldmap.h
|
@ Defines an object event template for map data, to be used by a normal object. Mirrors the struct layout of ObjectEventTemplate in include/global.fieldmap.h
|
||||||
.macro object_event index:req, gfx:req, x:req, y:req, elevation:req, movement_type:req, x_radius:req, y_radius:req, trainer_type:req, sight_radius_tree_etc:req, script:req, event_flag:req
|
.macro object_event index:req, gfx:req, x:req, y:req, elevation:req, movement_type:req, x_radius:req, y_radius:req, trainer_type:req, sight_radius_tree_etc:req, script:req, event_flag:req
|
||||||
.byte \index
|
.byte \index
|
||||||
.byte \gfx
|
.2byte \gfx
|
||||||
.byte OBJ_KIND_NORMAL
|
.byte OBJ_KIND_NORMAL
|
||||||
.space 1 @ Padding
|
|
||||||
.2byte \x, \y
|
.2byte \x, \y
|
||||||
.byte \elevation
|
.byte \elevation
|
||||||
.byte \movement_type
|
.byte \movement_type
|
||||||
|
|||||||
@ -163,4 +163,6 @@
|
|||||||
create_movement_action fly_up, MOVEMENT_ACTION_FLY_UP
|
create_movement_action fly_up, MOVEMENT_ACTION_FLY_UP
|
||||||
create_movement_action fly_down, MOVEMENT_ACTION_FLY_DOWN
|
create_movement_action fly_down, MOVEMENT_ACTION_FLY_DOWN
|
||||||
|
|
||||||
|
create_movement_action exit_pokeball, MOVEMENT_ACTION_EXIT_POKEBALL
|
||||||
|
create_movement_action enter_pokeball, MOVEMENT_ACTION_ENTER_POKEBALL
|
||||||
create_movement_action step_end, MOVEMENT_ACTION_STEP_END
|
create_movement_action step_end, MOVEMENT_ACTION_STEP_END
|
||||||
|
|||||||
@ -723,6 +723,7 @@ Common_EventScript_OutOfCenterPartyHeal::
|
|||||||
playfanfare MUS_HEAL
|
playfanfare MUS_HEAL
|
||||||
waitfanfare
|
waitfanfare
|
||||||
special HealPlayerParty
|
special HealPlayerParty
|
||||||
|
callnative UpdateFollowingPokemon
|
||||||
fadescreen FADE_FROM_BLACK
|
fadescreen FADE_FROM_BLACK
|
||||||
return
|
return
|
||||||
|
|
||||||
@ -1056,6 +1057,7 @@ Common_EventScript_LegendaryFlewAway::
|
|||||||
.include "data/scripts/move_tutors.inc"
|
.include "data/scripts/move_tutors.inc"
|
||||||
.include "data/scripts/trainer_hill.inc"
|
.include "data/scripts/trainer_hill.inc"
|
||||||
.include "data/scripts/test_signpost.inc"
|
.include "data/scripts/test_signpost.inc"
|
||||||
|
.include "data/scripts/follower.inc"
|
||||||
.include "data/text/frontier_brain.inc"
|
.include "data/text/frontier_brain.inc"
|
||||||
.include "data/text/save.inc"
|
.include "data/text/save.inc"
|
||||||
.include "data/text/birch_speech.inc"
|
.include "data/text/birch_speech.inc"
|
||||||
|
|||||||
@ -72,6 +72,9 @@ gFieldEffectScriptPointers::
|
|||||||
.4byte gFieldEffectScript_RayquazaSpotlight @ FLDEFF_RAYQUAZA_SPOTLIGHT
|
.4byte gFieldEffectScript_RayquazaSpotlight @ FLDEFF_RAYQUAZA_SPOTLIGHT
|
||||||
.4byte gFieldEffectScript_DestroyDeoxysRock @ FLDEFF_DESTROY_DEOXYS_ROCK
|
.4byte gFieldEffectScript_DestroyDeoxysRock @ FLDEFF_DESTROY_DEOXYS_ROCK
|
||||||
.4byte gFieldEffectScript_MoveDeoxysRock @ FLDEFF_MOVE_DEOXYS_ROCK
|
.4byte gFieldEffectScript_MoveDeoxysRock @ FLDEFF_MOVE_DEOXYS_ROCK
|
||||||
|
.4byte gFieldEffectScript_TracksSlither @ FLDEFF_TRACKS_SLITHER
|
||||||
|
.4byte gFieldEffectScript_TracksBug @ FLDEFF_TRACKS_BUG
|
||||||
|
.4byte gFieldEffectScript_TracksSpot @ FLDEFF_TRACKS_SPOT
|
||||||
|
|
||||||
gFieldEffectScript_ExclamationMarkIcon1::
|
gFieldEffectScript_ExclamationMarkIcon1::
|
||||||
field_eff_callnative FldEff_ExclamationMarkIcon
|
field_eff_callnative FldEff_ExclamationMarkIcon
|
||||||
@ -129,6 +132,14 @@ gFieldEffectScript_SandFootprints::
|
|||||||
field_eff_loadfadedpal_callnative gSpritePalette_GeneralFieldEffect0, FldEff_SandFootprints
|
field_eff_loadfadedpal_callnative gSpritePalette_GeneralFieldEffect0, FldEff_SandFootprints
|
||||||
field_eff_end
|
field_eff_end
|
||||||
|
|
||||||
|
gFieldEffectScript_TracksBug::
|
||||||
|
field_eff_loadfadedpal_callnative gSpritePalette_GeneralFieldEffect0, FldEff_TracksBug
|
||||||
|
field_eff_end
|
||||||
|
|
||||||
|
gFieldEffectScript_TracksSpot::
|
||||||
|
field_eff_loadfadedpal_callnative gSpritePalette_GeneralFieldEffect0, FldEff_TracksSpot
|
||||||
|
field_eff_end
|
||||||
|
|
||||||
gFieldEffectScript_JumpBigSplash::
|
gFieldEffectScript_JumpBigSplash::
|
||||||
field_eff_loadfadedpal_callnative gSpritePalette_GeneralFieldEffect0, FldEff_JumpBigSplash
|
field_eff_loadfadedpal_callnative gSpritePalette_GeneralFieldEffect0, FldEff_JumpBigSplash
|
||||||
field_eff_end
|
field_eff_end
|
||||||
@ -218,6 +229,10 @@ gFieldEffectScript_BikeTireTracks::
|
|||||||
field_eff_loadfadedpal_callnative gSpritePalette_GeneralFieldEffect0, FldEff_BikeTireTracks
|
field_eff_loadfadedpal_callnative gSpritePalette_GeneralFieldEffect0, FldEff_BikeTireTracks
|
||||||
field_eff_end
|
field_eff_end
|
||||||
|
|
||||||
|
gFieldEffectScript_TracksSlither::
|
||||||
|
field_eff_loadfadedpal_callnative gSpritePalette_GeneralFieldEffect0, FldEff_TracksSlither
|
||||||
|
field_eff_end
|
||||||
|
|
||||||
gFieldEffectScript_SandDisguisePlaceholder::
|
gFieldEffectScript_SandDisguisePlaceholder::
|
||||||
field_eff_callnative ShowSandDisguiseFieldEffect
|
field_eff_callnative ShowSandDisguiseFieldEffect
|
||||||
field_eff_end
|
field_eff_end
|
||||||
|
|||||||
@ -1,2 +1,2 @@
|
|||||||
аабааааааабааааабааааабааааааабааааабаааввгвввввввгвввввгвввдежзийкдежзийкдежзий стуфхцч щъыьэюя ёђѓєѕії !"#$%& љњћќ§ўџ()*+,-. 0123456
|
а2а2ба2а2а2а2а2а2а2ба2а2а2а2а2ба2а2а2аRаRбаRаRаRаRаRаRаRбаRаRаRаRаRбаRаRаRв2в2гв2в2в2в2в2в2в2гв2в2в2в2в2гв2в2в2дежзийкдежзийкдежзий 3 3с2т2у2ф2х2ц2ч23333333 3 3 3 3 3 3щ2ъыьэBюBяBCCC3 3 3 3 3 3 3ё2ђBѓBєBѕBіBїB C!C"C#C$C%C&3 3 3 3 3 3 3љ2њћќ§BўBџB(C)C*C+,-.3 3 3 3 3 3 3333301233435363 3 3 3 3 3 3 3
|
||||||
89:;<=>>
|
333
3338393:3;3<3=3>3>3 3 3 3
|
||||||
@ -12,10 +12,10 @@
|
|||||||
#include "constants/trainer_hill.h"
|
#include "constants/trainer_hill.h"
|
||||||
#include "constants/trainer_types.h"
|
#include "constants/trainer_types.h"
|
||||||
#include "constants/berry.h"
|
#include "constants/berry.h"
|
||||||
|
#include "constants/species.h"
|
||||||
.include "asm/macros.inc"
|
.include "asm/macros.inc"
|
||||||
.include "constants/constants.inc"
|
.include "constants/constants.inc"
|
||||||
|
|
||||||
.section .rodata
|
.section .rodata
|
||||||
|
|
||||||
.include "data/maps/events.inc"
|
.include "data/maps/events.inc"
|
||||||
|
|
||||||
|
|||||||
@ -15,7 +15,7 @@
|
|||||||
"connections": null,
|
"connections": null,
|
||||||
"object_events": [
|
"object_events": [
|
||||||
{
|
{
|
||||||
"graphics_id": "OBJ_EVENT_GFX_REGISTEEL",
|
"graphics_id": "OBJ_EVENT_GFX_MON_BASE + SPECIES_REGISTEEL",
|
||||||
"x": 8,
|
"x": 8,
|
||||||
"y": 7,
|
"y": 7,
|
||||||
"elevation": 3,
|
"elevation": 3,
|
||||||
|
|||||||
@ -55,6 +55,7 @@ AncientTomb_EventScript_CaveEntranceSide::
|
|||||||
end
|
end
|
||||||
|
|
||||||
AncientTomb_EventScript_Registeel::
|
AncientTomb_EventScript_Registeel::
|
||||||
|
bufferspeciesname 0, SPECIES_REGISTEEL
|
||||||
lock
|
lock
|
||||||
faceplayer
|
faceplayer
|
||||||
waitse
|
waitse
|
||||||
@ -83,4 +84,3 @@ AncientTomb_EventScript_RanFromRegisteel::
|
|||||||
setvar VAR_0x8004, SPECIES_REGISTEEL
|
setvar VAR_0x8004, SPECIES_REGISTEEL
|
||||||
goto Common_EventScript_LegendaryFlewAway
|
goto Common_EventScript_LegendaryFlewAway
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -75,6 +75,7 @@ BattleFrontier_BattleArenaLobby_EventScript_SaveAfterChallenge::
|
|||||||
frontier_checkairshow
|
frontier_checkairshow
|
||||||
special LoadPlayerParty
|
special LoadPlayerParty
|
||||||
special HealPlayerParty
|
special HealPlayerParty
|
||||||
|
callnative UpdateFollowingPokemon
|
||||||
arena_save 0
|
arena_save 0
|
||||||
playse SE_SAVE
|
playse SE_SAVE
|
||||||
waitse
|
waitse
|
||||||
@ -133,6 +134,7 @@ BattleFrontier_BattleArenaLobby_EventScript_TryEnterChallenge::
|
|||||||
frontier_set FRONTIER_DATA_LVL_MODE, VAR_RESULT
|
frontier_set FRONTIER_DATA_LVL_MODE, VAR_RESULT
|
||||||
msgbox BattleFrontier_BattleArenaLobby_Text_SelectThreeMons, MSGBOX_DEFAULT
|
msgbox BattleFrontier_BattleArenaLobby_Text_SelectThreeMons, MSGBOX_DEFAULT
|
||||||
fadescreen FADE_TO_BLACK
|
fadescreen FADE_TO_BLACK
|
||||||
|
callnative RemoveFollowingPokemon
|
||||||
call BattleFrontier_EventScript_GetLvlMode
|
call BattleFrontier_EventScript_GetLvlMode
|
||||||
copyvar VAR_0x8004, VAR_RESULT
|
copyvar VAR_0x8004, VAR_RESULT
|
||||||
setvar VAR_0x8005, FRONTIER_PARTY_SIZE
|
setvar VAR_0x8005, FRONTIER_PARTY_SIZE
|
||||||
@ -194,6 +196,7 @@ BattleFrontier_BattleArenaLobby_EventScript_CancelChallengeSaveFailed::
|
|||||||
|
|
||||||
BattleFrontier_BattleArenaLobby_EventScript_LoadPartyAndCancelChallenge::
|
BattleFrontier_BattleArenaLobby_EventScript_LoadPartyAndCancelChallenge::
|
||||||
special LoadPlayerParty
|
special LoadPlayerParty
|
||||||
|
callnative UpdateFollowingPokemon
|
||||||
BattleFrontier_BattleArenaLobby_EventScript_CancelChallenge::
|
BattleFrontier_BattleArenaLobby_EventScript_CancelChallenge::
|
||||||
msgbox BattleFrontier_BattleArenaLobby_Text_AwaitAnotherChallenge, MSGBOX_DEFAULT
|
msgbox BattleFrontier_BattleArenaLobby_Text_AwaitAnotherChallenge, MSGBOX_DEFAULT
|
||||||
BattleFrontier_BattleArenaLobby_EventScript_EndCancelChallenge::
|
BattleFrontier_BattleArenaLobby_EventScript_EndCancelChallenge::
|
||||||
|
|||||||
@ -17,6 +17,7 @@ BattleFrontier_BattleDomeBattleRoom_MapScripts::
|
|||||||
.byte 0
|
.byte 0
|
||||||
|
|
||||||
BattleFrontier_BattleDomeBattleRoom_OnTransition:
|
BattleFrontier_BattleDomeBattleRoom_OnTransition:
|
||||||
|
setflag FLAG_TEMP_HIDE_FOLLOWER
|
||||||
dome_setopponentgfx
|
dome_setopponentgfx
|
||||||
frontier_get FRONTIER_DATA_BATTLE_NUM
|
frontier_get FRONTIER_DATA_BATTLE_NUM
|
||||||
copyvar VAR_TEMP_F, VAR_RESULT
|
copyvar VAR_TEMP_F, VAR_RESULT
|
||||||
|
|||||||
@ -68,6 +68,7 @@ BattleFrontier_BattleDomeLobby_EventScript_GiveBattlePoints::
|
|||||||
dome_set DOME_DATA_WIN_STREAK_ACTIVE, TRUE
|
dome_set DOME_DATA_WIN_STREAK_ACTIVE, TRUE
|
||||||
special LoadPlayerParty
|
special LoadPlayerParty
|
||||||
special HealPlayerParty
|
special HealPlayerParty
|
||||||
|
callnative UpdateFollowingPokemon
|
||||||
goto BattleFrontier_BattleDomeLobby_EventScript_AskRecordBattle
|
goto BattleFrontier_BattleDomeLobby_EventScript_AskRecordBattle
|
||||||
|
|
||||||
BattleFrontier_BattleDomeLobby_EventScript_LostChallenge::
|
BattleFrontier_BattleDomeLobby_EventScript_LostChallenge::
|
||||||
@ -82,6 +83,7 @@ BattleFrontier_BattleDomeLobby_EventScript_LostChallenge::
|
|||||||
dome_set DOME_DATA_ATTEMPTED_CHALLENGE, TRUE
|
dome_set DOME_DATA_ATTEMPTED_CHALLENGE, TRUE
|
||||||
special LoadPlayerParty
|
special LoadPlayerParty
|
||||||
special HealPlayerParty
|
special HealPlayerParty
|
||||||
|
callnative UpdateFollowingPokemon
|
||||||
BattleFrontier_BattleDomeLobby_EventScript_AskRecordBattle::
|
BattleFrontier_BattleDomeLobby_EventScript_AskRecordBattle::
|
||||||
dome_save 0
|
dome_save 0
|
||||||
playse SE_SAVE
|
playse SE_SAVE
|
||||||
@ -160,6 +162,7 @@ BattleFrontier_BattleDomeLobby_EventScript_TryEnterChallenge::
|
|||||||
frontier_set FRONTIER_DATA_LVL_MODE, VAR_RESULT
|
frontier_set FRONTIER_DATA_LVL_MODE, VAR_RESULT
|
||||||
msgbox BattleFrontier_BattleDomeLobby_Text_SelectThreeMons, MSGBOX_DEFAULT
|
msgbox BattleFrontier_BattleDomeLobby_Text_SelectThreeMons, MSGBOX_DEFAULT
|
||||||
fadescreen FADE_TO_BLACK
|
fadescreen FADE_TO_BLACK
|
||||||
|
callnative RemoveFollowingPokemon
|
||||||
call BattleFrontier_EventScript_GetLvlMode
|
call BattleFrontier_EventScript_GetLvlMode
|
||||||
copyvar VAR_0x8004, VAR_RESULT
|
copyvar VAR_0x8004, VAR_RESULT
|
||||||
setvar VAR_0x8005, FRONTIER_PARTY_SIZE
|
setvar VAR_0x8005, FRONTIER_PARTY_SIZE
|
||||||
@ -222,6 +225,7 @@ BattleFrontier_BattleDomeLobby_EventScript_CancelChallengeSaveFailed::
|
|||||||
|
|
||||||
BattleFrontier_BattleDomeLobby_EventScript_LoadPartyCancelChallenge::
|
BattleFrontier_BattleDomeLobby_EventScript_LoadPartyCancelChallenge::
|
||||||
special LoadPlayerParty
|
special LoadPlayerParty
|
||||||
|
callnative UpdateFollowingPokemon
|
||||||
BattleFrontier_BattleDomeLobby_EventScript_CancelChallenge::
|
BattleFrontier_BattleDomeLobby_EventScript_CancelChallenge::
|
||||||
msgbox BattleFrontier_BattleDomeLobby_Text_HopeToSeeYouAgain, MSGBOX_DEFAULT
|
msgbox BattleFrontier_BattleDomeLobby_Text_HopeToSeeYouAgain, MSGBOX_DEFAULT
|
||||||
BattleFrontier_BattleDomeLobby_EventScript_EndCancelChallenge::
|
BattleFrontier_BattleDomeLobby_EventScript_EndCancelChallenge::
|
||||||
|
|||||||
@ -59,6 +59,7 @@ BattleFrontier_BattleFactoryLobby_EventScript_GiveBattlePoints::
|
|||||||
waitmessage
|
waitmessage
|
||||||
frontier_checkairshow
|
frontier_checkairshow
|
||||||
special LoadPlayerParty
|
special LoadPlayerParty
|
||||||
|
callnative UpdateFollowingPokemon
|
||||||
factory_save 0
|
factory_save 0
|
||||||
playse SE_SAVE
|
playse SE_SAVE
|
||||||
waitse
|
waitse
|
||||||
@ -71,6 +72,7 @@ BattleFrontier_BattleFactoryLobby_EventScript_LostChallenge::
|
|||||||
waitmessage
|
waitmessage
|
||||||
frontier_checkairshow
|
frontier_checkairshow
|
||||||
special LoadPlayerParty
|
special LoadPlayerParty
|
||||||
|
callnative UpdateFollowingPokemon
|
||||||
factory_set FACTORY_DATA_WIN_STREAK_ACTIVE, FALSE
|
factory_set FACTORY_DATA_WIN_STREAK_ACTIVE, FALSE
|
||||||
factory_save 0
|
factory_save 0
|
||||||
playse SE_SAVE
|
playse SE_SAVE
|
||||||
@ -196,6 +198,7 @@ BattleFrontier_BattleFactoryLobby_EventScript_CancelChallengeSaveFailed::
|
|||||||
|
|
||||||
BattleFrontier_BattleFactoryLobby_EventScript_LoadPartyAndCancelChallenge::
|
BattleFrontier_BattleFactoryLobby_EventScript_LoadPartyAndCancelChallenge::
|
||||||
special LoadPlayerParty
|
special LoadPlayerParty
|
||||||
|
callnative UpdateFollowingPokemon
|
||||||
BattleFrontier_BattleFactoryLobby_EventScript_CancelChallenge::
|
BattleFrontier_BattleFactoryLobby_EventScript_CancelChallenge::
|
||||||
msgbox BattleFrontier_BattleFactoryLobby_Text_LookForwardToNextVisit, MSGBOX_DEFAULT
|
msgbox BattleFrontier_BattleFactoryLobby_Text_LookForwardToNextVisit, MSGBOX_DEFAULT
|
||||||
release
|
release
|
||||||
|
|||||||
@ -76,6 +76,7 @@ BattleFrontier_BattlePalaceLobby_EventScript_SaveAfterChallenge::
|
|||||||
frontier_checkairshow
|
frontier_checkairshow
|
||||||
special LoadPlayerParty
|
special LoadPlayerParty
|
||||||
special HealPlayerParty
|
special HealPlayerParty
|
||||||
|
callnative UpdateFollowingPokemon
|
||||||
palace_save 0
|
palace_save 0
|
||||||
playse SE_SAVE
|
playse SE_SAVE
|
||||||
waitse
|
waitse
|
||||||
@ -151,6 +152,7 @@ BattleFrontier_BattlePalaceLobby_EventScript_TryEnterChallenge::
|
|||||||
frontier_set FRONTIER_DATA_LVL_MODE, VAR_RESULT
|
frontier_set FRONTIER_DATA_LVL_MODE, VAR_RESULT
|
||||||
msgbox BattleFrontier_BattlePalaceLobby_Text_NowSelectThreeMons, MSGBOX_DEFAULT
|
msgbox BattleFrontier_BattlePalaceLobby_Text_NowSelectThreeMons, MSGBOX_DEFAULT
|
||||||
fadescreen FADE_TO_BLACK
|
fadescreen FADE_TO_BLACK
|
||||||
|
callnative RemoveFollowingPokemon
|
||||||
call BattleFrontier_EventScript_GetLvlMode
|
call BattleFrontier_EventScript_GetLvlMode
|
||||||
copyvar VAR_0x8004, VAR_RESULT
|
copyvar VAR_0x8004, VAR_RESULT
|
||||||
setvar VAR_0x8005, FRONTIER_PARTY_SIZE
|
setvar VAR_0x8005, FRONTIER_PARTY_SIZE
|
||||||
@ -215,6 +217,7 @@ BattleFrontier_BattlePalaceLobby_EventScript_CancelChallengeSaveFailed::
|
|||||||
|
|
||||||
BattleFrontier_BattlePalaceLobby_EventScript_LoadPartyAndCancelChallenge::
|
BattleFrontier_BattlePalaceLobby_EventScript_LoadPartyAndCancelChallenge::
|
||||||
special LoadPlayerParty
|
special LoadPlayerParty
|
||||||
|
callnative LoadPlayerParty
|
||||||
BattleFrontier_BattlePalaceLobby_EventScript_CancelChallenge::
|
BattleFrontier_BattlePalaceLobby_EventScript_CancelChallenge::
|
||||||
msgbox BattleFrontier_BattlePalaceLobby_Text_ReturnWhenFortified, MSGBOX_DEFAULT
|
msgbox BattleFrontier_BattlePalaceLobby_Text_ReturnWhenFortified, MSGBOX_DEFAULT
|
||||||
BattleFrontier_BattlePalaceLobby_EventScript_EndCancelChallenge::
|
BattleFrontier_BattlePalaceLobby_EventScript_EndCancelChallenge::
|
||||||
@ -647,4 +650,3 @@ BattleFrontier_BattlePalaceLobby_Text_ExplainRulesWhenInDanger:
|
|||||||
.string "nature when it is in trouble.\p"
|
.string "nature when it is in trouble.\p"
|
||||||
.string "If a POKéMON begins behaving oddly\n"
|
.string "If a POKéMON begins behaving oddly\n"
|
||||||
.string "in a pinch, watch it carefully.$"
|
.string "in a pinch, watch it carefully.$"
|
||||||
|
|
||||||
|
|||||||
@ -59,6 +59,7 @@ BattleFrontier_BattlePikeLobby_EventScript_GiveBattlePoints::
|
|||||||
pike_set PIKE_DATA_TOTAL_STREAKS, VAR_RESULT
|
pike_set PIKE_DATA_TOTAL_STREAKS, VAR_RESULT
|
||||||
special LoadPlayerParty
|
special LoadPlayerParty
|
||||||
special HealPlayerParty
|
special HealPlayerParty
|
||||||
|
callnative UpdateFollowingPokemon
|
||||||
pike_resethelditems
|
pike_resethelditems
|
||||||
message BattleFrontier_BattlePikeLobby_Text_ShallRecordResults
|
message BattleFrontier_BattlePikeLobby_Text_ShallRecordResults
|
||||||
waitmessage
|
waitmessage
|
||||||
@ -80,6 +81,7 @@ BattleFrontier_BattlePikeLobby_EventScript_LostChallenge::
|
|||||||
pike_set PIKE_DATA_WIN_STREAK_ACTIVE, FALSE
|
pike_set PIKE_DATA_WIN_STREAK_ACTIVE, FALSE
|
||||||
special LoadPlayerParty
|
special LoadPlayerParty
|
||||||
special HealPlayerParty
|
special HealPlayerParty
|
||||||
|
callnative UpdateFollowingPokemon
|
||||||
pike_resethelditems
|
pike_resethelditems
|
||||||
pike_save 0
|
pike_save 0
|
||||||
playse SE_SAVE
|
playse SE_SAVE
|
||||||
@ -119,6 +121,7 @@ BattleFrontier_BattlePikeLobby_EventScript_TryEnterChallenge::
|
|||||||
frontier_set FRONTIER_DATA_LVL_MODE, VAR_RESULT
|
frontier_set FRONTIER_DATA_LVL_MODE, VAR_RESULT
|
||||||
msgbox BattleFrontier_BattlePikeLobby_Text_PleaseChooseThreeMons, MSGBOX_DEFAULT
|
msgbox BattleFrontier_BattlePikeLobby_Text_PleaseChooseThreeMons, MSGBOX_DEFAULT
|
||||||
fadescreen FADE_TO_BLACK
|
fadescreen FADE_TO_BLACK
|
||||||
|
callnative RemoveFollowingPokemon
|
||||||
call BattleFrontier_EventScript_GetLvlMode
|
call BattleFrontier_EventScript_GetLvlMode
|
||||||
copyvar VAR_0x8004, VAR_RESULT
|
copyvar VAR_0x8004, VAR_RESULT
|
||||||
setvar VAR_0x8005, FRONTIER_PARTY_SIZE
|
setvar VAR_0x8005, FRONTIER_PARTY_SIZE
|
||||||
@ -183,6 +186,7 @@ BattleFrontier_BattlePikeLobby_EventScript_CancelChallengeSaveFailed::
|
|||||||
|
|
||||||
BattleFrontier_BattlePikeLobby_EventScript_LoadPartyAndCancelChallenge::
|
BattleFrontier_BattlePikeLobby_EventScript_LoadPartyAndCancelChallenge::
|
||||||
special LoadPlayerParty
|
special LoadPlayerParty
|
||||||
|
callnative UpdateFollowingPokemon
|
||||||
BattleFrontier_BattlePikeLobby_EventScript_CancelChallenge::
|
BattleFrontier_BattlePikeLobby_EventScript_CancelChallenge::
|
||||||
msgbox BattleFrontier_BattlePikeLobby_Text_LookForwardToSeeingYou, MSGBOX_DEFAULT
|
msgbox BattleFrontier_BattlePikeLobby_Text_LookForwardToSeeingYou, MSGBOX_DEFAULT
|
||||||
BattleFrontier_BattlePikeLobby_EventScript_EndCancelChallenge::
|
BattleFrontier_BattlePikeLobby_EventScript_EndCancelChallenge::
|
||||||
@ -430,4 +434,3 @@ BattleFrontier_BattlePikeLobby_Text_ExplainMonOrderRules:
|
|||||||
.string "changed.\p"
|
.string "changed.\p"
|
||||||
.string "The sequence must be set before\n"
|
.string "The sequence must be set before\n"
|
||||||
.string "starting your challenge.$"
|
.string "starting your challenge.$"
|
||||||
|
|
||||||
|
|||||||
@ -59,6 +59,7 @@ BattleFrontier_BattlePyramidLobby_EventScript_GiveBattlePoints::
|
|||||||
special LoadPlayerParty
|
special LoadPlayerParty
|
||||||
pyramid_clearhelditems
|
pyramid_clearhelditems
|
||||||
special HealPlayerParty
|
special HealPlayerParty
|
||||||
|
callnative UpdateFollowingPokemon
|
||||||
message BattleFrontier_BattlePyramidLobby_Text_UsedBattleBagWillBeKept
|
message BattleFrontier_BattlePyramidLobby_Text_UsedBattleBagWillBeKept
|
||||||
waitmessage
|
waitmessage
|
||||||
playse SE_EXP_MAX
|
playse SE_EXP_MAX
|
||||||
@ -83,6 +84,7 @@ BattleFrontier_BattlePyramidLobby_EventScript_LostChallenge::
|
|||||||
special LoadPlayerParty
|
special LoadPlayerParty
|
||||||
pyramid_clearhelditems
|
pyramid_clearhelditems
|
||||||
special HealPlayerParty
|
special HealPlayerParty
|
||||||
|
callnative UpdateFollowingPokemon
|
||||||
lockall
|
lockall
|
||||||
message BattleFrontier_BattlePyramidLobby_Text_DisappointingHereIsBag
|
message BattleFrontier_BattlePyramidLobby_Text_DisappointingHereIsBag
|
||||||
waitmessage
|
waitmessage
|
||||||
@ -132,6 +134,7 @@ BattleFrontier_BattlePyramidLobby_EventScript_TryEnterChallenge::
|
|||||||
frontier_set FRONTIER_DATA_LVL_MODE, VAR_RESULT
|
frontier_set FRONTIER_DATA_LVL_MODE, VAR_RESULT
|
||||||
msgbox BattleFrontier_BattlePyramidLobby_Text_SelectThreeMons, MSGBOX_DEFAULT
|
msgbox BattleFrontier_BattlePyramidLobby_Text_SelectThreeMons, MSGBOX_DEFAULT
|
||||||
fadescreen FADE_TO_BLACK
|
fadescreen FADE_TO_BLACK
|
||||||
|
callnative RemoveFollowingPokemon
|
||||||
call BattleFrontier_EventScript_GetLvlMode
|
call BattleFrontier_EventScript_GetLvlMode
|
||||||
copyvar VAR_0x8004, VAR_RESULT
|
copyvar VAR_0x8004, VAR_RESULT
|
||||||
setvar VAR_0x8005, FRONTIER_PARTY_SIZE
|
setvar VAR_0x8005, FRONTIER_PARTY_SIZE
|
||||||
@ -196,6 +199,7 @@ BattleFrontier_BattlePyramidLobby_EventScript_CancelChallengeSaveFailed::
|
|||||||
|
|
||||||
BattleFrontier_BattlePyramidLobby_EventScript_LoadPartyAndCancelChallenge::
|
BattleFrontier_BattlePyramidLobby_EventScript_LoadPartyAndCancelChallenge::
|
||||||
special LoadPlayerParty
|
special LoadPlayerParty
|
||||||
|
callnative UpdateFollowingPokemon
|
||||||
BattleFrontier_BattlePyramidLobby_EventScript_CancelChallenge::
|
BattleFrontier_BattlePyramidLobby_EventScript_CancelChallenge::
|
||||||
msgbox BattleFrontier_BattlePyramidLobby_Text_AwaitFutureChallenge, MSGBOX_DEFAULT
|
msgbox BattleFrontier_BattlePyramidLobby_Text_AwaitFutureChallenge, MSGBOX_DEFAULT
|
||||||
BattleFrontier_BattlePyramidLobby_EventScript_EndCancelChallenge::
|
BattleFrontier_BattlePyramidLobby_EventScript_EndCancelChallenge::
|
||||||
@ -900,4 +904,3 @@ BattleFrontier_BattlePyramidLobby_Text_ExplainBagRules:
|
|||||||
.string "of ten kinds of items.\p"
|
.string "of ten kinds of items.\p"
|
||||||
.string "The contents of the BATTLE BAG are\n"
|
.string "The contents of the BATTLE BAG are\n"
|
||||||
.string "lost if you fail in your quest.$"
|
.string "lost if you fail in your quest.$"
|
||||||
|
|
||||||
|
|||||||
@ -95,6 +95,7 @@ BattleFrontier_BattleTowerLobby_EventScript_LookForwardToChallenge::
|
|||||||
msgbox BattleFrontier_BattleTowerLobby_Text_LookForwardToAnotherChallenge, MSGBOX_DEFAULT
|
msgbox BattleFrontier_BattleTowerLobby_Text_LookForwardToAnotherChallenge, MSGBOX_DEFAULT
|
||||||
closemessage
|
closemessage
|
||||||
setvar VAR_TEMP_0, 255
|
setvar VAR_TEMP_0, 255
|
||||||
|
callnative UpdateFollowingPokemon
|
||||||
release
|
release
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -114,6 +115,7 @@ BattleFrontier_BattleTowerLobby_EventScript_LostThanksForPlaying::
|
|||||||
msgbox BattleFrontier_BattleTowerLobby_Text_LookForwardToAnotherChallenge, MSGBOX_DEFAULT
|
msgbox BattleFrontier_BattleTowerLobby_Text_LookForwardToAnotherChallenge, MSGBOX_DEFAULT
|
||||||
closemessage
|
closemessage
|
||||||
setvar VAR_TEMP_0, 255
|
setvar VAR_TEMP_0, 255
|
||||||
|
callnative UpdateFollowingPokemon
|
||||||
release
|
release
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -200,6 +202,7 @@ BattleFrontier_BattleTowerLobby_EventScript_TryEnterSinglesChallenge::
|
|||||||
frontier_set FRONTIER_DATA_LVL_MODE, VAR_RESULT
|
frontier_set FRONTIER_DATA_LVL_MODE, VAR_RESULT
|
||||||
msgbox BattleFrontier_BattleTowerLobby_Text_SelectThreeMons, MSGBOX_DEFAULT
|
msgbox BattleFrontier_BattleTowerLobby_Text_SelectThreeMons, MSGBOX_DEFAULT
|
||||||
fadescreen FADE_TO_BLACK
|
fadescreen FADE_TO_BLACK
|
||||||
|
callnative RemoveFollowingPokemon
|
||||||
call BattleFrontier_EventScript_GetLvlMode
|
call BattleFrontier_EventScript_GetLvlMode
|
||||||
copyvar VAR_0x8004, VAR_RESULT
|
copyvar VAR_0x8004, VAR_RESULT
|
||||||
setvar VAR_0x8005, FRONTIER_PARTY_SIZE
|
setvar VAR_0x8005, FRONTIER_PARTY_SIZE
|
||||||
@ -263,6 +266,7 @@ BattleFrontier_BattleTowerLobby_EventScript_TryEnterDoublesChallenge::
|
|||||||
frontier_set FRONTIER_DATA_LVL_MODE, VAR_RESULT
|
frontier_set FRONTIER_DATA_LVL_MODE, VAR_RESULT
|
||||||
msgbox BattleFrontier_BattleTowerLobby_Text_PleaseSelectFourMons, MSGBOX_DEFAULT
|
msgbox BattleFrontier_BattleTowerLobby_Text_PleaseSelectFourMons, MSGBOX_DEFAULT
|
||||||
fadescreen FADE_TO_BLACK
|
fadescreen FADE_TO_BLACK
|
||||||
|
callnative RemoveFollowingPokemon
|
||||||
call BattleFrontier_EventScript_GetLvlMode
|
call BattleFrontier_EventScript_GetLvlMode
|
||||||
copyvar VAR_0x8004, VAR_RESULT
|
copyvar VAR_0x8004, VAR_RESULT
|
||||||
setvar VAR_0x8005, FRONTIER_DOUBLES_PARTY_SIZE
|
setvar VAR_0x8005, FRONTIER_DOUBLES_PARTY_SIZE
|
||||||
@ -327,6 +331,7 @@ BattleFrontier_BattleTowerLobby_EventScript_TryEnterMultisChallenge::
|
|||||||
frontier_set FRONTIER_DATA_LVL_MODE, VAR_RESULT
|
frontier_set FRONTIER_DATA_LVL_MODE, VAR_RESULT
|
||||||
msgbox BattleFrontier_BattleTowerLobby_Text_PleaseSelectTwoMons, MSGBOX_DEFAULT
|
msgbox BattleFrontier_BattleTowerLobby_Text_PleaseSelectTwoMons, MSGBOX_DEFAULT
|
||||||
fadescreen FADE_TO_BLACK
|
fadescreen FADE_TO_BLACK
|
||||||
|
callnative RemoveFollowingPokemon
|
||||||
call BattleFrontier_EventScript_GetLvlMode
|
call BattleFrontier_EventScript_GetLvlMode
|
||||||
copyvar VAR_0x8004, VAR_RESULT
|
copyvar VAR_0x8004, VAR_RESULT
|
||||||
setvar VAR_0x8005, FRONTIER_MULTI_PARTY_SIZE
|
setvar VAR_0x8005, FRONTIER_MULTI_PARTY_SIZE
|
||||||
@ -390,6 +395,7 @@ BattleFrontier_BattleTowerLobby_EventScript_TryEnterLinkMultisChallenge::
|
|||||||
frontier_set FRONTIER_DATA_LVL_MODE, VAR_RESULT
|
frontier_set FRONTIER_DATA_LVL_MODE, VAR_RESULT
|
||||||
msgbox BattleFrontier_BattleTowerLobby_Text_PleaseSelectTwoMons2, MSGBOX_DEFAULT
|
msgbox BattleFrontier_BattleTowerLobby_Text_PleaseSelectTwoMons2, MSGBOX_DEFAULT
|
||||||
fadescreen FADE_TO_BLACK
|
fadescreen FADE_TO_BLACK
|
||||||
|
callnative RemoveFollowingPokemon
|
||||||
call BattleFrontier_EventScript_GetLvlMode
|
call BattleFrontier_EventScript_GetLvlMode
|
||||||
copyvar VAR_0x8004, VAR_RESULT
|
copyvar VAR_0x8004, VAR_RESULT
|
||||||
setvar VAR_0x8005, FRONTIER_MULTI_PARTY_SIZE
|
setvar VAR_0x8005, FRONTIER_MULTI_PARTY_SIZE
|
||||||
@ -577,6 +583,7 @@ BattleFrontier_BattleTowerLobby_EventScript_CancelChallengeSaveFailed::
|
|||||||
|
|
||||||
BattleFrontier_BattleTowerLobby_EventScript_LoadPartyCancelChallenge::
|
BattleFrontier_BattleTowerLobby_EventScript_LoadPartyCancelChallenge::
|
||||||
special LoadPlayerParty
|
special LoadPlayerParty
|
||||||
|
callnative UpdateFollowingPokemon
|
||||||
BattleFrontier_BattleTowerLobby_EventScript_CancelChallenge::
|
BattleFrontier_BattleTowerLobby_EventScript_CancelChallenge::
|
||||||
special CloseLink
|
special CloseLink
|
||||||
msgbox BattleFrontier_BattleTowerLobby_Text_LookForwardToAnotherChallenge, MSGBOX_DEFAULT
|
msgbox BattleFrontier_BattleTowerLobby_Text_LookForwardToAnotherChallenge, MSGBOX_DEFAULT
|
||||||
|
|||||||
@ -15,7 +15,7 @@
|
|||||||
"connections": null,
|
"connections": null,
|
||||||
"object_events": [
|
"object_events": [
|
||||||
{
|
{
|
||||||
"graphics_id": "OBJ_EVENT_GFX_REGIROCK",
|
"graphics_id": "OBJ_EVENT_GFX_MON_BASE + SPECIES_REGIROCK",
|
||||||
"x": 8,
|
"x": 8,
|
||||||
"y": 7,
|
"y": 7,
|
||||||
"elevation": 3,
|
"elevation": 3,
|
||||||
|
|||||||
@ -55,6 +55,7 @@ DesertRuins_EventScript_CaveEntranceSide::
|
|||||||
end
|
end
|
||||||
|
|
||||||
DesertRuins_EventScript_Regirock::
|
DesertRuins_EventScript_Regirock::
|
||||||
|
bufferspeciesname 0, SPECIES_REGIROCK
|
||||||
lock
|
lock
|
||||||
faceplayer
|
faceplayer
|
||||||
waitse
|
waitse
|
||||||
@ -83,4 +84,3 @@ DesertRuins_EventScript_RanFromRegirock::
|
|||||||
setvar VAR_0x8004, SPECIES_REGIROCK
|
setvar VAR_0x8004, SPECIES_REGIROCK
|
||||||
goto Common_EventScript_LegendaryFlewAway
|
goto Common_EventScript_LegendaryFlewAway
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -5,6 +5,7 @@ FortreeCity_Gym_MapScripts::
|
|||||||
|
|
||||||
FortreeCity_Gym_OnTransition:
|
FortreeCity_Gym_OnTransition:
|
||||||
special RotatingGate_InitPuzzle
|
special RotatingGate_InitPuzzle
|
||||||
|
setflag FLAG_TEMP_HIDE_FOLLOWER @ Hide follower bc of rotating gates
|
||||||
end
|
end
|
||||||
|
|
||||||
FortreeCity_Gym_OnWarp:
|
FortreeCity_Gym_OnWarp:
|
||||||
|
|||||||
@ -15,7 +15,7 @@
|
|||||||
"connections": null,
|
"connections": null,
|
||||||
"object_events": [
|
"object_events": [
|
||||||
{
|
{
|
||||||
"graphics_id": "OBJ_EVENT_GFX_REGICE",
|
"graphics_id": "OBJ_EVENT_GFX_MON_BASE + SPECIES_REGICE",
|
||||||
"x": 8,
|
"x": 8,
|
||||||
"y": 7,
|
"y": 7,
|
||||||
"elevation": 3,
|
"elevation": 3,
|
||||||
|
|||||||
@ -88,6 +88,7 @@ IslandCave_EventScript_ClearSteps::
|
|||||||
return
|
return
|
||||||
|
|
||||||
IslandCave_EventScript_Regice::
|
IslandCave_EventScript_Regice::
|
||||||
|
bufferspeciesname 0, SPECIES_REGICE
|
||||||
lock
|
lock
|
||||||
faceplayer
|
faceplayer
|
||||||
waitse
|
waitse
|
||||||
|
|||||||
@ -1,9 +1,14 @@
|
|||||||
MossdeepCity_Gym_MapScripts::
|
MossdeepCity_Gym_MapScripts::
|
||||||
|
map_script MAP_SCRIPT_ON_TRANSITION, MossdeepCity_Gym_OnTransition
|
||||||
map_script MAP_SCRIPT_ON_LOAD, MossdeepCity_Gym_OnLoad
|
map_script MAP_SCRIPT_ON_LOAD, MossdeepCity_Gym_OnLoad
|
||||||
.byte 0
|
.byte 0
|
||||||
|
|
||||||
@ NOTE: Mossdeep Gym was redesigned between R/S and E. Leftover (and now functionally unused) scripts are commented below
|
@ NOTE: Mossdeep Gym was redesigned between R/S and E. Leftover (and now functionally unused) scripts are commented below
|
||||||
|
|
||||||
|
MossdeepCity_Gym_OnTransition:
|
||||||
|
setflag FLAG_TEMP_HIDE_FOLLOWER @ Hide follower since it can collide with moving statues
|
||||||
|
end
|
||||||
|
|
||||||
@ All the below checks are leftover from RS. FLAG_MOSSDEEP_GYM_SWITCH_X is never set
|
@ All the below checks are leftover from RS. FLAG_MOSSDEEP_GYM_SWITCH_X is never set
|
||||||
MossdeepCity_Gym_OnLoad:
|
MossdeepCity_Gym_OnLoad:
|
||||||
goto_if_set FLAG_MOSSDEEP_GYM_SWITCH_1, MossdeepCity_Gym_EventScript_SetSwitch1Metatiles
|
goto_if_set FLAG_MOSSDEEP_GYM_SWITCH_1, MossdeepCity_Gym_EventScript_SetSwitch1Metatiles
|
||||||
|
|||||||
@ -105,8 +105,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"graphics_id": "OBJ_EVENT_GFX_PIKACHU",
|
"graphics_id": "OBJ_EVENT_GFX_PIKACHU",
|
||||||
"x": 49,
|
"x": 51,
|
||||||
"y": 2,
|
"y": 1,
|
||||||
"elevation": 3,
|
"elevation": 3,
|
||||||
"movement_type": "MOVEMENT_TYPE_LOOK_AROUND",
|
"movement_type": "MOVEMENT_TYPE_LOOK_AROUND",
|
||||||
"movement_range_x": 0,
|
"movement_range_x": 0,
|
||||||
@ -336,6 +336,32 @@
|
|||||||
"trainer_sight_or_berry_tree_id": "4",
|
"trainer_sight_or_berry_tree_id": "4",
|
||||||
"script": "Route117_EventScript_Melina",
|
"script": "Route117_EventScript_Melina",
|
||||||
"flag": "0"
|
"flag": "0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"graphics_id": "OBJ_EVENT_GFX_VAR_0",
|
||||||
|
"x": 47,
|
||||||
|
"y": 2,
|
||||||
|
"elevation": 3,
|
||||||
|
"movement_type": "MOVEMENT_TYPE_LOOK_AROUND",
|
||||||
|
"movement_range_x": 0,
|
||||||
|
"movement_range_y": 0,
|
||||||
|
"trainer_type": "TRAINER_TYPE_NONE",
|
||||||
|
"trainer_sight_or_berry_tree_id": "VAR_TEMP_0",
|
||||||
|
"script": "NULL",
|
||||||
|
"flag": "FLAG_TEMP_1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"graphics_id": "OBJ_EVENT_GFX_VAR_1",
|
||||||
|
"x": 49,
|
||||||
|
"y": 2,
|
||||||
|
"elevation": 3,
|
||||||
|
"movement_type": "MOVEMENT_TYPE_LOOK_AROUND",
|
||||||
|
"movement_range_x": 0,
|
||||||
|
"movement_range_y": 0,
|
||||||
|
"trainer_type": "TRAINER_TYPE_NONE",
|
||||||
|
"trainer_sight_or_berry_tree_id": "VAR_TEMP_1",
|
||||||
|
"script": "NULL",
|
||||||
|
"flag": "FLAG_TEMP_2"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"warp_events": [
|
"warp_events": [
|
||||||
|
|||||||
@ -1,13 +1,61 @@
|
|||||||
.set LOCALID_DAYCARE_MAN, 3
|
.set LOCALID_DAYCARE_MAN, 3
|
||||||
|
.set LOCALID_DAYCARE_MON_0, 25
|
||||||
|
.set LOCALID_DAYCARE_MON_1, 26
|
||||||
|
|
||||||
Route117_MapScripts::
|
Route117_MapScripts::
|
||||||
map_script MAP_SCRIPT_ON_TRANSITION, Route117_OnTransition
|
map_script MAP_SCRIPT_ON_TRANSITION, Route117_OnTransition
|
||||||
.byte 0
|
.byte 0
|
||||||
|
|
||||||
|
.macro getdaycaregfx var0:req var1:req var2:req var3:req
|
||||||
|
callfunc ScrFunc_getdaycaregfx
|
||||||
|
.2byte \var0
|
||||||
|
.2byte \var1
|
||||||
|
.2byte \var2
|
||||||
|
.2byte \var3
|
||||||
|
.endm
|
||||||
|
|
||||||
Route117_OnTransition:
|
Route117_OnTransition:
|
||||||
call Route117_EventScript_TryMoveDayCareMan
|
call Route117_EventScript_TryMoveDayCareMan
|
||||||
|
@ set flags for OW daycare mons
|
||||||
|
setflag FLAG_TEMP_1
|
||||||
|
setflag FLAG_TEMP_2
|
||||||
|
getdaycaregfx VAR_OBJ_GFX_ID_0, VAR_OBJ_GFX_ID_1, VAR_TEMP_0, VAR_TEMP_1
|
||||||
|
switch VAR_RESULT
|
||||||
|
case 2, Route117_EventScript_ShowDaycareMon1
|
||||||
|
case 1, Route117_EventScript_ShowDaycareMon0
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Route117_EventScript_ShowDaycareMon1:
|
||||||
|
@ set pokemon movement type based on compatibility
|
||||||
|
special SetDaycareCompatibilityString
|
||||||
|
@ 0:
|
||||||
|
call_if_eq VAR_RESULT, PARENTS_INCOMPATIBLE, Route117_EventScript_DaycareMonIncompatible
|
||||||
|
@ 20: do nothing if low compatibility
|
||||||
|
@ call_if_eq VAR_RESULT, PARENTS_LOW_COMPATIBILITY, Route117_EventScript_DaycareMonLowCompatibility
|
||||||
|
@ 50:
|
||||||
|
call_if_eq VAR_RESULT, PARENTS_MED_COMPATIBILITY, Route117_EventScript_DaycareMonMedCompatibility
|
||||||
|
@ 70:
|
||||||
|
call_if_eq VAR_RESULT, PARENTS_MAX_COMPATIBILITY, Route117_EventScript_DaycareMonMaxCompatibility
|
||||||
|
clearflag FLAG_TEMP_2
|
||||||
|
Route117_EventScript_ShowDaycareMon0:
|
||||||
|
clearflag FLAG_TEMP_1
|
||||||
|
end
|
||||||
|
|
||||||
|
Route117_EventScript_DaycareMonIncompatible: @ mons never face each other
|
||||||
|
setobjectmovementtype LOCALID_DAYCARE_MON_0, MOVEMENT_TYPE_FACE_DOWN_UP_AND_LEFT
|
||||||
|
setobjectmovementtype LOCALID_DAYCARE_MON_1, MOVEMENT_TYPE_FACE_DOWN_UP_AND_RIGHT
|
||||||
|
return
|
||||||
|
|
||||||
|
Route117_EventScript_DaycareMonMedCompatibility: @ down and towards each other
|
||||||
|
setobjectmovementtype LOCALID_DAYCARE_MON_0, MOVEMENT_TYPE_FACE_DOWN_AND_RIGHT
|
||||||
|
setobjectmovementtype LOCALID_DAYCARE_MON_1, MOVEMENT_TYPE_FACE_DOWN_AND_LEFT
|
||||||
|
return
|
||||||
|
|
||||||
|
Route117_EventScript_DaycareMonMaxCompatibility: @ facing; walk in place
|
||||||
|
setobjectmovementtype LOCALID_DAYCARE_MON_0, MOVEMENT_TYPE_WALK_IN_PLACE_RIGHT
|
||||||
|
setobjectmovementtype LOCALID_DAYCARE_MON_1, MOVEMENT_TYPE_WALK_IN_PLACE_LEFT
|
||||||
|
return
|
||||||
|
|
||||||
Route117_EventScript_TryMoveDayCareMan::
|
Route117_EventScript_TryMoveDayCareMan::
|
||||||
goto_if_unset FLAG_PENDING_DAYCARE_EGG, Route117_EventScript_StopMoveDayCareMan
|
goto_if_unset FLAG_PENDING_DAYCARE_EGG, Route117_EventScript_StopMoveDayCareMan
|
||||||
setobjectxyperm LOCALID_DAYCARE_MAN, 47, 6
|
setobjectxyperm LOCALID_DAYCARE_MAN, 47, 6
|
||||||
@ -205,4 +253,3 @@ Route117_Text_RouteSignMauville:
|
|||||||
Route117_Text_DayCareSign:
|
Route117_Text_DayCareSign:
|
||||||
.string "POKéMON DAY CARE\n"
|
.string "POKéMON DAY CARE\n"
|
||||||
.string "“Let us raise your POKéMON.”$"
|
.string "“Let us raise your POKéMON.”$"
|
||||||
|
|
||||||
|
|||||||
@ -559,7 +559,7 @@
|
|||||||
"flag": "0"
|
"flag": "0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"graphics_id": "OBJ_EVENT_GFX_YOUNGSTER",
|
"graphics_id": "OBJ_EVENT_GFX_BUG_CATCHER",
|
||||||
"x": 14,
|
"x": 14,
|
||||||
"y": 12,
|
"y": 12,
|
||||||
"elevation": 3,
|
"elevation": 3,
|
||||||
|
|||||||
@ -274,6 +274,7 @@ RusturfTunnel_EventScript_TunnelBlockagePos3::
|
|||||||
|
|
||||||
RusturfTunnel_EventScript_AquaGruntBackUp::
|
RusturfTunnel_EventScript_AquaGruntBackUp::
|
||||||
lockall
|
lockall
|
||||||
|
setflag FLAG_SAFE_FOLLOWER_MOVEMENT
|
||||||
msgbox RusturfTunnel_Text_ComeAndGetSome, MSGBOX_DEFAULT
|
msgbox RusturfTunnel_Text_ComeAndGetSome, MSGBOX_DEFAULT
|
||||||
closemessage
|
closemessage
|
||||||
applymovement LOCALID_GRUNT, RusturfTunnel_Movement_GruntAndPeekoBackUp
|
applymovement LOCALID_GRUNT, RusturfTunnel_Movement_GruntAndPeekoBackUp
|
||||||
@ -529,4 +530,3 @@ RusturfTunnel_Text_MikePostBattle:
|
|||||||
.string "They halted development here to\n"
|
.string "They halted development here to\n"
|
||||||
.string "protect POKéMON, right?\l"
|
.string "protect POKéMON, right?\l"
|
||||||
.string "There's a feel-good story!$"
|
.string "There's a feel-good story!$"
|
||||||
|
|
||||||
|
|||||||
@ -79,6 +79,7 @@ SlateportCity_OceanicMuseum_2F_EventScript_CaptStern::
|
|||||||
playfanfare MUS_HEAL
|
playfanfare MUS_HEAL
|
||||||
waitfanfare
|
waitfanfare
|
||||||
special HealPlayerParty
|
special HealPlayerParty
|
||||||
|
callnative UpdateFollowingPokemon
|
||||||
removeobject LOCALID_CAPT_STERN
|
removeobject LOCALID_CAPT_STERN
|
||||||
setflag FLAG_HIDE_ROUTE_110_TEAM_AQUA
|
setflag FLAG_HIDE_ROUTE_110_TEAM_AQUA
|
||||||
call_if_eq VAR_REGISTER_BIRCH_STATE, 0, SlateportCity_OceanicMuseum_2F_EventScript_ReadyRegisterBirch
|
call_if_eq VAR_REGISTER_BIRCH_STATE, 0, SlateportCity_OceanicMuseum_2F_EventScript_ReadyRegisterBirch
|
||||||
@ -437,4 +438,3 @@ SlateportCity_OceanicMuseum_2F_Text_SSAnneReplica:
|
|||||||
.string "“S.S. ANNE\p"
|
.string "“S.S. ANNE\p"
|
||||||
.string "“A replica of the luxury liner that\n"
|
.string "“A replica of the luxury liner that\n"
|
||||||
.string "circles the globe.”$"
|
.string "circles the globe.”$"
|
||||||
|
|
||||||
|
|||||||
@ -495,6 +495,7 @@ SootopolisCity_EventScript_RayquazaSceneFromPokeCenter::
|
|||||||
removeobject LOCALID_GROUDON
|
removeobject LOCALID_GROUDON
|
||||||
removeobject LOCALID_KYOGRE
|
removeobject LOCALID_KYOGRE
|
||||||
addobject LOCALID_RAYQUAZA
|
addobject LOCALID_RAYQUAZA
|
||||||
|
hideobjectat LOCALID_RAYQUAZA, MAP_SOOTOPOLIS_CITY
|
||||||
setvar VAR_0x8004, TRUE
|
setvar VAR_0x8004, TRUE
|
||||||
special Script_DoRayquazaScene
|
special Script_DoRayquazaScene
|
||||||
waitstate
|
waitstate
|
||||||
|
|||||||
@ -96,6 +96,7 @@ TrainerHill_Entrance_EventScript_PlayerExitChallenge::
|
|||||||
waitmovement 0
|
waitmovement 0
|
||||||
setvar VAR_TRAINER_HILL_IS_ACTIVE, 0
|
setvar VAR_TRAINER_HILL_IS_ACTIVE, 0
|
||||||
special HealPlayerParty
|
special HealPlayerParty
|
||||||
|
callnative UpdateFollowingPokemon
|
||||||
releaseall
|
releaseall
|
||||||
TrainerHill_Entrance_EventScript_EndExitChallenge::
|
TrainerHill_Entrance_EventScript_EndExitChallenge::
|
||||||
end
|
end
|
||||||
@ -161,6 +162,7 @@ TrainerHill_Entrance_EventScript_ChooseChallenge::
|
|||||||
setvar VAR_TRAINER_HILL_IS_ACTIVE, 1
|
setvar VAR_TRAINER_HILL_IS_ACTIVE, 1
|
||||||
setvar VAR_TEMP_5, 0
|
setvar VAR_TEMP_5, 0
|
||||||
special HealPlayerParty
|
special HealPlayerParty
|
||||||
|
callnative UpdateFollowingPokemon
|
||||||
msgbox TrainerHill_Entrance_Text_TimeProgessGetSetGo, MSGBOX_DEFAULT
|
msgbox TrainerHill_Entrance_Text_TimeProgessGetSetGo, MSGBOX_DEFAULT
|
||||||
trainerhill_start
|
trainerhill_start
|
||||||
releaseall
|
releaseall
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
"layouts_table_label": "gMapLayouts",
|
||||||
"group_order": [
|
"group_order": [
|
||||||
"gMapGroup_TownsAndRoutes",
|
"gMapGroup_TownsAndRoutes",
|
||||||
"gMapGroup_IndoorLittleroot",
|
"gMapGroup_IndoorLittleroot",
|
||||||
|
|||||||
@ -227,6 +227,7 @@ gScriptCmdTable::
|
|||||||
.4byte ScrCmd_warpwhitefade @ 0xe0
|
.4byte ScrCmd_warpwhitefade @ 0xe0
|
||||||
.4byte ScrCmd_buffercontestname @ 0xe1
|
.4byte ScrCmd_buffercontestname @ 0xe1
|
||||||
.4byte ScrCmd_bufferitemnameplural @ 0xe2
|
.4byte ScrCmd_bufferitemnameplural @ 0xe2
|
||||||
|
.4byte ScrCmd_callfunc @ 0xe3
|
||||||
|
|
||||||
gScriptCmdTableEnd::
|
gScriptCmdTableEnd::
|
||||||
.4byte ScrCmd_nop
|
.4byte ScrCmd_nop
|
||||||
|
|||||||
@ -133,6 +133,7 @@ BattleFrontier_BattlePikeThreePathRoom_EventScript_NoTurningBack::
|
|||||||
lockall
|
lockall
|
||||||
msgbox BattleFrontier_BattlePike_Text_PathBlockedNoTurningBack, MSGBOX_DEFAULT
|
msgbox BattleFrontier_BattlePike_Text_PathBlockedNoTurningBack, MSGBOX_DEFAULT
|
||||||
closemessage
|
closemessage
|
||||||
|
releaseall
|
||||||
end
|
end
|
||||||
|
|
||||||
BattleFrontier_BattlePikeRoomNormal_EventScript_SetEnteredRoom::
|
BattleFrontier_BattlePikeRoomNormal_EventScript_SetEnteredRoom::
|
||||||
@ -146,6 +147,7 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_NoTurningBack::
|
|||||||
lockall
|
lockall
|
||||||
msgbox BattleFrontier_BattlePike_Text_PathBlockedNoTurningBack, MSGBOX_DEFAULT
|
msgbox BattleFrontier_BattlePike_Text_PathBlockedNoTurningBack, MSGBOX_DEFAULT
|
||||||
closemessage
|
closemessage
|
||||||
|
releaseall
|
||||||
end
|
end
|
||||||
|
|
||||||
BattleFrontier_BattlePikeRoomNormal_EventScript_Exit::
|
BattleFrontier_BattlePikeRoomNormal_EventScript_Exit::
|
||||||
@ -214,6 +216,7 @@ BattleFrontier_BattlePikeRoomWildMons_EventScript_NoTurningBack::
|
|||||||
lockall
|
lockall
|
||||||
msgbox BattleFrontier_BattlePike_Text_PathBlockedNoTurningBack, MSGBOX_DEFAULT
|
msgbox BattleFrontier_BattlePike_Text_PathBlockedNoTurningBack, MSGBOX_DEFAULT
|
||||||
closemessage
|
closemessage
|
||||||
|
releaseall
|
||||||
end
|
end
|
||||||
|
|
||||||
BattleFrontier_BattlePike_EventScript_Retire::
|
BattleFrontier_BattlePike_EventScript_Retire::
|
||||||
|
|||||||
@ -103,6 +103,7 @@ Route117_PokemonDayCare_EventScript_GiveMonToRaise::
|
|||||||
msgbox Route117_PokemonDayCare_Text_WellRaiseYourMon, MSGBOX_DEFAULT
|
msgbox Route117_PokemonDayCare_Text_WellRaiseYourMon, MSGBOX_DEFAULT
|
||||||
waitmoncry
|
waitmoncry
|
||||||
special StoreSelectedPokemonInDaycare
|
special StoreSelectedPokemonInDaycare
|
||||||
|
callnative UpdateFollowingPokemon
|
||||||
incrementgamestat GAME_STAT_USED_DAYCARE
|
incrementgamestat GAME_STAT_USED_DAYCARE
|
||||||
specialvar VAR_RESULT, GetDaycareState
|
specialvar VAR_RESULT, GetDaycareState
|
||||||
goto_if_eq VAR_RESULT, DAYCARE_ONE_MON, Route117_PokemonDayCare_EventScript_CanRaiseOneMore
|
goto_if_eq VAR_RESULT, DAYCARE_ONE_MON, Route117_PokemonDayCare_EventScript_CanRaiseOneMore
|
||||||
|
|||||||
@ -11,26 +11,26 @@ EventScript_CutTree::
|
|||||||
goto_if_eq VAR_RESULT, NO, EventScript_CancelCut
|
goto_if_eq VAR_RESULT, NO, EventScript_CancelCut
|
||||||
msgbox Text_MonUsedFieldMove, MSGBOX_DEFAULT
|
msgbox Text_MonUsedFieldMove, MSGBOX_DEFAULT
|
||||||
closemessage
|
closemessage
|
||||||
|
EventScript_CutTreeCommon:
|
||||||
|
callfunc ScrFunc_IsFollowerFieldMoveUser
|
||||||
|
.2byte VAR_0x8004
|
||||||
|
setfieldeffectargument 3, VAR_0x8004 @ skip pose if so
|
||||||
dofieldeffect FLDEFF_USE_CUT_ON_TREE
|
dofieldeffect FLDEFF_USE_CUT_ON_TREE
|
||||||
waitstate
|
waitstate
|
||||||
goto EventScript_CutTreeDown
|
EventScript_CutTreeDown:: @ fallthrough
|
||||||
end
|
setflag FLAG_SAFE_FOLLOWER_MOVEMENT
|
||||||
|
call_if_eq VAR_0x8004, TRUE, EventScript_FollowerFieldMove
|
||||||
@ Use cut from party menu
|
|
||||||
EventScript_UseCut::
|
|
||||||
lockall
|
|
||||||
dofieldeffect FLDEFF_USE_CUT_ON_TREE
|
|
||||||
waitstate
|
|
||||||
goto EventScript_CutTreeDown
|
|
||||||
end
|
|
||||||
|
|
||||||
EventScript_CutTreeDown::
|
|
||||||
applymovement VAR_LAST_TALKED, Movement_CutTreeDown
|
applymovement VAR_LAST_TALKED, Movement_CutTreeDown
|
||||||
waitmovement 0
|
waitmovement 0
|
||||||
removeobject VAR_LAST_TALKED
|
removeobject VAR_LAST_TALKED
|
||||||
releaseall
|
releaseall
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ Use cut from party menu
|
||||||
|
EventScript_UseCut::
|
||||||
|
lockall
|
||||||
|
goto EventScript_CutTreeCommon
|
||||||
|
|
||||||
Movement_CutTreeDown:
|
Movement_CutTreeDown:
|
||||||
cut_tree
|
cut_tree
|
||||||
step_end
|
step_end
|
||||||
@ -57,6 +57,11 @@ Text_CantCut:
|
|||||||
.string "This tree looks like it can be\n"
|
.string "This tree looks like it can be\n"
|
||||||
.string "CUT down!$"
|
.string "CUT down!$"
|
||||||
|
|
||||||
|
@ Use rock smash from party menu
|
||||||
|
EventScript_UseRockSmash::
|
||||||
|
lockall
|
||||||
|
goto EventScript_RockSmashCommon
|
||||||
|
|
||||||
@ Interact with smashable rock
|
@ Interact with smashable rock
|
||||||
EventScript_RockSmash::
|
EventScript_RockSmash::
|
||||||
lockall
|
lockall
|
||||||
@ -70,20 +75,16 @@ EventScript_RockSmash::
|
|||||||
goto_if_eq VAR_RESULT, NO, EventScript_CancelSmash
|
goto_if_eq VAR_RESULT, NO, EventScript_CancelSmash
|
||||||
msgbox Text_MonUsedFieldMove, MSGBOX_DEFAULT
|
msgbox Text_MonUsedFieldMove, MSGBOX_DEFAULT
|
||||||
closemessage
|
closemessage
|
||||||
|
EventScript_RockSmashCommon:
|
||||||
|
@ check if follower should use the field move
|
||||||
|
callfunc ScrFunc_IsFollowerFieldMoveUser
|
||||||
|
.2byte VAR_0x8004
|
||||||
|
setfieldeffectargument 3, VAR_0x8004 @ skip pose if so
|
||||||
dofieldeffect FLDEFF_USE_ROCK_SMASH
|
dofieldeffect FLDEFF_USE_ROCK_SMASH
|
||||||
waitstate
|
waitstate
|
||||||
goto EventScript_SmashRock
|
EventScript_SmashRock:: @ fallthrough
|
||||||
end
|
setflag FLAG_SAFE_FOLLOWER_MOVEMENT
|
||||||
|
call_if_eq VAR_0x8004, TRUE, EventScript_FollowerFieldMove
|
||||||
@ Use rock smash from party menu
|
|
||||||
EventScript_UseRockSmash::
|
|
||||||
lockall
|
|
||||||
dofieldeffect FLDEFF_USE_ROCK_SMASH
|
|
||||||
waitstate
|
|
||||||
goto EventScript_SmashRock
|
|
||||||
end
|
|
||||||
|
|
||||||
EventScript_SmashRock::
|
|
||||||
applymovement VAR_LAST_TALKED, Movement_SmashRock
|
applymovement VAR_LAST_TALKED, Movement_SmashRock
|
||||||
waitmovement 0
|
waitmovement 0
|
||||||
removeobject VAR_LAST_TALKED
|
removeobject VAR_LAST_TALKED
|
||||||
@ -95,10 +96,120 @@ EventScript_SmashRock::
|
|||||||
releaseall
|
releaseall
|
||||||
end
|
end
|
||||||
|
|
||||||
|
EventScript_FollowerFieldMove:
|
||||||
|
callfunc ScrFunc_GetDirectionToFace
|
||||||
|
.2byte VAR_0x8005
|
||||||
|
.byte OBJ_EVENT_ID_FOLLOWER
|
||||||
|
.byte OBJ_EVENT_ID_PLAYER
|
||||||
|
specialvar VAR_0x8006, GetPlayerFacingDirection
|
||||||
|
goto_if_eq VAR_0x8005, DIR_NONE, EventScript_FollowerFieldMoveEnd
|
||||||
|
@ Swap follower and player
|
||||||
|
call EventScript_FollowerSwap
|
||||||
|
@ Face follower in direction and jump
|
||||||
|
switch VAR_0x8006
|
||||||
|
case DIR_NORTH, EventScript_FollowerJumpNorth
|
||||||
|
case DIR_EAST, EventScript_FollowerJumpEast
|
||||||
|
case DIR_SOUTH, EventScript_FollowerJumpSouth
|
||||||
|
case DIR_WEST, EventScript_FollowerJumpWest
|
||||||
|
EventScript_FollowerFieldMoveEnd:
|
||||||
|
return
|
||||||
|
|
||||||
|
EventScript_FollowerSwap:
|
||||||
|
switch VAR_0x8005
|
||||||
|
case DIR_NORTH, EventScript_FollowerMoveNorth
|
||||||
|
case DIR_EAST, EventScript_FollowerMoveEast
|
||||||
|
case DIR_SOUTH, EventScript_FollowerMoveSouth
|
||||||
|
case DIR_WEST, EventScript_FollowerMoveWest
|
||||||
|
return
|
||||||
|
|
||||||
|
EventScript_FollowerMoveNorth:
|
||||||
|
applymovement OBJ_EVENT_ID_FOLLOWER, Movement_WalkUp
|
||||||
|
applymovement OBJ_EVENT_ID_PLAYER, Movement_WalkDown
|
||||||
|
waitmovement 0
|
||||||
|
applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_FaceUp
|
||||||
|
waitmovement 0
|
||||||
|
return
|
||||||
|
|
||||||
|
EventScript_FollowerMoveEast:
|
||||||
|
applymovement OBJ_EVENT_ID_FOLLOWER, Movement_WalkRight
|
||||||
|
applymovement OBJ_EVENT_ID_PLAYER, Movement_WalkLeft
|
||||||
|
waitmovement 0
|
||||||
|
applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_FaceRight
|
||||||
|
waitmovement 0
|
||||||
|
return
|
||||||
|
|
||||||
|
EventScript_FollowerMoveSouth:
|
||||||
|
applymovement OBJ_EVENT_ID_FOLLOWER, Movement_WalkDown
|
||||||
|
applymovement OBJ_EVENT_ID_PLAYER, Movement_WalkUp
|
||||||
|
waitmovement 0
|
||||||
|
applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_FaceDown
|
||||||
|
waitmovement 0
|
||||||
|
return
|
||||||
|
|
||||||
|
EventScript_FollowerMoveWest:
|
||||||
|
applymovement OBJ_EVENT_ID_FOLLOWER, Movement_WalkLeft
|
||||||
|
applymovement OBJ_EVENT_ID_PLAYER, Movement_WalkRight
|
||||||
|
waitmovement 0
|
||||||
|
applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_FaceLeft
|
||||||
|
waitmovement 0
|
||||||
|
return
|
||||||
|
|
||||||
|
EventScript_FollowerJumpNorth:
|
||||||
|
applymovement OBJ_EVENT_ID_FOLLOWER, Movement_JumpUp
|
||||||
|
waitmovement 0
|
||||||
|
return
|
||||||
|
|
||||||
|
EventScript_FollowerJumpEast:
|
||||||
|
applymovement OBJ_EVENT_ID_FOLLOWER, Movement_JumpRight
|
||||||
|
waitmovement 0
|
||||||
|
return
|
||||||
|
|
||||||
|
EventScript_FollowerJumpSouth:
|
||||||
|
applymovement OBJ_EVENT_ID_FOLLOWER, Movement_JumpDown
|
||||||
|
waitmovement 0
|
||||||
|
return
|
||||||
|
|
||||||
|
EventScript_FollowerJumpWest:
|
||||||
|
applymovement OBJ_EVENT_ID_FOLLOWER, Movement_JumpLeft
|
||||||
|
waitmovement 0
|
||||||
|
return
|
||||||
|
|
||||||
EventScript_EndSmash::
|
EventScript_EndSmash::
|
||||||
releaseall
|
releaseall
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Movement_WalkUp:
|
||||||
|
walk_up
|
||||||
|
step_end
|
||||||
|
|
||||||
|
Movement_JumpUp:
|
||||||
|
jump_in_place_up
|
||||||
|
step_end
|
||||||
|
|
||||||
|
Movement_WalkRight:
|
||||||
|
walk_right
|
||||||
|
step_end
|
||||||
|
|
||||||
|
Movement_JumpRight:
|
||||||
|
jump_in_place_right
|
||||||
|
step_end
|
||||||
|
|
||||||
|
Movement_WalkDown:
|
||||||
|
walk_down
|
||||||
|
step_end
|
||||||
|
|
||||||
|
Movement_JumpDown:
|
||||||
|
jump_in_place_down
|
||||||
|
step_end
|
||||||
|
|
||||||
|
Movement_WalkLeft:
|
||||||
|
walk_left
|
||||||
|
step_end
|
||||||
|
|
||||||
|
Movement_JumpLeft:
|
||||||
|
jump_in_place_left
|
||||||
|
step_end
|
||||||
|
|
||||||
Movement_SmashRock:
|
Movement_SmashRock:
|
||||||
rock_smash_break
|
rock_smash_break
|
||||||
step_end
|
step_end
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
EventScript_UseFlash::
|
EventScript_UseFlash::
|
||||||
animateflash 1
|
animateflash 1
|
||||||
setflashlevel 1
|
setflashlevel 1
|
||||||
|
releaseall
|
||||||
end
|
end
|
||||||
|
|||||||
674
data/scripts/follower.inc
Normal file
@ -0,0 +1,674 @@
|
|||||||
|
gText_FollowerLovesYou::
|
||||||
|
.string "123456789012345678901234567890123\n$"
|
||||||
|
|
||||||
|
gText_FollowerLostInThought::
|
||||||
|
.string "{STR_VAR_1} seems lost in thought.$"
|
||||||
|
|
||||||
|
gText_FollowerDefault::
|
||||||
|
.string "ERROR 404: Script not found.$"
|
||||||
|
|
||||||
|
gText_WantsToFly::
|
||||||
|
.string "{STR_VAR_1} looks up at the\nsky restlessly.\pWould you like to use FLY?$"
|
||||||
|
|
||||||
|
.macro playfirstmoncry
|
||||||
|
callfunc ScrFunc_playfirstmoncry
|
||||||
|
.endm
|
||||||
|
|
||||||
|
.macro bufferlivemonnickname out:req
|
||||||
|
callfunc ScrFunc_bufferlivemonnickname
|
||||||
|
.byte \out
|
||||||
|
.endm
|
||||||
|
|
||||||
|
.macro emote obj:req id:req
|
||||||
|
callfunc ScrFunc_emote
|
||||||
|
.byte \obj
|
||||||
|
.byte \id
|
||||||
|
.endm
|
||||||
|
|
||||||
|
EventScript_Follower::
|
||||||
|
lock
|
||||||
|
bufferlivemonnickname 0
|
||||||
|
playfirstmoncry
|
||||||
|
callfunc ScrFunc_getfolloweraction
|
||||||
|
checkpartymove MOVE_FLY
|
||||||
|
compare VAR_RESULT 6
|
||||||
|
goto_if_eq EventScript_FollowerEnd
|
||||||
|
bufferlivemonnickname 0
|
||||||
|
msgbox gText_WantsToFly, MSGBOX_YESNO
|
||||||
|
switch VAR_RESULT
|
||||||
|
case NO, EventScript_FollowerEnd
|
||||||
|
case YES, EventScript_FollowerFly
|
||||||
|
case MULTI_B_PRESSED, EventScript_FollowerEnd
|
||||||
|
EventScript_FollowerFly::
|
||||||
|
callfunc ScrFunc_followerfly
|
||||||
|
EventScript_FollowerEnd::
|
||||||
|
waitfieldeffect FLDEFF_EMOTE
|
||||||
|
release
|
||||||
|
end
|
||||||
|
|
||||||
|
EventScript_FollowerLovesYou::
|
||||||
|
applymovement 0xFE ContestHall_Movement_Heart
|
||||||
|
waitmovement 0xFE
|
||||||
|
waitmoncry
|
||||||
|
msgbox gText_FollowerLovesYou, MSGBOX_DEFAULT
|
||||||
|
return
|
||||||
|
|
||||||
|
@ Message address must be loaded into bank 0
|
||||||
|
EventScript_FollowerGeneric:: @ similar to Std_MsgboxDefault
|
||||||
|
faceplayer
|
||||||
|
EventScript_FollowerGenericSkipFace:
|
||||||
|
waitfieldeffect FLDEFF_EMOTE
|
||||||
|
message 0x0
|
||||||
|
waitmessage
|
||||||
|
waitbuttonpress
|
||||||
|
return
|
||||||
|
|
||||||
|
EventScript_FollowerJump::
|
||||||
|
faceplayer
|
||||||
|
applymovement 0xFE FollowerSplashMovement
|
||||||
|
waitmovement 0xFE
|
||||||
|
waitfieldeffect FLDEFF_EMOTE
|
||||||
|
message 0x0
|
||||||
|
waitmessage
|
||||||
|
waitbuttonpress
|
||||||
|
return
|
||||||
|
|
||||||
|
EnterPokeballMovement::
|
||||||
|
enter_pokeball
|
||||||
|
step_end
|
||||||
|
|
||||||
|
@ Movement scripts below, movements are defined in movement.inc
|
||||||
|
|
||||||
|
FollowerSplashMovement::
|
||||||
|
jump_in_place_down
|
||||||
|
delay_4
|
||||||
|
jump_in_place_down
|
||||||
|
face_player
|
||||||
|
step_end
|
||||||
|
|
||||||
|
FollowerShiverVerticalMovement:
|
||||||
|
lock_facing_direction
|
||||||
|
slide_left
|
||||||
|
slide_right
|
||||||
|
slide_right
|
||||||
|
slide_left
|
||||||
|
unlock_facing_direction
|
||||||
|
step_end
|
||||||
|
|
||||||
|
FollowerShiverHorizontalMovement:
|
||||||
|
lock_facing_direction
|
||||||
|
slide_up
|
||||||
|
slide_down
|
||||||
|
slide_down
|
||||||
|
slide_up
|
||||||
|
unlock_facing_direction
|
||||||
|
step_end
|
||||||
|
|
||||||
|
FollowerNostalgiaMovement:
|
||||||
|
face_away_player
|
||||||
|
lock_facing_direction
|
||||||
|
jump_in_place_down
|
||||||
|
jump_in_place_down
|
||||||
|
jump_in_place_down
|
||||||
|
unlock_facing_direction
|
||||||
|
face_player
|
||||||
|
lock_facing_direction
|
||||||
|
jump_in_place_down
|
||||||
|
unlock_facing_direction
|
||||||
|
step_end
|
||||||
|
|
||||||
|
FollowerSkippingMovement:
|
||||||
|
lock_facing_direction
|
||||||
|
jump_in_place_down
|
||||||
|
delay_4
|
||||||
|
jump_in_place_down
|
||||||
|
unlock_facing_direction
|
||||||
|
step_end
|
||||||
|
|
||||||
|
FollowerJumpOnPlayerNorth:
|
||||||
|
jump_up
|
||||||
|
delay_4
|
||||||
|
lock_facing_direction
|
||||||
|
walk_fast_down
|
||||||
|
unlock_facing_direction
|
||||||
|
step_end
|
||||||
|
|
||||||
|
FollowerJumpOnPlayerSouth:
|
||||||
|
jump_down
|
||||||
|
delay_4
|
||||||
|
lock_facing_direction
|
||||||
|
walk_fast_up
|
||||||
|
unlock_facing_direction
|
||||||
|
step_end
|
||||||
|
|
||||||
|
FollowerJumpOnPlayerEast:
|
||||||
|
jump_right
|
||||||
|
delay_4
|
||||||
|
lock_facing_direction
|
||||||
|
walk_fast_left
|
||||||
|
unlock_facing_direction
|
||||||
|
step_end
|
||||||
|
|
||||||
|
FollowerJumpOnPlayerWest:
|
||||||
|
jump_left
|
||||||
|
delay_4
|
||||||
|
lock_facing_direction
|
||||||
|
walk_fast_right
|
||||||
|
unlock_facing_direction
|
||||||
|
step_end
|
||||||
|
|
||||||
|
FollowerCuddlingNorth:
|
||||||
|
face_left
|
||||||
|
lock_facing_direction
|
||||||
|
walk_up
|
||||||
|
walk_in_place_left
|
||||||
|
walk_in_place_left
|
||||||
|
unlock_facing_direction
|
||||||
|
walk_down
|
||||||
|
face_player
|
||||||
|
step_end
|
||||||
|
|
||||||
|
FollowerCuddlingSouth:
|
||||||
|
face_right
|
||||||
|
lock_facing_direction
|
||||||
|
walk_down
|
||||||
|
walk_in_place_right
|
||||||
|
walk_in_place_right
|
||||||
|
unlock_facing_direction
|
||||||
|
walk_up
|
||||||
|
face_player
|
||||||
|
step_end
|
||||||
|
|
||||||
|
FollowerCuddlingEast:
|
||||||
|
face_down
|
||||||
|
lock_facing_direction
|
||||||
|
walk_right
|
||||||
|
walk_in_place_down
|
||||||
|
walk_in_place_down
|
||||||
|
unlock_facing_direction
|
||||||
|
walk_left
|
||||||
|
face_player
|
||||||
|
step_end
|
||||||
|
|
||||||
|
FollowerCuddlingWest:
|
||||||
|
face_down
|
||||||
|
lock_facing_direction
|
||||||
|
walk_left
|
||||||
|
walk_in_place_down
|
||||||
|
walk_in_place_down
|
||||||
|
unlock_facing_direction
|
||||||
|
walk_right
|
||||||
|
face_player
|
||||||
|
step_end
|
||||||
|
|
||||||
|
FollowerGetCloserNorth:
|
||||||
|
walk_up
|
||||||
|
delay_16
|
||||||
|
lock_facing_direction
|
||||||
|
walk_down
|
||||||
|
unlock_facing_direction
|
||||||
|
step_end
|
||||||
|
|
||||||
|
FollowerGetCloserSouth:
|
||||||
|
walk_down
|
||||||
|
delay_16
|
||||||
|
lock_facing_direction
|
||||||
|
walk_up
|
||||||
|
unlock_facing_direction
|
||||||
|
step_end
|
||||||
|
|
||||||
|
FollowerGetCloserEast:
|
||||||
|
walk_right
|
||||||
|
delay_16
|
||||||
|
lock_facing_direction
|
||||||
|
walk_left
|
||||||
|
unlock_facing_direction
|
||||||
|
step_end
|
||||||
|
|
||||||
|
FollowerGetCloserWest:
|
||||||
|
walk_left
|
||||||
|
delay_16
|
||||||
|
lock_facing_direction
|
||||||
|
walk_right
|
||||||
|
unlock_facing_direction
|
||||||
|
step_end
|
||||||
|
|
||||||
|
FollowerPokeNorth:
|
||||||
|
walk_faster_up
|
||||||
|
delay_8
|
||||||
|
lock_facing_direction
|
||||||
|
walk_faster_down
|
||||||
|
delay_4
|
||||||
|
walk_faster_up
|
||||||
|
delay_4
|
||||||
|
walk_faster_down
|
||||||
|
unlock_facing_direction
|
||||||
|
step_end
|
||||||
|
|
||||||
|
FollowerPokeSouth:
|
||||||
|
walk_faster_down
|
||||||
|
delay_8
|
||||||
|
lock_facing_direction
|
||||||
|
walk_faster_up
|
||||||
|
delay_4
|
||||||
|
walk_faster_down
|
||||||
|
delay_4
|
||||||
|
walk_faster_up
|
||||||
|
unlock_facing_direction
|
||||||
|
step_end
|
||||||
|
|
||||||
|
FollowerPokeEast:
|
||||||
|
walk_faster_right
|
||||||
|
delay_8
|
||||||
|
lock_facing_direction
|
||||||
|
walk_faster_left
|
||||||
|
delay_4
|
||||||
|
walk_faster_right
|
||||||
|
delay_4
|
||||||
|
walk_faster_left
|
||||||
|
unlock_facing_direction
|
||||||
|
step_end
|
||||||
|
|
||||||
|
FollowerPokeWest:
|
||||||
|
walk_faster_left
|
||||||
|
delay_8
|
||||||
|
lock_facing_direction
|
||||||
|
walk_faster_right
|
||||||
|
delay_4
|
||||||
|
walk_faster_left
|
||||||
|
delay_4
|
||||||
|
walk_faster_right
|
||||||
|
unlock_facing_direction
|
||||||
|
step_end
|
||||||
|
|
||||||
|
FollowerLookAround:
|
||||||
|
face_away_player
|
||||||
|
delay_16
|
||||||
|
delay_16
|
||||||
|
face_left
|
||||||
|
delay_16
|
||||||
|
delay_16
|
||||||
|
face_up
|
||||||
|
delay_16
|
||||||
|
delay_16
|
||||||
|
face_down
|
||||||
|
delay_16
|
||||||
|
delay_16
|
||||||
|
step_end
|
||||||
|
|
||||||
|
FollowerLookAway:
|
||||||
|
face_away_player
|
||||||
|
delay_16
|
||||||
|
delay_16
|
||||||
|
step_end
|
||||||
|
|
||||||
|
FollowerLookAwayBark:
|
||||||
|
face_away_player
|
||||||
|
lock_facing_direction
|
||||||
|
jump_in_place_down
|
||||||
|
jump_in_place_down
|
||||||
|
unlock_facing_direction
|
||||||
|
step_end
|
||||||
|
|
||||||
|
FollowerLookAwayPokeG:
|
||||||
|
face_away_player
|
||||||
|
lock_facing_direction
|
||||||
|
walk_in_place_down
|
||||||
|
walk_in_place_down
|
||||||
|
walk_in_place_down
|
||||||
|
unlock_facing_direction
|
||||||
|
step_end
|
||||||
|
|
||||||
|
FollowerPokeGround:
|
||||||
|
lock_facing_direction
|
||||||
|
walk_in_place_down
|
||||||
|
walk_in_place_down
|
||||||
|
walk_in_place_down
|
||||||
|
unlock_facing_direction
|
||||||
|
step_end
|
||||||
|
|
||||||
|
FollowerStartled:
|
||||||
|
face_away_player
|
||||||
|
lock_facing_direction
|
||||||
|
jump_in_place_down
|
||||||
|
unlock_facing_direction
|
||||||
|
face_player
|
||||||
|
step_end
|
||||||
|
|
||||||
|
FollowerHopFast:
|
||||||
|
jump_in_place_up
|
||||||
|
jump_in_place_down
|
||||||
|
jump_in_place_left
|
||||||
|
jump_in_place_right
|
||||||
|
face_player
|
||||||
|
step_end
|
||||||
|
|
||||||
|
FollowerDizzy:
|
||||||
|
walk_in_place_left
|
||||||
|
walk_in_place_fast_right
|
||||||
|
walk_in_place_slow_up
|
||||||
|
walk_in_place_fast_down
|
||||||
|
delay_4
|
||||||
|
face_away_player
|
||||||
|
step_end
|
||||||
|
|
||||||
|
FollowerLookAroundScared:
|
||||||
|
face_up
|
||||||
|
delay_16
|
||||||
|
face_down
|
||||||
|
delay_16
|
||||||
|
face_left
|
||||||
|
delay_16
|
||||||
|
face_right
|
||||||
|
delay_16
|
||||||
|
face_up
|
||||||
|
delay_16
|
||||||
|
face_down
|
||||||
|
delay_16
|
||||||
|
face_left
|
||||||
|
delay_16
|
||||||
|
face_right
|
||||||
|
delay_16
|
||||||
|
face_player
|
||||||
|
step_end
|
||||||
|
|
||||||
|
FollowerDance:
|
||||||
|
lock_facing_direction
|
||||||
|
jump_in_place_up
|
||||||
|
unlock_facing_direction
|
||||||
|
walk_in_place_fast_up
|
||||||
|
walk_in_place_fast_left
|
||||||
|
walk_in_place_fast_down
|
||||||
|
walk_in_place_fast_right
|
||||||
|
walk_in_place_fast_up
|
||||||
|
walk_in_place_fast_left
|
||||||
|
walk_in_place_fast_down
|
||||||
|
walk_in_place_fast_right
|
||||||
|
jump_in_place_up
|
||||||
|
jump_in_place_down
|
||||||
|
jump_in_place_up
|
||||||
|
face_player
|
||||||
|
step_end
|
||||||
|
|
||||||
|
@ Movement scripts
|
||||||
|
|
||||||
|
EventScript_FollowerIsShivering::
|
||||||
|
faceplayer
|
||||||
|
compare VAR_FACING, DIR_NORTH
|
||||||
|
call_if_eq ShiverVertical
|
||||||
|
compare VAR_FACING, DIR_SOUTH
|
||||||
|
call_if_eq ShiverVertical
|
||||||
|
compare VAR_FACING, DIR_WEST
|
||||||
|
call_if_eq ShiverHorizontal
|
||||||
|
compare VAR_FACING, DIR_EAST
|
||||||
|
call_if_eq ShiverHorizontal
|
||||||
|
goto EventScript_FollowerGeneric
|
||||||
|
|
||||||
|
ShiverVertical:
|
||||||
|
applymovement 0xFE FollowerShiverVerticalMovement
|
||||||
|
waitmovement 0xFE
|
||||||
|
return
|
||||||
|
|
||||||
|
ShiverHorizontal:
|
||||||
|
applymovement 0xFE FollowerShiverHorizontalMovement
|
||||||
|
waitmovement 0xFE
|
||||||
|
return
|
||||||
|
|
||||||
|
EventScript_FollowerNostalgia::
|
||||||
|
applymovement 0xFE FollowerNostalgiaMovement
|
||||||
|
waitmovement 0xFE
|
||||||
|
goto EventScript_FollowerGeneric
|
||||||
|
|
||||||
|
EventScript_FollowerHopping::
|
||||||
|
faceplayer
|
||||||
|
applymovement 0xFE FollowerSkippingMovement
|
||||||
|
waitmovement 0xFE
|
||||||
|
goto EventScript_FollowerGeneric
|
||||||
|
|
||||||
|
JumpOnN:
|
||||||
|
applymovement 0xFE FollowerJumpOnPlayerNorth
|
||||||
|
waitmovement 0xFE
|
||||||
|
return
|
||||||
|
|
||||||
|
JumpOnS:
|
||||||
|
applymovement 0xFE FollowerJumpOnPlayerSouth
|
||||||
|
waitmovement 0xFE
|
||||||
|
return
|
||||||
|
|
||||||
|
JumpOnE:
|
||||||
|
applymovement 0xFE FollowerJumpOnPlayerEast
|
||||||
|
waitmovement 0xFE
|
||||||
|
return
|
||||||
|
|
||||||
|
JumpOnW:
|
||||||
|
applymovement 0xFE FollowerJumpOnPlayerWest
|
||||||
|
waitmovement 0xFE
|
||||||
|
return
|
||||||
|
|
||||||
|
EventScript_FollowerJumpOnPlayer::
|
||||||
|
faceplayer
|
||||||
|
compare VAR_FACING, DIR_NORTH
|
||||||
|
call_if_eq JumpOnS
|
||||||
|
compare VAR_FACING, DIR_SOUTH
|
||||||
|
call_if_eq JumpOnN
|
||||||
|
compare VAR_FACING, DIR_WEST
|
||||||
|
call_if_eq JumpOnE
|
||||||
|
compare VAR_FACING, DIR_EAST
|
||||||
|
call_if_eq JumpOnW
|
||||||
|
goto EventScript_FollowerGeneric
|
||||||
|
|
||||||
|
CuddleN:
|
||||||
|
applymovement 0xFE FollowerCuddlingNorth
|
||||||
|
waitmovement 0xFE
|
||||||
|
return
|
||||||
|
|
||||||
|
CuddleS:
|
||||||
|
applymovement 0xFE FollowerCuddlingSouth
|
||||||
|
waitmovement 0xFE
|
||||||
|
return
|
||||||
|
|
||||||
|
CuddleE:
|
||||||
|
applymovement 0xFE FollowerCuddlingEast
|
||||||
|
waitmovement 0xFE
|
||||||
|
return
|
||||||
|
|
||||||
|
CuddleW:
|
||||||
|
applymovement 0xFE FollowerCuddlingWest
|
||||||
|
waitmovement 0xFE
|
||||||
|
return
|
||||||
|
|
||||||
|
EventScript_FollowerCuddling:: @ similar to Std_MsgboxDefault
|
||||||
|
faceplayer
|
||||||
|
compare VAR_FACING, DIR_NORTH
|
||||||
|
call_if_eq CuddleS
|
||||||
|
compare VAR_FACING, DIR_SOUTH
|
||||||
|
call_if_eq CuddleN
|
||||||
|
compare VAR_FACING, DIR_WEST
|
||||||
|
call_if_eq CuddleE
|
||||||
|
compare VAR_FACING, DIR_EAST
|
||||||
|
call_if_eq CuddleW
|
||||||
|
goto EventScript_FollowerGeneric
|
||||||
|
|
||||||
|
ShCuddleN:
|
||||||
|
applymovement 0xFE FollowerShiverVerticalMovement
|
||||||
|
waitmovement 0xFE
|
||||||
|
applymovement 0xFE FollowerCuddlingNorth
|
||||||
|
waitmovement 0xFE
|
||||||
|
return
|
||||||
|
|
||||||
|
ShCuddleS:
|
||||||
|
applymovement 0xFE FollowerShiverVerticalMovement
|
||||||
|
waitmovement 0xFE
|
||||||
|
applymovement 0xFE FollowerCuddlingSouth
|
||||||
|
waitmovement 0xFE
|
||||||
|
return
|
||||||
|
|
||||||
|
ShCuddleE:
|
||||||
|
applymovement 0xFE FollowerShiverHorizontalMovement
|
||||||
|
waitmovement 0xFE
|
||||||
|
applymovement 0xFE FollowerCuddlingEast
|
||||||
|
waitmovement 0xFE
|
||||||
|
return
|
||||||
|
|
||||||
|
ShCuddleW:
|
||||||
|
applymovement 0xFE FollowerShiverHorizontalMovement
|
||||||
|
waitmovement 0xFE
|
||||||
|
applymovement 0xFE FollowerCuddlingWest
|
||||||
|
waitmovement 0xFE
|
||||||
|
return
|
||||||
|
|
||||||
|
EventScript_FollowerShiverCuddling::
|
||||||
|
faceplayer
|
||||||
|
compare VAR_FACING, DIR_NORTH
|
||||||
|
call_if_eq ShCuddleS
|
||||||
|
compare VAR_FACING, DIR_SOUTH
|
||||||
|
call_if_eq ShCuddleN
|
||||||
|
compare VAR_FACING, DIR_WEST
|
||||||
|
call_if_eq ShCuddleE
|
||||||
|
compare VAR_FACING, DIR_EAST
|
||||||
|
call_if_eq ShCuddleW
|
||||||
|
goto EventScript_FollowerGeneric
|
||||||
|
|
||||||
|
CreepCloserN:
|
||||||
|
applymovement 0xFE FollowerGetCloserNorth
|
||||||
|
waitmovement 0xFE
|
||||||
|
return
|
||||||
|
|
||||||
|
CreepCloserS:
|
||||||
|
applymovement 0xFE FollowerGetCloserSouth
|
||||||
|
waitmovement 0xFE
|
||||||
|
return
|
||||||
|
|
||||||
|
CreepCloserE:
|
||||||
|
applymovement 0xFE FollowerGetCloserEast
|
||||||
|
waitmovement 0xFE
|
||||||
|
return
|
||||||
|
|
||||||
|
CreepCloserW:
|
||||||
|
applymovement 0xFE FollowerGetCloserWest
|
||||||
|
waitmovement 0xFE
|
||||||
|
return
|
||||||
|
|
||||||
|
EventScript_FollowerGetCloser::
|
||||||
|
faceplayer
|
||||||
|
compare VAR_FACING, DIR_NORTH
|
||||||
|
call_if_eq CreepCloserS
|
||||||
|
compare VAR_FACING, DIR_SOUTH
|
||||||
|
call_if_eq CreepCloserN
|
||||||
|
compare VAR_FACING, DIR_WEST
|
||||||
|
call_if_eq CreepCloserE
|
||||||
|
compare VAR_FACING, DIR_EAST
|
||||||
|
call_if_eq CreepCloserW
|
||||||
|
goto EventScript_FollowerGeneric
|
||||||
|
|
||||||
|
PokePlayerN:
|
||||||
|
applymovement 0xFE FollowerGetCloserNorth
|
||||||
|
waitmovement 0xFE
|
||||||
|
return
|
||||||
|
|
||||||
|
PokePlayerS:
|
||||||
|
applymovement 0xFE FollowerGetCloserSouth
|
||||||
|
waitmovement 0xFE
|
||||||
|
return
|
||||||
|
|
||||||
|
PokePlayerE:
|
||||||
|
applymovement 0xFE FollowerGetCloserEast
|
||||||
|
waitmovement 0xFE
|
||||||
|
return
|
||||||
|
|
||||||
|
PokePlayerW:
|
||||||
|
applymovement 0xFE FollowerGetCloserWest
|
||||||
|
waitmovement 0xFE
|
||||||
|
return
|
||||||
|
|
||||||
|
EventScript_FollowerPokingPlayer::
|
||||||
|
faceplayer
|
||||||
|
compare VAR_FACING, DIR_NORTH
|
||||||
|
call_if_eq PokePlayerS
|
||||||
|
compare VAR_FACING, DIR_SOUTH
|
||||||
|
call_if_eq PokePlayerN
|
||||||
|
compare VAR_FACING, DIR_WEST
|
||||||
|
call_if_eq PokePlayerE
|
||||||
|
compare VAR_FACING, DIR_EAST
|
||||||
|
call_if_eq PokePlayerW
|
||||||
|
goto EventScript_FollowerGeneric
|
||||||
|
|
||||||
|
EventScript_FollowerLookAround::
|
||||||
|
applymovement 0xFE FollowerLookAround
|
||||||
|
waitmovement 0xFE
|
||||||
|
goto EventScript_FollowerGeneric
|
||||||
|
|
||||||
|
EventScript_FollowerLookAway::
|
||||||
|
applymovement 0xFE FollowerLookAway
|
||||||
|
waitmovement 0xFE
|
||||||
|
goto EventScript_FollowerGenericSkipFace
|
||||||
|
|
||||||
|
EventScript_FollowerLookAwayBark::
|
||||||
|
applymovement 0xFE FollowerLookAwayBark
|
||||||
|
waitmovement 0xFE
|
||||||
|
goto EventScript_FollowerGenericSkipFace
|
||||||
|
|
||||||
|
EventScript_FollowerLookAwayPoke::
|
||||||
|
applymovement 0xFE FollowerLookAwayPokeG
|
||||||
|
waitmovement 0xFE
|
||||||
|
goto EventScript_FollowerGenericSkipFace
|
||||||
|
|
||||||
|
EventScript_FollowerPokeGround::
|
||||||
|
faceplayer
|
||||||
|
applymovement 0xFE FollowerPokeGround
|
||||||
|
waitmovement 0xFE
|
||||||
|
goto EventScript_FollowerGeneric
|
||||||
|
|
||||||
|
EventScript_FollowerStartled::
|
||||||
|
applymovement 0xFE FollowerStartled
|
||||||
|
waitmovement 0xFE
|
||||||
|
goto EventScript_FollowerGenericSkipFace
|
||||||
|
|
||||||
|
EventScript_FollowerFastHopping::
|
||||||
|
applymovement 0xFE FollowerHopFast
|
||||||
|
waitmovement 0xFE
|
||||||
|
goto EventScript_FollowerGenericSkipFace
|
||||||
|
|
||||||
|
EventScript_FollowerDizzy::
|
||||||
|
applymovement 0xFE FollowerDizzy
|
||||||
|
waitmovement 0
|
||||||
|
goto EventScript_FollowerGenericSkipFace
|
||||||
|
|
||||||
|
EventScript_FollowerLookAroundScared::
|
||||||
|
applymovement 0xFE FollowerLookAroundScared
|
||||||
|
waitmovement 0xFE
|
||||||
|
goto EventScript_FollowerGeneric
|
||||||
|
|
||||||
|
EventScript_FollowerDance::
|
||||||
|
faceplayer
|
||||||
|
applymovement 0xFE FollowerDance
|
||||||
|
waitmovement 0
|
||||||
|
goto EventScript_FollowerGenericSkipFace
|
||||||
|
|
||||||
|
EventScript_FollowerFaceUp::
|
||||||
|
applymovement 0xFE Common_Movement_FaceUp
|
||||||
|
waitmovement 0xFE
|
||||||
|
goto EventScript_FollowerGenericSkipFace
|
||||||
|
|
||||||
|
EventScript_FollowerFaceResult:: @ Face towards direction in VAR_RESULT
|
||||||
|
switch VAR_RESULT
|
||||||
|
case DIR_SOUTH, EventScript_FollowerFaceDown
|
||||||
|
case DIR_NORTH, EventScript_FollowerFaceUp
|
||||||
|
case DIR_WEST, EventScript_FollowerFaceLeft
|
||||||
|
case DIR_EAST, EventScript_FollowerFaceRight
|
||||||
|
goto EventScript_FollowerGeneric
|
||||||
|
|
||||||
|
EventScript_FollowerFaceDown:
|
||||||
|
applymovement 0xFE Common_Movement_FaceDown
|
||||||
|
waitmovement 0xFE
|
||||||
|
goto EventScript_FollowerGenericSkipFace
|
||||||
|
|
||||||
|
EventScript_FollowerFaceLeft:
|
||||||
|
applymovement 0xFE Common_Movement_FaceLeft
|
||||||
|
waitmovement 0xFE
|
||||||
|
goto EventScript_FollowerGenericSkipFace
|
||||||
|
|
||||||
|
EventScript_FollowerFaceRight:
|
||||||
|
applymovement 0xFE Common_Movement_FaceRight
|
||||||
|
waitmovement 0xFE
|
||||||
|
goto EventScript_FollowerGenericSkipFace
|
||||||
@ -33,13 +33,14 @@ EventScript_PkmnCenterNurse_IllTakeYourPkmn2::
|
|||||||
return
|
return
|
||||||
|
|
||||||
EventScript_PkmnCenterNurse_TakeAndHealPkmn::
|
EventScript_PkmnCenterNurse_TakeAndHealPkmn::
|
||||||
applymovement VAR_0x800B, Common_Movement_WalkInPlaceFasterLeft
|
applymovement VAR_0x800B, Common_Movement_WalkInPlaceFasterLeft @ TODO: Make follower disappear here
|
||||||
waitmovement 0
|
waitmovement 0
|
||||||
dofieldeffect FLDEFF_POKECENTER_HEAL
|
dofieldeffect FLDEFF_POKECENTER_HEAL
|
||||||
waitfieldeffect FLDEFF_POKECENTER_HEAL
|
waitfieldeffect FLDEFF_POKECENTER_HEAL
|
||||||
applymovement VAR_0x800B, Common_Movement_WalkInPlaceFasterDown
|
applymovement VAR_0x800B, Common_Movement_WalkInPlaceFasterDown
|
||||||
waitmovement 0
|
waitmovement 0
|
||||||
special HealPlayerParty
|
special HealPlayerParty
|
||||||
|
callnative UpdateFollowingPokemon
|
||||||
return
|
return
|
||||||
|
|
||||||
EventScript_PkmnCenterNurse_CheckTrainerHillAndUnionRoom::
|
EventScript_PkmnCenterNurse_CheckTrainerHillAndUnionRoom::
|
||||||
|
|||||||
@ -646,6 +646,7 @@ SecretBase_EventScript_BattleTrainer::
|
|||||||
call_if_eq VAR_RESULT, B_OUTCOME_WON, SecretBase_EventScript_WonSecretBaseBattle
|
call_if_eq VAR_RESULT, B_OUTCOME_WON, SecretBase_EventScript_WonSecretBaseBattle
|
||||||
call_if_eq VAR_RESULT, B_OUTCOME_LOST, SecretBase_EventScript_LostSecretBaseBattle
|
call_if_eq VAR_RESULT, B_OUTCOME_LOST, SecretBase_EventScript_LostSecretBaseBattle
|
||||||
special HealPlayerParty
|
special HealPlayerParty
|
||||||
|
callnative UpdateFollowingPokemon
|
||||||
release
|
release
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -10,8 +10,10 @@ EventScript_TrainerApproach::
|
|||||||
EventScript_TryDoNormalTrainerBattle::
|
EventScript_TryDoNormalTrainerBattle::
|
||||||
lock
|
lock
|
||||||
faceplayer
|
faceplayer
|
||||||
|
setflag FLAG_SAFE_FOLLOWER_MOVEMENT
|
||||||
applymovement VAR_LAST_TALKED, Movement_RevealTrainer
|
applymovement VAR_LAST_TALKED, Movement_RevealTrainer
|
||||||
waitmovement 0
|
waitmovement 0
|
||||||
|
clearflag FLAG_SAFE_FOLLOWER_MOVEMENT
|
||||||
specialvar VAR_RESULT, GetTrainerFlag
|
specialvar VAR_RESULT, GetTrainerFlag
|
||||||
goto_if_ne VAR_RESULT, FALSE, EventScript_NoNormalTrainerBattle
|
goto_if_ne VAR_RESULT, FALSE, EventScript_NoNormalTrainerBattle
|
||||||
special PlayTrainerEncounterMusic
|
special PlayTrainerEncounterMusic
|
||||||
@ -44,8 +46,10 @@ EventScript_NoDoubleTrainerBattle::
|
|||||||
gotopostbattlescript
|
gotopostbattlescript
|
||||||
|
|
||||||
EventScript_DoNoIntroTrainerBattle::
|
EventScript_DoNoIntroTrainerBattle::
|
||||||
|
setflag FLAG_SAFE_FOLLOWER_MOVEMENT
|
||||||
applymovement VAR_LAST_TALKED, Movement_RevealTrainer
|
applymovement VAR_LAST_TALKED, Movement_RevealTrainer
|
||||||
waitmovement 0
|
waitmovement 0
|
||||||
|
clearflag FLAG_SAFE_FOLLOWER_MOVEMENT
|
||||||
special PlayTrainerEncounterMusic
|
special PlayTrainerEncounterMusic
|
||||||
dotrainerbattle
|
dotrainerbattle
|
||||||
gotopostbattlescript
|
gotopostbattlescript
|
||||||
@ -93,8 +97,10 @@ EventScript_NotEnoughMonsForDoubleRematchBattle::
|
|||||||
end
|
end
|
||||||
|
|
||||||
EventScript_RevealTrainer::
|
EventScript_RevealTrainer::
|
||||||
|
setflag FLAG_SAFE_FOLLOWER_MOVEMENT
|
||||||
applymovement VAR_LAST_TALKED, Movement_RevealTrainer
|
applymovement VAR_LAST_TALKED, Movement_RevealTrainer
|
||||||
waitmovement 0
|
waitmovement 0
|
||||||
|
clearflag FLAG_SAFE_FOLLOWER_MOVEMENT
|
||||||
return
|
return
|
||||||
|
|
||||||
Movement_RevealTrainer:
|
Movement_RevealTrainer:
|
||||||
|
|||||||
149
emotions.txt
Normal file
@ -0,0 +1,149 @@
|
|||||||
|
Happy (Special):
|
||||||
|
Specific map:
|
||||||
|
{STR_VAR_1} greeted your mom.
|
||||||
|
|
||||||
|
Landscape/map feature:
|
||||||
|
{STR_VAR_1} greeted everyone!
|
||||||
|
{STR_VAR_1} greeted the two. (when standing in front of 2 trainers).
|
||||||
|
{STR_VAR_1} is very eager! ( gym ) must have type advantage.
|
||||||
|
{STR_VAR_1} greeted Amphy!
|
||||||
|
|
||||||
|
Neutral (Special):
|
||||||
|
Specific map:
|
||||||
|
Why is it doing warm-up exercises? (Cerulean Gym).
|
||||||
|
{STR_VAR_1} is running along the side of the pool! (Cerulean Gym).
|
||||||
|
|
||||||
|
Map feature:
|
||||||
|
Your pokemon is smelling the scent of the flowers. (When next to flowers in Cherrygrove City).
|
||||||
|
{STR_VAR_1} Greeted Slowbro (Cerulean city, in front of Slowbro).
|
||||||
|
{STR_VAR_1} is playing on the sand.
|
||||||
|
{STR_VAR_1} is staring fixedly at the sea.
|
||||||
|
{STR_VAR_1} is stomping on the grass!
|
||||||
|
{STR_VAR_1} is playing around, Picking bits of grass.
|
||||||
|
{STR_VAR_1} seems highly interested in the tree.
|
||||||
|
{STR_VAR_1} is looking outside and frolicking!
|
||||||
|
|
||||||
|
Pokemon exclusive:
|
||||||
|
(MAGIKARP) is leaping around more than usual (lake of rage, During team rockets broadcast) ( Pokemon Exclusive ).
|
||||||
|
|
||||||
|
Pokemon feature:
|
||||||
|
{STR_VAR_1} seems happy to have taken a shower! (Celadon gym) (Grass,Water type).
|
||||||
|
|
||||||
|
Misc:
|
||||||
|
{STR_VAR_1} seems dazzled after seeing the sky.
|
||||||
|
{STR_VAR_1} is fidgeting in front of everyone (maybe baby pokemon).
|
||||||
|
{STR_VAR_1} roared!
|
||||||
|
{STR_VAR_1} spun around in a circle!
|
||||||
|
|
||||||
|
Sad (Special):
|
||||||
|
Pokemon feature:
|
||||||
|
|
||||||
|
Upset (Special):
|
||||||
|
Specific map(s):
|
||||||
|
It seems to have eaten something strange. It's making an odd face... (Olivine Cafe).
|
||||||
|
{STR_VAR_1} is staring at the crumbling floor (burnt tower).
|
||||||
|
{STR_VAR_1} seems to think that (Player) has disappeared! ( Morty's Gym ).
|
||||||
|
|
||||||
|
Map feature:
|
||||||
|
{STR_VAR_1} is splashing around in the wet grass.
|
||||||
|
|
||||||
|
Pokemon feature:
|
||||||
|
Your pokemon doesn't like splashing around on the ground (must be fire type).
|
||||||
|
|
||||||
|
Misc:
|
||||||
|
{STR_VAR_1} seems to feel a little claustrophobic.
|
||||||
|
{STR_VAR_1} is a bit nervous about the narrow space!
|
||||||
|
{STR_VAR_1} seems uneasy and is poking (PLAYER).
|
||||||
|
|
||||||
|
Angry (Special):
|
||||||
|
Map feature:
|
||||||
|
{STR_VAR_1} is staring at the Persian statue and glaring.
|
||||||
|
{STR_VAR_1} is glaring at the PERSIAN statue!
|
||||||
|
{STR_VAR_1} is glaring at your foe!
|
||||||
|
{STR_VAR_1} is intimidating your foe!
|
||||||
|
|
||||||
|
Pensive (Special):
|
||||||
|
Specific map(s):
|
||||||
|
{STR_VAR_1} seems to be listening to the sound of rustling leaves.
|
||||||
|
{STR_VAR_1} is preoccupied by the ceiling, which seems like it may collapse (burnt tower).
|
||||||
|
{STR_VAR_1} is concerned about the swaying pillar (sprout tower).
|
||||||
|
Your pokemon is drooling a little (Olivine Cafe).
|
||||||
|
{STR_VAR_1} is preoccupied by the floor, which seems like it may collapse (burnt tower).
|
||||||
|
|
||||||
|
Map feature:
|
||||||
|
{STR_VAR_1} is staring intently at the reflection of its face.
|
||||||
|
{STR_VAR_1} seems interested in Amphy...
|
||||||
|
{STR_VAR_1} has a sleepy look on its face... (Near Jigglypuff in Radio Tower.).
|
||||||
|
|
||||||
|
Misc:
|
||||||
|
Your pokemon turned to face the other way, showing a defiant expression.
|
||||||
|
|
||||||
|
Music (Special):
|
||||||
|
Map feature:
|
||||||
|
{STR_VAR_1} is pulling out the grass.
|
||||||
|
{STR_VAR_1} is happy to see what's out doors!
|
||||||
|
{STR_VAR_1} is listening intently to the sound of the waves.
|
||||||
|
Your pokemon is staring spellbound at the night sky!
|
||||||
|
Your pokemon seems to be enjoying sliding around!
|
||||||
|
{STR_VAR_1} is steadily observing the flow of the river.
|
||||||
|
{STR_VAR_1} is noticing the scent of the grass.
|
||||||
|
Misc:
|
||||||
|
{STR_VAR_1} seems happy at the sight of water on the window!
|
||||||
|
{STR_VAR_1} is looking up at the ceiling.
|
||||||
|
{STR_VAR_1} seems to be enjoying this a little bit!
|
||||||
|
{STR_VAR_1} is wandering around enjoying the forest scenery.
|
||||||
|
{STR_VAR_1} is playing around in the fallen leaves.
|
||||||
|
{STR_VAR_1} is playing around with a leaf.
|
||||||
|
{STR_VAR_1} is playing around, touching the leaves.
|
||||||
|
Your pokemon is happily gazing at the beautiful, starry sky!
|
||||||
|
{STR_VAR_1} is rolling around in the grass.
|
||||||
|
{STR_VAR_1} seems to want to return to the lab (after you receive the Mystery egg).
|
||||||
|
Your pokemon is staring at the various items.
|
||||||
|
{STR_VAR_1} is looking up the tall mountain... (Mt. Mortar).
|
||||||
|
{STR_VAR_1} seems concerned about the waterfall.
|
||||||
|
{STR_VAR_1} is sniffing around the room. (Inside Hero's Room).
|
||||||
|
{STR_VAR_1} is dancing around the pillar! (Seems to occur more for Bellsprout)(sprout tower).
|
||||||
|
{STR_VAR_1} swayed around, dancing in a strange manner.(Seems to occur more for Bellsprout)(sprout tower).
|
||||||
|
{STR_VAR_1} swayed and danced around as it pleased (Seems to occur more for Bellsprout)(sprout tower).
|
||||||
|
Your Pokemon is playing around and splashing in the water! (Water's edge).
|
||||||
|
{STR_VAR_1} is looking up at the sky.
|
||||||
|
{STR_VAR_1} is poking at garbage (Goldenrods underground path).
|
||||||
|
Your pokemon is rolling a screw from a bicycle around.
|
||||||
|
{STR_VAR_1} is looking up at the sky.
|
||||||
|
{STR_VAR_1} is clawing the grass!
|
||||||
|
{STR_VAR_1} is looking around restlessly at the Forest.
|
||||||
|
{STR_VAR_1} is playfully nibbling at the ground.
|
||||||
|
(CYNDAQUIL) blew out a fireball. ( Pokemon Exclusive ).
|
||||||
|
(CYNDAQUIL) blew out a couple of fireballs. ( Pokemon Exclusive ).
|
||||||
|
(CHIKORITA) is waving its leaf around ( Pokemon Exclusive ).
|
||||||
|
(CHIKORITA) is making its leaf twitch ( Pokemon Exclusive ).
|
||||||
|
(TODADILE) is moving its jaw ( Pokemon Exclusive ).
|
||||||
|
(TODADILE) is opening and closing its mouth ( Pokemon Exclusive ).
|
||||||
|
{STR_VAR_1} is playing in the puddle.
|
||||||
|
{STR_VAR_1} is gazing restlessly at the building ( in goldenrod).
|
||||||
|
|
||||||
|
Surprised (Special):
|
||||||
|
{STR_VAR_1} seems to have gotten caught in the clumps of grass.
|
||||||
|
{STR_VAR_1} slipped on the floor and seems likely to fall!
|
||||||
|
Your pokemon is very concerned about the room below ( Burnt tower ).
|
||||||
|
Careful! seems like the floor could collapse, and it might fall.
|
||||||
|
{STR_VAR_1} seems to think that (Player) has disappeared! ( Morty's Gym ).
|
||||||
|
{STR_VAR_1} gazed surprisingly at the rock!
|
||||||
|
Huh? your pokemon found something in top of the mountain ( outside Mt. Mortar) (!).
|
||||||
|
{STR_VAR_1} got tangled up in the branches and almost fell down!
|
||||||
|
{STR_VAR_1} looked up at the sky and shouted loudly.
|
||||||
|
{STR_VAR_1} seems to have found something!
|
||||||
|
{STR_VAR_1} almost forgot it was holding that (Held item).
|
||||||
|
{STR_VAR_1} is happy at the sight of the water on the window!
|
||||||
|
{STR_VAR_1} was surprised by the sounds in the thicket!
|
||||||
|
Seems the breeze is coming from here.
|
||||||
|
Oh! its slipping and came over here for support (on ice).
|
||||||
|
{STR_VAR_1} seems to have gotten a bit of zap! (Power plant).
|
||||||
|
{STR_VAR_1} is dazzled by the shiny brightness of the bridge! (Standing on Nugget Bridge).
|
||||||
|
{STR_VAR_1} is slipping on the water and almost fell over!
|
||||||
|
Curious (Special):
|
||||||
|
{STR_VAR_1} feels something... (burnt tower basement).
|
||||||
|
{STR_VAR_1} seems to be hearing a strange sound. (Rocket hideout in Mahogany).
|
||||||
|
{STR_VAR_1} seems to be hearing a strange sound. (Team rocket hide out).
|
||||||
|
{STR_VAR_1} is concerned about the other side of the fence, it seems.
|
||||||
|
{STR_VAR_1} is looking at the machine in a strange manner. (Power plant).
|
||||||
110
extract_sprites.py
Normal file
@ -0,0 +1,110 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
""" Extract sprites from HGSS follower spritesheets. """
|
||||||
|
import os.path
|
||||||
|
import subprocess
|
||||||
|
import sys
|
||||||
|
from glob import glob
|
||||||
|
|
||||||
|
import png
|
||||||
|
|
||||||
|
|
||||||
|
SPRITESHEETS = [('gen1.png', 15, 11, 1)]
|
||||||
|
output_dir = 'sprites'
|
||||||
|
index_to_name = {}
|
||||||
|
with open('names.txt', 'r') as f:
|
||||||
|
for line in f:
|
||||||
|
index, name = line.split(' ')[:2]
|
||||||
|
name = name.strip()
|
||||||
|
index_to_name[int(index)] = name.lower()
|
||||||
|
name_to_index = {v: k for k, v in index_to_name.items()}
|
||||||
|
PKMN_GRAPHICS = os.path.join('graphics', 'pokemon')
|
||||||
|
|
||||||
|
|
||||||
|
def extract_sprites(spritesheet):
|
||||||
|
path, width, height, offset = spritesheet
|
||||||
|
for y in range(height):
|
||||||
|
for x in range(width):
|
||||||
|
if x == 3 and y == 0 or x == 10 and y == 1:
|
||||||
|
continue
|
||||||
|
output_path = os.path.join(output_dir, f'{offset:03d}.png')
|
||||||
|
subprocess.run(['convert', '-extract', f'64x128+{x*(64+1)}+{y*(128+1)}', path, output_path], check=True)
|
||||||
|
offset += 1
|
||||||
|
|
||||||
|
|
||||||
|
def stack_sprite(name, path):
|
||||||
|
joinp = os.path.join
|
||||||
|
frames = [joinp(path, 'down', name), joinp(path, 'down', 'frame2', name),
|
||||||
|
joinp(path, 'up', name), joinp(path, 'up', 'frame2', name),
|
||||||
|
joinp(path, 'left', name), joinp(path, 'left', 'frame2', name)]
|
||||||
|
output = joinp(path, name)
|
||||||
|
subprocess.run(['convert'] + frames + ['+append', output], check=True)
|
||||||
|
print(f'Stacked {output}')
|
||||||
|
|
||||||
|
def canonicalize_names():
|
||||||
|
for path in glob('overworld/**/*.png', recursive=True):
|
||||||
|
head, tail = os.path.split(path)
|
||||||
|
name, ext = os.path.splitext(tail)
|
||||||
|
try:
|
||||||
|
num = int(name)
|
||||||
|
except ValueError:
|
||||||
|
continue
|
||||||
|
new_name = f'{num:03d}'
|
||||||
|
new_path = os.path.join(head, new_name+ext)
|
||||||
|
os.rename(path, new_path)
|
||||||
|
print(path, '->', new_path)
|
||||||
|
|
||||||
|
def closest_color(c, palette):
|
||||||
|
min_d = float('inf')
|
||||||
|
best = 0
|
||||||
|
r1, g1, b1 = c
|
||||||
|
for i, (r2, g2, b2) in enumerate(palette[1:], 1):
|
||||||
|
# Color diff from https://stackoverflow.com/questions/1847092/given-an-rgb-value-what-would-be-the-best-way-to-find-the-closest-match-in-the-d
|
||||||
|
d = ((r2-r1)*0.30)**2 + ((g2-g1)*0.59)**2 + ((b2-b1)*0.11)**2
|
||||||
|
if d < min_d:
|
||||||
|
min_d = d
|
||||||
|
best = i
|
||||||
|
return best
|
||||||
|
|
||||||
|
def apply_palette(palette_file, input_file, output_file): # Apply one file's palette to another
|
||||||
|
plt = png.Reader(palette_file)
|
||||||
|
plt.read()
|
||||||
|
target_palette = tuple(c[:3] for c in plt.palette())
|
||||||
|
inp = png.Reader(input_file)
|
||||||
|
w, h, rows, _ = inp.read()
|
||||||
|
src_palette = tuple(c[:3] for c in inp.palette())
|
||||||
|
with open(output_file, 'wb') as f:
|
||||||
|
new_rows = []
|
||||||
|
for row in rows:
|
||||||
|
new_rows.append([closest_color(src_palette[c], target_palette) if c else 0 for c in row])
|
||||||
|
w = png.Writer(width=w, height=h, bitdepth=4, palette=target_palette)
|
||||||
|
w.write(f, new_rows)
|
||||||
|
|
||||||
|
def paletteify(path, output_path=None):
|
||||||
|
output_path = output_path or path
|
||||||
|
joinp = os.path.join
|
||||||
|
_, tail = os.path.split(path)
|
||||||
|
species, _ = os.path.splitext(tail)
|
||||||
|
front = png.Reader(joinp(PKMN_GRAPHICS, species, 'anim_front.png'))
|
||||||
|
front.read()
|
||||||
|
target_palette = tuple(c[:3] for c in front.palette())
|
||||||
|
r, g, b = target_palette[0]
|
||||||
|
color = f'rgb({r},{g},{b})'
|
||||||
|
# Strip alpha color
|
||||||
|
subprocess.run(['convert', path, '-background', color, '-alpha', 'remove', output_path], check=True)
|
||||||
|
apply_palette(joinp(PKMN_GRAPHICS, species, 'anim_front.png'), output_path, output_path)
|
||||||
|
|
||||||
|
# Sprites from https://veekun.com/dex/downloads
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
args = sys.argv[1:]
|
||||||
|
if args:
|
||||||
|
paletteify(args[0])
|
||||||
|
else:
|
||||||
|
for path in sorted(glob('overworld/*.png')):
|
||||||
|
_, tail = os.path.split(path)
|
||||||
|
name, _ = os.path.splitext(tail)
|
||||||
|
output_path = os.path.join('graphics/object_events/pics/pokemon', f'{name}.png')
|
||||||
|
try:
|
||||||
|
paletteify(path, output_path)
|
||||||
|
except Exception as e:
|
||||||
|
print(name, e.__class__.__name__, e, file=sys.stderr)
|
||||||
50
follower_emotions.py
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
""" Processes & outputs follower emotion messages """
|
||||||
|
import sys
|
||||||
|
import re
|
||||||
|
import textwrap
|
||||||
|
|
||||||
|
blank_regex = re.compile(r'\(?_+\)?')
|
||||||
|
|
||||||
|
|
||||||
|
# Converts a series of message lines to a better format
|
||||||
|
def convert_messages(infile, outfile='emotions.txt'):
|
||||||
|
with open(infile, 'r') as f_in, open(outfile, 'w') as f_out:
|
||||||
|
for line in f_in:
|
||||||
|
line = line.rstrip('\n')
|
||||||
|
if line and line[0] == '-':
|
||||||
|
line = line[1:]
|
||||||
|
line = line.lstrip()
|
||||||
|
if not line:
|
||||||
|
continue
|
||||||
|
line = blank_regex.sub('{STR_VAR_1}', line)
|
||||||
|
if line[-1] not in ('.', '?', '!', ':'):
|
||||||
|
line += '.'
|
||||||
|
print(line)
|
||||||
|
f_out.write('\n' + line)
|
||||||
|
|
||||||
|
# Prepares a string for field-message display, performing line-wrapping, etc
|
||||||
|
# Does not add a terminator, as this is done by _("")
|
||||||
|
def prepare_string(s):
|
||||||
|
lines = textwrap.wrap(s, width=36) # Width of message window
|
||||||
|
s = lines[0]
|
||||||
|
for i, line in enumerate(lines[1:]):
|
||||||
|
ending = r'\p' if i % 2 else r'\n'
|
||||||
|
s += ending + line
|
||||||
|
return s
|
||||||
|
|
||||||
|
|
||||||
|
# Exports up to n messages in C format to outfile
|
||||||
|
def export_messages(infile, outfile, n=None, indent=0, start=0):
|
||||||
|
with open(infile, 'r') as f_in:
|
||||||
|
lines = f_in.readlines()
|
||||||
|
if n is not None:
|
||||||
|
lines = lines[:n]
|
||||||
|
with open(outfile, 'w') as f_out:
|
||||||
|
codelines = [' '*indent + f'static const u8 sCondMsg{start+i:02d}[] = _("{prepare_string(s)}");' for i, s in enumerate(lines)]
|
||||||
|
f_out.write('\n'.join(codelines))
|
||||||
|
print(f'{len(lines)} lines written')
|
||||||
|
return len(lines)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
export_messages('emotions.txt', 'emotions.h', n=1, start=7)
|
||||||
69
front_palette.py
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
""" Extract sprites from HGSS follower spritesheets. """
|
||||||
|
import os.path
|
||||||
|
from os.path import join as joinp
|
||||||
|
import subprocess
|
||||||
|
import sys
|
||||||
|
from glob import glob
|
||||||
|
|
||||||
|
import png
|
||||||
|
from tqdm import tqdm
|
||||||
|
|
||||||
|
|
||||||
|
def stack_sprite(name, path):
|
||||||
|
frames = [joinp(path, 'down', name), joinp(path, 'down', 'frame2', name),
|
||||||
|
joinp(path, 'up', name), joinp(path, 'up', 'frame2', name),
|
||||||
|
joinp(path, 'left', name), joinp(path, 'left', 'frame2', name)]
|
||||||
|
output = joinp(path, name)
|
||||||
|
subprocess.run(['convert'] + frames + ['+append', output], check=True)
|
||||||
|
print(f'Stacked {output}')
|
||||||
|
|
||||||
|
def closest_color(c, palette):
|
||||||
|
min_d = float('inf')
|
||||||
|
best = 0
|
||||||
|
r1, g1, b1 = c
|
||||||
|
for i, (r2, g2, b2) in enumerate(palette[1:], 1):
|
||||||
|
# Color diff from https://stackoverflow.com/questions/1847092/given-an-rgb-value-what-would-be-the-best-way-to-find-the-closest-match-in-the-d
|
||||||
|
d = ((r2-r1)*0.30)**2 + ((g2-g1)*0.59)**2 + ((b2-b1)*0.11)**2
|
||||||
|
if d < min_d:
|
||||||
|
min_d = d
|
||||||
|
best = i
|
||||||
|
return best
|
||||||
|
|
||||||
|
def apply_palette(palette_file, input_file, output_file): # Apply one file's palette to another
|
||||||
|
plt = png.Reader(palette_file)
|
||||||
|
plt.read()
|
||||||
|
target_palette = tuple(c[:3] for c in plt.palette())
|
||||||
|
inp = png.Reader(input_file)
|
||||||
|
w, h, rows, info = inp.read()
|
||||||
|
src_palette = tuple(c[:3] for c in inp.palette())
|
||||||
|
new_rows = [[closest_color(src_palette[c][:3], target_palette) if c else 0 for c in row] for row in rows]
|
||||||
|
with open(output_file, 'wb') as f:
|
||||||
|
w = png.Writer(width=w, height=h, bitdepth=4, palette=target_palette)
|
||||||
|
w.write(f, new_rows)
|
||||||
|
|
||||||
|
# Sprites from https://veekun.com/dex/downloads
|
||||||
|
|
||||||
|
def apply_front_palettes(ow_dir, project_root=''):
|
||||||
|
mon_graphics = joinp(project_root, 'graphics', 'pokemon')
|
||||||
|
t = tqdm(sorted(glob(joinp(ow_dir, '*.png'))))
|
||||||
|
spaces = 0
|
||||||
|
for path in t:
|
||||||
|
name, _ = os.path.splitext(os.path.basename(path))
|
||||||
|
spaces = min(max(len(name), spaces), 10)
|
||||||
|
t.set_description(name + ' '*(spaces-len(name)))
|
||||||
|
output_path = joinp(project_root, 'graphics', 'object_events', 'pics', 'pokemon', f'{name}.png')
|
||||||
|
if 'unown' in name:
|
||||||
|
palette_path = joinp(mon_graphics, 'unown', 'a', 'anim_front.png')
|
||||||
|
elif name == 'castform':
|
||||||
|
palette_path = joinp(mon_graphics, name, 'anim_front_normal_form.png')
|
||||||
|
else:
|
||||||
|
palette_path = joinp(mon_graphics, name, 'anim_front.png')
|
||||||
|
try:
|
||||||
|
apply_palette(palette_path, path, output_path)
|
||||||
|
except Exception as e:
|
||||||
|
t.write(f'{name}: {e.__class__.__name__}: {e}', file=sys.stderr)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
apply_front_palettes('overworld')
|
||||||
@ -584,7 +584,7 @@ u8 CreateSpriteAt(u8 index, const struct SpriteTemplate *template, s16 x, s16 y,
|
|||||||
if (sprite->oam.affineMode & ST_OAM_AFFINE_ON_MASK)
|
if (sprite->oam.affineMode & ST_OAM_AFFINE_ON_MASK)
|
||||||
InitSpriteAffineAnim(sprite);
|
InitSpriteAffineAnim(sprite);
|
||||||
|
|
||||||
if (template->paletteTag != TAG_NONE)
|
if (template->paletteTag != TAG_NONE) // TODO: Load sprite palette if tag not present
|
||||||
sprite->oam.paletteNum = IndexOfSpritePaletteTag(template->paletteTag);
|
sprite->oam.paletteNum = IndexOfSpritePaletteTag(template->paletteTag);
|
||||||
|
|
||||||
return index;
|
return index;
|
||||||
@ -1587,6 +1587,8 @@ void FreeAllSpritePalettes(void)
|
|||||||
u8 LoadSpritePalette(const struct SpritePalette *palette)
|
u8 LoadSpritePalette(const struct SpritePalette *palette)
|
||||||
{
|
{
|
||||||
u8 index = IndexOfSpritePaletteTag(palette->tag);
|
u8 index = IndexOfSpritePaletteTag(palette->tag);
|
||||||
|
u8 i;
|
||||||
|
u16 *debugPtr = (u16*) 0x0203d800;
|
||||||
|
|
||||||
if (index != 0xFF)
|
if (index != 0xFF)
|
||||||
return index;
|
return index;
|
||||||
@ -1600,6 +1602,9 @@ u8 LoadSpritePalette(const struct SpritePalette *palette)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
sSpritePaletteTags[index] = palette->tag;
|
sSpritePaletteTags[index] = palette->tag;
|
||||||
|
for (i = 0; i < 16; i++) {
|
||||||
|
debugPtr[i] = sSpritePaletteTags[i];
|
||||||
|
}
|
||||||
DoLoadSpritePalette(palette->data, PLTT_ID(index));
|
DoLoadSpritePalette(palette->data, PLTT_ID(index));
|
||||||
return index;
|
return index;
|
||||||
}
|
}
|
||||||
@ -1650,8 +1655,12 @@ u16 GetSpritePaletteTagByPaletteNum(u8 paletteNum)
|
|||||||
void FreeSpritePaletteByTag(u16 tag)
|
void FreeSpritePaletteByTag(u16 tag)
|
||||||
{
|
{
|
||||||
u8 index = IndexOfSpritePaletteTag(tag);
|
u8 index = IndexOfSpritePaletteTag(tag);
|
||||||
if (index != 0xFF)
|
if (index != 0xFF) {
|
||||||
sSpritePaletteTags[index] = TAG_NONE;
|
sSpritePaletteTags[index] = TAG_NONE;
|
||||||
|
#if DEBUG
|
||||||
|
FillPalette(0, index * 16 + 0x100, 32);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetSubspriteTables(struct Sprite *sprite, const struct SubspriteTable *subspriteTables)
|
void SetSubspriteTables(struct Sprite *sprite, const struct SubspriteTable *subspriteTables)
|
||||||
|
|||||||
BIN
graphics/field_effects/pics/bug_tracks.png
Normal file
|
After Width: | Height: | Size: 275 B |
|
Before Width: | Height: | Size: 152 B After Width: | Height: | Size: 5.1 KiB |
|
Before Width: | Height: | Size: 144 B After Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 143 B After Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 143 B After Width: | Height: | Size: 4.7 KiB |
BIN
graphics/field_effects/pics/slither_tracks.png
Normal file
|
After Width: | Height: | Size: 354 B |
BIN
graphics/field_effects/pics/spot_tracks.png
Normal file
|
After Width: | Height: | Size: 269 B |
19
graphics/misc/emotes.pal
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
JASC-PAL
|
||||||
|
0100
|
||||||
|
16
|
||||||
|
255 255 0
|
||||||
|
151 48 0
|
||||||
|
74 75 87
|
||||||
|
88 88 97
|
||||||
|
164 72 167
|
||||||
|
248 63 2
|
||||||
|
78 128 207
|
||||||
|
48 160 0
|
||||||
|
237 131 0
|
||||||
|
205 144 203
|
||||||
|
168 168 178
|
||||||
|
251 167 159
|
||||||
|
240 176 183
|
||||||
|
219 181 221
|
||||||
|
165 225 69
|
||||||
|
247 249 246
|
||||||
BIN
graphics/misc/emotes.png
Normal file
|
After Width: | Height: | Size: 4.0 KiB |
19
graphics/object_events/palettes/light.pal
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
JASC-PAL
|
||||||
|
0100
|
||||||
|
16
|
||||||
|
110 198 165
|
||||||
|
255 213 18
|
||||||
|
255 214 38
|
||||||
|
254 217 39
|
||||||
|
254 218 53
|
||||||
|
255 220 65
|
||||||
|
255 221 76
|
||||||
|
255 223 86
|
||||||
|
254 225 95
|
||||||
|
254 228 104
|
||||||
|
254 229 112
|
||||||
|
254 230 120
|
||||||
|
255 232 132
|
||||||
|
255 235 148
|
||||||
|
255 237 162
|
||||||
|
255 240 176
|
||||||
BIN
graphics/object_events/pics/misc/animated_ball.png
Normal file
|
After Width: | Height: | Size: 8.0 KiB |
BIN
graphics/object_events/pics/misc/light.png
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
BIN
graphics/object_events/pics/pokemon/abra.png
Normal file
|
After Width: | Height: | Size: 485 B |
BIN
graphics/object_events/pics/pokemon/absol.png
Normal file
|
After Width: | Height: | Size: 733 B |
BIN
graphics/object_events/pics/pokemon/aerodactyl.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
graphics/object_events/pics/pokemon/aggron.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
graphics/object_events/pics/pokemon/aipom.png
Normal file
|
After Width: | Height: | Size: 873 B |
BIN
graphics/object_events/pics/pokemon/alakazam.png
Normal file
|
After Width: | Height: | Size: 881 B |
BIN
graphics/object_events/pics/pokemon/altaria.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
graphics/object_events/pics/pokemon/ampharos.png
Normal file
|
After Width: | Height: | Size: 703 B |
BIN
graphics/object_events/pics/pokemon/anorith.png
Normal file
|
After Width: | Height: | Size: 733 B |
BIN
graphics/object_events/pics/pokemon/arbok.png
Normal file
|
After Width: | Height: | Size: 817 B |
BIN
graphics/object_events/pics/pokemon/arcanine.png
Normal file
|
After Width: | Height: | Size: 962 B |
BIN
graphics/object_events/pics/pokemon/ariados.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
graphics/object_events/pics/pokemon/armaldo.png
Normal file
|
After Width: | Height: | Size: 908 B |
BIN
graphics/object_events/pics/pokemon/aron.png
Normal file
|
After Width: | Height: | Size: 404 B |
BIN
graphics/object_events/pics/pokemon/articuno.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 325 B After Width: | Height: | Size: 690 B |
BIN
graphics/object_events/pics/pokemon/azumarill_old.png
Normal file
|
After Width: | Height: | Size: 325 B |
|
Before Width: | Height: | Size: 308 B After Width: | Height: | Size: 520 B |
BIN
graphics/object_events/pics/pokemon/azurill_old.png
Normal file
|
After Width: | Height: | Size: 308 B |
BIN
graphics/object_events/pics/pokemon/bagon.png
Normal file
|
After Width: | Height: | Size: 616 B |
BIN
graphics/object_events/pics/pokemon/baltoy.png
Normal file
|
After Width: | Height: | Size: 388 B |
BIN
graphics/object_events/pics/pokemon/banette.png
Normal file
|
After Width: | Height: | Size: 528 B |
BIN
graphics/object_events/pics/pokemon/barboach.png
Normal file
|
After Width: | Height: | Size: 518 B |
BIN
graphics/object_events/pics/pokemon/bayleef.png
Normal file
|
After Width: | Height: | Size: 700 B |
BIN
graphics/object_events/pics/pokemon/beautifly.png
Normal file
|
After Width: | Height: | Size: 978 B |
BIN
graphics/object_events/pics/pokemon/beedrill.png
Normal file
|
After Width: | Height: | Size: 803 B |
BIN
graphics/object_events/pics/pokemon/beldum.png
Normal file
|
After Width: | Height: | Size: 538 B |
BIN
graphics/object_events/pics/pokemon/bellossom.png
Normal file
|
After Width: | Height: | Size: 630 B |
BIN
graphics/object_events/pics/pokemon/bellsprout.png
Normal file
|
After Width: | Height: | Size: 396 B |
BIN
graphics/object_events/pics/pokemon/blastoise.png
Normal file
|
After Width: | Height: | Size: 989 B |
BIN
graphics/object_events/pics/pokemon/blaziken.png
Normal file
|
After Width: | Height: | Size: 885 B |
BIN
graphics/object_events/pics/pokemon/blissey.png
Normal file
|
After Width: | Height: | Size: 726 B |
BIN
graphics/object_events/pics/pokemon/breloom.png
Normal file
|
After Width: | Height: | Size: 582 B |
BIN
graphics/object_events/pics/pokemon/bulbasaur.png
Normal file
|
After Width: | Height: | Size: 519 B |
BIN
graphics/object_events/pics/pokemon/butterfree.png
Normal file
|
After Width: | Height: | Size: 808 B |
BIN
graphics/object_events/pics/pokemon/cacnea.png
Normal file
|
After Width: | Height: | Size: 509 B |
BIN
graphics/object_events/pics/pokemon/cacturne.png
Normal file
|
After Width: | Height: | Size: 517 B |
BIN
graphics/object_events/pics/pokemon/camerupt.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
graphics/object_events/pics/pokemon/carvanha.png
Normal file
|
After Width: | Height: | Size: 749 B |
BIN
graphics/object_events/pics/pokemon/cascoon.png
Normal file
|
After Width: | Height: | Size: 695 B |
BIN
graphics/object_events/pics/pokemon/castform.png
Normal file
|
After Width: | Height: | Size: 342 B |