pokeemerald-expansion rewrites existing systems in pokeemerald to improve their efficiency and make them easier to use and implement for developers. If developers were previously using a system that has been deprecated, it can be difficult to manually migrate between systems.
These scripts exist to help developers make the transition between refactored systems.
All migration scripts require python3
to be installed. Migration scripts are executed by running the following commands from the root directory of a developer's project.
chmod +x migration_scripts/*.py ; #give permission to make the script executable
python3 migration_scripts/*.py ; #run the migration script
*
will need to be replaced with the name of the appropriate script.
migration_scripts/1.11/consolidate_contest_opponent_filters.py
Moves the contest opponent filters in src/data/contest_opponents.h from gPostgameContestOpponentFilter to gContestOpponents
const struct ContestPokemon gContestOpponents[] =
{
[CONTEST_OPPONENT_JIMMY] = {
+ .filter = CONTEST_FILTER_NONE,
...
- const u8 gPostgameContestOpponentFilter[] =
- {
- [CONTEST_OPPONENT_JIMMY] = CONTEST_FILTER_NONE,
migration_scripts/1.11/convert_battle_frontier_trainers.py
Moves the Battle Frontier trainer parties from battle_frontier_trainer_mons.h to battle_frontier_trainers.h
- const u16 gBattleFrontierTrainerMons_Brady[] =
- {
- FRONTIER_MONS_YOUNGSTER_LASS_1
- };
- .monSet = gBattleFrontierTrainerMons_Brady
+ .monSet = (const u16[]){FRONTIER_MONS_YOUNGSTER_LASS_1}
migration_scripts/1.9/battle_anim_moves_refactor.py
Refactors all battle animation move scripts, removing the list from data/battle_anim_scripts.s
and linking them to the moves in gMovesInfo
for easier maintaining. Only necessary if new moves have been added.
- .4byte Move_POUND
+ extern const u8 Move_POUND[];
[MOVE_POUND] =
{
.name = COMPOUND_STRING("Pound"),
.description = COMPOUND_STRING(
"Pounds the foe with\n"
"forelegs or tail."),
.effect = EFFECT_HIT,
.power = 40,
.type = TYPE_NORMAL,
.accuracy = 100,
.pp = 35,
.target = MOVE_TARGET_SELECTED,
.priority = 0,
.category = DAMAGE_CATEGORY_PHYSICAL,
.makesContact = TRUE,
.ignoresKingsRock = B_UPDATED_MOVE_FLAGS == GEN_4,
.contestEffect = CONTEST_EFFECT_HIGHLY_APPEALING,
.contestCategory = CONTEST_CATEGORY_TOUGH,
.contestComboStarterId = COMBO_STARTER_POUND,
- .contestComboMoves = {0}
+ .contestComboMoves = {0},
+ .battleAnimScript = Move_POUND,
},
migration_scripts/1.9/convert_item_icons.py
Moves all information from gItemIconTable
to gItemsInfo
.
- [ITEM_POKE_BALL] = {gItemIcon_PokeBall, gItemIconPalette_PokeBall},
[ITEM_POKE_BALL] =
{
.name = _("Poké Ball"),
.price = 200,
.description = COMPOUND_STRING(
"A tool used for\n"
"catching wild\n"
"Pokémon."),
.pocket = POCKET_POKE_BALLS,
.type = ITEM_USE_BAG_MENU,
.battleUsage = EFFECT_ITEM_THROW_BALL,
.secondaryId = BALL_POKE,
+ .iconSprite = gItemIcon_PokeBall,
+ .iconPalette = gItemIconPalette_PokeBall,
},
migration_scripts/1.9/convert_trainer_parties.py
and migration_scripts/1.9/convert_partner_parties.py
Converts trainer data (for convert_trainer_parties.py
) and partner data (for convert_partner_data.py
) to the new .party
format. Not necessary if COMPETITIVE_PARTY_SYNTAX
is turned off.
-static const struct TrainerMon sParty_Sawyer1[] = {
- {
- .lvl = 21,
- .species = SPECIES_GEODUDE,
- }
-};
+=== TRAINER_SAWYER_1 ===
+Name: SAWYER
+Class: Hiker
+Pic: Hiker
+Gender: Male
+Music: Hiker
+Double Battle: No
+AI: Check Bad Move / Try To Faint / Check Viability
+
+Geodude
+Level: 21
+IVs: 0 HP / 0 Atk / 0 Def / 0 SpA / 0 SpD / 0 Spe
-static const struct TrainerMon sParty_StevenPartner[] = {
- {
- .species = SPECIES_METANG,
- .lvl = 42,
- .nature = NATURE_BRAVE,
- .iv = TRAINER_PARTY_IVS(31, 31, 31, 31, 31, 31),
- .ev = TRAINER_PARTY_EVS(0, 252, 252, 0, 6, 0),
- .moves = {MOVE_LIGHT_SCREEN, MOVE_PSYCHIC, MOVE_REFLECT, MOVE_METAL_CLAW},
- },
- {
- .species = SPECIES_SKARMORY,
- .lvl = 43,
- .nature = NATURE_IMPISH,
- .iv = TRAINER_PARTY_IVS(31, 31, 31, 31, 31, 31),
- .ev = TRAINER_PARTY_EVS(252, 0, 0, 0, 6, 252),
- .moves = {MOVE_TOXIC, MOVE_AERIAL_ACE, MOVE_PROTECT, MOVE_STEEL_WING},
- },
- {
- .species = SPECIES_AGGRON,
- .lvl = 44,
- .nature = NATURE_ADAMANT,
- .iv = TRAINER_PARTY_IVS(31, 31, 31, 31, 31, 31),
- .ev = TRAINER_PARTY_EVS(0, 252, 0, 0, 252, 6),
- .moves = {MOVE_THUNDER, MOVE_PROTECT, MOVE_SOLAR_BEAM, MOVE_DRAGON_CLAW},
- }
-};
+=== PARTNER_STEVEN ===
+Name: STEVEN
+Class: Rival
+Pic: Steven
+Gender: Male
+Music: Male
+
+Metang
+Brave Nature
+Level: 42
+IVs: 31 HP / 31 Atk / 31 Def / 31 SpA / 31 SpD / 31 Spe
+EVs: 252 Atk / 252 Def / 6 SpA
+- Light Screen
+- Psychic
+- Reflect
+- Metal Claw
+
+Skarmory
+Impish Nature
+Level: 43
+IVs: 31 HP / 31 Atk / 31 Def / 31 SpA / 31 SpD / 31 Spe
+EVs: 252 HP / 6 SpA / 252 SpD
+- Toxic
+- Aerial Ace
+- Protect
+- Steel Wing
+
+Aggron
+Adamant Nature
+Level: 44
+IVs: 31 HP / 31 Atk / 31 Def / 31 SpA / 31 SpD / 31 Spe
+EVs: 252 Atk / 252 SpA / 6 SpD
+- Thunder
+- Protect
+- Solar Beam
+- Dragon Claw
migration_scripts/1.9/egg_move_refactor.py
Updates egg moves to the refactored format. Only necessary if new species have been added or if egg moves of an existing species was altered.
- egg_moves(BULBASAUR,
- MOVE_SKULL_BASH,
- MOVE_CHARM,
- MOVE_PETAL_DANCE,
- MOVE_MAGICAL_LEAF,
- MOVE_GRASS_WHISTLE,
- MOVE_CURSE,
- MOVE_INGRAIN,
- MOVE_NATURE_POWER,
- MOVE_AMNESIA,
- MOVE_LEAF_STORM,
- MOVE_POWER_WHIP,
- MOVE_SLUDGE,
- MOVE_ENDURE,
- MOVE_GIGA_DRAIN,
- MOVE_GRASSY_TERRAIN),
+static const u16 sBulbasaurEggMoveLearnset[] = {
+ MOVE_SKULL_BASH,
+ MOVE_CHARM,
+ MOVE_PETAL_DANCE,
+ MOVE_MAGICAL_LEAF,
+ MOVE_GRASS_WHISTLE,
+ MOVE_CURSE,
+ MOVE_INGRAIN,
+ MOVE_NATURE_POWER,
+ MOVE_AMNESIA,
+ MOVE_LEAF_STORM,
+ MOVE_POWER_WHIP,
+ MOVE_SLUDGE,
+ MOVE_ENDURE,
+ MOVE_GIGA_DRAIN,
+ MOVE_GRASSY_TERRAIN,
+ MOVE_UNAVAILABLE,
};
[SPECIES_BULBASAUR] =
{
.baseHP = 45,
.baseAttack = 49,
.baseDefense = 49,
.baseSpeed = 45,
.baseSpAttack = 65,
.baseSpDefense = 65,
.types = MON_TYPES(TYPE_GRASS, TYPE_POISON),
.catchRate = 45,
.expYield = 64,
.evYield_SpAttack = 1,
.genderRatio = PERCENT_FEMALE(12.5),
.eggCycles = 20,
.friendship = STANDARD_FRIENDSHIP,
.growthRate = GROWTH_MEDIUM_SLOW,
.eggGroups = MON_EGG_GROUPS(EGG_GROUP_MONSTER, EGG_GROUP_GRASS),
.abilities = { ABILITY_OVERGROW, ABILITY_NONE, ABILITY_CHLOROPHYLL },
.bodyColor = BODY_COLOR_GREEN,
.speciesName = _("Bulbasaur"),
.cryId = CRY_BULBASAUR,
.natDexNum = NATIONAL_DEX_BULBASAUR,
.categoryName = _("Seed"),
.height = 7,
.weight = 69,
.description = COMPOUND_STRING(
"Bulbasaur can be seen napping in bright\n"
"sunlight. There is a seed on its back.\n"
"By soaking up the sun's rays, the seed\n"
"grows progressively larger."),
.pokemonScale = 356,
.pokemonOffset = 17,
.trainerScale = 256,
.trainerOffset = 0,
.frontPic = gMonFrontPic_Bulbasaur,
.frontPicSize = MON_COORDS_SIZE(40, 40),
.frontPicYOffset = 13,
.frontAnimFrames = sAnims_Bulbasaur,
.frontAnimId = ANIM_V_JUMPS_H_JUMPS,
.backPic = gMonBackPic_Bulbasaur,
.backPicSize = MON_COORDS_SIZE(56, 40),
.backPicYOffset = 13,
.backAnimId = BACK_ANIM_DIP_RIGHT_SIDE,
.palette = gMonPalette_Bulbasaur,
.shinyPalette = gMonShinyPalette_Bulbasaur,
.iconSprite = gMonIcon_Bulbasaur,
.iconPalIndex = 4,
FOOTPRINT(Bulbasaur)
.levelUpLearnset = sBulbasaurLevelUpLearnset,
.teachableLearnset = sBulbasaurTeachableLearnset,
+ .eggMoveLearnset = sBulbasaurEggMoveLearnset,
.evolutions = EVOLUTION({EVO_LEVEL, 16, SPECIES_IVYSAUR}),
},
migration_scripts/1.8/item_ball_refactor.py
Modifies all item ball scripts defined using to original Game Freak method to the new refactored method.
- Route102_EventScript_ItemPotion::
- finditem ITEM_POTION
+ Common_EventScript_FindItem::
+ callnative GetObjectEventTrainerRangeFromTemplate
+ finditem VAR_RESULT
end
{
"graphics_id": "OBJ_EVENT_GFX_ITEM_BALL",
"x": 50,
"y": 5,
"elevation": 3,
"movement_type": "MOVEMENT_TYPE_LOOK_AROUND",
"movement_range_x": 1,
"movement_range_y": 1,
"trainer_type": "TRAINER_TYPE_NONE",
- "trainer_sight_or_berry_tree_id": "0",
- "script": "Route102_EventScript_ItemPotion",
+ "trainer_sight_or_berry_tree_id": "ITEM_POTION",
+ "script": "Common_EventScript_FindItem",
"flag": "FLAG_ITEM_ROUTE_102_POTION"
},
migration_scripts/1.9/battle_frontier_convert_parties.py
Replaces itemTableId with heldItem and evSpread with ev.
[FRONTIER_MON_SUNKERN] = {
.species = SPECIES_SUNKERN,
.moves = {MOVE_MEGA_DRAIN, MOVE_HELPING_HAND, MOVE_SUNNY_DAY, MOVE_LIGHT_SCREEN},
- .itemTableId = BATTLE_FRONTIER_ITEM_LAX_INCENSE,
+ .heldItem = ITEM_LAX_INCENSE,
- .evSpread = F_EV_SPREAD_SP_ATTACK | F_EV_SPREAD_HP,
+ .ev = TRAINER_PARTY_EVS(252, 0, 0, 0, 252, 0),
.nature = NATURE_RELAXED
},
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。