Quantum Chests(chest that shares its content through worlds)
Quantum Chests(chest that shares its content through worlds)
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.
- Versepelles
- Long Handed Inserter
- Posts: 70
- Joined: Sat May 28, 2016 1:42 pm
- Contact:
Re: Quantum Chests(chest that shares its content through worlds)
Like, between save games or within a single save game (like the minecraft enderchest)?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.
Author of:
Re: Quantum Chests(chest that shares its content through worlds)
Between savesVersepelles wrote:Like, between save games or within a single save game (like the minecraft enderchest)?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.
- Versepelles
- Long Handed Inserter
- Posts: 70
- Joined: Sat May 28, 2016 1:42 pm
- Contact:
Re: Quantum Chests(chest that shares its content through worlds)
Unfortunately, this is not possible at the moment (I tried). See this post: viewtopic.php?f=28&t=30285Overene wrote:Between savesVersepelles wrote:Like, between save games or within a single save game (like the minecraft enderchest)?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.
Author of:
Re: Quantum Chests(chest that shares its content through worlds)
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...
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
Re: Quantum Chests(chest that shares its content through worlds)
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.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...
- sporefreak
- Fast Inserter
- Posts: 183
- Joined: Sun Apr 17, 2016 12:55 am
- Contact:
Re: Quantum Chests(chest that shares its content through worlds)
I feel like that if people are going to go through the trouble of doing this they would just use the console...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...
Chests between saves seems like a bad idea imo
-
- Inserter
- Posts: 48
- Joined: Sun Jan 03, 2016 10:28 am
- Contact:
Re: Quantum Chests(chest that shares its content through worlds)
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.
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)
Interesting. I'll give it a tryDanielv123 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.
-
- Inserter
- Posts: 48
- Joined: Sun Jan 03, 2016 10:28 am
- Contact:
Re: Quantum Chests(chest that shares its content through worlds)
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 wrote: Interesting. I'll give it a try
Re: Quantum Chests(chest that shares its content through worlds)
Does it work offline, then? Since you mentioned it requiring a master server.Danielv123 wrote: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 wrote: Interesting. I'll give it a try
Re: Quantum Chests(chest that shares its content through worlds)
For me, the item disappears when I put it into a "put" chest and doesnt appear anywhere elseDanielv123 wrote: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 wrote: Interesting. I'll give it a try
-
- Inserter
- Posts: 48
- Joined: Sun Jan 03, 2016 10:28 am
- Contact:
Re: Quantum Chests(chest that shares its content through worlds)
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.Overene wrote:For me, the item disappears when I put it into a "put" chest and doesnt appear anywhere elseDanielv123 wrote: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 wrote: Interesting. I'll give it a try
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)
wait so how do i run the master server then?Danielv123 wrote: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.Overene wrote:For me, the item disappears when I put it into a "put" chest and doesnt appear anywhere elseDanielv123 wrote: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 wrote: Interesting. I'll give it a try
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.
-
- Inserter
- Posts: 48
- Joined: Sun Jan 03, 2016 10:28 am
- Contact:
Re: Quantum Chests(chest that shares its content through worlds)
Make sure you have nodejs installed. Then runOverene wrote: wait so how do i run the master server then?
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)
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 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
My Mods: Staff of Teleportation, Don't Touch My Stuff
-
- Inserter
- Posts: 48
- Joined: Sun Jan 03, 2016 10:28 am
- Contact:
Re: Quantum Chests(chest that shares its content through worlds)
Well, no, it cannot work that waylux wrote: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 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
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.
-
- Inserter
- Posts: 48
- Joined: Sun Jan 03, 2016 10:28 am
- Contact:
Re: Quantum Chests(chest that shares its content through worlds)
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.