Repository navigation
Add the Danger Ores Mosaic map - #1682
Merged
Merged
Conversation
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>
This was referenced Nov 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
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
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:
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