Creeps forget their command sometimes, and don't get removed on command failed

Bugs that we were not able to reproduce, and/or are waiting for more detailed info.
Post Reply
User avatar
ownlyme
Filter Inserter
Filter Inserter
Posts: 343
Joined: Thu Dec 21, 2017 8:02 am
Contact:

Creeps forget their command sometimes, and don't get removed on command failed

Post by ownlyme » Thu Jun 06, 2019 11:06 pm

Factorio's AI on a stress test:
https://mods.factorio.com/mod/dota
After a while, some creeps seem to forget their command
Since i increased their collision size, it got even worse.
I also told them to destroy themselves when their command failed, but they don't...
Afaik there's no way to read a unit's command to destroy them manually.

Code: Select all

local south_biter = game.surfaces[1].create_entity{name="dota-biter-"..south_level.."-"..color, position = south_spawn, force = color}
south_biter.ai_settings.allow_destroy_when_commands_fail = true
south_biter.ai_settings.do_separation = true
south_biter.set_command{
	type = def.command.compound,
	structure_type = def.compound_command.return_last,
	commands =
	{
		{type = def.command.go_to_location, destination = {x=177 ,y=115}},
		{type = def.command.go_to_location, destination = {x=118 ,y=170}},
		{type = def.command.attack_area, destination =enemy_silo_pos, radius = 70}
	}
}

Code: Select all

	
local unit = table.deepcopy(data.raw.unit["small-biter"])
unit.can_open_gates = true
unit.flags = {"placeable-player", "placeable-enemy", "placeable-off-grid", "not-repairable", "breaths-air", "player-creation"}
unit.ai_settings = { destroy_when_commands_fail = true}
unit.selection_box[1][1]= unit.selection_box[1][1]*1.2
...
unit.collision_box[1][1]= unit.collision_box[1][1]*2.5
...
unit.attack_parameters.range = unit.attack_parameters.range * 2
mods.factorio.com/user/ownlyme
My requests: uiRelative||Grenade arc||Blueprint allies||Creeps forget command/ don't get removed||Player Modifiers||textbox::selection||Better Heat IF||Singleplayer RCON||Serializing function refs in global table

User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 3944
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: Creeps forget their command sometimes, and don't get removed on command failed

Post by Klonan » Mon Jun 10, 2019 11:27 am

can you provide a save game or scenario demonstrating the bug,
Something we can just load and it shows the bug without needing to do any console commands or hope it happens by random during the script execution

User avatar
ownlyme
Filter Inserter
Filter Inserter
Posts: 343
Joined: Thu Dec 21, 2017 8:02 am
Contact:

Re: Creeps forget their command sometimes, and don't get removed on command failed

Post by ownlyme » Mon Jun 17, 2019 6:23 pm

Oh sorry, forgot to subscribe to the thread
Hi :)
https://mods.factorio.com/mod/dota
Takes a while until it happens and often resolves itself when they get killed, but still kinda weird.
Could it be that i issued the biters to somehow fall back to wander behaviour?
mods.factorio.com/user/ownlyme
My requests: uiRelative||Grenade arc||Blueprint allies||Creeps forget command/ don't get removed||Player Modifiers||textbox::selection||Better Heat IF||Singleplayer RCON||Serializing function refs in global table

Post Reply

Return to “Pending”

Who is online

Users browsing this forum: No registered users