Better Air Filtering

by JoeyDP

An overhaul of the air filtering mod by Schorty. Includes complex air filtering steps to remove pollution.

Content
2 years ago
0.17 - 1.1
9.53K
Environment

b [Bug] Non-functional filters and Crash

3 years ago

So I noticed that filters built by bots do not function at all. Seeing this I attempted to pick up the filter so I could place it by hand and my game instantly crashed. Please let me know any other info you may need.

2913.087 Error MainLoop.cpp:1207: Exception at tick 9666825: The mod Better Air Filtering (0.3.0) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event better-air-filtering::on_player_mined_entity (ID 65)
better-air-filtering/control.lua:350: attempt to index field '?' (a nil value)
stack traceback:
better-air-filtering/control.lua:350: in function 'removeFromMap'
better-air-filtering/control.lua:424: in function 'removeFilter'
better-air-filtering/control.lua:465: in function <better-air-filtering/control.lua:460>

3 years ago
(updated 3 years ago)

as far as i can tell, flying robots place them, won't work but you can pick up. land robots.... crash on pick up

The mod Better Air Filtering (0.3.0) caused a non-recoverable error.
Please report this error to the mod author.
Error while running event better-air-filtering::on_player_mined_entity (ID 65)
better-air-filtering/control.lua:350: attempt to index field '?' (a nil value)
stack traceback:
better-air-filtering/control.lua:350: in function 'removeFromMap'
better-air-filtering/control.lua:424: in function 'removeFilter'
better-air-filtering/control.lua:465: in function <better-air-filtering/control.lua:460>

update: savegame is not lost, if flying robot placed it, use it to pick it up, if land robot placed it, use it to pick it up. hand or wrong robot pickup will crash
then hand place the building an it works

3 years ago

Yeah, I found that removing the bugged filters with the robots that placed them worked. I'm concerned that we haven't heard from this dev in nearly two weeks though.

3 years ago

I just updated the mod to 1.1 and was unable to reproduce the problem on that version. If the issue persists after updating, let me know.
– Joey

3 years ago
(updated 3 years ago)

I've just had the same issue on 1.1.8, can provide save if needed

24314.792 Error MainLoop.cpp:1282: Exception at tick 51332405: The mod Better Air Filtering (0.3.1) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event better-air-filtering::on_player_mined_entity (ID 65)
better-air-filtering/control.lua:350: attempt to index field '?' (a nil value)
stack traceback:
better-air-filtering/control.lua:350: in function 'removeFromMap'
better-air-filtering/control.lua:424: in function 'removeFilter'
better-air-filtering/control.lua:465: in function <better-air-filtering/control.lua:460>

3 years ago
(updated 3 years ago)

replace it with this:

    if global.air_filtered_chunks_map[self.surface.name][self.x] ~= nil then                                                             
        global.air_filtered_chunks_map[self.surface.name][self.x][self.y] = nil
    end
3 years ago

Thanks @ptx0, that worked for me!

3 years ago

i don't think it fixes the robot placing them but it will fix being able to mine them so you can place by hand.

3 years ago

This may have been related to https://mods.factorio.com/mod/better-air-filtering/discussion/601a8951ebe61f2b356c2d1a, which was fixed in version 0.3.2. Otherwise it might be a bad mod interaction. Are those vanilla robots?

3 years ago

So, I'm getting what I think is the exact same error as these fellas. I have the mod Nanobots, and when they build the buildings then the filter machines don't work, and then when I try to pick them up, either by hand or using Nanobots, then it gives me the error below and crashes the game. I can't speak to what happens when using vanilla robots, as I haven't gotten to them yet.

The specific machine in this case is the tier 2, but I was having almost the same issue with the tier 1's, but I was able to pick them up somehow, so I just kinda moved on, and didn't pay attention to the specifics...

The mod Better Air Filtering (0.3.3) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event better-air-filtering::on_player_mined_entity (ID 66)
better-air-filtering/control.lua:364: attempt to index field '?' (a nil value)
stack traceback:
better-air-filtering/control.lua:364: in function 'removeFromMap'
better-air-filtering/control.lua:432: in function 'removeFilter'
better-air-filtering/control.lua:478: in function <better-air-filtering/control.lua:473>

2 years ago
(updated 2 years ago)

I used Player Auto Build(https://mods.factorio.com/mod/player-auto-build),also encounter this problem

trying delete tier one mechine that doesn`t absorb pollution also cause this crash,when destruct via player bots or shooting it down.

The mod Better Air Filtering (0.3.3) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event better-air-filtering::on_player_mined_entity (ID 66)
better-air-filtering/control.lua:364: attempt to index field '?' (a nil value)
stack traceback:
better-air-filtering/control.lua:364: in function 'removeFromMap'
better-air-filtering/control.lua:432: in function 'removeFilter'
better-air-filtering/control.lua:478: in function <better-air-filtering/control.lua:473>

1 year, 11 months ago

Also crash when i tried to manually dig a bugged Air filter Mk2. There were filters (expendable) in the chest but inserter were not putting them in. They worked in earlier location but i moved the whole setup to different chunk with Nanobots.

https://i.imgur.com/1CghKIF.jpg

New response