Page 1 of 1
Quantum Chests(chest that shares its content through worlds)
Posted: Sun Jul 31, 2016 6:55 pm
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.
Re: Quantum Chests(chest that shares its content through worlds)
Posted: Sun Jul 31, 2016 8:38 pm
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)?
Re: Quantum Chests(chest that shares its content through worlds)
Posted: Mon Aug 01, 2016 12:11 am
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
Re: Quantum Chests(chest that shares its content through worlds)
Posted: Mon Aug 01, 2016 2:39 am
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
Re: Quantum Chests(chest that shares its content through worlds)
Posted: Tue Aug 02, 2016 4:21 pm
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...
Re: Quantum Chests(chest that shares its content through worlds)
Posted: Tue Aug 02, 2016 10:45 pm
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.
Re: Quantum Chests(chest that shares its content through worlds)
Posted: Sat Aug 06, 2016 6:10 pm
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
Re: Quantum Chests(chest that shares its content through worlds)
Posted: Wed Aug 17, 2016 3:55 pm
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.
Re: Quantum Chests(chest that shares its content through worlds)
Posted: Wed Aug 17, 2016 6:58 pm
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
Re: Quantum Chests(chest that shares its content through worlds)
Posted: Thu Aug 18, 2016 12:46 pm
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.
Re: Quantum Chests(chest that shares its content through worlds)
Posted: Wed Aug 31, 2016 4:49 am
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.
Re: Quantum Chests(chest that shares its content through worlds)
Posted: Wed Aug 31, 2016 5:03 am
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
Re: Quantum Chests(chest that shares its content through worlds)
Posted: Wed Aug 31, 2016 12:53 pm
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.
Re: Quantum Chests(chest that shares its content through worlds)
Posted: Wed Aug 31, 2016 7:17 pm
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?
Re: Quantum Chests(chest that shares its content through worlds)
Posted: Wed Aug 31, 2016 8:33 pm
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.
Re: Quantum Chests(chest that shares its content through worlds)
Posted: Sun Sep 18, 2016 8:02 pm
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.
Re: Quantum Chests(chest that shares its content through worlds)
Posted: Mon Sep 19, 2016 4:20 pm
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.
Re: Quantum Chests(chest that shares its content through worlds)
Posted: Tue Sep 27, 2016 11:12 am
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.