Original Post — Direct link

Hi,

I am playing factorio 1.1 (modded) and currently have to face the issue that my UPS has dropped to 10 (or even lower). With the debug info screen I was able to locate it:

Entity updates eat my computer: YoGPFDk.png (1444×1303) (imgur.com)

And the class causing the issues are "Projectile": xp9mlJ5.png (873×1094) (imgur.com)

Now what I don't understand is why projectiles cause issues while no battle is going on on the map. No turret involved in a fight. I killed all enemies (command line), disabled pollution and then started disabling mods - no change. As a last test I disabled all mods and launched the more or less wrecked factory, but still no changes. https://i.imgur.com/DmeByhL.png

- I still have "projectiles" on the map which cause the program to almost freeze.

Anyone has an idea where to look, or is there at least a command line to destroy all entitis of class projectile?

[edit]

/c local surface=game.player.surface

for key, entity in pairs(surface.find_entities_filtered({type="projectile"})) do

entity.destroy()

end

This destroyed all projectiles on the map and I am back to 50 FPS. So at least I was able to solve this one here for now. Question remains: is there a way to locate the amount and location of entities type projectile? I am curious to find out what causes the problems

External link →
over 3 years ago - /u/Klonan - Direct link

Probably a mod making them and not destroying them when their time is up.

You can print their name with game.print(entity.name) and try to see which mod it might be

over 3 years ago - /u/Klonan - Direct link

Originally posted by [deleted]

[deleted]

The output has some spam prevention, if the name is the same it will only print it once, instead of 3409 times

What is the random entity name? You can look it up in the prototype browser (CTRL + SHIFT + E in game), and 'Prototype history' should show which mods have added/touched the prototype.

over 3 years ago - /u/Klonan - Direct link

Originally posted by becks0815

The entity listed when running the print command is explosive-cannon-projectile. Makes no sense, these are shells I produce somewhere in a factory, and I am sure the projectile type just ends on the list as last item by accident, and the rest is supressed.

Thats not how it works, the print is correct, some mod is creating lots of artillery projectiles somewhere

over 3 years ago - /u/Klonan - Direct link

Originally posted by becks0815

Which is strange. These projectiles can only be generated by firing an explosive shell using a cannon, and I have zero cannons built.

Found the history. It shows base 1.1.8, RampantArsenal 1.0.2 and RealisticFusionWeaponry as the only and last 3 Mods accessing it.

I will look into Rampart first

Projectiles can be creates by scripts directly, using surface.create_entity{}