Skip to content

Dynamic Trade Names

TRBRY edited this page Nov 22, 2022 · 4 revisions

Dynamic Trade Names

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

Find BufferTradeSceneStrings After the else statement, replace the following:

ingameTrade = &sIngameTrades[gSpecialVar_0x8004];
StringCopy(gStringVar1, ingameTrade->otName);
StringCopy_Nickname(gStringVar3, ingameTrade->nickname);
GetMonData(&gPlayerParty[gSpecialVar_0x8005], MON_DATA_NICKNAME, name);
StringCopy_Nickname(gStringVar2, name);

with:

GetMonData(&gEnemyParty[0], MON_DATA_OT_NAME, gStringVar1);
GetMonData(&gEnemyParty[0], MON_DATA_NICKNAME, name);
StringCopy_Nickname(gStringVar3, name);
GetMonData(&gPlayerParty[gSpecialVar_0x8005], MON_DATA_NICKNAME, name);
StringCopy_Nickname(gStringVar2, name);

That's it!

Clone this wiki locally