[1.1.6] High UPS drop with forest fires
- blargh2015
- Inserter
- Posts: 37
- Joined: Sun Jun 03, 2018 3:47 pm
- Contact:
[1.1.6] High UPS drop with forest fires
Disclaimer: This is a modded game.
We are experiencing VERY high UPS performance hits with even small forest fires after upgrading from 1.0 to 1.1.6, to the point that I'm having to almost constantly do a "for k,v in pairs(game.player.surface.find_entities_filtered{type="fire"}) do v.destroy() end" console command, which immediately brings the UPS back up to 60. Debug blames Entity updates during this time.
This is made worse by the Rampant mod having fire-spitting biters and map settings that had relatively dense forests, so the little buggers are always setting off forest fires.
We are experiencing VERY high UPS performance hits with even small forest fires after upgrading from 1.0 to 1.1.6, to the point that I'm having to almost constantly do a "for k,v in pairs(game.player.surface.find_entities_filtered{type="fire"}) do v.destroy() end" console command, which immediately brings the UPS back up to 60. Debug blames Entity updates during this time.
This is made worse by the Rampant mod having fire-spitting biters and map settings that had relatively dense forests, so the little buggers are always setting off forest fires.
- Attachments
-
- factorio-current.log
- (208.6 KiB) Downloaded 112 times
-
- OMGfire.jpg (1.87 MiB) Viewed 3877 times
-
- FireOMG.zip
- (17.49 MiB) Downloaded 107 times
Re: [1.1.6] High UPS drop with forest fires
I don't see anything that looks like a bug
probably some mod is changing the fire entities to do some crazy large area of effect damage or something
probably some mod is changing the fire entities to do some crazy large area of effect damage or something
Re: [1.1.6] High UPS drop with forest fires
i have a mod called wildfire season and you could i guess, use it to reduce the fire hop limit so the fires are less intense. or try disabling smoke.
- blargh2015
- Inserter
- Posts: 37
- Joined: Sun Jun 03, 2018 3:47 pm
- Contact:
Re: [1.1.6] High UPS drop with forest fires
After binary-tree-searching through our mods, it turned out Water Turret was the culprit here, which I suppose makes sense. Just weird it didn't show as the culprit on the detailed time listing.
Re: [1.1.6] High UPS drop with forest fires
Oh, geez! I thought I'd improved performance somewhat, and I've honestly no idea what more I could do. But it's true, whenever a fire is created it will spawn a dummy (which will be removed again together with the fire). Currently, I use combat bots (if I remember correctly, they are made inactive on being created) because I need an entity-with-force so the turrets can target it, but it may not be a simple-entity-with-force because that's attacked by artillery. If only we had target_masks for some more prototypes!blargh2015 wrote: Tue Jan 19, 2021 3:44 pm After binary-tree-searching through our mods, it turned out Water Turret was the culprit here, which I suppose makes sense. Just weird it didn't show as the culprit on the detailed time listing.
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!
- blargh2015
- Inserter
- Posts: 37
- Joined: Sun Jun 03, 2018 3:47 pm
- Contact:
Re: [1.1.6] High UPS drop with forest fires
A mitigating issue is probably that I got sick of people I'm playing with complaining "there aren't enough trees" so increased the tree density to its absolute maximum. It is SERIOUSLY a ridiculous amount of woodland. Then add in the Rampant mod that has biters that spit fire and the buggers just start forest fires all over the place, and having thousands of trees on fire happened pretty regularly.Pi-C wrote: Tue Jan 19, 2021 4:02 pm Oh, geez! I thought I'd improved performance somewhat, and I've honestly no idea what more I could do. But it's true, whenever a fire is created it will spawn a dummy (which will be removed again together with the fire). Currently, I use combat bots (if I remember correctly, they are made inactive on being created) because I need an entity-with-force so the turrets can target it, but it may not be a simple-entity-with-force because that's attacked by artillery. If only we had target_masks for some more prototypes!
However, we were getting the UPS slowdowns even when the fires were very far away from our water turrets - I don't know if there can be a range limit or somesuch put on finding fires and the dummy units? Would help a lot, at least in this case.
Re: [1.1.6] High UPS drop with forest fires
what if you change the tree force to enemy (once it's on fire)?Pi-C wrote: Tue Jan 19, 2021 4:02 pmOh, geez! I thought I'd improved performance somewhat, and I've honestly no idea what more I could do. But it's true, whenever a fire is created it will spawn a dummy (which will be removed again together with the fire). Currently, I use combat bots (if I remember correctly, they are made inactive on being created) because I need an entity-with-force so the turrets can target it, but it may not be a simple-entity-with-force because that's attacked by artillery. If only we had target_masks for some more prototypes!blargh2015 wrote: Tue Jan 19, 2021 3:44 pm After binary-tree-searching through our mods, it turned out Water Turret was the culprit here, which I suppose makes sense. Just weird it didn't show as the culprit on the detailed time listing.
- blargh2015
- Inserter
- Posts: 37
- Joined: Sun Jun 03, 2018 3:47 pm
- Contact:
Re: [1.1.6] High UPS drop with forest fires
I think that would cause every turret type to target them? So flamethrower turrrets ("YOU'RE NOT HELPING!!!"), snipers, artillery, etc...ptx0 wrote: Tue Jan 19, 2021 5:17 pm what if you change the tree force to enemy (once it's on fire)?
The idea of flamethrower turrets attacking forest fires is unreasonably hilarious to me for some reason
Re: [1.1.6] High UPS drop with forest fires
It's not the trees or the fires that get attacked, but the dummies. They are on their own force (which is hostile towards any force with players, and on ceasefire with all other forces, so that biters won't take out the fires for you), and unless another mod that's loaded after Water Turrets changes things again, they have a trigger_target_mask that will be ignored by all other turrets (except for artillery turrets, because these don't support target masks for whatever reason).ptx0 wrote: Tue Jan 19, 2021 5:17 pmwhat if you change the tree force to enemy (once it's on fire)?Pi-C wrote: Tue Jan 19, 2021 4:02 pmOh, geez! I thought I'd improved performance somewhat, and I've honestly no idea what more I could do. But it's true, whenever a fire is created it will spawn a dummy (which will be removed again together with the fire). Currently, I use combat bots (if I remember correctly, they are made inactive on being created) because I need an entity-with-force so the turrets can target it, but it may not be a simple-entity-with-force because that's attacked by artillery. If only we had target_masks for some more prototypes!blargh2015 wrote: Tue Jan 19, 2021 3:44 pm After binary-tree-searching through our mods, it turned out Water Turret was the culprit here, which I suppose makes sense. Just weird it didn't show as the culprit on the detailed time listing.
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!
Re: [1.1.6] High UPS drop with forest fires
Technically, the acid splashes made by spitters and worms are just fires as well (based on the fire prototype), so if the option to clean acid is on, that may be the reason.blargh2015 wrote: Tue Jan 19, 2021 5:16 pm However, we were getting the UPS slowdowns even when the fires were very far away from our water turrets
We've come a long way! In the first version of firefighting water turrets, I did indeed search in a radius around each turrets for fires, which was incredibly inefficient. Now I don't need to search for fires at all: they announce themselves because I've modified all fire prototypes to autospawn a dummy. When a dummy is spawned, I look for the fire on the dummy position and create a custom entity for it. When the dummy is killed, fires around it are destroyed (along with the respective dummies), and if a fire expires of its own before the dummy could be killed, the dummy will simply be removed. The dummies are hardcoded in the attack_target_masks of the water turrets. Whenever a fire is created in range of a water turret, it will be attacked automatically, so I leave searching for dummies to the game engine. There are options like "attack target with least/most health" that require intervention per script, but these should be off per default.blargh2015 wrote: Tue Jan 19, 2021 5:16 pm I don't know if there can be a range limit or somesuch put on finding fires and the dummy units? Would help a lot, at least in this case.
Perhaps I'm missing something, but I believe I've optimized pretty much everything that took a hefty bite out of UPS.
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!
Re: [1.1.6] High UPS drop with forest fires
You could edit settings.lua (lines 178--185):
Code: Select all
{ -- Set radius in which fires are extinguished around a fire dummy
type = "double-setting",
name = "WT-fire-extinguish-radius",
setting_type = "runtime-global",
allowed_values = {1, 1.5, 2, 2.5, 3, 3.5, 4},
default_value = 2.5,
order = "WT-[misc]-[fire-extinguishing-radius]"
},
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!
- blargh2015
- Inserter
- Posts: 37
- Joined: Sun Jun 03, 2018 3:47 pm
- Contact:
Re: [1.1.6] High UPS drop with forest fires
I'll give it a look. Our main point of deploying the water turrets was to try and deal with the overwhelming forest fires, so our solution will PROBABLY be "Okay Blargh2015, you made your point, turn the tree density back down."Pi-C wrote: Tue Jan 19, 2021 6:43 pmYou could edit settings.lua (lines 178--185):You could add to or change "allowed_values", to extend the radius (no idea what a sane value would be: 6, 7, even more?). If one dummy is killed, all fires in this radius will be removed. It certainly will look ridiculous if a single turret can extinguish fires in a big area, but if there are so many trees that would take off some load. Turning up the damage should also help (turrets waste less time per fire, and the fires have less time to spread).Code: Select all
{ -- Set radius in which fires are extinguished around a fire dummy type = "double-setting", name = "WT-fire-extinguish-radius", setting_type = "runtime-global", allowed_values = {1, 1.5, 2, 2.5, 3, 3.5, 4}, default_value = 2.5, order = "WT-[misc]-[fire-extinguishing-radius]" },
Re: [1.1.6] High UPS drop with forest fires
this is what i was recommending my Wildfire Season mod for, to tune down the fire hop limit, which is how far a fire can spread from the first tree that burned. you can set it to 1 or 2, and that will make fires less devastating with high tree count.blargh2015 wrote: Tue Jan 19, 2021 8:27 pm I'll give it a look. Our main point of deploying the water turrets was to try and deal with the overwhelming forest fires, so our solution will PROBABLY be "Okay Blargh2015, you made your point, turn the tree density back down."
- blargh2015
- Inserter
- Posts: 37
- Joined: Sun Jun 03, 2018 3:47 pm
- Contact:
Re: [1.1.6] High UPS drop with forest fires
We were having entire screen fulls of forest on fire at once. Did WONDERS for the pollution map, heh.ptx0 wrote: Tue Jan 19, 2021 8:56 pmthis is what i was recommending my Wildfire Season mod for, to tune down the fire hop limit, which is how far a fire can spread from the first tree that burned. you can set it to 1 or 2, and that will make fires less devastating with high tree count.blargh2015 wrote: Tue Jan 19, 2021 8:27 pm I'll give it a look. Our main point of deploying the water turrets was to try and deal with the overwhelming forest fires, so our solution will PROBABLY be "Okay Blargh2015, you made your point, turn the tree density back down."