Skip to content

Add the Danger Ores Mosaic map - #1682

Merged
grilledham merged 3 commits into
Refactorio:developfrom
lex:danger-ore-mosaic
Nov 11, 2026
Merged

grilledham merged 3 commits into
Refactorio:developfrom
lex:danger-ore-mosaic

Conversation

@lex

@lex lex commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Adds Mosaic, a Danger Ores map laid out as a monumental mural of space and industry, in the flat, hard-edged style of the great mosaics on building walls. Every seed lays out a different wall.

Mosaic

The preview is a screenshot of the map view from a playtest (terraforming off). Spawn is in the middle; the dark blue blobs are the map's usual lakes.

What it looks like

  • Rows of panels, 640 tiles tall and 520–1100 wide, framed in coal.
  • Each panel has a background in three inks between coal lines: sunburst rays, diagonal stripes, orbits, a web of rays and rings, or two lines splitting it into fields. Rays and rings come from the panel's middle, a corner or a side.
  • On it, one big symbol, outlined in coal: a rocket, sputnik, atom, gear, wheat, factory, pylon, planet, helmet, flag, sun, lightning bolt or star. Sometimes it sits on a great disc, and up to three stars keep clear of it.
  • Spawn sits in a round medallion 380 tiles across the radius, so it fills the land terraforming opens at the start (a square 384 tiles across): a great faceted star round spawn, each point split down the middle into an iron half and a copper half, so the two take turns all round spawn's edge (ten facets, ~40 tiles wide there, for the first 100 tiles); it sits on an iron core showing between its points, then a ring of iron and copper rays. The panels start right outside it.

Ores

The inks are iron and copper with their usual mixes (stone mixed in), and now and then a field of coal; one ray in four round the medallion is coal too. Coal is pure and is mostly the frames, lines and outlines. A panel's inks are drawn by weights that blend from mostly iron near spawn to mostly copper further out (300 to 1500 tiles), where the rockets get built. Measured over whole chunks, by area:

Coal Iron Copper
Land open at the start 25% 54% 21%
1200–8000 tiles 40% 24% 36%

Lines and outlines are at least 20 tiles wide, bands and fields 100–200, so a build site crosses a coal line now and then, but the ore it clears there is coal.

How

  • modules/mosaic_layout.lua (pure Lua): the panels, backgrounds, palettes, symbols and medallion, from a hash of the panel and the seed, so the map is infinite, never repeats and stores nothing.
  • modules/mosaic_figures.lua: the symbols, as lists of strokes, discs and polygons, with line work (windows, eyes) in the line ore.
  • modules/art_shapes.lua (pure Lua): draws such figures turned, flipped and scaled onto the map, and gives the distance to their paint for outlines; plus the hash and weighted picks. The hash squares as it mixes, because a linear one lines whatever is drawn from it up in visible rows.
  • modules/main_ores_mosaic.lua: the builder; it refuses an ink that isn't one of the main ores.
  • layouts/mosaic.lua, the preset, scenario template, map poll entry, changelog line and preview.

It takes about 1.8 ms per 32×32 chunk in plain Lua 5.5; I haven't timed it in Factorio.

Tests

  • art_shapes_tests.lua: polygons, shapes painting over earlier ones, figures placed, scaled, turned and flipped, paint distances, the hash (same seed, same stream; neighbouring places independent, which a linear hash fails) and weighted picks.
  • mosaic_layout_tests.lua: the same seed lays out the same wall and another seed another; every symbol paints a solid shape that fits its panel; panels are framed in coal; every pattern and symbol turns up; stripes draw lines between them; neighbouring inks of a panel differ and coal is rare among them; just outside spawn, iron and copper take turns in ten facets, half each and nothing else, and the medallion is ringed in coal; far out, coal is 20–50% and there is more copper than iron.
  • danger_ore_mosaic_tests.lua (when Mosaic is the active map): with the real builder and the preset's ores, the tiles just outside spawn are iron and copper only, both in every eighth of the way round, every main ore lies in the land open at the start on five seeds, and an ink that isn't a main ore is refused.
  • pwsh .github/scripts/run-tests.ps1 <factorio> danger-ore-mosaic: 176 passed, 0 failed, 65 skipped (need a player). luacheck .: 0 warnings / 0 errors.

The first playtest found no iron to mine near spawn: the first medallion's copper star was smaller than spawn's ore-free circle but for its points, so spawn was ringed by coal and copper, and the medallion was bigger than the land open at the start. The second commit fixes both; the iron test found no iron round spawn on the first version. Then spawn's edge was all iron, so the third commit facets the star in iron and copper, and the fifth adds a little coal.

🤖 Generated with Claude Code

lex and others added 3 commits November 11, 2026 22:20
A monumental mural of space and industry laid out in ore: rows of
panels framed in coal, each with a constructivist background (sunburst
rays, stripes, orbits, a web of rays and rings, or split fields) and a
big outlined symbol (rocket, sputnik, atom, gear, wheat, factory,
pylon...), sometimes on a disc, with stars. Spawn sits in a round
medallion: an iron core under a copper star, then a sunburst. Panels
near spawn lean iron and further out copper.

art_shapes.lua draws figures made of strokes, discs and polygons, and
holds the hash and weighted picks the layout draws from; the layout
and figures are pure Lua and tested in game.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Playtest: there was no iron to mine near spawn. The copper star at
spawn was smaller than spawn's ore-free circle but for its points, so
spawn was ringed by its coal outline and copper, and the iron core lay
beyond; the medallion (620 tiles) was also bigger than the land
terraforming opens at the start (a square 384 tiles across).

The medallion is now 380 tiles: a great iron star round spawn, solid
iron for its first 100 tiles, on a copper core showing between its
points, then a ring of rays. A test builds the map with the real
builder and checks every tile just outside spawn is iron; it found
none on the old medallion.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Playtest: spawn's edge was all iron. Each point of the star round spawn
is now split down the middle, one half iron and one copper, the way
faceted stars are drawn, so the two take turns all round spawn's edge
(ten facets, ~40 tiles wide there). The core between the points is
iron again, so the land open at the start is about 54% iron, 21% copper
and 25% coal.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@grilledham grilledham left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very pretty.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants