Smog: Visual Pollution


Now high pollution makes grey smog; good UPS optimization

Tweaks
3 years ago
0.17 - 1.1
2.14K

a Smog Planet

4 years ago

Nice!

4 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>

PyroFire β˜†
4 years ago
(updated 4 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

4 years ago

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

PyroFire β˜†
4 years ago
(updated 4 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.

4 years ago

thank you for the time for explanation ;)

4 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.

PyroFire β˜†
4 years ago
(updated 4 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

4 years ago
(updated 4 years ago)

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

PyroFire β˜†
4 years ago

Sure, i can help clean things up a bit.

4 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.

PyroFire β˜†
4 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.

4 years ago
(updated 4 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.

PyroFire β˜†
4 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.

4 years ago

How about the Black Map planet?

New response