This is my first post, so I apologize if I didn't pick quite the right location for it.
Greetings! I'm starting to cut my teeth on Factorio modding. It's something I've been tempted to do a few times but up until now haven't touched on much. I have played with the in-game live scripting, which is fun. The fact that the data is all controllable through Lua is fun, and I've always really liked Lua.
My actual question for this post is: Is there a means by which to remove a force once created?
game.create_force("forcename") will happily create a force, no issues. However, there isn't a "remove_force" or equivalent that I can find. Setting game.forces["testforce"] to nil doesn't accomplish anything at all (which I think for the best, really).
An alternative would be an assessment of the harm of leaving lose forces about. Particularly, if I give every player their own force and then an offline player is removed, are the extra forces going to make much of an impact?
Cheers!
-XComp
[SOLVED] Method to remove a force
[SOLVED] Method to remove a force
Last edited by xcompwiz on Fri May 27, 2016 10:35 pm, edited 2 times in total.
Re: Method to remove a force
You remove a force by merging it into an existing one using game.merge_forces: http://lua-api.factorio.com/0.12.34/Lua ... rge_forces
If you want to get ahold of me I'm almost always on Discord.
Re: Method to remove a force
Of course! That makes perfect sense.
Thanks!
Thanks for the super quick support. I've been where you are in other contexts, so I send much support and respect to you.
And I absolutely love Factorio.

Thanks for the super quick support. I've been where you are in other contexts, so I send much support and respect to you.
And I absolutely love Factorio.
