SPECIAL SUPPORTS
First off, I’d like to give a massive thank you to Vesly, ditto, Jester, Sme and Contro for helping me with troubleshooting.
In Thracia 776 and Three Houses, there were some supports that were considered to be special, and got extra perks; the former just doubled bonuses while the latter added an extra point of damage.
FE5 Special Support Tree by a redditor who deleted their account.
FE16 Special Bonds by u/FakeKyloRen on reddit.
This hack leans more towards the former.
Check the video below to see it applied.
Raw C Code
#include "C_Code.h"
extern u8 SpecialSupportPartners[];
int IsSpecialSupport(int pidA, int pidB) {
for (int i = 0; i < 3; ++i) {
if (SpecialSupportPartners[pidA * 3 + i] == pidB) { return true; }
}
return false;
}
static void ApplyAffinitySupportBonuses(struct SupportBonuses* bonuses, int affinity, int level)
{
const struct SupportBonuses* added = GetAffinityBonuses(affinity);
bonuses->bonusAttack += level * added->bonusAttack;
bonuses->bonusDefense += level * added->bonusDefense;
bonuses->bonusHit += level * added->bonusHit;
bonuses->bonusAvoid += level * added->bonusAvoid;
bonuses->bonusCrit += level * added->bonusCrit;
bonuses->bonusDodge += level * added->bonusDodge;
}
static void ApplyAffinitySpecialSupportBonuses(struct SupportBonuses* bonuses, int affinity, int level)
{
const struct SupportBonuses* added = GetAffinityBonuses(affinity);
bonuses->bonusAttack += level * (added->bonusAttack * 2);
bonuses->bonusDefense += level * (added->bonusDefense * 2);
bonuses->bonusHit += level * (added->bonusHit * 2);
bonuses->bonusAvoid += level * (added->bonusAvoid * 2);
bonuses->bonusCrit += level * (added->bonusCrit * 2);
bonuses->bonusDodge += level * (added->bonusDodge * 2);
}
int GetUnitSupportBonuses(struct Unit* unit, struct SupportBonuses* bonuses)
{
int i, count;
int result = 0;
bool specialSupport = false;
InitSupportBonuses(bonuses);
count = GetUnitSupporterCount(unit);
for (i = 0; i < count; ++i)
{
struct Unit* other;
int level1, level2;
result = result >> 1;
other = GetUnitSupporterUnit(unit, i);
if (!other)
continue;
if (!(gBmSt.gameStateBits & 0x40))
{
if (RECT_DISTANCE(unit->xPos, unit->yPos, other->xPos, other->yPos) > SUPPORT_BONUSES_MAX_DISTANCE)
continue;
}
if(IsSpecialSupport(unit->pCharacterData->number, other->pCharacterData->number))
specialSupport = true;
if (other->state & (US_UNAVAILABLE | US_RESCUED))
continue;
if (IsSpecialSupport(unit->pCharacterData->number, other->pCharacterData->number)) {
level1 = GetUnitSupportLevel(other, GetUnitSupporterNum(other, unit->pCharacterData->number));
ApplyAffinitySpecialSupportBonuses(bonuses, other->pCharacterData->affinity, level1);
level2 = GetUnitSupportLevel(unit, i);
ApplyAffinitySpecialSupportBonuses(bonuses, unit->pCharacterData->affinity, level2);
} else {
level1 = GetUnitSupportLevel(other, GetUnitSupporterNum(other, unit->pCharacterData->number));
ApplyAffinitySupportBonuses(bonuses, other->pCharacterData->affinity, level1);
level2 = GetUnitSupportLevel(unit, i);
ApplyAffinitySupportBonuses(bonuses, unit->pCharacterData->affinity, level2);
}
if (level1 != 0 && level2 != 0)
result += 1 << (count - 1);
}
if (specialSupport) {
bonuses->bonusAttack /= 2;
bonuses->bonusDefense /= 2;
bonuses->bonusHit /= 2;
bonuses->bonusAvoid /= 2;
bonuses->bonusCrit /= 2;
bonuses->bonusDodge /= 2;
} else {
bonuses->bonusAttack /= 2;
bonuses->bonusDefense /= 2;
bonuses->bonusHit /= 2;
bonuses->bonusAvoid /= 2;
bonuses->bonusCrit /= 2;
bonuses->bonusDodge /= 2;
}
return result;
}
Here’s the Darbus to the hack, and this post will be linked to the OP as always.






