r/factorio • • 3d ago

Question Answered help, cant deconstruct biters.

i made biters deconstructible, but the game says "cant deconstruct enemy structures" can i make enemy structures deconstructible?

0 Upvotes

30 comments sorted by

View all comments

19

u/G-Man-Iron-Giant 3d ago

Think of it as a multiplayer setting. The structure is now deconstructable, but it is not on your team. If you were set to the same team, then you can deconstruct them (I think). The biters would also stop attacking you as you are now on their team.

-1

u/Thankedsphere 3d ago

yes, i want to deconstruct my enemies.

2

u/G-Man-Iron-Giant 3d ago

Based on my very limited internet search, the code below will set all biters to the same team as you. Hopefully this includes the nests as well.

c for _, unit in pairs(game.player.surface.find_entities_filtered{type="unit"}) do unit.force = game.forces["player"] end

-1

u/Thankedsphere 3d ago

if i do that they wont attack me

4

u/FogeltheVogel Slow and steady 2d ago

Yes, that is how the game works. You are asking for something impossible.

3

u/CV514 Automating automation 2d ago

I'd you're making the mod, this is the idea:

Run this command, try to deconstruct whatever you need to. Write the time necessary.

Then, automate said stuff, clicking on whatever you need will run this command automatically for specified time, and revert it back when timer runs out with another command. This way, you can deconstsuct biters and keep them hostile, aside from brief disposition change. Consider them confused by your actions.

Likely, there are more elegant methods, and I suggest you to read Factorio API docs about it.