Extracting data from Factorio
Posted: Wed Mar 01, 2017 11:01 pm
Hi there,
I haven't really used Lua before, nor have I modded any games so this may be a stupid question.
My goal here isn't to modify the game but to extract eg. production data from the game. I have already looked into mods which do that so getting the data part is not the question.
As I was looking into these mods and skimming through the API I discovered that I have the chance to write to files while the game is running so that's a way of persisting the data.
But I would like to be able to send the data to some other application through some kind of IPC (I would accept any kind of queue/message type of communication. But if it can be
accomplished on a higher level I would prefer TCP or maybe UDP or if it's possible HTTP but it doesn't matter that much).
In the end I would like to persist the data in a database and do some analytics on it but that's obviously not the topic of this post.
I already looked into luasocket but it seems like I can't use that. Though I don't really understand why or how should that work, so I may be missing something here.
Is something like this even possible or am I forced to use files to transfer my data to some other application?
Thanks for your answers in advance!
I haven't really used Lua before, nor have I modded any games so this may be a stupid question.
My goal here isn't to modify the game but to extract eg. production data from the game. I have already looked into mods which do that so getting the data part is not the question.
As I was looking into these mods and skimming through the API I discovered that I have the chance to write to files while the game is running so that's a way of persisting the data.
But I would like to be able to send the data to some other application through some kind of IPC (I would accept any kind of queue/message type of communication. But if it can be
accomplished on a higher level I would prefer TCP or maybe UDP or if it's possible HTTP but it doesn't matter that much).
In the end I would like to persist the data in a database and do some analytics on it but that's obviously not the topic of this post.
I already looked into luasocket but it seems like I can't use that. Though I don't really understand why or how should that work, so I may be missing something here.
Is something like this even possible or am I forced to use files to transfer my data to some other application?
Thanks for your answers in advance!