Giter VIP home page Giter VIP logo

even-distribution's Introduction

even-distribution's People

Contributors

321freddy avatar astorin avatar ewanm89 avatar olinator990 avatar st-ddt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

even-distribution's Issues

Empty UI element in top-left corner

Factorio version: 1.1
Even Distribution version: 1.0.10

There's an empty UI element in the top-left corner of the game when the Even Distribution mod is enabled:

image

I've verified that this must be caused by Even Distribution by doing the following:

  • Disable Even Distribution. The empty element goes away
  • Disable all mods. The empty element goes away
  • Disable every mod except Even Distribution. The empty element returns

I tried changing all of the configuration options and wasn't able to get it to go away, so I'm assuming this is a bug and not a misconfiguration on my part. It seems to be a very old bug (>3 years) based on a few reddit posts I've found [1][2].

I don't know anything about Factorio mods but I am a software developer; if anyone has any ideas as to what's causing this and can point me in the right direction I'm more than happy to try fixing it myself and submitting a PR.

Error while running event even-distribution::on_player_fast_transferred (ID 129) LuaEntity doesn't contain key x.

Hi there!
Just thought I'd report this bug, unfortunately overwrote the save file for this one, but hopefully the stack trace helps! Cheers.

The mod Even Distribution (1.0.8) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event even-distribution::on_player_fast_transferred (ID 129)
LuaEntity doesn't contain key x.
stack traceback:
    [C]: in function '__index'
    __even-distribution__/scripts/helpers.lua:21: in function <__even-distribution__/scripts/helpers.lua:20>
    [C]: in function 'create_entity'
    __even-distribution__/scripts/visuals.lua:39: in function 'mark'
    __even-distribution__/scripts/drag.lua:237: in function 'onStackTransferred'
    __even-distribution__/scripts/drag.lua:208: in function 'func'
    __even-distribution__/framework.lua:99: in function <__even-distribution__/framework.lua:98>

[Request] Toggable option for showing debug information

I'm not sure which mod is causing the invalid entities that Even Distribution is finding, but could we get a mod setting option in either map or game which will let us decide whether or not we want to see these debug messages?

427520_20190321091320_1 (2)

Bug: Balancing items with durability resets durabiilty to full

Using Even Distribution to rebalance any item with a durability (ammo, repair packs, science packs) resets the durability of the items to full. Any such item to any inventory replicates the issue.

Replication:
Start game
Shoot some bullets
Distribute your pistol ammo across a chest
Pistol ammo in chest is full again

Small improvement

I am playing Angel Bob game with tech & component overhaul. I really enjoy mode when all non-placeable items (including fuel) are automatically distributed to machines. Angels componens are not known to mod. I had to modify code on my local copy in the following way

function setup.generateTrashItemList()
local items = {}

for name,item in pairs(game.item_prototypes) do
	if not (item.place_result or item.place_as_equipment_result or item.has_flag("hidden")) then -- or item.place_as_tile_result
		local default = defaultTrash[name] or defaultTrash[item.subgroup.name] or defaultTrash[item.group.name]
		
		if default and default ~= "ignore" then
			if item.fuel_category and not defaultTrash[name] then -- fuels default to 2 stacks as desired amount
				items[name] = 2 * item.stack_size
			else
				items[name] = default
			end
		end
		**_items[name] = 0_**
	end
end	
return items

end

This works for both components and fuel.

Would it be possible to add this as option?

Fuel limit in UI seems to be not respected for coal - if I turn on option "use fuel limits" and set fuel limit it zero, coal still not fully distributed, probably because of default 400 limit set in code. So I have turn off option "use fuel limits" and rely on above code modification.

Crash during inventory cleanup

6405.569 Error MainLoop.cpp:1013: Exception at tick 4712546: Error while running event even-distribution::inventory-cleanup (ID 106)
LuaBurner doesn't contain key fuel_category.
stack traceback:
	__even-distribution__/scripts/cleanup.lua:41: in function 'filterEntities'
	__even-distribution__/scripts/cleanup.lua:25: in function 'func'
	__even-distribution__/control.lua:26: in function <__even-distribution__/control.lua:25>

Crash when inputing rocket fuel on silo

The game is crashing when I try to insert, using this mod, rocket fuel into silos (try to insert in 1 or 2 silos).

819.009 Error MainLoop.cpp:1284: Exception at tick 101226964: The mod Even Distribution (1.0.10) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event even-distribution::on_tick (ID 0)
LuaInventory API call when LuaInventory was invalid.
stack traceback:
[C]: in function 'index'
__even-distribution/scripts/helpers/LuaControl.lua:94: in function 'insert'
even-distribution/scripts/helpers/LuaControl.lua:232: in function 'customInsert'
even-distribution/scripts/drag.lua:54: in function 'func'
even-distribution/scripts/util.lua:116: in function 'distribute'
even-distribution/scripts/drag.lua:43: in function 'distributeItems'
even-distribution/scripts/drag.lua:19: in function 'func'
even-distribution/framework.lua:99: in function <even-distribution/framework.lua:98>

Thanks

Error loading mod into world saved with 1.0.1

this error started happening after upgrading to 1.0.2 of the mod, trying to load an save with mod version 1.0.1
and also happens when trying to start a new world

error:

The mod Even Distribution (1.0.2) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event even-distribution::on_configuration_changed
__even-distribution__/scripts/helpers.lua:21: attempt to index a nil value
stack traceback:
	__even-distribution__/scripts/helpers.lua:21: in function '__index'
	__even-distribution__/scripts/setup.lua:245: in function 'migrateSettings'
	__even-distribution__/scripts/setup.lua:87: in function 'setupPlayerGlobalTable'
	__even-distribution__/scripts/setup.lua:74: in function 'func'
	__even-distribution__/framework.lua:99: in function 'handleEvent'
	__even-distribution__/framework.lua:108: in function <__even-distribution__/framework.lua:108>

i think this crash already got reported on the mod discussion, but i thought posting it in the source would also help:

Useless block top left corner

On the top left corner of the screen I noticed a useless block, which is always appearing when having this mod enabled. This is pretty annoying once you noticed it - would be great if you can get rid of it ๐Ÿ‘

Mod version: 1.0.8
Factorio version: 1.1.35

grafik

Bug when used with Factorissimo 2

http://imgur.com/a/PuYSl

The Factorissimo2 Buildings have a 'chest entity' that helps to display an overlay over the buildings so players can have an idea of what their buildings do. This chest entity is receiving items from even distribution, but when it does these items disappear into the nether. I asked MagmaMcFry what could be done on his end, but he said that really the only solution is for Even Distribution to have an exclusion set on this entity: "factory-overlay-display".

Would it be possible to set up even distribution to ignore that entity?

See also https://mods.factorio.com/mods/321freddy/even-distribution/discussion/15888

Shift-C to machine outputs places fuel in furnace output

Screenshot below.

When I press shift-C while carrying tons of fuel, I expect Even Distribution to dump fuel (up to a set limit) into nearby machine fuel slots. This does occur.

But the mod additionally places a stack of fuel in the furnaces' output slots, which inserters place on my furnace array's output belt. This has the potential to cause all sorts of problems elsewhere in the factory.

NOTE: I play with a ton of mods. This is my first playthrough with Space Exploration, and the issue involves a fuel type introduced by that mod. I do not know if the issue is specific to this item, or all items from Space Exploration, or fuels from all mods, or all fuels.

photo_2021-01-01 16 47 13

Crash with AAI Vehicles

While distributing ammo to AAI Chaingunners, I got the following stacktrace when I released right-click:

1916.637 Error MainLoop.cpp:1183: Exception at tick 694672: The mod Even Distribution caused a non-recoverable error.
Please report this error to the mod author.

Error while running event even-distribution::on_tick (ID 0)
There is no valid object with id 1919.
stack traceback:
	__even-distribution__/scripts/visuals.lua:105: in function 'func'
	__even-distribution__/scripts/helpers.lua:141: in function 'where'
	__even-distribution__/scripts/visuals.lua:101: in function 'unmark'
	__even-distribution__/scripts/visuals.lua:115: in function 'func'
	__even-distribution__/scripts/helpers.lua:124: in function 'each'
	__even-distribution__/scripts/visuals.lua:114: in function 'unmark'
	__even-distribution__/scripts/drag.lua:173: in function 'resetCache'
	__even-distribution__/scripts/drag.lua:62: in function 'distributeItems'
	__even-distribution__/scripts/drag.lua:15: in function 'func'
	__even-distribution__/framework.lua:99: in function <__even-distribution__/framework.lua:98>
stack traceback:
	[C]: in function 'get_target'
	__even-distribution__/scripts/visuals.lua:105: in function 'func'
	__even-distribution__/scripts/helpers.lua:141: in function 'where'
	__even-distribution__/scripts/visuals.lua:101: in function 'unmark'
	__even-distribution__/scripts/visuals.lua:115: in function 'func'
	__even-distribution__/scripts/helpers.lua:124: in function 'each'
	__even-distribution__/scripts/visuals.lua:114: in function 'unmark'
	__even-distribution__/scripts/drag.lua:173: in function 'resetCache'
	__even-distribution__/scripts/drag.lua:62: in function 'distributeItems'
	__even-distribution__/scripts/drag.lua:15: in function 'func'
	__even-distribution__/framework.lua:99: in function <__even-distribution__/framework.lua:98

I was also using AAI Programmable Vehicles, which seems to do some funky things when vehicles start/stop moving - possibly making them change IDs?
I think I got unlucky with the exact tick - I couldn't reproduce the crash easily.

Crushes on 0.17.4

What I did:

  • Loaded Factorio 0.17.4 with even-distribution_0.3.1
  • Loaded the map from Factorio 0.16.51
  • Selected 18 full stacks of uranium rounds magazine
  • Control-dragged them over storage chests (some of them had some items, some didn't)

What happened:

  • Factorio throwed this error:
Item stack count has to a be positive number
stack traceback:
	__even-distribution__/scripts/drag.lua:149: in function 'stackTransferred'
	__even-distribution__/scripts/drag.lua:101: in function 'func'
	__even-distribution__/framework.lua:98: in function <__even-distribution__/framework.lua:97>
stack traceback:
	[C]: in function 'remove_item'
	__even-distribution__/scripts/drag.lua:149: in function 'stackTransferred'
	__even-distribution__/scripts/drag.lua:101: in function 'func'
	__even-distribution__/framework.lua:98: in function <__even-distribution__/framework.lua:97>
  • Factorio closed the map without saving

Blueprint books being cleared

Bug: Upgrade planner is clearing blueprint books, upgrade planners, and deconstruction planners

Steps to reproduce:

  1. Start a new game
  2. Place stone furnace
  3. Create an upgrade planner
  4. Customize the planner (e.g. give it a name)
  5. Hold down Ctrl while dragging the planner over the furnace
  6. Result: planner will be cleared
  7. Expected result: planner is unchanged

This can be a serious issue, causing people to loose blueprint books. I'm the dev for Sea Block and someone reported this issue on our discord. They had a deconstruction planner in their blueprint book an they lost all their blueprints. They weren't intending to use Even Distribution's functionality at the time.

2022-03-28_21-35-11.mp4

can't use - crashes

shift+c

The mod Even Distribution (1.0.1) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event even-distribution::inventory-cleanup (ID 200)
LuaEntity doesn't contain key x.
stack traceback:
	[C]: in function '__index'
	__even-distribution__/scripts/helpers.lua:21: in function <__even-distribution__/scripts/helpers.lua:20>
	[C]: in function 'create_entity'
	__even-distribution__/scripts/visuals.lua:77: in function 'mark'
	__even-distribution__/scripts/cleanup.lua:45: in function 'func'
	__even-distribution__/scripts/util.lua:82: in function 'distribute'
	__even-distribution__/scripts/cleanup.lua:36: in function 'func'
	__even-distribution__/scripts/helpers.lua:176: in function 'each'
	__even-distribution__/scripts/cleanup.lua:29: in function 'distributeItems'
	__even-distribution__/scripts/cleanup.lua:20: in function 'func'
	__even-distribution__/framework.lua:99: in function <__even-distribution__/framework.lua:98>

ctrl+right click-drag or ctrl+left click-drag

The mod Even Distribution (1.0.1) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event even-distribution::on_player_fast_transferred (ID 131)
LuaEntity doesn't contain key x.
stack traceback:
	[C]: in function '__index'
	__even-distribution__/scripts/helpers.lua:21: in function <__even-distribution__/scripts/helpers.lua:20>
	[C]: in function 'create_entity'
	__even-distribution__/scripts/visuals.lua:39: in function 'mark'
	__even-distribution__/scripts/drag.lua:238: in function 'onStackTransferred'
	__even-distribution__/scripts/drag.lua:212: in function 'func'
	__even-distribution__/framework.lua:99: in function <__even-distribution__/framework.lua:98>

mods list:
``
aai-industry
Aircraft
alien-biomes
beautiful bridge railway Cargoships
Bio Industries
Bottleneck
cargo-ships
cargo-ships-graphics
CopyPasteModules
even-distribution
EvoGUI
FARL-fixed-se
Fill4Me-fixed
flib
Flow Control
FluidMustFlow
helmod
informatron
jetpack
KingsTurret-Shields
KS Power
LogisticTrainNetwork
LtnManager
ModuleInserterEx
PickerAtheneum
PickerExtended
Robo-Charge-1x1
Solar-Lamp
stdlib
thermal-solar-power
upgrade-planner-next
Warehousing

Inventory Cleanup Causing Production Issues

Problem: If inventory cleanup fills a slot in an assembler/etc. while an inserter is on its way to depositing that same type of item, the inserter will be unable to insert it. (Naturally.) If that inserter is also responsible for inserting other items, production will grind to a halt because the other necessary items will never get inserted.

Solution: Add an 'Inventory cleanup limit' slider to the ED tab to allow players to set the amount that production machine slots will be filled when inventory cleanup is triggered. (e.g. if set to '0.9 stacks', 10% of the space will be available for inserters to insert more items.)

Does that sound reasonable?

Add option to disable per player

I really like you mod, unfortunately not all my players like it.
Could you add an option to disable it per player?
(Maybe be setting the time to 0.0)

DyWorld-Dynamic's burner radar causes crash when distributing items to it

DyWorld-Dynamic mod introduces new radar which burns carbon fuel for it to run.

So entity:inventory("fuel") at https://github.com/321freddy/even-distribution/blob/master/scripts/cleanup.lua#L267 returns nil and then is accessed right away, causing Lua's equivalent of Null pointer exception.

After some debugging I found that entity.get_inventory("fuel") returns actual inventory while entity.get_fuel_inventory() returns nil. It appears to be bug in Factorio, but fast fix for this mod would be to use entity.get_inventory(defines.inventory.fuel) on line https://github.com/321freddy/even-distribution/blob/master/scripts/helpers/LuaControl.lua#L67

Controls need rework

Just waiting a few ticks before distributing is stupid as you always need to swith between short and long delay.
Please add a setting to only trigger distribution on pressing the hotkey again, or, if you can get a keyboard library to work, to not work if the hotkey is still held.
Thank you for a nice mod!

tblId missing local

tblId = rawget(tbl, "id")

missing local so temporary value with object refs is stored in global context outside of global variable. This is not safe and may desync

mod even-distribution has object ref inside _G.tblId.524970.box
mod even-distribution has object ref inside _G.tblId.524973.box
mod even-distribution has object ref inside _G.tblId.524975.box

Error on load with god mode on

20201221195620_1

Happens when loading testing scenario with god mode on. Does not happen when loading normal game.

I cured it by turning off god mode while using old version of mod, then load with new mod version, enabled god mode, saved. Error disappeared.

Bug

Has been working fine till latest Factorio update.
Factorio 1.1.38 (build 58907, win64, steam)

The mod Even Distribution (1.0.8) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event even-distribution::on_player_fast_transferred (ID 129)
LuaEntity doesn't contain key x.
stack traceback:
[C]: in function 'index'
__even-distribution/scripts/helpers.lua:21: in function <even-distribution/scripts/helpers.lua:20>
[C]: in function 'create_entity'
even-distribution/scripts/visuals.lua:39: in function 'mark'
even-distribution/scripts/drag.lua:237: in function 'onStackTransferred'
even-distribution/scripts/drag.lua:208: in function 'func'
even-distribution/framework.lua:99: in function <even-distribution/framework.lua:98>

Crash when manually ditributing items

Here is the crash report I get when i try and hold control and drag an item over an assembler
crash

Steps to reproduce:

  1. Have an inventory that accepts items, I was trying to distribute to an array of assemblers
  2. ctrl + click and drag over the inventory
  3. crash

Can't close Even Distribution settings.

Using v1.0.0 of this and Factorio 1.1.

So I click on this to open the settings:
image

And then I try this to close it:
image

But this is the result:
image

Basically it doesn't close the settings but removes the top header bar thing.
I tried this on a save from 1.0 and also just started a new game to test this and I get the same results.
I am using the flat character gui if it makes a difference.

Allow other mods to specify entities to exclude

Part of my mod uses container-type entities as part of a more complex thing, and this makes Even Distribution break them when it inserts additional items into it.

Would it be possible to have a remote interface or something, so that mods like mine can specify some entities to exclude from Shift+C cleanup?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.