Robinlukke
...
- 52
- Posts
- 14
- Years
- He/Him/It
- Argentina
- Seen Apr 28, 2025
Since it took me forever to find which files I had to modify in order to make this work, I decided to make a tutorial so you don't have to waste your time looking for them.
In this tutorial I'm adding new items as available prizes (the Regi trio dolls ♥) at the Exchange corner in the Battle Frontier.
👉At data/maps/BattleFrontier_ExchangeServiceCorner/scripts.inc:
👉At src/data/battle_frontier/battle_frontier_exchange_corner.h:
👉At include/strings.h:
👉At src/field_specials.c:
In this tutorial I'm adding new items as available prizes (the Regi trio dolls ♥) at the Exchange corner in the Battle Frontier.
👉At data/maps/BattleFrontier_ExchangeServiceCorner/scripts.inc:
Spoiler:
Search:
Then add and replace the corresponding numbers:
Also add at the end of the script:
Spoiler:
case 0, BattleFrontier_ExchangeServiceCorner_EventScript_LaprasDoll
case 1, BattleFrontier_ExchangeServiceCorner_EventScript_SnorlaxDoll
case 2, BattleFrontier_ExchangeServiceCorner_EventScript_VenusaurDoll
case 3, BattleFrontier_ExchangeServiceCorner_EventScript_CharizardDoll
case 4, BattleFrontier_ExchangeServiceCorner_EventScript_BlastoiseDoll
case 5, BattleFrontier_ExchangeServiceCorner_EventScript_ClerkGoodbye
case MULTI_B_PRESSED, BattleFrontier_ExchangeServiceCorner_EventScript_ClerkGoodbye
case 1, BattleFrontier_ExchangeServiceCorner_EventScript_SnorlaxDoll
case 2, BattleFrontier_ExchangeServiceCorner_EventScript_VenusaurDoll
case 3, BattleFrontier_ExchangeServiceCorner_EventScript_CharizardDoll
case 4, BattleFrontier_ExchangeServiceCorner_EventScript_BlastoiseDoll
case 5, BattleFrontier_ExchangeServiceCorner_EventScript_ClerkGoodbye
case MULTI_B_PRESSED, BattleFrontier_ExchangeServiceCorner_EventScript_ClerkGoodbye
Then add and replace the corresponding numbers:
Spoiler:
case 0, BattleFrontier_ExchangeServiceCorner_EventScript_LaprasDoll
case 1, BattleFrontier_ExchangeServiceCorner_EventScript_SnorlaxDoll
case 2, BattleFrontier_ExchangeServiceCorner_EventScript_VenusaurDoll
case 3, BattleFrontier_ExchangeServiceCorner_EventScript_CharizardDoll
case 4, BattleFrontier_ExchangeServiceCorner_EventScript_BlastoiseDoll
case 5, BattleFrontier_ExchangeServiceCorner_EventScript_RegirockDoll
case 6, BattleFrontier_ExchangeServiceCorner_EventScript_RegiceDoll
case 7, BattleFrontier_ExchangeServiceCorner_EventScript_RegisteelDoll
case 8, BattleFrontier_ExchangeServiceCorner_EventScript_ClerkGoodbye
case MULTI_B_PRESSED, BattleFrontier_ExchangeServiceCorner_EventScript_ClerkGoodbye
case 1, BattleFrontier_ExchangeServiceCorner_EventScript_SnorlaxDoll
case 2, BattleFrontier_ExchangeServiceCorner_EventScript_VenusaurDoll
case 3, BattleFrontier_ExchangeServiceCorner_EventScript_CharizardDoll
case 4, BattleFrontier_ExchangeServiceCorner_EventScript_BlastoiseDoll
case 5, BattleFrontier_ExchangeServiceCorner_EventScript_RegirockDoll
case 6, BattleFrontier_ExchangeServiceCorner_EventScript_RegiceDoll
case 7, BattleFrontier_ExchangeServiceCorner_EventScript_RegisteelDoll
case 8, BattleFrontier_ExchangeServiceCorner_EventScript_ClerkGoodbye
case MULTI_B_PRESSED, BattleFrontier_ExchangeServiceCorner_EventScript_ClerkGoodbye
Also add at the end of the script:
Spoiler:
BattleFrontier_ExchangeServiceCorner_EventScript_RegirockDoll::
msgbox BattleFrontier_ExchangeServiceCorner_Text_ConfirmRegirockDoll, MSGBOX_YESNO
compare VAR_RESULT, NO
goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor2
setvar VAR_0x8008, 256
setvar VAR_0x8009, DECOR_REGIROCK_DOLL
goto BattleFrontier_ExchangeServiceCorner_EventScript_TryPurchasePrize
end
BattleFrontier_ExchangeServiceCorner_EventScript_RegiceDoll::
msgbox BattleFrontier_ExchangeServiceCorner_Text_ConfirmRegiceDoll, MSGBOX_YESNO
compare VAR_RESULT, NO
goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor2
setvar VAR_0x8008, 256
setvar VAR_0x8009, DECOR_REGICE_DOLL
goto BattleFrontier_ExchangeServiceCorner_EventScript_TryPurchasePrize
end
BattleFrontier_ExchangeServiceCorner_EventScript_RegisteelDoll::
msgbox BattleFrontier_ExchangeServiceCorner_Text_ConfirmRegisteelDoll, MSGBOX_YESNO
compare VAR_RESULT, NO
goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor2
setvar VAR_0x8008, 256
setvar VAR_0x8009, DECOR_REGISTEEL_DOLL
goto BattleFrontier_ExchangeServiceCorner_EventScript_TryPurchasePrize
end
BattleFrontier_ExchangeServiceCorner_Text_ConfirmRegirockDoll:
.string "You've chosen the REGIROCK DOLL.\n"
.string "Is that correct?$"
BattleFrontier_ExchangeServiceCorner_Text_ConfirmRegiceDoll:
.string "You've chosen the REGICE DOLL.\n"
.string "Is that correct?$"
BattleFrontier_ExchangeServiceCorner_Text_ConfirmRegisteelDoll:
.string "You've chosen the REGISTEEL DOLL.\n"
.string "Is that correct?$"
msgbox BattleFrontier_ExchangeServiceCorner_Text_ConfirmRegirockDoll, MSGBOX_YESNO
compare VAR_RESULT, NO
goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor2
setvar VAR_0x8008, 256
setvar VAR_0x8009, DECOR_REGIROCK_DOLL
goto BattleFrontier_ExchangeServiceCorner_EventScript_TryPurchasePrize
end
BattleFrontier_ExchangeServiceCorner_EventScript_RegiceDoll::
msgbox BattleFrontier_ExchangeServiceCorner_Text_ConfirmRegiceDoll, MSGBOX_YESNO
compare VAR_RESULT, NO
goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor2
setvar VAR_0x8008, 256
setvar VAR_0x8009, DECOR_REGICE_DOLL
goto BattleFrontier_ExchangeServiceCorner_EventScript_TryPurchasePrize
end
BattleFrontier_ExchangeServiceCorner_EventScript_RegisteelDoll::
msgbox BattleFrontier_ExchangeServiceCorner_Text_ConfirmRegisteelDoll, MSGBOX_YESNO
compare VAR_RESULT, NO
goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor2
setvar VAR_0x8008, 256
setvar VAR_0x8009, DECOR_REGISTEEL_DOLL
goto BattleFrontier_ExchangeServiceCorner_EventScript_TryPurchasePrize
end
BattleFrontier_ExchangeServiceCorner_Text_ConfirmRegirockDoll:
.string "You've chosen the REGIROCK DOLL.\n"
.string "Is that correct?$"
BattleFrontier_ExchangeServiceCorner_Text_ConfirmRegiceDoll:
.string "You've chosen the REGICE DOLL.\n"
.string "Is that correct?$"
BattleFrontier_ExchangeServiceCorner_Text_ConfirmRegisteelDoll:
.string "You've chosen the REGISTEEL DOLL.\n"
.string "Is that correct?$"
👉At src/data/battle_frontier/battle_frontier_exchange_corner.h:
Spoiler:
Search:
Then add:
Also find:
Then add:
Spoiler:
static const u16 sFrontierExchangeCorner_Decor2[] =
{
DECOR_LAPRAS_DOLL,
DECOR_SNORLAX_DOLL,
DECOR_VENUSAUR_DOLL,
DECOR_CHARIZARD_DOLL,
DECOR_BLASTOISE_DOLL,
0xFFFF
};
{
DECOR_LAPRAS_DOLL,
DECOR_SNORLAX_DOLL,
DECOR_VENUSAUR_DOLL,
DECOR_CHARIZARD_DOLL,
DECOR_BLASTOISE_DOLL,
0xFFFF
};
Then add:
Spoiler:
static const u16 sFrontierExchangeCorner_Decor2[] =
{
DECOR_LAPRAS_DOLL,
DECOR_SNORLAX_DOLL,
DECOR_VENUSAUR_DOLL,
DECOR_CHARIZARD_DOLL,
DECOR_BLASTOISE_DOLL,
DECOR_REGIROCK_DOLL,
DECOR_REGICE_DOLL,
DECOR_REGISTEEL_DOLL,
0xFFFF
};
{
DECOR_LAPRAS_DOLL,
DECOR_SNORLAX_DOLL,
DECOR_VENUSAUR_DOLL,
DECOR_CHARIZARD_DOLL,
DECOR_BLASTOISE_DOLL,
DECOR_REGIROCK_DOLL,
DECOR_REGICE_DOLL,
DECOR_REGISTEEL_DOLL,
0xFFFF
};
Also find:
Spoiler:
static const u8 *const sFrontierExchangeCorner_Decor2Descriptions[] =
{
BattleFrontier_ExchangeServiceCorner_Text_LargeDollDesc,
BattleFrontier_ExchangeServiceCorner_Text_LargeDollDesc,
BattleFrontier_ExchangeServiceCorner_Text_LargeDollDesc,
BattleFrontier_ExchangeServiceCorner_Text_LargeDollDesc,
BattleFrontier_ExchangeServiceCorner_Text_LargeDollDesc,
gText_Exit
};
{
BattleFrontier_ExchangeServiceCorner_Text_LargeDollDesc,
BattleFrontier_ExchangeServiceCorner_Text_LargeDollDesc,
BattleFrontier_ExchangeServiceCorner_Text_LargeDollDesc,
BattleFrontier_ExchangeServiceCorner_Text_LargeDollDesc,
BattleFrontier_ExchangeServiceCorner_Text_LargeDollDesc,
gText_Exit
};
Then add:
Spoiler:
static const u8 *const sFrontierExchangeCorner_Decor2Descriptions[] =
{
BattleFrontier_ExchangeServiceCorner_Text_LargeDollDesc,
BattleFrontier_ExchangeServiceCorner_Text_LargeDollDesc,
BattleFrontier_ExchangeServiceCorner_Text_LargeDollDesc,
BattleFrontier_ExchangeServiceCorner_Text_LargeDollDesc,
BattleFrontier_ExchangeServiceCorner_Text_LargeDollDesc,
BattleFrontier_ExchangeServiceCorner_Text_LargeDollDesc,
BattleFrontier_ExchangeServiceCorner_Text_LargeDollDesc,
BattleFrontier_ExchangeServiceCorner_Text_LargeDollDesc,
gText_Exit
};
{
BattleFrontier_ExchangeServiceCorner_Text_LargeDollDesc,
BattleFrontier_ExchangeServiceCorner_Text_LargeDollDesc,
BattleFrontier_ExchangeServiceCorner_Text_LargeDollDesc,
BattleFrontier_ExchangeServiceCorner_Text_LargeDollDesc,
BattleFrontier_ExchangeServiceCorner_Text_LargeDollDesc,
BattleFrontier_ExchangeServiceCorner_Text_LargeDollDesc,
BattleFrontier_ExchangeServiceCorner_Text_LargeDollDesc,
BattleFrontier_ExchangeServiceCorner_Text_LargeDollDesc,
gText_Exit
};
👉At include/strings.h:
Spoiler:
Search:
Then add:
Spoiler:
extern const u8 gText_LaprasDoll128BP[];
extern const u8 gText_SnorlaxDoll128BP[];
extern const u8 gText_VenusaurDoll256BP[];
extern const u8 gText_CharizardDoll256BP[];
extern const u8 gText_BlastoiseDoll256BP[];
extern const u8 gText_SnorlaxDoll128BP[];
extern const u8 gText_VenusaurDoll256BP[];
extern const u8 gText_CharizardDoll256BP[];
extern const u8 gText_BlastoiseDoll256BP[];
Then add:
Spoiler:
extern const u8 gText_LaprasDoll128BP[];
extern const u8 gText_SnorlaxDoll128BP[];
extern const u8 gText_VenusaurDoll256BP[];
extern const u8 gText_CharizardDoll256BP[];
extern const u8 gText_BlastoiseDoll256BP[];
extern const u8 gText_RegirockDoll256BP[];
extern const u8 gText_RegiceDoll256BP[];
extern const u8 gText_RegisteelDoll256BP[];
extern const u8 gText_SnorlaxDoll128BP[];
extern const u8 gText_VenusaurDoll256BP[];
extern const u8 gText_CharizardDoll256BP[];
extern const u8 gText_BlastoiseDoll256BP[];
extern const u8 gText_RegirockDoll256BP[];
extern const u8 gText_RegiceDoll256BP[];
extern const u8 gText_RegisteelDoll256BP[];
👉At src/field_specials.c:
Spoiler:
Search:
Then add:
And finally search:
Then modify the number at "task->tNumItems = " (in this case, we added 3 more):
Spoiler:
[SCROLL_MULTI_BF_EXCHANGE_CORNER_DECOR_VENDOR_2] =
{
gText_LaprasDoll128BP,
gText_SnorlaxDoll128BP,
gText_VenusaurDoll256BP,
gText_CharizardDoll256BP,
gText_BlastoiseDoll256BP,
gText_Exit
},
{
gText_LaprasDoll128BP,
gText_SnorlaxDoll128BP,
gText_VenusaurDoll256BP,
gText_CharizardDoll256BP,
gText_BlastoiseDoll256BP,
gText_Exit
},
Then add:
Spoiler:
[SCROLL_MULTI_BF_EXCHANGE_CORNER_DECOR_VENDOR_2] =
{
gText_LaprasDoll128BP,
gText_SnorlaxDoll128BP,
gText_VenusaurDoll256BP,
gText_CharizardDoll256BP,
gText_BlastoiseDoll256BP,
gText_RegirockDoll256BP,
gText_RegiceDoll256BP,
gText_RegisteelDoll256BP,
gText_Exit
},
{
gText_LaprasDoll128BP,
gText_SnorlaxDoll128BP,
gText_VenusaurDoll256BP,
gText_CharizardDoll256BP,
gText_BlastoiseDoll256BP,
gText_RegirockDoll256BP,
gText_RegiceDoll256BP,
gText_RegisteelDoll256BP,
gText_Exit
},
And finally search:
Spoiler:
case SCROLL_MULTI_BF_EXCHANGE_CORNER_DECOR_VENDOR_2:
task->tMaxItemsOnScreen = MAX_SCROLL_MULTI_ON_SCREEN;
task->tNumItems = 6;
task->tLeft = 14;
task->tTop = 1;
task->tWidth = 15;
task->tHeight = 12;
task->tKeepOpenAfterSelect = FALSE;
task->tTaskId = taskId;
task->tMaxItemsOnScreen = MAX_SCROLL_MULTI_ON_SCREEN;
task->tNumItems = 6;
task->tLeft = 14;
task->tTop = 1;
task->tWidth = 15;
task->tHeight = 12;
task->tKeepOpenAfterSelect = FALSE;
task->tTaskId = taskId;
Then modify the number at "task->tNumItems = " (in this case, we added 3 more):
Spoiler:
case SCROLL_MULTI_BF_EXCHANGE_CORNER_DECOR_VENDOR_2:
task->tMaxItemsOnScreen = MAX_SCROLL_MULTI_ON_SCREEN;
task->tNumItems = 9;
task->tLeft = 14;
task->tTop = 1;
task->tWidth = 15;
task->tHeight = 12;
task->tKeepOpenAfterSelect = FALSE;
task->tTaskId = taskId;
task->tMaxItemsOnScreen = MAX_SCROLL_MULTI_ON_SCREEN;
task->tNumItems = 9;
task->tLeft = 14;
task->tTop = 1;
task->tWidth = 15;
task->tHeight = 12;
task->tKeepOpenAfterSelect = FALSE;
task->tTaskId = taskId;
And listo!
![[PokeCommunity.com] [Tutorial] Adding new prizes at BF's Exchange Corner [PokeCommunity.com] [Tutorial] Adding new prizes at BF's Exchange Corner](https://i.imgur.com/70FEDoU.png)