Page 1 of 1

[Klonan][2.1.14] LuaCommandable.set_command() leaves unit group stuck in gathering state called in on_build_base_arrived

Posted: Thu Aug 06, 2026 6:44 pm
by Luamaniemi
OS: Windows 11 x64 25h2 build 26200.8973
Factorio version: 2.1.14
DLCs: no

Description:
This is a follow-up to 135356
The crash has been fixed (thanks!), but set_command() itself still does not work properly: the unit group simply switches to the gathering state and stays like that until it expires.
It does not matter which command is used — command.flee, command.go_to_location, or others — they all result in the group getting stuck in the gathering state when called in on_build_base_arrived

As a result, you can get this:
Scr_gathering.png
Scr_gathering.png (435.68 KiB) Viewed 1076 times
Steps to reproduce:
  1. Load the game with the attached mod
  2. Place the test entity (commandable-crash-test-chest)
  3. Wait for the biters to send an expansion group, or trigger it manually using /c game.get_surface("nauvis").build_enemy_base({ 15 , 15 }, 5, game.forces["enemy"])
  4. Once the group arrives at its destination, it will get stuck in the gathering state.
Expected Behavior:
Upon executing set_command() with type = defines.command.flee, the group should disband and the biters should flee from the entity specified in the "from" parameter as it happens in 2.0.77
Similarly, type = defines.command.go_to_location should force the group to move to the specified location.

Re: [Klonan][2.1.14] LuaCommandable.set_command() leaves unit group stuck in gathering state called in on_build_base_arr

Posted: Wed Sep 30, 2026 7:48 am
by Klonan
Thanks for the report,

This is fixed for the next release