@Ponder (Tony) replied to one of my questions that the Load/Save system in game is part of the Core in C++ and therefore not modable. see Here
Although this Lua algorithm is interesting it might not be useful in Stonehearth.