[MOD 0.14.x] Water maze

Topics and discussion about specific mods
orzelek
Smart Inserter
Smart Inserter
Posts: 3911
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: [MOD 0.12.x] Water maze

Post by orzelek »

swni wrote:It should be pretty easy for Water Maze to expose two remote interfaces; one that tells it whether to suppress calling make_chunk in response to on_chunk_generated, and another to explicitly call make_chunk when desired. Then RSO can call the former on_init and on_load, and the latter right before its own chunk generation work. This way RSO needs to be aware of this mod, but not vice versa. (Or we could go the other way.) Does that sound good?
Sure - it works for me.
I'm not 100% sure if that initial init call will go through - would need to test when to actually make it. I'll try on player creation call or on init/mod changes. On_load is limited now.

swni
Long Handed Inserter
Long Handed Inserter
Posts: 91
Joined: Sat Mar 05, 2016 1:54 am
Contact:

Re: [MOD 0.12.x] Water maze

Post by swni »

I wrote another version with some bugfixes and new features (like islandify) but it looks like I'm not going to have internet at home for a few weeks, so it won't be uploaded for a while.

Based on what I heard from a developer, the configuration auto-sync feature is not going to work in 0.13 because Factorio will not let people with different mod settings join the same game. I don't think there's anything I can do to get around this limitation. However I'm probably the only person who uses this mod in multiplayer anyhow.

Revol
Manual Inserter
Manual Inserter
Posts: 2
Joined: Mon Apr 04, 2016 6:26 pm
Contact:

Re: [MOD 0.12.x] Water maze

Post by Revol »

having Trouble Figuring out how to change it to islands settings :(

Using Notepad++ ive edited in the zip and after unzipping as well neither has worked, Deleted Maze1 (after about 50 tries)

the Topish Portion of my control.lua is now

local watercolor = "green"

local pattern

-- pattern = islands(64, 64, 2) -- Do not use chunkify with this

pattern = union(islands(64, 64, 2))

-- pattern = safety(pattern)

pattern = add_land_boundary(pattern, watercolor)

Finaly opened the readme in notepad++ but it showed same as here on forum and in the control and didn't help.

Mostly just Unable to get off the Maze Setting(which isn't bad, but I cant even adjust that!) to islands with blue or green(preferred green but don't care lol) water. I love control points/chockpoints and downloaded mod as soon as I saw those images but cant get it to work sadly... Anyone have a Clue exactly what I am screwing up? at first I thought it was the othermods I downloaded fighting it but I disabled all but water Maze.

using/installed Factorio Thru Steam no Beta/Experimental is enabled, but not sure if that is needed? if I Guessing right by the list under Betas for properties for factorio in steam the "stable" version is like .12.21? do I need to opt into one of the listed beta version/experimental for the mod? If anyone has a Clue Please let me know!

Edit: Ohh yes, I DL'ed the 0.0.5 version and no others atm..

swni
Long Handed Inserter
Long Handed Inserter
Posts: 91
Joined: Sat Mar 05, 2016 1:54 am
Contact:

Re: [MOD 0.12.x] Water maze

Post by swni »

Revol wrote:having Trouble Figuring out how to change it to islands settings :(
pattern = union(islands(64, 64, 2))
You should get rid of the word "union" there; change the line so it just says "pattern = islands(64, 64, 2)". Let me know if that doesn't work and I'll be happy to help. If you have any problems be sure to let me know what error message you get because that will help me know what the problem is.

I don't know what version of Factorio is stable but I don't think the mod will work on versions older than around 0.12.10 or so.

I have been playing with the islands setting myself lately and I found that it makes a lot easier if the paths are a bit wider, so I might suggest "islands(64, 64, 4)" for a path width of 4 instead of 2. Less of a challenge though!

Revol
Manual Inserter
Manual Inserter
Posts: 2
Joined: Mon Apr 04, 2016 6:26 pm
Contact:

Re: [MOD 0.12.x] Water maze

Post by Revol »

Changed the Patern to

Pattern = islands(64, 64, 3) and got Error __water-maze__/control.lua:29: attempt to call global 'Islands' (a nil value)

Tried again right after with 64, 64, 4 and got __water-maze__/control.lua:29: attempt to call global 'Islands' (a nil value)

Line 29 is the pattern = where maze was before and is now Islands (no capitals) I can repost the full area again, but I replaced it with original download and only deleted the Chuckify line and the empty above it.

Welp. found the problem. The Autocorrect going Behind my Back.

swni
Long Handed Inserter
Long Handed Inserter
Posts: 91
Joined: Sat Mar 05, 2016 1:54 am
Contact:

Re: [MOD 0.12.x] Water maze

Post by swni »

Glad to hear it is fixed. Hope you enjoy it!

Randomness
Burner Inserter
Burner Inserter
Posts: 13
Joined: Wed Mar 30, 2016 9:18 pm
Contact:

Re: [MOD 0.12.x] Water maze

Post by Randomness »

It's very nice idea for a mod and I was hoping to try it out and did what I think is right, but then I got an error that said
__water-maze__/patterns.lua:125: attempt to index local 'p1' (a nil value)
after trying to load a map, here is what my control.lua looks like

Code: Select all

require "defines"
require "util"
require "patterns"

--[[
        Configuration (information below)
]]

local extra_options = {
    start_with_car = false,
    disable_water = false,
    big_scans = false
}

local watercolor = "blue"

local pattern

-- pattern = maze1()
-- pattern = maze2()                -- This is the best of the three maze algorithms
-- pattern = maze3()
-- pattern = cross()
-- pattern = comb()
-- pattern = grid()
-- pattern = islands(64, 64, 2)     -- Do not use chunkify with this
-- pattern = island(32)             -- Do not use chunkify with this
-- pattern = roundisland(32)        -- Do not use chunkify with this

pattern = islands(64, 64, 4)

pattern = union(pattern1, pattern2)

-- pattern = safety(pattern)

pattern = add_land_boundary(pattern, watercolor)

swni
Long Handed Inserter
Long Handed Inserter
Posts: 91
Joined: Sat Mar 05, 2016 1:54 am
Contact:

Re: [MOD 0.12.x] Water maze

Post by swni »

The trouble is with "pattern = union(pattern1, pattern2)", as you have not defined pattern1 or pattern2. You need to define the two patterns you wish to take the union of first. If you just want a normal islands map, you can comment out this line with "--" at the front, otherwise do something like:

pattern1 = blah
pattern2 = otherblah
pattern = union(pattern1, pattern2)

swni
Long Handed Inserter
Long Handed Inserter
Posts: 91
Joined: Sat Mar 05, 2016 1:54 am
Contact:

Re: [MOD 0.12.x] Water maze

Post by swni »

Incidentally a quick update on the status of the mod. During the couple of weeks I had no internet at home I re-wrote most of the mod, added several new patterns (eg islandify, spiral, I think some others), fixed some bugs (see Known Issues), split off configuration into a separate config.lua file that was much easier to understand, and implemented requested features such as remote function calls and such. Unfortunately a short time later a mis-behaving program wiped my hard drive totally, so the re-written version is lost. I haven't gotten around to re-installing Factorio yet and I am not feeling particularly motivated to re-write the mod again, especially since v 0.12.30 (edit: corrected) irreparably broke my favorite feature of this mod and since I have a lot of work to do to re-build my computer unrelated to Factorio.

I encourage feedback and suggestions for changes that you'd like (such as new patterns) but it will be a while before I get around to releasing a newer version. I have another wacky mod idea I'd like to try out as well....
Last edited by swni on Sat Apr 16, 2016 12:06 pm, edited 1 time in total.

orzelek
Smart Inserter
Smart Inserter
Posts: 3911
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: [MOD 0.12.x] Water maze

Post by orzelek »

What was broken for your mod with updates?

swni
Long Handed Inserter
Long Handed Inserter
Posts: 91
Joined: Sat Mar 05, 2016 1:54 am
Contact:

Re: [MOD 0.12.x] Water maze

Post by swni »

orzelek wrote:What was broken for your mod with updates?
If there are any configuration differences between various players joining the same multiplayer game, the mod avoids desyncs by letting the host's settings dominate. (This proved very useful when playing multiplayer with 5 players, as we wanted to try out a bunch of different possible settings, and I didn't have the email addresses of everyone playing.) Now Factorio will not let such players join at all.

Randomness
Burner Inserter
Burner Inserter
Posts: 13
Joined: Wed Mar 30, 2016 9:18 pm
Contact:

Re: [MOD 0.12.x] Water maze

Post by Randomness »

Wow you reply quick, well I made the union a comment and it worked, but do you want me to actually put blah or what is something that I could put there :lol:

swni
Long Handed Inserter
Long Handed Inserter
Posts: 91
Joined: Sat Mar 05, 2016 1:54 am
Contact:

Re: [MOD 0.12.x] Water maze

Post by swni »

You could do something like:

pattern1 = islands(64, 64, 4)
pattern2 = chunkify(cross(), 20)
pattern = union(pattern1, pattern2)

or replace union with intersection for example.

User avatar
UntouchedWagons
Long Handed Inserter
Long Handed Inserter
Posts: 60
Joined: Thu Jan 01, 2015 6:16 pm
Contact:

Re: [MOD 0.12.x] Water maze

Post by UntouchedWagons »

This might be a bit outside the scope of your mod but could you add a pattern that adds medium-to-large blobs of land random distances apart without connecting land?

swni
Long Handed Inserter
Long Handed Inserter
Posts: 91
Joined: Sat Mar 05, 2016 1:54 am
Contact:

Re: [MOD 0.12.x] Water maze

Post by swni »

UntouchedWagons wrote:This might be a bit outside the scope of your mod but could you add a pattern that adds medium-to-large blobs of land random distances apart without connecting land?
Sure, if you're okay with the blobs being circles (I don't know a good way to make nice "natural looking" blobs). Can I ask why you don't want the blobs to be connected, or what this is for? I don't know any mods that let you cross water....

(I assume you saw my earlier note that it'll be a bit until I resume development.)

User avatar
UntouchedWagons
Long Handed Inserter
Long Handed Inserter
Posts: 60
Joined: Thu Jan 01, 2015 6:16 pm
Contact:

Re: [MOD 0.12.x] Water maze

Post by UntouchedWagons »

The landfill mod lets you create land with stone and FARL lets you place concrete over water. What I want to do is have a series of rail-connected islands where each island performs a very specific job, one creates green circuits, one processes oil, etc... I haven't found a bridge mod that does what I want. What I ended up doing was using the Island pattern with no interconnecting bridges, it's not ideal but it'll work for now.

swni
Long Handed Inserter
Long Handed Inserter
Posts: 91
Joined: Sat Mar 05, 2016 1:54 am
Contact:

Re: [MOD 0.12.x] Water maze

Post by swni »

Neat, sounds fun. If you're fine with regularly spaced islands for now, it's easy enough to modify the "islands" pattern to get rid of the bridges, but that'll lose the surprise of where the next island is. (Change line 42 of patterns.lua from "if (x < w) or (y < w) then" to "if false then", or something like that.)

Mr Sunol
Inserter
Inserter
Posts: 24
Joined: Thu Dec 25, 2014 6:23 am
Contact:

Re: [MOD 0.12.x] Water maze

Post by Mr Sunol »

Is there any way of combining the islands with the maze?
Such as, the island are all the same, but the bridges are sporadic. Not every bridge will be there.


Also, I think someone else mentioned it, but having islands of different sizes would be cool.

swni
Long Handed Inserter
Long Handed Inserter
Posts: 91
Joined: Sat Mar 05, 2016 1:54 am
Contact:

Re: [MOD 0.12.x] Water maze

Post by swni »

I mentioned in another post that due to a hard drive wipe I lost a lot of work I had done on this mod. In the end I was able to recover a portion of the lost work, so I reinstalled Factorio and cleaned it up and have now uploaded v0.0.6. There are quite a few changes, see changelog. Notably configuration is now in config.lua and all the patterns have been given clearer names; the popular "islands" pattern is now called "SquaresAndBridges". There are several new patterns, including Islandify which was contributed by Donovan Hawkins.

I have several interesting ideas for patterns, especially nicer looking islands, but further work on the mod is going to be quite low priority for a long while. Feedback still welcome.
Mr Sunol wrote:Is there any way of combining the islands with the maze?
Such as, the island are all the same, but the bridges are sporadic. Not every bridge will be there.
Try the new Islandify pattern, it should be similar to what you want, e.g.

Code: Select all

pattern = Islandify(<basepattern>, <square size>, <bridge lengths>, <bridge widths>)
UntouchedWagons wrote: This might be a bit outside the scope of your mod but could you add a pattern that adds medium-to-large blobs of land random distances apart without connecting land?
Maze3() now accepts optional parameters that allow it to generate disconnected land, e.g. Maze3(0.3, false). The first parameter controls what proportion of the world is land, and the second parameter being false tells the mod to not force land to be connected. By playing around with Maze3 and combining some patterns (e.g. with Union) you may find something vaguely along the lines of what you have in mind.

swni
Long Handed Inserter
Long Handed Inserter
Posts: 91
Joined: Sat Mar 05, 2016 1:54 am
Contact:

Re: [MOD 0.12.x] Water maze

Post by swni »

Two more things -- I uploaded new screenshots in the album on the initial post, check out the new patterns and some fun combinations of the old patterns. Spiral is near-enough impossible to play on but it looks wicked on the minimap.

Unfortunately the remote function call stuff was lost in the hard drive wipe and I've forgotten how to do it, so I'm not sure when I'll get around to re-doing it.

Post Reply

Return to “Mods”