Quantum Chests(chest that shares its content through worlds)

This is the place to request new mods or give ideas about what could be done.
Overene
Fast Inserter
Fast Inserter
Posts: 130
Joined: Wed Mar 09, 2016 11:20 pm
Contact:

Quantum Chests(chest that shares its content through worlds)

Post by Overene »

It would be really cool if there were a mod that added chests that can share there inventories between worlds and/or servers. Not much else to say about it really.
User avatar
Versepelles
Long Handed Inserter
Long Handed Inserter
Posts: 70
Joined: Sat May 28, 2016 1:42 pm
Contact:

Re: Quantum Chests(chest that shares its content through worlds)

Post by Versepelles »

Overene wrote:It would be really cool if there were a mod that added chests that can share there inventories between worlds and/or servers. Not much else to say about it really.
Like, between save games or within a single save game (like the minecraft enderchest)?
Overene
Fast Inserter
Fast Inserter
Posts: 130
Joined: Wed Mar 09, 2016 11:20 pm
Contact:

Re: Quantum Chests(chest that shares its content through worlds)

Post by Overene »

Versepelles wrote:
Overene wrote:It would be really cool if there were a mod that added chests that can share there inventories between worlds and/or servers. Not much else to say about it really.
Like, between save games or within a single save game (like the minecraft enderchest)?
Between saves
User avatar
Versepelles
Long Handed Inserter
Long Handed Inserter
Posts: 70
Joined: Sat May 28, 2016 1:42 pm
Contact:

Re: Quantum Chests(chest that shares its content through worlds)

Post by Versepelles »

Overene wrote:
Versepelles wrote:
Overene wrote:It would be really cool if there were a mod that added chests that can share there inventories between worlds and/or servers. Not much else to say about it really.
Like, between save games or within a single save game (like the minecraft enderchest)?
Between saves
Unfortunately, this is not possible at the moment (I tried). See this post: viewtopic.php?f=28&t=30285
User avatar
binbinhfr
Smart Inserter
Smart Inserter
Posts: 1524
Joined: Sat Feb 27, 2016 7:37 pm
Contact:

Re: Quantum Chests(chest that shares its content through worlds)

Post by binbinhfr »

I already thought about this one, but the major problem that I see is this one :
as you cannot run 2 save at the same time, the solution is much more some kind of a "postmail".
You put something in a mailbox in world1, you click SEND, it disappears and it will appear in a receiving chest next time you open the save of world2.
I imagined a technical way to do it, like the way blueprint strings work (it is a way to exchange data between saves).
BUT there is an easy way to cheat that I cannot avoid: once you received the posting in world2, you can save world2, exit, and load a previous save of world1, where you did not send anything yet to world2... So if will be a free posting. And I cannot imagine a way to avoid this behaviour...
My mods on the Factorio Mod Portal :geek:
Overene
Fast Inserter
Fast Inserter
Posts: 130
Joined: Wed Mar 09, 2016 11:20 pm
Contact:

Re: Quantum Chests(chest that shares its content through worlds)

Post by Overene »

binbinhfr wrote:I already thought about this one, but the major problem that I see is this one :
as you cannot run 2 save at the same time, the solution is much more some kind of a "postmail".
You put something in a mailbox in world1, you click SEND, it disappears and it will appear in a receiving chest next time you open the save of world2.
I imagined a technical way to do it, like the way blueprint strings work (it is a way to exchange data between saves).
BUT there is an easy way to cheat that I cannot avoid: once you received the posting in world2, you can save world2, exit, and load a previous save of world1, where you did not send anything yet to world2... So if will be a free posting. And I cannot imagine a way to avoid this behaviour...
True. I had a similar thought which kind of made me realize that it would be impossible to implement something like this without a way to abuse it.
User avatar
sporefreak
Fast Inserter
Fast Inserter
Posts: 183
Joined: Sun Apr 17, 2016 12:55 am
Contact:

Re: Quantum Chests(chest that shares its content through worlds)

Post by sporefreak »

binbinhfr wrote:I already thought about this one, but the major problem that I see is this one :
as you cannot run 2 save at the same time, the solution is much more some kind of a "postmail".
You put something in a mailbox in world1, you click SEND, it disappears and it will appear in a receiving chest next time you open the save of world2.
I imagined a technical way to do it, like the way blueprint strings work (it is a way to exchange data between saves).
BUT there is an easy way to cheat that I cannot avoid: once you received the posting in world2, you can save world2, exit, and load a previous save of world1, where you did not send anything yet to world2... So if will be a free posting. And I cannot imagine a way to avoid this behaviour...
I feel like that if people are going to go through the trouble of doing this they would just use the console...
Chests between saves seems like a bad idea imo
Danielv123
Inserter
Inserter
Posts: 48
Joined: Sun Jan 03, 2016 10:28 am
Contact:

Re: Quantum Chests(chest that shares its content through worlds)

Post by Danielv123 »

Fulfilling this request has been my dream since I hit 30 ups, and once 0.12 launched I knew it could be done!

I have finally gotten around to it with some usable results. Currently, it only works for dedicated servers on windows that has nodejs installed. As it does not yet have a config file, there is quite a lot of manual setup work that has to be done, but I am working on creating a proper config.

https://github.com/Danielv123/factorioClusterio

Essentially, its a chest. Place items in it, and they get stored on a webserver.
Requesting items in the requester chest I add will fetch items from that webserver and deposit them in the requesterchest. If the master server does not exist, you currently loose your items, so be careful.

From the clients, this requires nothing more than installing the mod. For the factorio server, it also needs to run nodejs with client.js.

The master server that keeps track of items needs nodejs.
Overene
Fast Inserter
Fast Inserter
Posts: 130
Joined: Wed Mar 09, 2016 11:20 pm
Contact:

Re: Quantum Chests(chest that shares its content through worlds)

Post by Overene »

Danielv123 wrote:Fulfilling this request has been my dream since I hit 30 ups, and once 0.12 launched I knew it could be done!

I have finally gotten around to it with some usable results. Currently, it only works for dedicated servers on windows that has nodejs installed. As it does not yet have a config file, there is quite a lot of manual setup work that has to be done, but I am working on creating a proper config.

https://github.com/Danielv123/factorioClusterio

Essentially, its a chest. Place items in it, and they get stored on a webserver.
Requesting items in the requester chest I add will fetch items from that webserver and deposit them in the requesterchest. If the master server does not exist, you currently loose your items, so be careful.

From the clients, this requires nothing more than installing the mod. For the factorio server, it also needs to run nodejs with client.js.

The master server that keeps track of items needs nodejs.
Interesting. I'll give it a try
Danielv123
Inserter
Inserter
Posts: 48
Joined: Sun Jan 03, 2016 10:28 am
Contact:

Re: Quantum Chests(chest that shares its content through worlds)

Post by Danielv123 »

Overene wrote: Interesting. I'll give it a try
Make sure to file a issue or something if problems appear. The setup right now is very confusing, but Im working on a config file.
Overene
Fast Inserter
Fast Inserter
Posts: 130
Joined: Wed Mar 09, 2016 11:20 pm
Contact:

Re: Quantum Chests(chest that shares its content through worlds)

Post by Overene »

Danielv123 wrote:
Overene wrote: Interesting. I'll give it a try
Make sure to file a issue or something if problems appear. The setup right now is very confusing, but Im working on a config file.
Does it work offline, then? Since you mentioned it requiring a master server.
Overene
Fast Inserter
Fast Inserter
Posts: 130
Joined: Wed Mar 09, 2016 11:20 pm
Contact:

Re: Quantum Chests(chest that shares its content through worlds)

Post by Overene »

Danielv123 wrote:
Overene wrote: Interesting. I'll give it a try
Make sure to file a issue or something if problems appear. The setup right now is very confusing, but Im working on a config file.
For me, the item disappears when I put it into a "put" chest and doesnt appear anywhere else
Danielv123
Inserter
Inserter
Posts: 48
Joined: Sun Jan 03, 2016 10:28 am
Contact:

Re: Quantum Chests(chest that shares its content through worlds)

Post by Danielv123 »

Overene wrote:
Danielv123 wrote:
Overene wrote: Interesting. I'll give it a try
Make sure to file a issue or something if problems appear. The setup right now is very confusing, but Im working on a config file.
For me, the item disappears when I put it into a "put" chest and doesnt appear anywhere else
Well, the master server has to be run by you as well. Where you run it doesn't matter, local is just fine. Currently the mod is still broken, basic item transfers are working buggily in the master branch but it desyncs if you disconnect and reconnect without restarting the server.

Im working on it, it might be done sometime. I really need someone who knows JS better than me.

If you still want to get it set up to do some testing or whatever, try find me on #factorio espernet IRC.
Overene
Fast Inserter
Fast Inserter
Posts: 130
Joined: Wed Mar 09, 2016 11:20 pm
Contact:

Re: Quantum Chests(chest that shares its content through worlds)

Post by Overene »

Danielv123 wrote:
Overene wrote:
Danielv123 wrote:
Overene wrote: Interesting. I'll give it a try
Make sure to file a issue or something if problems appear. The setup right now is very confusing, but Im working on a config file.
For me, the item disappears when I put it into a "put" chest and doesnt appear anywhere else
Well, the master server has to be run by you as well. Where you run it doesn't matter, local is just fine. Currently the mod is still broken, basic item transfers are working buggily in the master branch but it desyncs if you disconnect and reconnect without restarting the server.

Im working on it, it might be done sometime. I really need someone who knows JS better than me.

If you still want to get it set up to do some testing or whatever, try find me on #factorio espernet IRC.
wait so how do i run the master server then?
Danielv123
Inserter
Inserter
Posts: 48
Joined: Sun Jan 03, 2016 10:28 am
Contact:

Re: Quantum Chests(chest that shares its content through worlds)

Post by Danielv123 »

Overene wrote: wait so how do i run the master server then?
Make sure you have nodejs installed. Then run
node master.js

Each instance of the dedicated server also needs to have its own client.js running as an interface between factorio and master. Make sure you install the mod and configure everything in config.json right.
If you have any questions, use /msg Danielv123 on #factorio.
lux
Inserter
Inserter
Posts: 25
Joined: Fri Nov 07, 2014 7:40 pm
Contact:

Re: Quantum Chests(chest that shares its content through worlds)

Post by lux »

Danielv123 wrote:I have finally gotten around to it with some usable results. Currently, it only works for dedicated servers on windows that has nodejs installed. As it does not yet have a config file, there is quite a lot of manual setup work that has to be done, but I am working on creating a proper config.

https://github.com/Danielv123/factorioClusterio
This is very cool, but I am wondering if it could be generalized. Do you know if rcon commands can be executed on any dedicated server? The scenario I am thinking of is a centralized API server, which acts as a persistence layer, so the host does not need to install node.
Danielv123
Inserter
Inserter
Posts: 48
Joined: Sun Jan 03, 2016 10:28 am
Contact:

Re: Quantum Chests(chest that shares its content through worlds)

Post by Danielv123 »

lux wrote:
Danielv123 wrote:I have finally gotten around to it with some usable results. Currently, it only works for dedicated servers on windows that has nodejs installed. As it does not yet have a config file, there is quite a lot of manual setup work that has to be done, but I am working on creating a proper config.

https://github.com/Danielv123/factorioClusterio
The scenario I am thinking of is a centralized API server, which acts as a persistence layer, so the host does not need to install node.
Well, no, it cannot work that way :(

You could create a package that bundled node into an executable, but you would still need to edit the files in script-output so something has to run on the factorio servers.
Danielv123
Inserter
Inserter
Posts: 48
Joined: Sun Jan 03, 2016 10:28 am
Contact:

Re: Quantum Chests(chest that shares its content through worlds)

Post by Danielv123 »

Update to the whole situation: ITS DONE! https://github.com/Danielv123/factorioClusterio master branch should include everything thats needed. It also opens a webserver on :8080 on the master server that gives you an inventory of the chests. Planned for the future is also a live production graph of everything added to the chests and who added/took how much.
Post Reply

Return to “Ideas and Requests For Mods”