Changing a unit's affinity

Is it possible to change a unit’s affinity? For example, via an event or promotion? I don’t have enough unit slots for the amount of variation I need, so I wanted to see if it was possible, and if so how would I go about doing it.

Thanks.

Affinity is in ROM, not RAM, so it’s not something that can change during gameplay in vanilla. You would have to write code to make it either be read from RAM like stats such as strength and speed, or to make it read from a different list that can also have specifications. The former is less advisable since unit RAM is usually more valuable, but the latter would use data in ROM and also has some similar patches already created such as the “change portrait” ones which you could use as reference.

2 Likes

If you absolutely must do it, make a copy of the unit in the character editor and use the SetUnitStatus patch to change the unit into a different unit.

Here’s a pic @Shuusuke made of doing that

If you’re not doing it for many characters and you have the slots below 0x46 available, then this is the easiest way.

1 Like

Yes, I had thought about doing that. Unit slots would be tight, but I think I could manage. The problem would be transferring any supports the unit had.

Any ideas about how I could do that?

Maybe the take over unit patch…? I don’t know, sorry.

There are patches that let you check and set support level. It would be tedious to event, but you could check the support levels of the old unit and set them to be the same on the new unit.