In data.lua
local my_data = {}
for _, class in pairs(data.raw) do
for _, prototype in pairs(class) do
my_data[prototype.type .. "aaa" .. prototype.name] = prototype.name
end
end
data:extend({"mymod-data", serpent.dump(my_data)})
In control.lua
ok, global.data = serpent.load(bigunpack("mymod-data"))
log(serpent.block(global.data))
I haven't tried the above piece of code in a standalone mod, but that is where I have isolated the issue to. Also, the table I saved is slightly different, but is essentially something for each prototype like above. I can try this in a standalone mod once I get the time, but wanted to make sure I gave you a timely response. The log then looks like this...
131.866 Script @__propertyrandomizer__/informatron.lua:10: "[string \"rticle-small\"]={num_steps=0,num_good_steps=0}...\"]:1: syntax error near '-'"
Notice how the "rticle" is cut off (it should be particle). I've done some other testing and the string is indeed cut off when manually inspected, so none of the earlier prototypes appear.