Skip to content

Dynamic Trade Names

ghoulslash edited this page Sep 25, 2020 · 2 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);
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!

Clone this wiki locally