Factorissimo2


Factorissimo adds factory buildings to Factorio. Place them down, walk in, build your factories inside!

Content
3 years ago
0.14 - 1.1
222K

g How to completely delete unneeded factories?

5 years ago
(updated 5 years ago)

When I pick up or destroy a factory, it's surface and contents stay in the save file. There is a command to return the lost factory buildings. I'm gradually reducing my number of factories for performance reasons such as save file size, gamesaving speed and electric networks overhead (even when inactive), how do I delete those surfaces that I don't need anymore?

5 years ago

It's not currently possible, and it's not easy to implement with the current system, as I hadn't really planned for people wanting to make their factories smaller. To minimize the UPS impact of your unused factory buildings, you can keep them around in item form (or destroy them while placed if you already have too many factory buildings in item form). They'll still have one electric network per building though.

5 years ago

I guess if I decide that I really need it, I'll try to get the name of surface of factory that I'm about to demolish using https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.name , then walk out of it, destroy the building, and do https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.delete_surface

5 years ago

Bad idea. Factorissimo periodically sucks up pollution inside factory buildings, even the deconstructed and destroyed ones, so it doesn't escape into the void and can be ejected once the factory building is placed again. You'll crash once the mod tries to gather pollution from an invalid surface.

5 years ago

I see.

5 years ago
(updated 5 years ago)

I was in the same situation and I found an artisan solution:
I assume you are using the map editor:
- Make blueprints of every single Factorissimo interiors you want to keep and keep them in safe place
- Deactivate Factorissimo mod
- Load your game and then you can delete Factorissimo surfaces using the map editor (Game crashes if Factorissimo is activated as developer told)
- Reactivate Factorissimo mod and rebuild your Factories using blueprints
That is the only solution I found to clean all those abandoned surfaces until the developer find a better one.
I wonder support for that like a menu, a destroyer chest, or if it is impossible in game, maybe a migration script that works on game loading and deletes factories placed in that type of chest or some way to mange and delete dead factories. I'm not an expert but hopefully there should be ways to do that :D

5 years ago
(updated 5 years ago)

I'd suggest a special void chest with 1 slot that would only destroy factorissimo buildings and their surfaces.
Reason i'd delete buildings is because i moved on to bigger ones. As i understand it's more "efficient" to have as few extra surfaces as possible and so i use as big buildings as i can.

But i'd assume Factorio raises an event when entity is destroyed. You could tap into it and check if it's this building type, then delete its surface. Simpler than using a special chest i guess.

New response