[0.15] Explosive Excavation & Bot Landfill

Topics and discussion about specific mods
Post Reply
GotLag
Filter Inserter
Filter Inserter
Posts: 532
Joined: Sat May 03, 2014 3:32 pm
Contact:

[0.15] Explosive Excavation & Bot Landfill

Post 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.
Version History
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.
Version History

bNarFProfCrazy
Fast Inserter
Fast Inserter
Posts: 194
Joined: Sat Apr 23, 2016 7:11 am
Contact:

Re: [0.15] Explosive Excavation & Bot Landfill

Post 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.

bNarFProfCrazy
Fast Inserter
Fast Inserter
Posts: 194
Joined: Sat Apr 23, 2016 7:11 am
Contact:

Re: [0.15] Explosive Excavation & Bot Landfill

Post by bNarFProfCrazy »

There seems to be a strange bug with landfill when I try to place larger area with bots.
20170531221442_1.jpg
20170531221442_1.jpg (505.54 KiB) Viewed 9175 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.

GotLag
Filter Inserter
Filter Inserter
Posts: 532
Joined: Sat May 03, 2014 3:32 pm
Contact:

Re: [0.15] Explosive Excavation & Bot Landfill

Post 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.

bogpah
Manual Inserter
Manual Inserter
Posts: 3
Joined: Sat Aug 01, 2015 3:53 am
Contact:

Re: [0.15] Explosive Excavation & Bot Landfill

Post 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?

GotLag
Filter Inserter
Filter Inserter
Posts: 532
Joined: Sat May 03, 2014 3:32 pm
Contact:

Re: [0.15] Explosive Excavation & Bot Landfill

Post 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.

bogpah
Manual Inserter
Manual Inserter
Posts: 3
Joined: Sat Aug 01, 2015 3:53 am
Contact:

Re: [0.15] Explosive Excavation & Bot Landfill

Post 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.

User avatar
Mooncat
Smart Inserter
Smart Inserter
Posts: 1190
Joined: Wed May 18, 2016 4:55 pm
Contact:

Re: [0.15] Explosive Excavation & Bot Landfill

Post by Mooncat »

As someone reported the crash issue in Creative Mode, would you check robot.valid in your on_robot_built_tile handler please? :mrgreen:

Trainwreck
Fast Inserter
Fast Inserter
Posts: 110
Joined: Wed Apr 05, 2017 2:17 am
Contact:

Re: [0.15] Explosive Excavation & Bot Landfill

Post by Trainwreck »

I'm seeing an issue with Explosive Excavation where random explosions are spawned when placing landfill.
eecropped.jpg
eecropped.jpg (228.42 KiB) Viewed 8559 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.

GotLag
Filter Inserter
Filter Inserter
Posts: 532
Joined: Sat May 03, 2014 3:32 pm
Contact:

Re: [0.15] Explosive Excavation & Bot Landfill

Post by GotLag »

That looks like it might be a bug in the event handling code, could you submit a bug report?

Trainwreck
Fast Inserter
Fast Inserter
Posts: 110
Joined: Wed Apr 05, 2017 2:17 am
Contact:

Re: [0.15] Explosive Excavation & Bot Landfill

Post 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

Tyrindor
Long Handed Inserter
Long Handed Inserter
Posts: 91
Joined: Sun Jul 03, 2016 10:06 am
Contact:

Re: [0.15] Explosive Excavation & Bot Landfill

Post 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.

Trainwreck
Fast Inserter
Fast Inserter
Posts: 110
Joined: Wed Apr 05, 2017 2:17 am
Contact:

Re: [0.15] Explosive Excavation & Bot Landfill

Post 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].

GotLag
Filter Inserter
Filter Inserter
Posts: 532
Joined: Sat May 03, 2014 3:32 pm
Contact:

Re: [0.15] Explosive Excavation & Bot Landfill

Post by GotLag »

Fixed now, thanks for letting me know.

Drizzt321
Inserter
Inserter
Posts: 35
Joined: Fri May 23, 2014 1:55 am
Contact:

Re: [0.15] Explosive Excavation & Bot Landfill

Post 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.

GotLag
Filter Inserter
Filter Inserter
Posts: 532
Joined: Sat May 03, 2014 3:32 pm
Contact:

Re: [0.15] Explosive Excavation & Bot Landfill

Post by GotLag »

A bit more description, please.

golfmiketango
Filter Inserter
Filter Inserter
Posts: 549
Joined: Fri Jan 29, 2016 2:48 am
Contact:

Re: [0.15] Explosive Excavation & Bot Landfill

Post 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)

liqo
Burner Inserter
Burner Inserter
Posts: 17
Joined: Fri May 25, 2018 1:19 am
Contact:

Re: [0.15] Explosive Excavation & Bot Landfill

Post 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

Post Reply

Return to “Mods”