Evolution and pollution statistics
Posted: Sun Feb 13, 2022 8:35 pm
Hello,
I've been developing a mod for 2 years.
https://mods.factorio.com/mod/RitnTeleportation
It allows players to create their own map just like it does in solo. Each player who connects can create his own map and through teleportation portals join the map of another in this way.
In addition to the map created for the player, I create a force on behalf of the player as well as an enemy force dedicated to this map.
Precisely my problem comes from the enemies and especially from their evolution.
Indeed, the evolution is dedicated to the map because I use the event to change the strength of the spawners by the strength created for this map.
Evolution by time is set to 0 because a player present on the server will evaluate the enemy strength of other players who are not connected at that time.
Evolution by destruction works correctly, no worries on that side.
The evolution by pollution poses a problem, because the pollution is calculated globally on the part and not by map. suddenly the pollution factor increases exponentially according to the pollution generated by all the players.
So my question is, is it possible to make pollution / map stats and not for the whole game globally?
origin:
change to:
My but is of course that the evolution is equivalent to a solo game for each of the maps.
thank you.
I've been developing a mod for 2 years.
https://mods.factorio.com/mod/RitnTeleportation
It allows players to create their own map just like it does in solo. Each player who connects can create his own map and through teleportation portals join the map of another in this way.
In addition to the map created for the player, I create a force on behalf of the player as well as an enemy force dedicated to this map.
Precisely my problem comes from the enemies and especially from their evolution.
Indeed, the evolution is dedicated to the map because I use the
Code: Select all
on_chunk_generated
Evolution by time is set to 0 because a player present on the server will evaluate the enemy strength of other players who are not connected at that time.
Evolution by destruction works correctly, no worries on that side.
The evolution by pollution poses a problem, because the pollution is calculated globally on the part and not by map. suddenly the pollution factor increases exponentially according to the pollution generated by all the players.
So my question is, is it possible to make pollution / map stats and not for the whole game globally?
origin:
Code: Select all
game.pollution_statistics
Code: Select all
game.surfaces['my_surface'].pollution_statistics
thank you.