Rampant Industry

by Veden

Adds advanced versions of Oil Refinery Oil Generator, Lab, Storage Tank, Assembler, Chemical Plant, Solar Panel, and Accumulator that are larger and more powerful than there original versions. All are configurable with settings

Content
2 years ago
1.1
14.7K
Manufacturing

g Air Filter mechanics

3 years ago

Hello,
How does air filtering work? Does Air Filter consume pollution units from chunk it is located in (looks like it highlights in green the chunk to be cleared)?
"Pollution" gas ingredient in recipe confuses a little: 20 "pollution" gas units are processed every 90 seconds, while Filter "absorbs" 30 pollution units per 60 seconds. Probably that fluid/gas is not direct pollution units count.
Will lack of pollution units in the chunk stop Filter structure work?

3 years ago
(updated 3 years ago)

Air filters should pull pollution from the chunk that is highlighted.
Pollution added to the air filter entity increases based on pollution on the chunk.
If the chunk runs out of pollution, the air filter entity no longer gains pollution.
The air filter must have greater than 65% power to gain any pollution.
Correct about the "pollution" gas units not representing pollution count on a chunk.
The air filter running is what removes pollution from the chunk, not the script.
Open to balancing changes, if you have feedback.

2 years ago

Will lack of pollution units in the chunk stop Filter structure work?

Found the answer for my question: any amount of pollution units allows structure to work at full capacity. Only complete pollution absence in highlighted chunk stops it. Ok.

Probably it's not easy (or even UPS consuming) to set up some (optional or tunable?) mechanism freezing air filter activity when pollution units amount is not enough for purification iteration or when PUs amount in chunk doesn't exceed a player set value. There are some mods providing PUs data into circuit network, therefore it can be achieved that way, but I am not sure if it is UPS efficient.

2 years ago
(updated 2 years ago)

As a result I came to these 2 conclusions:
as PUs amount in chunk determines the "speed" air filter building works (how many pseudo units it puts in the building recipe for work) situation of consuming not existing PUs occurs often
1) it makes this building to waste clean air filters sometimes;
2) after upgrading to advanced air filter building it becomes crucial not to install more than one building in one chunk even for intensive pollution-producing structures in the chunk. Player should install 2nd and other air filter buildings in adjacent chunks. This is because every filter building takes actual PUs amount in recipe without other factors consideration - if trees, creep tiles, other filter buildings in the same chunk will consume pollution while recipe is proceeded.

2 years ago

In the next version, the air filter now only injects 5% of the pollution on the chunk that the entity is on.

The other factors are not something to easily account for.

2 years ago

Yes, I noticed the change. Great! I'll test it soon. Thank you!

2 years ago
(updated 2 years ago)

In the next version, the air filter now only injects 5% of the pollution on the chunk that the entity is on.

It's more economically viable now. Thanks.

I have 2 more suggestions:

  1. To reduce power consumption. Especially in standby mode. K2 building consumes 75KW in work - it's cheating, but 500/1500KW is quite a lot for doing nothing.
  2. ( Can be smarter alternative to first one or both can be done.) To disable by script when pollution goes down beyond some level. For example taking 50% of min_to_diffuse map value as such turn off level. And automatically turn on when chunk PUs exceed 90% of min_to_diffuse value. As script is running anyway for all air filters with enough electrical power provided I suppose it won't hurt game UPS.
2 years ago

I can do both if you could notice pull requests from time to time. :-)

2 years ago

You are welcome to make pull requests.

2 years ago

You are welcome to make pull requests.

I added a commit to existing PR. Do you see PR (it's 13 days old now)?

2 years ago

Ok, I'll give more detailed description of entire pollution creation, dissipation, absorption and cleaning here for better understanding.
Example - a chunk with some miner buildings. They produce pollution with some not stable speed (depending on extracted resource requests by player's factory).
Chunk gets pollution units (PUs) rise to some value - minimum diffusion value. Usually it is equal to 15.0 PUs. At this point pollution is not only absorbed by trees and ground tiles, but migrates to adjacent chunks. And here is the key point - player is interested in reducing pollution migration from this chunk as diffused pollution will eventually reach enemy nests.
Air filter building cleans pollution with 100% stable speed (let's imagine that it has abundant amount of clean filters available and no problems with electrical energy income).
Depending on miners speed, efficiency modules used, resource mining productivity and some minor factors some PUs are generated from time to time. And building should consume them, spending clean filters and energy.
Player is focused on goal to clean as much of produced pollution as possible - player installs appropriate number of air filtering buildings.
This mod mechanics is very UPS effective and does not directly control PUs in chunk, only generates ingredient for air filter recipe to start work from start till iteration finish ignoring PUs level in chunk.
It leads to situation when there is 0 PUs in the chunk and some %% of filters+energy are wasted. Especially when pollution is generated in big numbers and requires several filtering buildings in chunk (or even adjacent chunks).
Deactivating the building fixes this problem. The same script that produces ingredient deactivates/activates building when PUs level is going below 25% of minimum diffusion value / exceeds 75% of minimum diffusion value. Building activity is regulated via the same script without noticeable UPS consumption growth.
Air Filter building deactivates for some time till miners produce enough pollution and then activates again. That's all.

Unlike building with chemical energy source, all electric energy buildings do consume energy via drain when they are deactivated. Therefore I suggest to decrease energy drain. For example to reduce it by 10 times to be closer to factorio standard for electric energy buildings. Active energy consumption can be increased by 2 or 3 times to compensate.

New response