Page 1 of 1
[0.15] Explosive Excavation & Bot Landfill
Posted: Fri May 12, 2017 2:53 pm
by GotLag
Explosive Excavation
Adds "blasting charges" to place water tiles - the opposite of landfill. Available to research after completing Explosives and Landfill researches.
Blasting charges do a small amount of explosive damage to their immediate surroundings on placement.
Bot Landfill
Allows bots to place landfill and explosive blasting changes. Note that due to the way water tile placement works, attempting to fill large areas with water will result in land with a few random water holes in it.
Landfill ghosts can be added to blueprints, but after being placed they transform into grass tiles that can't be blueprinted. So if you want to make landfill blueprints, place some ghosts and make a blueprint from those.
Re: [0.15] Explosive Excavation & Bot Landfill
Posted: Sat May 27, 2017 5:45 pm
by bNarFProfCrazy
I get an error with Bot-Landfill and Creative-Mode:
Error while running event creative-mode::on_tick (ID 0)
Error while running event Bot Landfill::on_robot_built_tile (ID 47)
__Bot Landfill__/control.lua:4: attempt to index local 'surface' (a nil value)
stack traceback:
__creative-mode__/scripts/util.lua:152: in function 'raise_event'
__creative-mode__/scripts/util.lua:236: in function 'raise_event_for_revived_tile_ghosts'
__creative-mode__/scripts/util.lua:259: in function 'revive_tile_ghost_and_raise_event'
__creative-mode__/scripts/cheats.lua:2673: in function 'tick'
__creative-mode__/scripts/events.lua:160: in function <__creative-mode__/scripts/events.lua:101>
100% reproducible by placing concrete using a blueprint/shift click.
I don't know which mod caused the issue.
Re: [0.15] Explosive Excavation & Bot Landfill
Posted: Wed May 31, 2017 9:06 pm
by bNarFProfCrazy
There seems to be a strange bug with landfill when I try to place larger area with bots.

- 20170531221442_1.jpg (505.54 KiB) Viewed 11160 times
When placing landfill with bots there is a high probability that neighbouring fields are filled with landfill as well, but the ghost landfill remains the same.
Re: [0.15] Explosive Excavation & Bot Landfill
Posted: Wed May 31, 2017 9:25 pm
by GotLag
That's a known problem, to do with the way Factorio's tile placement checks create more land (the minimum wight/height of a piece of land is 2 tiles). There's no easy fix (computationally or programmatically) that I'm aware of. It's the same reason you can't completely cut off a piece of land using explosives, unless you hand-place the last 2x2 section in one click.
Re: [0.15] Explosive Excavation & Bot Landfill
Posted: Thu Jun 29, 2017 3:19 pm
by bogpah
I would like to be able to take any blueprint, paste it on water, and have landfill be placed as a blueprint under the entities that I am trying to construct. Does that make sense? I want to be able to click the blueprint on water just as I would on land, and have bots come try to place everything as they would on land, except that they would also put landfill where needed to make the construction possible, maybe requiring shift-clicking the blueprint in this case. Is there any way to do this with this mod? If not, where else should I look for this functionality?
Re: [0.15] Explosive Excavation & Bot Landfill
Posted: Fri Jun 30, 2017 7:38 am
by GotLag
I don't think it's feasible. Shift-clicking won't place blueprint ghosts on water, and without that there's no reasonable way I can see to detect when landfill would be required.
Re: [0.15] Explosive Excavation & Bot Landfill
Posted: Fri Jun 30, 2017 5:18 pm
by bogpah
GotLag wrote:I don't think it's feasible. Shift-clicking won't place blueprint ghosts on water, and without that there's no reasonable way I can see to detect when landfill would be required.
Whenever you try to place a blueprint, you could always try to place landfill under the entities in the blueprint. This would fix the problem on the water, and have no effect on the land. Then you wouldn't have to detect when landfill would be required.
Re: [0.15] Explosive Excavation & Bot Landfill
Posted: Tue Aug 22, 2017 2:47 am
by Mooncat
As someone reported the crash issue in Creative Mode, would you check robot.valid in your on_robot_built_tile handler please?

Re: [0.15] Explosive Excavation & Bot Landfill
Posted: Mon Nov 06, 2017 9:11 am
by Trainwreck
I'm seeing an issue with Explosive Excavation where random explosions are spawned when placing landfill.

- eecropped.jpg (228.42 KiB) Viewed 10544 times
In these screenshots I had just clicked to place a large block of landfill. For some reason (probably due to its no single width/height land blocks weirdness), factorio decided not to fill in the bottom row of the landfill brush. Apparently it still passed those coordinates to your on_player_built_tile handler, which spawned the explosions.
Is there any way you could fix this? I was thinking one possible work around would be to do a pre-scan of array of positions passed to your built_tile handler, and if any of the tiles are not water then don't spawn any explosions at all. Haven't tested that though so not sure how well it would work in practice.
Re: [0.15] Explosive Excavation & Bot Landfill
Posted: Mon Nov 06, 2017 9:34 am
by GotLag
That looks like it might be a bug in the event handling code, could you submit a bug report?
Re: [0.15] Explosive Excavation & Bot Landfill
Posted: Mon Nov 06, 2017 10:16 am
by Trainwreck
GotLag wrote:That looks like it might be a bug in the event handling code, could you submit a bug report?
Bug report posted
Re: [0.15] Explosive Excavation & Bot Landfill
Posted: Thu Dec 28, 2017 1:58 am
by Tyrindor
"Dig holes with explosives" doesn't get good search results on the mod portal. You should consider including "water" somewhere in the description. I've been looking for something like this for a long time and just happened to stumble upon this.
Re: [0.15] Explosive Excavation & Bot Landfill
Posted: Wed Jan 24, 2018 3:36 am
by Trainwreck
Getting this error when placing landfill with factorio 0.16.18:
__Explosive Excavation__/control.lua:3: bad argument #1 to 'pairs' (table expected, got nil)
The arguments to on_player_built_tile have changed recently. Positions are now accessed by event.tiles[n].position, instead of the old way of event.positions[n].
Re: [0.15] Explosive Excavation & Bot Landfill
Posted: Wed Jan 24, 2018 5:46 am
by GotLag
Fixed now, thanks for letting me know.
Re: [0.15] Explosive Excavation & Bot Landfill
Posted: Thu Jan 25, 2018 4:07 am
by Drizzt321
For me, it now doesn't crash, but it hangs Factorio and I have to kill it. After disabling this mod it works fine.
Re: [0.15] Explosive Excavation & Bot Landfill
Posted: Thu Jan 25, 2018 5:27 am
by GotLag
A bit more description, please.
Re: [0.15] Explosive Excavation & Bot Landfill
Posted: Wed Feb 07, 2018 1:15 am
by golfmiketango
In bot landfill there is some kind of conflict with creative mode mod, when trying to use the "create wand" to build tiles. I didn't try to understand the underlying problem (which is probably worth doing since it's hard to imagine a good reason for these events to be firing with nonstandard arguments) but the following makes it stop crashing (this replaces the last several lines of control.lua):
Code: Select all
script.on_event(defines.events.on_player_built_tile, function(event)
if event and event["item"] then
placedTiles(game.players[event.player_index], event.tiles, event.item)
end
end)
script.on_event(defines.events.on_robot_built_tile, function(event)
if event and event["item"] then
placedTiles(event.robot, event.tiles, event.item)
end
end)
Re: [0.15] Explosive Excavation & Bot Landfill
Posted: Sat Jun 23, 2018 3:55 am
by liqo
Hello,
I've recently installed bunch of mods and now my game freezes when I try to lay down a brick path. Disabling the Bot Landfill redeems the issue so I figured I let you know

I've already posted it in bug report forum before I found the perpetrator - link here
viewtopic.php?f=7&t=61140&p=368786#p368786
Log, save and the mods I used are uploaded here:
https://drive.google.com/file/d/1Jl5_D4 ... sp=sharing