Heya,
I'm trying to achieve a look that is to create a tile under the same location as a certain resource when generating chunks.
e.g.: creating a stone-tile under iron-ore resources.
My current thought is to perhaps have a tile have the exact same autoplace function as the resource in question, but I can't quite wrap my little lizard brain around it. It doesn't need to be precise, it can be roughly the same.
NOTE: I'd like to do it that way, not the other way around (i.e. not using tile restriction on an ore autoplace to only appear on this tile).
Also without using runtime scripts.
Cheers
[Solved]Using autoplace to make a tile appear under a resource?
[Solved]Using autoplace to make a tile appear under a resource?
Last edited by Fishbus on Fri Jun 27, 2025 10:02 pm, edited 1 time in total.
Re: Using autoplace to make a tile appear under a resource?
IIRC, I discovered by accident that Aquilo uses an effect trigger event to create ice under it. (I had copied it and somehow ice was spawning on Nauvis, traced back to the build effect trigger on the resource entity.) That sounds like exactly what you want.
My mods: Multiple Unit Train Control, RGB Pipes, Shipping Containers, Rocket Log, Smart Artillery Wagons.
Maintainer of Auto Deconstruct, Cargo Ships, Vehicle Wagon, Honk, Shortwave.
Maintainer of Auto Deconstruct, Cargo Ships, Vehicle Wagon, Honk, Shortwave.
Re: Using autoplace to make a tile appear under a resource?
Thank you!robot256 wrote: Fri Jun 27, 2025 8:34 pm IIRC, I discovered by accident that Aquilo uses an effect trigger event to create ice under it. (I had copied it and somehow ice was spawning on Nauvis, traced back to the build effect trigger on the resource entity.) That sounds like exactly what you want.
Investigating down this path, lead me to make a function that is just the ticket:
(based on the aquilo one, but allowed to be customizable more easily)
Code: Select all
local function create_tiles(tilename, rad)
return {
type = "direct",
action_delivery =
{
type = "instant",
target_effects =
{
{
type = "set-tile",
tile_name = tilename,
radius = rad or 1,
}
}
}
}
end
created_effect = create_tiles("grass-2", 2.5),
Re: [Solved]Using autoplace to make a tile appear under a resource?
Alternatively, you can use the same noise expression for your tile autoplace