[Solved] "create-entity" Trigger Effect "find_non_colliding_position" to care about ghosts

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
User avatar
Fishbus
Inserter
Inserter
Posts: 33
Joined: Sat Sep 28, 2024 8:20 pm
Contact:

[Solved] "create-entity" Trigger Effect "find_non_colliding_position" to care about ghosts

Post by Fishbus »

Heya,

I have a" create-entity" trigger effect which does this:

Code: Select all

 {
	type = "create-entity",
	entity_name = data.entity_name,
	check_buildability = true,
	find_non_colliding_position  = true,
	non_colliding_search_radius = 3,
	tile_collision_mask  = {layers = {ghost= true} }
}
When this is created near a ghost, it will place on it and remove the ghost. (which is undesired)

Adding the tile collision mask for ghosts doesn't seem to effect the search radius as it will place on a ghost and remove it.

The expected behavior for me would be to not remove/replace the ghost, or at least avoid it altogether (or fail placement - either is fine)

Something along the lines of find_non_colliding_position_use_mask = true, which would mean that when rechecking the position to also use the tile_collision_mask layers when checking the radius.

Cheers
Last edited by Fishbus on Tue Jul 08, 2025 5:28 pm, edited 1 time in total.
Rseding91
Factorio Staff
Factorio Staff
Posts: 15871
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: "create-entity" Trigger Effect "find_non_colliding_position" to care about ghosts

Post by Rseding91 »

Note the reason it doesn't work how you're asking is: it's using the collision mask from the entity defined in the trigger.
If you want to get ahold of me I'm almost always on Discord.
User avatar
Fishbus
Inserter
Inserter
Posts: 33
Joined: Sat Sep 28, 2024 8:20 pm
Contact:

Re: "create-entity" Trigger Effect "find_non_colliding_position" to care about ghosts

Post by Fishbus »

Rseding91 wrote: Tue Jul 08, 2025 5:07 pm Note the reason it doesn't work how you're asking is: it's using the collision mask from the entity defined in the trigger.
Ok that makes a lot of sense. it would use the created entitys collision mask.

Much thanks, I will report back.
User avatar
Fishbus
Inserter
Inserter
Posts: 33
Joined: Sat Sep 28, 2024 8:20 pm
Contact:

Re: "create-entity" Trigger Effect "find_non_colliding_position" to care about ghosts

Post by Fishbus »

Yes that works

Many thanks again!
Post Reply

Return to “Modding interface requests”