[MOD 0.12.x] Equalizer chests v1.4.0

Topics and discussion about specific mods
Rseding91
Factorio Staff
Factorio Staff
Posts: 14332
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [MOD 0.12.x] Equalizer chests v1.1.3

Post by Rseding91 »

The issue with the desyncs is related to the "local ticks = 59" in the mod control.lua. The ticks variable is not saved in the global state so it's not saved and every time someone else joins they start over with it at 59 while all existing players have what ever values they had before.

It's a simple fix - remove "local ticks = 59" from the control.lua file and replace function ticker() with this:

Code: Select all

function ticker()
	if global.eqChests ~= nil then
		if global.ticks == nil or global.ticks == 0 then
			global.ticks = 59
			processEqChests()
		else
			global.ticks = global.ticks - 1
		end
	else
		script.on_event(defines.events.on_tick, nil)
	end
end
If you want to get ahold of me I'm almost always on Discord.
Boogieman14
Filter Inserter
Filter Inserter
Posts: 778
Joined: Sun Sep 07, 2014 12:59 pm
Contact:

Re: [MOD 0.12.x] Equalizer chests v1.1.4

Post by Boogieman14 »

Thanks for that bit of code, Rseding :) I've updated the release version in the first post with it. Only tested very briefly in single player (as in: it loads, I can place chests and the contents move around), not tested at all in MP - make a backup of your save, if you care about it ;)

apriori wrote:I'd also like to ask modder a question: is it possible to make common inventory for several containers? Or each container can only have it's own inventory? Or may be it's possible to store items in global.myMod.customInvs[] for entities from global.myMod.myEnts[]? I'd like to make mod, where neighboring chests have common inventory to provide my smelters with ore - it's the fastest way of using upgraded inserters (5 items per time instead of 1, when interacting with belts).
Right now I'm not playing Factorio, so I also won't be developing any new mods or features. You might want to post your idea in the Mod requests forum, maybe someone will pick it up :)
I don't have OCD, I have CDO. It's the same, but with the letters in the correct order.
roy7
Filter Inserter
Filter Inserter
Posts: 341
Joined: Fri Dec 12, 2014 4:24 pm
Contact:

Re: [MOD 0.12.x] Equalizer chests v1.1.3

Post by roy7 »

Rseding91 wrote:The issue with the desyncs is related to the "local ticks = 59" in the mod control.lua. The ticks variable is not saved in the global state so it's not saved and every time someone else joins they start over with it at 59 while all existing players have what ever values they had before.

It's a simple fix - remove "local ticks = 59" from the control.lua file and replace function ticker() with this:
Thank you Rseding91! I admit I was hoping when I posted my original issue you might one day chime in with a fix, but I didn't want to bug you about it. ;)
Xiomax
Burner Inserter
Burner Inserter
Posts: 11
Joined: Mon Mar 28, 2016 5:16 pm
Contact:

Re: [MOD 0.12.x] Equalizer chests v1.1.4

Post by Xiomax »

Unofficial mod fix for 12.11+
Equalizer_Chests_1.1.1.zip
(17.41 KiB) Downloaded 227 times
Boogieman14
Filter Inserter
Filter Inserter
Posts: 778
Joined: Sun Sep 07, 2014 12:59 pm
Contact:

Re: [MOD 0.12.x] Equalizer chests v1.1.4

Post by Boogieman14 »

Xiomax wrote:Unofficial mod fix for 12.11+
Equalizer_Chests_1.1.1.zip
What needed fixing exactly? And why did you base it off a rather old version? :)
I don't have OCD, I have CDO. It's the same, but with the letters in the correct order.
Rseding91
Factorio Staff
Factorio Staff
Posts: 14332
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [MOD 0.12.x] Equalizer chests v1.1.4

Post by Rseding91 »

Boogieman14 wrote:... What needed fixing exactly? And why did you base it off a rather old version? :)
Most likely what I have had a happen more frequently: people download older versions off the downloads section. I just removed all but the most recent version and those types of posts stopped :)
If you want to get ahold of me I'm almost always on Discord.
Boogieman14
Filter Inserter
Filter Inserter
Posts: 778
Joined: Sun Sep 07, 2014 12:59 pm
Contact:

Re: [MOD 0.12.x] Equalizer chests v1.1.4

Post by Boogieman14 »

Rseding91 wrote:
Boogieman14 wrote:... What needed fixing exactly? And why did you base it off a rather old version? :)
Most likely what I have had a happen more frequently: people download older versions off the downloads section. I just removed all but the most recent version and those types of posts stopped :)
I guess that could be possible, although the particular version he based his fix on hasn't been available for download for a while :) In any case, I've hidden the older versions behind a spoiler tag at least, just to avoid confusion :)
I don't have OCD, I have CDO. It's the same, but with the letters in the correct order.
sasaa_86
Manual Inserter
Manual Inserter
Posts: 4
Joined: Mon Apr 11, 2016 3:28 pm
Contact:

Re: [Mod 0.11.x] Equalizer chests v1.0.0

Post by sasaa_86 »

TheSAguy wrote:Hey Boogieman14,

I thought of an upgrade to your chests. Quantum Chests!
They will work like underground belts. You build them in pairs and they stay connected, but can span a distance underground. The distance can be increased by upgrading, like underground belts.

enderchest! *ahum Minecraft logics :P
would love the idea tho. if we can link them 2max?
User avatar
sumdawgy
Inserter
Inserter
Posts: 43
Joined: Wed May 11, 2016 1:01 am
Contact:

Re: [Mod 0.11.x] Equalizer chests v1.0.0

Post by sumdawgy »

sasaa_86 wrote:
TheSAguy wrote:Hey Boogieman14,

I thought of an upgrade to your chests. Quantum Chests!
They will work like underground belts. You build them in pairs and they stay connected, but can span a distance underground. The distance can be increased by upgrading, like underground belts.

enderchest! *ahum Minecraft logics :P
would love the idea tho. if we can link them 2max?
hmmm.
"pnuematic transport" exists as a mod based on that idea including research for distance.
---Although, i have it. I haven't yet used it.
User avatar
sumdawgy
Inserter
Inserter
Posts: 43
Joined: Wed May 11, 2016 1:01 am
Contact:

Re: [MOD 0.12.x] Equalizer chests v1.1.4

Post by sumdawgy »

Boogieman14 wrote:Thanks for that bit of code, Rseding :) I've updated the release version in the first post with it. Only tested very briefly in single player (as in: it loads, I can place chests and the contents move around), not tested at all in MP - make a backup of your save, if you care about it ;)

Right now I'm not playing Factorio, so I also won't be developing any new mods or features. You might want to post your idea in the Mod requests forum, maybe someone will pick it up :)

aww...
I was hoping you might consider a "master node" upgrade.
When they run low, the master in the group would be the last one to go zero.
I figure placing the master runs a check fora competing unit..~There an only be one~
Boogieman14
Filter Inserter
Filter Inserter
Posts: 778
Joined: Sun Sep 07, 2014 12:59 pm
Contact:

Re: [MOD 0.12.x] Equalizer chests v1.1.4

Post by Boogieman14 »

sumdawgy wrote:
Boogieman14 wrote:Thanks for that bit of code, Rseding :) I've updated the release version in the first post with it. Only tested very briefly in single player (as in: it loads, I can place chests and the contents move around), not tested at all in MP - make a backup of your save, if you care about it ;)

Right now I'm not playing Factorio, so I also won't be developing any new mods or features. You might want to post your idea in the Mod requests forum, maybe someone will pick it up :)

aww...
I was hoping you might consider a "master node" upgrade.
When they run low, the master in the group would be the last one to go zero.
I figure placing the master runs a check fora competing unit..~There an only be one~
That would be a rather significant departure from the current concept. Right now there is no such thing as a group of chests. Each chest only knows about its direct neighbours and it will balance its contents with those neighbours. Again, post your idea in the mod requests forum and maybe someone will pick it up :)
I don't have OCD, I have CDO. It's the same, but with the letters in the correct order.
User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2920
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: [MOD 0.12.x] Equalizer chests v1.1.4

Post by Optera »

Quick unofficial 0.13 fix
Tested only in SP.
Attachments
Equalizer_Chests_1.1.4.zip
Equalizer Chests 1.1.4 fix for 0.13
(17.58 KiB) Downloaded 144 times
Boogieman14
Filter Inserter
Filter Inserter
Posts: 778
Joined: Sun Sep 07, 2014 12:59 pm
Contact:

Re: [MOD 0.12.x] Equalizer chests v1.1.4

Post by Boogieman14 »

Thanks, I already have an "official" fix, but while testing I discovered the chests won't allow circuit connections, so that stopped me from releasing it. I'll probably upload my official version to mod portal somewhere this weekend and look into those circuit connections later.
I don't have OCD, I have CDO. It's the same, but with the letters in the correct order.
User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2920
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: [MOD 0.12.x] Equalizer chests v1.1.4

Post by Optera »

Boogieman14 wrote:Thanks, I already have an "official" fix, but while testing I discovered the chests won't allow circuit connections, so that stopped me from releasing it. I'll probably upload my official version to mod portal somewhere this weekend and look into those circuit connections later.
Looking forward to it.
Getting circuit hooked up would be a nice bonus. Perhaps I'll try making logic network controlled trains now.
Boogieman14
Filter Inserter
Filter Inserter
Posts: 778
Joined: Sun Sep 07, 2014 12:59 pm
Contact:

Re: [MOD 0.12.x] Equalizer chests v1.1.4

Post by Boogieman14 »

I just uploaded version 1.2.0 for Factorio 0.13 to the mod portal. This thread can probably remain for the Factorio 0.12 versions of the mod.
I don't have OCD, I have CDO. It's the same, but with the letters in the correct order.
User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2920
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: [MOD 0.12.x] Equalizer chests v1.1.4

Post by Optera »

Here's a version I made for myself. Since those features where asked for on the mod portal.
- added circuit network
- reduced difference threshold for balancing, long rows at train stations balance a bit better
Attachments
Equalizer_Chests_1.2.1.zip
0.13 Version with working circuit network
(17.75 KiB) Downloaded 154 times
Boogieman14
Filter Inserter
Filter Inserter
Posts: 778
Joined: Sun Sep 07, 2014 12:59 pm
Contact:

Re: [MOD 0.12.x] Equalizer chests v1.1.4

Post by Boogieman14 »

Thanks, life's been keeping my busy lately, so I just didn't get around to it. I've adopted your changes, but made a tiny modification still: the move threshold is now a configurable variable at the top of control.lua. Default is 10, but it can be lowered by editing control.lua. No idea what it does with CPU usage, so use at your own risk :) New version will be on mod portal in a few minutes (or well.. as soon as I can access the thing, i guess :roll: ).
I don't have OCD, I have CDO. It's the same, but with the letters in the correct order.
User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2920
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: [MOD 0.12.x] Equalizer chests v1.1.4

Post by Optera »

As far as I've seen it has no influence on performance since it does the loop regardless every 60 ticks.
All I noticed was an Error if you use a Diff of 0 or 1. It has to be at least 2 for your current logic, making the minimal achievable difference between first and last chest in a row (#chests * 2)
Aes Sedai
Burner Inserter
Burner Inserter
Posts: 16
Joined: Fri Jan 08, 2016 12:37 am
Contact:

Re: [MOD 0.12.x] Equalizer chests v1.1.4

Post by Aes Sedai »

It seems that this mod has been causing desyncs on MP, Factorio 0.13.15 and Equalizer Chests v1.2.1. I haven't been able to reproduce the desync with any regularity, it seems that it is at random more or less. Sometimes, it will cause a desync cycle and it will just continue to desync over and over. If I can nail down a specific case that causes the desyncs, I'll provide a save. The desync log isn't much help, just says this:

Code: Select all

50.133 Error NetworkInputHandler.cpp:375: Multiplayer desynchronisation: crc test(CheckCRCHeuristic) failed for mapTick(5613721) peer(3) testCrc(58789044) testCrcPeerID(0) currentCrc(-1176465255)
50.133 Info NetworkInputHandler.cpp:442: Desync specification: Reference CRC = 58789044, reference peers = {0 (magister94), 2 (Blacksmoke16)}, desynced group = {CRC = 3118502041, peers = {3 (Aes_Sedai)}}
bjatta
Manual Inserter
Manual Inserter
Posts: 1
Joined: Sat Oct 15, 2016 5:33 pm
Contact:

Re: [MOD 0.12.x] Equalizer chests v1.1.4

Post by bjatta »

RU whant add to UR chest mod BUFFER
3x1 size
3 tech level (or more) for work directly with belts as a buffer with 2x more spedd than belt speed at input and same as belt speed for output.
Buffer Can excheange with neares when made from UR chest, and not when made from native still chest.
Post Reply

Return to “Mods”