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

This subforum contains all the issues which we already resolved.
Post Reply
User avatar
ownlyme
Filter Inserter
Filter Inserter
Posts: 400
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 »

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: uiAbove||Grenade arc||Blueprint allies||Creeps forget command/ don't get removed||Player Modifiers||textbox::selection||Better Heat IF||Singleplayer RCON||tank bug w/ min_range >= projectile_creation_distance

User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5150
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 »

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: 400
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 »

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: uiAbove||Grenade arc||Blueprint allies||Creeps forget command/ don't get removed||Player Modifiers||textbox::selection||Better Heat IF||Singleplayer RCON||tank bug w/ min_range >= projectile_creation_distance

User avatar
ownlyme
Filter Inserter
Filter Inserter
Posts: 400
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 »

i created an additional script that iterates over all my units and re-assigns commands if their current command type is wandering (is this new that we can read their command? if so, thank you)
it might not be perfect but for me it works like this..
mods.factorio.com/user/ownlyme
My requests: uiAbove||Grenade arc||Blueprint allies||Creeps forget command/ don't get removed||Player Modifiers||textbox::selection||Better Heat IF||Singleplayer RCON||tank bug w/ min_range >= projectile_creation_distance

User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5150
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 »

Right!

I also had this problem when updating my unit control mod, and I reported internally to our great biter dev Oxyd, and its fixed for the next release.

However, I think the specific case that was fixed was not present in 0.17, so your problems from June I do not know if they are fixed

Let us know after the next 0.18 release, if the problem still happens

Post Reply

Return to “Resolved Problems and Bugs”