Hi ,
i guess theres a way to create for example a "chest listener", are there any ways to create a udp socket from inside the mod?
I would like to implement a chest listener that broadcasts its inventory via udp..
I never used to code in Lua, im more familiar with Java. If my goal is not possible i would actually throw away my idea - would not involve much time into it.
Did someone tried to archive this or know if theres a udp interface?
Ive got some old dot matrix displays next to me. Wouldnt it be fun to use those to display production statistics?
With kind regards, gamecompiler
UDP packets on chest listener
-
- Manual Inserter
- Posts: 2
- Joined: Thu Jul 11, 2019 12:17 pm
UDP packets on chest listener
Perfectly synchronized.
Re: UDP packets on chest listener
check out the clusterio mod
-
- Manual Inserter
- Posts: 2
- Joined: Thu Jul 11, 2019 12:17 pm
Re: UDP packets on chest listener
Thank you very much for your answer
Its not really what i am searching for (but nice mod!). The mod writes its data to a file, a "back" - backend from outside the game - then parses the data and serves it.
That is one way to get it done. But it would be a way better if factorio it self will archive this.
If there is no other possibility i actually will do it like Clusterio. I am searching currently for ways to do it. It seems that UDP is not supported - but maybe i am missing something.
Maybe i am wrong, the read/write operation of the clusterio mod must/should be synchronized. Otherwise a race condition will happen. I am not sure if the os will secure this.
Its not really what i am searching for (but nice mod!). The mod writes its data to a file, a "back" - backend from outside the game - then parses the data and serves it.
That is one way to get it done. But it would be a way better if factorio it self will archive this.
If there is no other possibility i actually will do it like Clusterio. I am searching currently for ways to do it. It seems that UDP is not supported - but maybe i am missing something.
Maybe i am wrong, the read/write operation of the clusterio mod must/should be synchronized. Otherwise a race condition will happen. I am not sure if the os will secure this.
Perfectly synchronized.
- eradicator
- Smart Inserter
- Posts: 5206
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: UDP packets on chest listener
That is the *only* way to get it done. Mods are not allowed to read any data from the "outside world".
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
-
- Filter Inserter
- Posts: 587
- Joined: Sun Jun 09, 2019 10:40 pm
- Contact:
Re: UDP packets on chest listener
There is not, no. Your mental model is wildly far from the reality of the situation, I'm afraid. I can see how you came by it, but the way it works in practice is radically different from any sort of network interface inside the game.gamecompiler wrote: ↑Thu Jul 11, 2019 12:33 pmi guess theres a way to create for example a "chest listener", are there any ways to create a udp socket from inside the mod?
- BlueTemplar
- Smart Inserter
- Posts: 2420
- Joined: Fri Jun 08, 2018 2:16 pm
- Contact:
Re: UDP packets on chest listener
While probably limited to stay inside the game for now, this feels relevant to the discussion :
Feathernet: Autoconfigured Native and IPv6 Networking over Factorio Circuit Networks
Feathernet: Autoconfigured Native and IPv6 Networking over Factorio Circuit Networks
BobDiggity (mod-scenario-pack)
-
- Filter Inserter
- Posts: 587
- Joined: Sun Jun 09, 2019 10:40 pm
- Contact:
Re: UDP packets on chest listener
Nah, the author mentioned they implemented a (custom) ClusterIO server protocol wrapper to provide a GRE tunnel to their router, so Factorio was on the IPv6 Internet. ...or at least adjacent to it. Given support for publicly routable addresses, though....BlueTemplar wrote: ↑Fri Jul 12, 2019 3:05 pmWhile probably limited to stay inside the game for now, this feels relevant to the discussion :
Feathernet: Autoconfigured Native and IPv6 Networking over Factorio Circuit Networks