A maximum unit check has been added to the process of making an enemy or NPC an ally; if there are 48 units in the party and you try to add more, they will now become an NPC.

In the original, if you tried to add someone when there were 48 units, the game would freeze. This change is to allocate the process to avoid freezing in that case.
This workaround does not make sense in the current playing environment. It was included because it is unacceptable for the game to freeze when the number of allies exceeds the limit due to an assumption error or other reason. Currently, the number of allies will stay within 48 under all circumstances.
Originally, the check was only based on whether the unit ID was stored in the 48th unit's memory area, but depending on the situation, there could be an empty slot anywhere from the 2nd to the 47th, so I changed the check to see if there was an empty slot for all 48 slots.