[MOD 0.16-0.17] Ribbon Maze 0.7.0

Topics and discussion about specific mods
nosports
Filter Inserter
Filter Inserter
Posts: 274
Joined: Fri Jan 19, 2018 5:44 pm
Contact:

Re: [MOD 0.16] Ribbon Maze 0.6.7

Post by nosports »

H8UL wrote: ↑Thu Dec 13, 2018 9:27 pm
darkfrei wrote: ↑Thu Dec 13, 2018 5:03 pm It would be nice if dead ends of the maze can be 3x3 or 5x5 chunks size, but the corridors have the same one chunk wide.
That's the idea, but it's difficult.
I think its possible when you set the corridors n-size plus 2 wide while using only the center chunk for the maze, so that the chasm is just wider
Nerchio
Burner Inserter
Burner Inserter
Posts: 9
Joined: Fri Apr 14, 2017 8:52 am
Contact:

Re: [MOD 0.16] Ribbon Maze 0.6.7

Post by Nerchio »

What is maze chasm considered as for biters? Is it water or something else? I am trying to use this along with Rampant AI and Natural Evolution Enemies but feels like behaviour of biters is really weird. This would be totally expected if they didn't have a completely straight way to my base.
DrJones
Long Handed Inserter
Long Handed Inserter
Posts: 52
Joined: Thu Sep 08, 2016 11:13 pm
Contact:

Re: [MOD 0.16] Ribbon Maze 0.6.7

Post by DrJones »

What's the logic for the terraforming artillery turret to choose a new target? It seems to be going one chunk at a time, which I suppose is fine, maybe, but how does it pick the next chunk? Looking at the screenshot below, this seems a bit suboptimal here.
20190122214719_1.jpg
20190122214719_1.jpg (1.4 MiB) Viewed 4774 times
mrvn
Smart Inserter
Smart Inserter
Posts: 5925
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: [MOD 0.16] Ribbon Maze 0.6.7

Post by mrvn »

I'm trying out Ribbon Maze with Bobs+Angels and I found some problems:

1) Crotinium and Jivolite only appear in dead ends >= 6, which is rare, and then only with some probability. That makes them rather rare while they are needed about as much as any other ore. They aren't needed at the start and are excluded from the starting area by others. Did you interpret that as making them rare overall?

2) Setting a cleared area makes it void of any ores. And outside the starting area there be dragons. Especially with larger block sizes finding the right ores becomes impossible as there are too many aliens in the way and you can't even make more bullets.

The cleared area should have a set of basic ores (no Crotinium / Jivolite / Thermal water / Oil / Uranium).

3) Mixed ore field size should change with block size. A 256m block can still only have maximum 15m mixed ores. Would be nice to allow 30, 62 or even 126m fields.

4) Water might be unusable.

A normal water pump needs a 3x2 area of water. With the trees in the water that limits pumps to the occasional gap, which is OK. A Seafloor pump though needs 3x3 area of water making placement even harder. Maybe there could be the occasional stretch of water without growth.

Water is also only on one side of the maze with the player starting at the side. Why not add a probability to have water at dead ends? All dead ends in the starting area should have water and maybe add a lake in the cleared area. With that would it be possible to start in the center of the maze and have the map expand in all directions?

5) Aliens

Normally aliens are removed from the starting area so players aren't immediately attacked. With larger block sizes the starting area is too small too keep aliens out of the area needed to start. Maybe add a config setting for how many blocks away from the start position aliens should first appear (counted as you walk, not like the crow flies).
User avatar
H8UL
Fast Inserter
Fast Inserter
Posts: 114
Joined: Mon May 15, 2017 4:02 pm
Contact:

Re: [MOD 0.16] Ribbon Maze 0.6.7

Post by H8UL »

Nerchio wrote: ↑Sun Jan 20, 2019 7:15 pm What is maze chasm considered as for biters? Is it water or something else? I am trying to use this along with Rampant AI and Natural Evolution Enemies but feels like behaviour of biters is really weird. This would be totally expected if they didn't have a completely straight way to my base.
I think all that really matters is its got the player collision mask. I think its just the maze layout itself that's causing AI to find things difficult.

I suppose it's possible that the artillery targets in the void are causing some problems. But would biter behaviour be affected by a force where there is a mutual cease fire? I don't think so, but... I can't rule it out.

My plan is to review biter mechanics once 0.17 is out. That has a big more flexibility in its AI modding, from what I understand. I might be able to give enemy units some dedicated pathing logic.
Shameless mod plugging: Ribbon Maze
User avatar
H8UL
Fast Inserter
Fast Inserter
Posts: 114
Joined: Mon May 15, 2017 4:02 pm
Contact:

Re: [MOD 0.16] Ribbon Maze 0.6.7

Post by H8UL »

DrJones wrote: ↑Tue Jan 22, 2019 8:51 pm What's the logic for the terraforming artillery turret to choose a new target? It seems to be going one chunk at a time, which I suppose is fine, maybe, but how does it pick the next chunk?

20190122214719_1.jpg
It's a mystery to me too! Unfortunately, I don't have any control over artillery targeting, as it's internal to the game. It is much less noticeably quirky when used against biter nests due to the distances involved and cheaper ammo cost, but it'll be the same logic.
Shameless mod plugging: Ribbon Maze
User avatar
H8UL
Fast Inserter
Fast Inserter
Posts: 114
Joined: Mon May 15, 2017 4:02 pm
Contact:

Re: [MOD 0.16] Ribbon Maze 0.6.7

Post by H8UL »

mrvn wrote: ↑Mon Jan 28, 2019 10:53 am I'm trying out Ribbon Maze with Bobs+Angels and I found some problems:

1) Crotinium and Jivolite only appear in dead ends >= 6, which is rare, and then only with some probability. That makes them rather rare while they are needed about as much as any other ore. They aren't needed at the start and are excluded from the starting area by others. Did you interpret that as making them rare overall?
I don't remember my reasoning, so I won't defend it :) I'll reduce it to >= 4
mrvn wrote: ↑Mon Jan 28, 2019 10:53 am
2) Setting a cleared area makes it void of any ores. And outside the starting area there be dragons. Especially with larger block sizes finding the right ores becomes impossible as there are too many aliens in the way and you can't even make more bullets.

The cleared area should have a set of basic ores (no Crotinium / Jivolite / Thermal water / Oil / Uranium).
Agreed, the clear area is pretty brutal. Maybe I could leave standard resource spawning on. In 0.6.8 there are clearings throughout the maze, thanks to illiander42, so maybe that is worth a look as an alternative to the start clear area.
mrvn wrote: ↑Mon Jan 28, 2019 10:53 am
3) Mixed ore field size should change with block size. A 256m block can still only have maximum 15m mixed ores. Would be nice to allow 30, 62 or even 126m fields.
Agreed, in principle, but a bit of effort to solve, because the block size transparently scales everything right now, whereas this would make the resource generation "aware" of the block size.
mrvn wrote: ↑Mon Jan 28, 2019 10:53 am
4) Water might be unusable.

A normal water pump needs a 3x2 area of water. With the trees in the water that limits pumps to the occasional gap, which is OK. A Seafloor pump though needs 3x3 area of water making placement even harder. Maybe there could be the occasional stretch of water without growth.

Water is also only on one side of the maze with the player starting at the side. Why not add a probability to have water at dead ends? All dead ends in the starting area should have water and maybe add a lake in the cleared area. With that would it be possible to start in the center of the maze and have the map expand in all directions?
Seems a popular request, and in 0.6.8, water at dead ends is an option due to merged changes from illiander42. It was actually an early design of the mod to do this, but I took it out, because it competes with terraforming as a way to get water, and I'm evil and like the restriction of water near the start.

As for placing pumps, they weren't meant to collide, but collision masks are easily the hardest thing to get right in factorio modding. You fix one problem and create another. I'll try to review the pump/mangrove/harvester/electric mining drill collisions, but I'm not hopeful.
mrvn wrote: ↑Mon Jan 28, 2019 10:53 am
5) Aliens

Normally aliens are removed from the starting area so players aren't immediately attacked. With larger block sizes the starting area is too small too keep aliens out of the area needed to start. Maybe add a config setting for how many blocks away from the start position aliens should first appear (counted as you walk, not like the crow flies).
Agreed.
Shameless mod plugging: Ribbon Maze
mrvn
Smart Inserter
Smart Inserter
Posts: 5925
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: [MOD 0.16] Ribbon Maze 0.6.7

Post by mrvn »

(sorry for the double post in the mod portal)

I'm playing around with making a completely new maze algorithm and want to summarize my plans and ideas. Hopefully this can be merged into RibbonMaze or you have some useful ideas yourself.

First some ideas for the map generation. Those would apply to the existing maze too:

1) The terrain/void divide looks bad. What the maze needs are natural looking walls that can not be destroyed. One thing that comes to mind are the cliffs. If cliff explosives are disabled then they would make a nice looking natural wall for the maze. Cliffs could go either up or down. The void could possibly be filled deep water or lava (someone have a texture for that already?) I think that would look much better.

2) The straight edges on the maze also look bad and aren't ideal for laying train tracks. Corners could be rounded. Dead ends could optionally have a bulb giving some extra space around the ore field.

Secondly I think a totally different maze algorithm is needed. I really don't like the limited size of the maze and that one starts at one end. The existing algorithm doesn't lend itself to growing in all directions though.

So here is my idea for a new algorithm:

A) The map is divided into hexagons. This gives nicer paths with 6 neighbors per hexagon instead of 4 per square the maze has now. The size of the hexagon would be about 32 to give results similar to now. There could be a config setting to choose 4, 6 or 8 neighbors for the maze, doesn't have to absolutely be hexagons.

B) Hexagons are then grouped into larger hexagons or rombus formed blocks. Or any other form that tiles the area. I think hexagons would give nicer results but rombus would be easier to convert between map and maze coordinates.

The idea now is that each block can be generated on it's own and would only depend on the map seed and it's position and not on the time when it is generated. Since each block is of limited size more expensive maze algorithms can be used. Only requirement is that the blocks later fit together. Therefore:

C) Blocks must overlap by one hexagon. This is where blocks are glued together. Each overlap between 2 blocks is filled with randomly placed walls the same way for both blocks (using the coordinates of both blocks as random seed). The tile where 3 or more blocks overlap is always a wall. Create a table of all neighbors of walls just added. Surround the block with an imaginary wall for the purpose of generating the inside. Just so the algorithm doesn't try to leave the block or add walls to the overlap.

D) If open areas are desired add them randomly in the block as temporary walls (make them one tile smaller than the space you want). At the end the temporary walls are turned into free space.

E) For extra effect add some random walls in the block (maybe clustered around the free space?) and add their neighbors to the table. This will create loops in the maze.

F) Pick a random entry from the table. If the cell is free and has at most one wall neighboring it then it also becomes a wall. If so add it's neighbors to the table.

G) repeat F until the table is empty.
mrvn
Smart Inserter
Smart Inserter
Posts: 5925
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: [MOD 0.16] Ribbon Maze 0.6.7

Post by mrvn »

Here is an example for one hexagonal block:
Example maze block
Example maze block
maze.png (57.3 KiB) Viewed 4708 times
Black is the virtual wall around the block and doesn't end up on the map at all. The neighboring blocks fill that space. Bright red are the walls added to the overlap region and green the temporary wall to make a larger free space at the starting position. No random walls were added to the inside.

As you can see the algorithm leaves larger regions in the free space which I think would be beneficial for building factories. The maze could be scaled smaller giving narrower ways. Placing resources in dead ends might also be complicated. There might not be enough or they might not be obviously dead ends (e.g. a bulb of three tiles). Natural (or by design) occurring larger areas could hold resources too.
billbo99
Fast Inserter
Fast Inserter
Posts: 137
Joined: Fri Nov 02, 2018 9:19 am
Contact:

Re: [MOD 0.16] Ribbon Maze 0.6.7

Post by billbo99 »

I wonder if "Cliff Walls" that you propose could block Rockets being lauched over them. I recently played a community map with this mod and you could wipe out the biters with some nuke rockets by being on the other side of one of the void walls.
mrvn
Smart Inserter
Smart Inserter
Posts: 5925
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: [MOD 0.16] Ribbon Maze 0.6.7

Post by mrvn »

billbo99 wrote: ↑Wed Jan 30, 2019 6:24 pm I wonder if "Cliff Walls" that you propose could block Rockets being lauched over them. I recently played a community map with this mod and you could wipe out the biters with some nuke rockets by being on the other side of one of the void walls.
You could. Nukes simply destroy everything in a radius. If the other side of the wall is near enough then it dies.

Think of the nuke as being fired into the air and exploding above the cliffs. The blast will reach the other side easily.
mrvn
Smart Inserter
Smart Inserter
Posts: 5925
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: [MOD 0.16] Ribbon Maze 0.6.7

Post by mrvn »

I got a bit further, generating a maze block in the game. But the cliffs are tricky. I can't yet get the 60Β° slopes to work. So for now I places some palceholder items. This is how it looks now:
maze2.png
maze2.png (1.07 MiB) Viewed 4693 times
Anyone know how to place cliffs properly so they are connected along lines like the above?
User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2905
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: [MOD 0.16] Ribbon Maze 0.6.7

Post by darkfrei »

There is no 30 and 60 degrees cliffs, only 0, 45 and 90 degrees.
But cliff placing is hell.

Why not just water as borders of maze?
mrvn
Smart Inserter
Smart Inserter
Posts: 5925
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: [MOD 0.16] Ribbon Maze 0.6.7

Post by mrvn »

darkfrei wrote: ↑Thu Jan 31, 2019 8:10 am There is no 30 and 60 degrees cliffs, only 0, 45 and 90 degrees.
But cliff placing is hell.

Why not just water as borders of maze?
First: Tried that too. But somehow I didn't get any sandy beach between the grass and water tiles. Probabyl used the wrong flag when setting tiles. I will try that again. But maybe with lava so water isn't everywhere.

In my mind I see the maze as one of three options:

1) A world with deep canions. You crashed at the bottom and there is no way up.
2) Canions again but you are stuck at the top and the bottom is filled with water or lava. My reason for the cliffs would be to make water sparse. Using lava would have the same effect without the complexity of cliffs.
3) You are underground in a cave system. Makes it more plausible why you can't climb out of the canions in 1.
billbo99
Fast Inserter
Fast Inserter
Posts: 137
Joined: Fri Nov 02, 2018 9:19 am
Contact:

Re: [MOD 0.16] Ribbon Maze 0.6.7

Post by billbo99 »

Since there is grass on top of the cliff's I think your going to end up with biter bases being spawned up there.
User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2905
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: [MOD 0.16] Ribbon Maze 0.6.7

Post by darkfrei »

mrvn wrote: ↑Thu Jan 31, 2019 10:44 am First: Tried that too. But somehow I didn't get any sandy beach between the grass and water tiles. Probabyl used the wrong flag when setting tiles.
https://lua-api.factorio.com/latest/Lua ... .set_tiles

So you are need:

Code: Select all

surface.set_tiles(tiles, true)
mrvn
Smart Inserter
Smart Inserter
Posts: 5925
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: [MOD 0.16] Ribbon Maze 0.6.7

Post by mrvn »

darkfrei wrote: ↑Thu Jan 31, 2019 11:23 am
mrvn wrote: ↑Thu Jan 31, 2019 10:44 am First: Tried that too. But somehow I didn't get any sandy beach between the grass and water tiles. Probabyl used the wrong flag when setting tiles.
https://lua-api.factorio.com/latest/Lua ... .set_tiles

So you are need:

Code: Select all

surface.set_tiles(tiles, true)
and I had

Code: Select all

surface.set_tiles(tiles, false)
So not fixups happen for the beach.

I will probably get around to implementing this tonight and upload it to github for pull requests.
mrvn
Smart Inserter
Smart Inserter
Posts: 5925
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: [MOD 0.16] Ribbon Maze 0.6.7

Post by mrvn »

billbo99 wrote: ↑Thu Jan 31, 2019 10:45 am Since there is grass on top of the cliff's I think your going to end up with biter bases being spawned up there.
Would that actually be so bad? Could be interesting to have aliens there that can't reach you unless you get into spitting distance.
mrvn
Smart Inserter
Smart Inserter
Posts: 5925
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: [MOD 0.16] Ribbon Maze 0.6.7

Post by mrvn »

Ok, I got stuck on cliffs a bit and I'm still not at a stage where I support every existing feature.

But here is a preview for square mazes with 32m wide corridors. Call it a proof-of-concept.

https://github.com/mrvn/factorio-ribbon-maze/tree/mrvn
Start region
Start region
maze-1.png (13.07 MiB) Viewed 4631 times
larger area
larger area
maze-2.png (12.77 MiB) Viewed 4631 times
1024x1024 map
1024x1024 map
maze-3.png (288.44 KiB) Viewed 4631 times
even larger map
even larger map
maze-4.png (684.14 KiB) Viewed 4631 times
There is still a problem with the cliffs. Some of them don't get placed. I think that happens when there already is an entity in the way. But you get the idea.

The map is generated in blocks of 16x16 chunks as needed. It should have no loops but every now and then it has a small loop. No idea why yet. I haven't notice any large loops (and I ignore the loop chance setting for now). The map should be playable as it is for some settings. A lot of settings are ignored and block size must be 32 or the walls will be screwed up. Working on that. It's not what I described before because that didn't work at all for squares. Instead the corridors are grown randomly starting at the center till a block is filled without creating loops. Adjacent blocks start the algorithm again. So the maze should be a perfect tree with you in the center.

Overall any comments on the maze? Looks like it will have plenty of short dead-ends but also long stretches.

Note: When you generate your own map make sure to set Cliffs to None in the map settings.
billbo99
Fast Inserter
Fast Inserter
Posts: 137
Joined: Fri Nov 02, 2018 9:19 am
Contact:

Re: [MOD 0.16] Ribbon Maze 0.6.7

Post by billbo99 »

What happens to the walls if someone uses cliff explosives ?
Post Reply

Return to β€œMods”