Pave around water / is there a mod?

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
Post Reply
vanatteveldt
Filter Inserter
Filter Inserter
Posts: 945
Joined: Wed Nov 25, 2015 11:44 am
Contact:

Pave around water / is there a mod?

Post by vanatteveldt »

I've been going OCD on paving my base, paving everything with concrete and using brick paving to mark roads. I think the result is quite pretty:

Image

However, it really bothers me that I can't do anything with the waterfronts, as there are quite a couple of lakes in my base. I guess I could add the landfill mod, but it feels sort of nice to have the terrain to work around.

- Is there some sort of mod that allows me to pave up to the actual water, or give it an industrial quay / wharf front look?
- Can I plant trees on the waterfront to give it a bit of green / park like appearance? Maybe the treefarm mod can do that?

Thanks!

User avatar
prg
Filter Inserter
Filter Inserter
Posts: 947
Joined: Mon Jan 19, 2015 12:39 am
Contact:

Re: Pave around water / is there a mod?

Post by prg »

Run

Code: Select all

global.player=game.local_player
script.on_event(0, function(event)
    if event.tick % 10 ~= 0 then return end
    local tiles={}
    local p=global.player.position
    for x=-1,1 do
        for y=-1,1 do
            if not string.match(global.player.surface.get_tile(p.x+x, p.y+y).name, "water") then
                table.insert(tiles, {name="concrete", position={p.x+x,p.y+y}})
            end
        end
    end
    global.player.surface.set_tiles(tiles)
end)
to place concrete wherever you go, even next to water. This won't consume concrete from your inventory, so sacrifice a chest full of concrete with a shotgun or something if you feel this is cheaty.

Run

Code: Select all

script.on_event(0, nil)
to stop placing concrete again.

Run

Code: Select all

game.local_player.surface.create_entity{name="tree-0"..math.random(9), position=game.local_player.position}
to place a random tree.
Automatic Belt (and pipe) Planner—Automate yet another aspect of constructing your factory!

vanatteveldt
Filter Inserter
Filter Inserter
Posts: 945
Joined: Wed Nov 25, 2015 11:44 am
Contact:

Re: Pave around water / is there a mod?

Post by vanatteveldt »

Cool! I haven't played with lua yet, so this is a nice starter.

I'll sacrifice a chest of prime solar panels to placate Ford (or Armok :) )

Thanks!

User avatar
prg
Filter Inserter
Filter Inserter
Posts: 947
Joined: Mon Jan 19, 2015 12:39 am
Contact:

Re: Pave around water / is there a mod?

Post by prg »

Oh and if you'd rather have a button to place trees instead of having to go through the console all the time, you can use

Code: Select all

game.local_player.gui.top.add{type="button", name="create-tree-button", caption="Create a tree!"}

script.on_event(1, function(event)
    if event.element.name=="create-tree-button" then
        local p = game.get_player(event.player_index)
        p.surface.create_entity{name="tree-0"..math.random(9), position=p.position}
    end
end)
To get rid of that button again,

Code: Select all

script.on_event(1, nil)
game.local_player.gui.top["create-tree-button"].destroy()
Automatic Belt (and pipe) Planner—Automate yet another aspect of constructing your factory!

vanatteveldt
Filter Inserter
Filter Inserter
Posts: 945
Joined: Wed Nov 25, 2015 11:44 am
Contact:

Re: Pave around water / is there a mod?

Post by vanatteveldt »

Thanks again for helping. Placing the concrete worked perfectly. Interestingly, after removing some concrete that I didn't want, it removed the nearby water as well.

I also wanted to place some stone bricks, but I get segfaults when I try either

Code: Select all

script.on_event(0, function(event)
    if event.tick % 10 ~= 0 then return end
    local tiles={}
    local p=global.player.position
    for x=-1,1 do
        for y=-1,1 do
            if not string.match(global.player.surface.get_tile(p.x+x, p.y+y).name, "water") then
                table.insert(tiles, {name="stone-brick", position={p.x+x,p.y+y}})
            end
        end
    end
    global.player.surface.set_tiles(tiles)
end)
or the simpler

Code: Select all

global.player=game.local_player
script.on_event(0, function(event)
 if event.tick % 10 ~= 0 then return end
 local tiles={}
 local p=global.player.position
 table.insert(tiles, {name="stone-brick", position={p.x, p.y}})
 global.player.surface.set_tiles(tiles)
end)
Even though "stone-brick" is what it seems to use in the recipe names. Any idea?


Edit: never mind, I managed to solve my (admittedly, pretty rich-world) problem by removing the concrete then replacing with brick manually. Of course, this deleted some water but there's no shortage of that.

The tree planting also works perfectly:

Image


Edit again: Strange enough, sometimes removing the concrete doesn't remove the water as well (in fact, I can't seem to reproduce it anymore. Maybe it only works from the north, and not from other directions. Any clue on the "stone-brick" script?

User avatar
prg
Filter Inserter
Filter Inserter
Posts: 947
Joined: Mon Jan 19, 2015 12:39 am
Contact:

Re: Pave around water / is there a mod?

Post by prg »

The tile is called stone-path, not -brick. Though the game really shouldn't crash like that, you should report a bug about that.
Automatic Belt (and pipe) Planner—Automate yet another aspect of constructing your factory!

User avatar
Smarty
Global Moderator
Global Moderator
Posts: 816
Joined: Sat Oct 04, 2014 5:00 pm
Contact:

Re: Pave around water / is there a mod?

Post by Smarty »

vanatteveldt wrote: The tree planting also works perfectly:

Image

wauw that looks fancy

vanatteveldt
Filter Inserter
Filter Inserter
Posts: 945
Joined: Wed Nov 25, 2015 11:44 am
Contact:

Re: Pave around water / is there a mod?

Post by vanatteveldt »

prg wrote:The tile is called stone-path, not -brick. Though the game really shouldn't crash like that, you should report a bug about that.
Cool, thanks. I figured it was my own fault by meddling with the internals, but I'll submit a report. Thanks again!

@Smarty Thanks :). I'll post some screenies when I finish the redecoration, I think some parts of the factory are working quite well and I like the general shape of the layout.

User avatar
prg
Filter Inserter
Filter Inserter
Posts: 947
Joined: Mon Jan 19, 2015 12:39 am
Contact:

Re: Pave around water / is there a mod?

Post by prg »

vanatteveldt wrote:I figured it was my own fault by meddling with the internals, but I'll submit a report.
When you're doing something wrong with the Lua API, the error needs to be detected and reported properly. The game must not segfault.
Automatic Belt (and pipe) Planner—Automate yet another aspect of constructing your factory!

bobucles
Smart Inserter
Smart Inserter
Posts: 1669
Joined: Wed Jun 10, 2015 10:37 pm
Contact:

Re: Pave around water / is there a mod?

Post by bobucles »

I think this is more the fault of there not being a "dock wall" type of decal. Normally when pavement reaches a watery edge like the ocean, a small wall is constructed so the pavement is stable. You see this sort of thing happen all the time in ye olde docking districts, where restaurants and such build right up to the ocean and there's no beach transition at all.

mikeloeven
Manual Inserter
Manual Inserter
Posts: 4
Joined: Mon May 08, 2017 1:20 pm
Contact:

Re: Pave around water / is there a mod?

Post by mikeloeven »

Sorry for the necro post but I think the OP has a point that there needs to be a mod to remove or at least tighten the concrete placement constraints. I was just trying to build a nice paved dock for a boat mod but this stupid and completely unneeded constraint regarding placement of concrete near water is causing a problem. So yeah would like someone to make a mod to fix this once and for all

saturn7
Long Handed Inserter
Long Handed Inserter
Posts: 89
Joined: Wed Apr 27, 2016 6:14 pm
Contact:

Re: Pave around water / is there a mod?

Post by saturn7 »

You can remove the restriction for concrete placement in the lua files (I did it once, but I forget where exactly, I can search for it if you want); I don't know if there is a mod that does that. However placing concrete next to water sometimes bugs the water edge; the problem is that Factorio handles water edges in a weird way. For the same reason bots can't place landfill (they could once, but it has been disabled because it left holes, among other problems).

So the restriction is not arbitrary, but because there's a conflict with how Factorio handles the water edge.

User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2915
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: Pave around water / is there a mod?

Post by Optera »


Post Reply

Return to “Gameplay Help”