Beside the fact that I currently consider my job as being... well... awful... to select a mild word, I'm also struggling with the TBS engine.
I thought that I had found just the right way to do save games and the entity<->category relationship when I stumbled onto the underground templates that are used to generate the underground of a map. I don't want to store the entity parameters completely when making a savegame because that would prevent me from changing the template and having that changement affect the map accordingly.
So... I had to bite the sour apple and store a pointer to the template that is used to create an entity within the entity class and additionally give the template and the entity a function to access the name of the category in which they are stored.
On the other side, this allowed me to have inheritance between the templates. Means I can derive a template from another one.