[1.7] Serialization runs into 65536 constant limit

Moderator: Moderator

Post Reply
Posts: 280
Joined: Fri Sep 07, 2012 1:34 am

[1.7] Serialization runs into 65536 constant limit

#1 Post by minmay »

Since entities are serialized as a single main function, an entity with enough unique primitive fields will result in a savefile with a function exceeding 65536 constants.
The fastest way to get this to happen in an actual game of Tales of Maj'Eyal is to know the Innovation talent, then put on and take off an amulet with Engineering mastery a few dozen times, dismissing the stack overflow error popup, but you can imagine plenty of ways this could happen without any other bugs involved, too.

This can be fixed by splitting large entities' files into multiple function() blocks (you don't need to use multiple files, just spreading the constants across multiple functions in a single file is enough).

Post Reply