[0.17] Even Distribution

Topics and discussion about specific mods
321freddy
Fast Inserter
Fast Inserter
Posts: 125
Joined: Fri Sep 23, 2016 10:16 pm
Contact:

Re: [0.15] Even Distribution

Post by 321freddy »

Version 0.2.5
  • Fixed distribution to factorissimo 2 helper entities
    Added ignored entities mod setting
Rychlas
Manual Inserter
Manual Inserter
Posts: 3
Joined: Mon Jan 01, 2018 8:41 pm
Contact:

Re: [0.16] Even Distribution

Post by Rychlas »

First of all - great mod, I love it, thank you kindly for making it.

But I have a question:
Is it possible to distribute items in a way that only the amount what you are currently holding is being distributed instead of distributing every single resource you own of that type?

For example, I have 2k coal in my EQ, but I want to distribute only one stack between the ovens.

Does such feature already exist and I'm a dummy or is it not possible right now?
321freddy
Fast Inserter
Fast Inserter
Posts: 125
Joined: Fri Sep 23, 2016 10:16 pm
Contact:

Re: [0.16] Even Distribution

Post by 321freddy »

Rychlas wrote:First of all - great mod, I love it, thank you kindly for making it.

But I have a question:
Is it possible to distribute items in a way that only the amount what you are currently holding is being distributed instead of distributing every single resource you own of that type?

For example, I have 2k coal in my EQ, but I want to distribute only one stack between the ovens.

Does such feature already exist and I'm a dummy or is it not possible right now?
Thanks :)
If you put all but one stack in a wooden chest it would work already.

Other than that it's possible to implement but how? I already use CTRL+Left Click to distribute all items in the inventory and CTRL+Right Click to distrbute half of the items in the inv.
I'd rather add a setting to define a maximum amount of items a type of machine can recieve. For example: Fill all furnace to 10 coal and 20 ore and all turrets to 15 ammo.
This would apply to CTRL Click Drag and the Inventory Cleanup hotkey.
Rychlas
Manual Inserter
Manual Inserter
Posts: 3
Joined: Mon Jan 01, 2018 8:41 pm
Contact:

Re: [0.16] Even Distribution

Post by Rychlas »

321freddy wrote: If you put all but one stack in a wooden chest it would work already.
I'm already doing that, but it's annoying :D
321freddy wrote: Other than that it's possible to implement but how?
How about adding a toggle shortcut? That toggles between all items distribution and stack only?

EDIT:
The option you mentioned would also be useful. Maybe implement them both, and have one shortcut toggle between them, with advanced settings in "Per player" options?
321freddy
Fast Inserter
Fast Inserter
Posts: 125
Joined: Fri Sep 23, 2016 10:16 pm
Contact:

Re: [0.16] Even Distribution

Post by 321freddy »

Yeah I can do it when I find some spare time.
But this will require some more work since I already have like 10 different settings and it starts to become very messy. Maybe I'll add seperate config GUI with different profiles that can be switched between with a shortcut.
You can follow the progress on github.
Rychlas
Manual Inserter
Manual Inserter
Posts: 3
Joined: Mon Jan 01, 2018 8:41 pm
Contact:

Re: [0.16] Even Distribution

Post by Rychlas »

That'd be great bud. But of course, take your time, it's just a quality of life change, the mod already is awesome.
Cheers!
gendalf
Inserter
Inserter
Posts: 33
Joined: Thu Feb 25, 2016 8:59 pm
Contact:

Re: [0.17] Even Distribution

Post by gendalf »

Need to combine this with https://mods.factorio.com/mod/Fill4Me to have turrets with equal amount of ammo placed prefilled
dontdieych
Burner Inserter
Burner Inserter
Posts: 6
Joined: Tue Apr 17, 2018 3:01 pm
Contact:

Re: [0.17] Even Distribution

Post by dontdieych »

When I'm doing 'Shift + C', How can I ignore construction robot from distribution?

I wanna know exact syntax for mod setting(per player).
321freddy
Fast Inserter
Fast Inserter
Posts: 125
Joined: Fri Sep 23, 2016 10:16 pm
Contact:

Re: [0.17] Even Distribution

Post by 321freddy »

dontdieych wrote: Tue Mar 26, 2019 9:49 am When I'm doing 'Shift + C', How can I ignore construction robot from distribution?

I wanna know exact syntax for mod setting(per player).
It's currently only possible ignore entities(=buildings, not items) for distribution. You can prevent distribution to roboports by adding roboport to the ignored entities setting.

Do you have construction bots in your logistic requests or auto trash list? This is used to determine the amount of construction bots that will be distributed with SHIFT+C. You could remove the bots there or set the auto trash value really high to exclude them from distribution.
dontdieych
Burner Inserter
Burner Inserter
Posts: 6
Joined: Tue Apr 17, 2018 3:01 pm
Contact:

Re: [0.17] Even Distribution

Post by dontdieych »

321freddy wrote: Tue Mar 26, 2019 1:18 pm
dontdieych wrote: Tue Mar 26, 2019 9:49 am When I'm doing 'Shift + C', How can I ignore construction robot from distribution?

I wanna know exact syntax for mod setting(per player).
It's currently only possible ignore entities(=buildings, not items) for distribution. You can prevent distribution to roboports by adding roboport to the ignored entities setting.

Do you have construction bots in your logistic requests or auto trash list? This is used to determine the amount of construction bots that will be distributed with SHIFT+C. You could remove the bots there or set the auto trash value really high to exclude them from distribution.
OK, thx!
WkdPanda
Burner Inserter
Burner Inserter
Posts: 5
Joined: Sun Jan 07, 2018 1:54 pm
Contact:

Re: [0.17] Even Distribution

Post by WkdPanda »

Crashing 0.17.35 release alpha, version 0.3.6 installed from portal

https://imgur.com/a/8ZsqAqs
321freddy
Fast Inserter
Fast Inserter
Posts: 125
Joined: Fri Sep 23, 2016 10:16 pm
Contact:

Re: [0.17] Even Distribution

Post by 321freddy »

WkdPanda wrote: Thu May 02, 2019 8:33 pm Crashing 0.17.35 release alpha, version 0.3.6 installed from portal

https://imgur.com/a/8ZsqAqs
Thanks for the report :) It's now fixed in version 0.3.7
WkdPanda
Burner Inserter
Burner Inserter
Posts: 5
Joined: Sun Jan 07, 2018 1:54 pm
Contact:

Re: [0.17] Even Distribution

Post by WkdPanda »

Thanks for the quick turnaround! This is a great quality of life mod.
Nekothika
Manual Inserter
Manual Inserter
Posts: 1
Joined: Fri Oct 18, 2019 5:47 pm
Contact:

Re: [0.17] Even Distribution

Post by Nekothika »

Hello ...

Code: Select all

Le mod Even Distribution a engendré une erreur non récupérable.
Merci d'informer l'auteur de cette erreur.

Error while running event even-distribution::on_tick (ID 0)
real number expected got nil.
stack traceback:
	__even-distribution__/scripts/util.lua:42: in function 'getPlayerMainInventory'
	__even-distribution__/scripts/item-lib.lua:7: in function 'getPlayerItemCount'
	__even-distribution__/scripts/distribute.lua:35: in function 'distributeItems'
	__even-distribution__/scripts/distribute.lua:23: in function 'func'
	__even-distribution__/framework.lua:98: in function <__even-distribution__/framework.lua:97>
stack traceback:
	[C]: in function 'get_inventory'
	__even-distribution__/scripts/util.lua:42: in function 'getPlayerMainInventory'
	__even-distribution__/scripts/item-lib.lua:7: in function 'getPlayerItemCount'
	__even-distribution__/scripts/distribute.lua:35: in function 'distributeItems'
	__even-distribution__/scripts/distribute.lua:23: in function 'func'
	__even-distribution__/framework.lua:98: in function <__even-distribution__/framework.lua:97>
321freddy
Fast Inserter
Fast Inserter
Posts: 125
Joined: Fri Sep 23, 2016 10:16 pm
Contact:

Re: [0.17] Even Distribution

Post by 321freddy »

Nekothika wrote: Fri Oct 18, 2019 5:49 pm Hello ...

Code: Select all

Le mod Even Distribution a engendré une erreur non récupérable.
Merci d'informer l'auteur de cette erreur.

Error while running event even-distribution::on_tick (ID 0)
real number expected got nil.
stack traceback:
	__even-distribution__/scripts/util.lua:42: in function 'getPlayerMainInventory'
	__even-distribution__/scripts/item-lib.lua:7: in function 'getPlayerItemCount'
	__even-distribution__/scripts/distribute.lua:35: in function 'distributeItems'
	__even-distribution__/scripts/distribute.lua:23: in function 'func'
	__even-distribution__/framework.lua:98: in function <__even-distribution__/framework.lua:97>
stack traceback:
	[C]: in function 'get_inventory'
	__even-distribution__/scripts/util.lua:42: in function 'getPlayerMainInventory'
	__even-distribution__/scripts/item-lib.lua:7: in function 'getPlayerItemCount'
	__even-distribution__/scripts/distribute.lua:35: in function 'distributeItems'
	__even-distribution__/scripts/distribute.lua:23: in function 'func'
	__even-distribution__/framework.lua:98: in function <__even-distribution__/framework.lua:97>
Looks like you're using an old version. Please update to the newest version (0.3.13)
cappie
Inserter
Inserter
Posts: 30
Joined: Fri May 15, 2015 1:17 pm
Contact:

Re: [0.17] Even Distribution

Post by cappie »

Image

When starting 0.18.13...

EDIT: this is not meant to annoy you, just as a notification. I missed your message on the mod portal ( https://mods.factorio.com/mod/even-dist ... 000ef29cdc ) about you already seeing it. I'm sorry :)
User avatar
Omnifarious
Filter Inserter
Filter Inserter
Posts: 276
Joined: Wed Jul 26, 2017 3:24 pm
Contact:

Re: [0.17] Even Distribution

Post by Omnifarious »

There's a bug report on the mod portal for you 321freddy. 0.18.22 broke your mod by finally removing the "script-only" custom input flag for CustomInput prototypes. They deprecated that value for 'custom' sometime in the 0.15 series. :-/
GotLag
Filter Inserter
Filter Inserter
Posts: 532
Joined: Sat May 03, 2014 3:32 pm
Contact:

Re: [0.17] Even Distribution

Post by GotLag »

I've found a bug that results in the loss of items in "Balance out inventories" mode
Load the attached save game, and then immediately hold control and drag the held stack over the turrets, starting with the turret at top left (the only one with ammo).
To show the bug, you need to do this before the turret fires again a few seconds after loading.

What you should see is the following sequence of events:
1. As you drag over the turret, the amount in the cursor stack is reduced to 1
2. The amount distributed is thus the 49 in the turret plus the 1 in the cursor stack
3. The missing 145 magazines are gone forever, they do not appear in the player's ammo or inventory slots
even-distribution.jpg
even-distribution.jpg (206.69 KiB) Viewed 6476 times
This bug has proven very difficult to isolate and reproduce, and I think it's related to firing turrets having their inventory amounts change between distribution operations - I could not make this bug happen with turrets that weren't in combat. Note that it appears to be baked into the mod's state somehow, as it will happen every time on loading this save, until the turret fires again (and its inventory drops to 48).
Attachments
Even Distribution Bug.zip
(3.45 MiB) Downloaded 129 times
321freddy
Fast Inserter
Fast Inserter
Posts: 125
Joined: Fri Sep 23, 2016 10:16 pm
Contact:

Re: [0.17] Even Distribution

Post by 321freddy »

Fixed in the next version. Took me a while to find that one, but thanks for the save file, helped a lot :) .
Mortsy
Burner Inserter
Burner Inserter
Posts: 6
Joined: Wed Mar 01, 2017 9:11 pm
Contact:

Re: [0.17] Even Distribution

Post by Mortsy »

I think there is a bug with the option "Distribute items above the minimum request amount". It doesn't seem to work for me. I have to set the maximum request to 0 for shift-c to work.

Is this a known issue?
Post Reply

Return to “Mods”