Smog: Visual Pollution


Now high pollution makes grey smog; good UPS optimization

Tweaks
4 years ago
0.17 - 1.1
2.39K

a Smog Planet

5 years ago

Nice!

5 years ago

crash on startup

51.902 Error AppManagerStates.cpp:1419: The mod Warptorio2 Smog Planet caused a non-recoverable error.
Please report this error to the mod author.

Error while running event warptorio_planet_smog::on_init()
"SmogVisualPollution" is not an active and valid mod.
stack traceback:
warptorio_planet_smog/control.lua:138: in function 'on_init'
warptorio_planet_smog/control.lua:232: in function <warptorio_planet_smog/control.lua:232>
stack traceback:
[C]: in function 'clear'
warptorio_planet_smog/control.lua:138: in function 'on_init'
warptorio_planet_smog/control.lua:232: in function <warptorio_planet_smog/control.lua:232>

5 years ago
(updated 5 years ago)

I have uploaded a fix for this.

Please report planet related errors in the planet pack mod in future: https://mods.factorio.com/mod/warptorio_planet_pack

5 years ago

thank you, seems to work. but is the smog on each planet now, or just special ones?

5 years ago
(updated 5 years ago)

Just the smog planet.

The smog mod uses on_chunk_generated to create the smog overlay.
This can be used on a planet, but there are no built-in overrides.
This is why i needed to make it internal to the smog planet.
If darkfrei is interested i can help you with the code to make this fully compatible, and leave the planet as just bridging code.

5 years ago

thank you for the time for explanation ;)

5 years ago

It looks like I need to add exception for surface "warptorio_planet_smog" and then here is no double layers of smog on the smog planet.

5 years ago
(updated 5 years ago)

It looks like I need to add exception for surface "warptorio_planet_smog" and then here is no double layers of smog on the smog planet.

That is the wrong way to go about it.
And that is not the name of the surface.

Each surface in warptorio is procedurally generated with a unique name.

Please point me to where you would put that exception, and i'll help you make the right adjustments so this can be compatible with all other mods, including factorissimo and space exploration which both also use surfaces.

Or better yet, join us on discord: https://discord.gg/a9CNarA

5 years ago
(updated 5 years ago)

Pyro, you are the mod collaborator from now :)
Can you please just add a new version of SVP with the compatibility updates?

5 years ago

Sure, i can help clean things up a bit.

5 years ago

Thanks for your help, I've fixed your version, it looks like that you have upload wrong, not ready version. The version 0.1.2 works good, only part of chunks will be updated on one tick. In the version 0.1.1 was all chunks every tick, the UPS was about 20.

5 years ago

Indeed, and i think there was a couple of other typos too. It wasn't fully tested sorry :P, but it was a full fix and repair of the framework/code structure.
Should give better UPS too because the rectangles aren't destroyed and recreated every tick, particularly now the limiter for the chunk tick is back in.

5 years ago
(updated 5 years ago)

The reading of the pollution amount needs too much time for every chunk per tick. It can be good for small base, but the megabase needs much more time for update.

UPD: how work the black and white lists here? There is no checking with it.

5 years ago

UPD: how work the black and white lists here? There is no checking with it.

It only operates on nauvis, unless it is explicitly called to work on another surface by index.
I use some clever tricks to get the math a bit cheaper.
If global.smog[surface_index] doesn't exist, then we aren't "working" with that surface.

5 years ago

How about the Black Map planet?

New response