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

This subforum contains all the issues which we already resolved.
Luamaniemi
Manual Inserter
Manual Inserter
Posts: 2
Joined: Wed Jul 29, 2026 3:01 pm
Contact:

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

Post 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 1069 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.
Attachments
mod-set-command_0.1.0.zip
(1.45 KiB) Downloaded 29 times
User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5560
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

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

Post by Klonan »

Thanks for the report,

This is fixed for the next release
Post Reply

Return to “Resolved Problems and Bugs”