forked from DizzyEggg/pokeemerald
-
Notifications
You must be signed in to change notification settings - Fork 3
Dynamic Trade Names
ghoulslash edited this page Sep 25, 2020
·
2 revisions
Traded Pokemon are stored at gEnemyParty[0]. If you create a custom Pokemon to trade (not in sIngameTrades), the trading scene strings will get messed up. This loads the correct OT name / OT nickname from the pokemon's data structure rather than the in game trade array.
credit: Zeturic's binary FR src
Open src/trade.c
Find BufferTradeSceneStrings
After the else
statement, replace the following:
ingameTrade = &sIngameTrades[gSpecialVar_0x8004];
StringCopy(gStringVar1, ingameTrade->otName);
StringCopy10(gStringVar3, ingameTrade->nickname);
GetMonData(&gPlayerParty[gSpecialVar_0x8005], MON_DATA_NICKNAME, name);
StringCopy10(gStringVar2, name);
with:
GetMonData(&gEnemyParty[0], MON_DATA_OT_NAME, gStringVar1);
GetMonData(&gEnemyParty[0], MON_DATA_NICKNAME, name);
StringCopy10(gStringVar3, name);
GetMonData(&gPlayerParty[gSpecialVar_0x8005], MON_DATA_NICKNAME, name);
StringCopy10(gStringVar2, name);
That's it!