Water Turret

by Pi-C

This mod provides an early game Water thrower that does minimal damage but slows down the enemies (use steam for extra damage!) and an advanced turret for extinguishing fires (use "Hardened pipes" to give it extra resistances!).

Content
3 years ago
0.17 - 1.1
6.35K
Combat

b Increasing entity update time with 1.0.3

3 years ago

I've just updated to 1.0.3, and it makes the game slower every second. I've checked the "time usage" debug menu, and it seems when this version of the mod is active, the entity update time quickly raises from 5 to much more.

It seems I can't update to 1.1 for now, because I have a mod (Geothermal by Reika) that doesn't support it, and most of my power production depends on it

3 years ago
(updated 3 years ago)

Some additional info:
The game reaches 24 UPS from 60 under 10 seconds from loading the map, and after ~1 minute it's 1 UPS
The lag continues to increase if I mark all (13) water turrets for deconstruction

Mod settings:
Startup: https://i.imgur.com/uSFATxJ.png
Map: https://i.imgur.com/8EpFdIz.png

With activated debug logging (map settings) this is what I get: https://gist.github.com/MPeti1/6cde607050b57bcacfd8379e080240e9
The logging was enabled from the beginning of the log file (enabled the setting and restarted the game)
Is it just migrating too many things, and I just need to let it finish? But then why does the lag increase with every second?

In the debug view 'show-time-usage' I only see large numbers for 'Entity update' (at one point in time it was 226) and script update for the (water turret) mod is 2.372/0.008/5.951. Both has their numbers increasing.
In the other debug view 'show-entity-time-usage' the only outstanding is class Unit, with 1.65, 001208. All others have their first number less than 1.

3 years ago

The lag also starts quickly increasing if I first disable the mod, make a save so mod entities are removed, and after re-enabling the mod I load the newly saved map

3 years ago

I just noticed that a big fire started near 2 turrets, but I don't even get why, since only biters and laser turrets were there

3 years ago
(updated 3 years ago)

Yeah, it seems right in the moment I load the map, a fire starts exactly where a big spitter is.
So the problem seems to be that if there are entities on fire (probably anywhere on the map, but can't say that for sure), that makes the mod to be lagging

3 years ago

I tested a bit more, and it seems that fire is only started if I load the map with the Water Turret mod being enabled

3 years ago
(updated 3 years ago)

Thanks for the report!

Yeah, it seems right in the moment I load the map, a fire starts exactly where a big spitter is.

I bet the spitter attacked things? Well, there are no real acid splashes in the game! Like the fires burning with flames, acid splashes are based on the FireFlame prototype. I've lumped acid and fire dummies together in one table for convenience, so there's no way of knowing how many acid and how many fire dummies there really are. May be a good idea to add at least a counter for the different dummies.

So the problem seems to be that if there are entities on fire (probably anywhere on the map, but can't say that for sure), that makes the mod to be lagging

It rather seems that there are lots of acid splashes from spitter attacks.

You could enter "/gvv" (without the quotes") on the console to open the GUI of the Global Variable Viewer, select "WaterTurret" (tab "global"), and right-click on "fires" or "fire_dummies" (under remote.call("__WaterTurret__gvv", "global")). If you then switch back to the tab "Variable trace", you'll get the count of registered fires/acid splashes and dummies. (It should look similar to "#2 {[37], [38]}" -- "#2" is the total amount of table entries.) Write down this number!

Quit the game and change the startup settings. Turn off "Turrets: Turrets clean up acid splashes". Load the game and use GVV to check how many fires or dummies there are now. The number should be significantly lower than the one you've written down -- can you confirm that?

3 years ago
(updated 3 years ago)

I bet the spitter attacked things? Well, there are no real acid splashes in the game! Like the fires burning with flames, acid splashes are based on the FireFlame prototype. I've lumped acid and fire dummies together in one table for convenience

Oh, so it's intentional? Is there a way to do something with it?
Edit: for clarification, I meant whether it's intentional that acid ignites trees. I didn't want to mean that you're a psycho for burning worlds in your free time :D

It rather seems that there are lots of acid splashes from spitter attacks.

Yes, that's true. I have no idea why, but in different places outside my walls spitters are constantly spitting acid on game objects like rocks and trees. Not all of them does this, only relatively a few
So it's not something normal? I honestly thought everyone experiences this. Maybe this is why the spitter starts the fire too?

You could enter "/gvv" (without the quotes") on the console to open the GUI of the Global Variable Viewer, select "WaterTurret" (tab "global"), and right-click on "fires" or "fire_dummies" (under remote.call("__WaterTurret__gvv", "global")). If you then switch back to the tab "Variable trace", you'll get the count of registered fires/acid splashes and dummies. (It should look similar to "#2 {[37], [38]}" -- "#2" is the total amount of table entries.) Write down this number!

I'll check that tomorrow. I love that mod, I like technical things like that.

Turn off "Turrets: Turrets clean up acid splashes".

That's disabled already, I thought this might have to do something with the lag
I'll check that tomorrow, too

Also, how did you include that link? Is it simple MD? Asking because when I tried to use it, it didn't work for some reason, but maybe I just messed up the brackets

3 years ago
(updated 3 years ago)

...and right-click on "fires" or "fire_dummies" (under remote.call("__WaterTurret__gvv", "global")). If you then switch back to the tab "Variable trace", you'll get the count of registered fires/acid splashes and dummies. (It should look similar to "#2 {[37], [38]}" -- "#2" is the total amount of table entries.) Write down this number!

It's 216. This is with "Turrets: Turrets clean up acid splashes" enabled.
After disabling it, it becomes 215

Edit: with the setting being disabled, it becomes 1100 in under 5 seconds, and 4000 a bit later (not much, ~10 seconds, but due to the lag it would be 2-3 in game time)

3 years ago

Mysterious! Could you provide a saved game, perhaps? Now that the Bio Industries update is out, I think I could spare some time for the water turrets again. :-)

3 years ago
(updated 3 years ago)

Of course, here is the link: https://1drv.ms/u/s!ArvLKxtjzZnr1ttp0Aj4IXQXkuHdNA?e=Cz5Rel
This save was made in 1.0.0, so it'll start with the migration.
When it finished, one fire I know of will start at point 2 here: https://i.imgur.com/kmzErOA.png

When syncing mods, there will be a few that doesn't have a compatible version with 1.1.x, but if I remember correctly it doesn't do much problem so you could just load it anyway.

Edit: I'm aware that the game speed is set to 1/8 on the screenshot. I set it so the heavy lag kicks in later.
I recommend this for you too, that when the save loaded click on the rightmost button on the mod-gui asap, so you have some time to search for the location on the map

New response