Bishop, if you test it and it works, let us know here.
The gem system is indeed tied to the forge system, and uses the IsModMax function as well. So a breakthrough with this function will help in both cases. To apply this to both the forge system and the gem system is likely going to take more than just changing this function though. There are other things to consider as well - like the enchantment forge conversation will need to be modified (at least slightly) so it does something like not using this function until the very end when someone tries to apply a 4th enchantment, or else using a modified version of this function to allow the PC to pass a first check to get to the list of enchantments if there are 3 enchantments on an item, but then not apply a selected enchantment if a 4th is added. Or if a gem is used, which has no conversation tree and check, how does it determine if the item property from the gem would be an addition to, or an increase to, the enchantments already on the item.
So while this function is the root 'cause' of part of the current situation, don't get too hung up on just trying to fix it as other parts of this system need to change as well.
The gem system is indeed tied to the forge system, and uses the IsModMax function as well. So a breakthrough with this function will help in both cases. To apply this to both the forge system and the gem system is likely going to take more than just changing this function though. There are other things to consider as well - like the enchantment forge conversation will need to be modified (at least slightly) so it does something like not using this function until the very end when someone tries to apply a 4th enchantment, or else using a modified version of this function to allow the PC to pass a first check to get to the list of enchantments if there are 3 enchantments on an item, but then not apply a selected enchantment if a 4th is added. Or if a gem is used, which has no conversation tree and check, how does it determine if the item property from the gem would be an addition to, or an increase to, the enchantments already on the item.
So while this function is the root 'cause' of part of the current situation, don't get too hung up on just trying to fix it as other parts of this system need to change as well.