Skip to content

Danger Ores: intro cutscene - #1667

Merged
grilledham merged 8 commits into
Refactorio:developfrom
lex:danger-ore-cutscene
Nov 4, 2026
Merged

grilledham merged 8 commits into
Refactorio:developfrom
lex:danger-ore-cutscene

Conversation

@lex

@lex lex commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Danger Ores gets an intro cutscene, like Crash Site's: new players see it when they join (unless they turn off auto play in the settings), and /replay plays it again. It shows the one rule that sets Danger Ores apart, building only on ground cleared of ore, on a small staged factory instead of in text.

The cutscene

  1. A title card welcoming players to the map by its next-map poll name, with the poll's description of its twist (Petals: "Iron near spawn, copper further out"), then spawn.
  2. A staged scene on a small surface of its own: an ore field ("Everywhere else is buried in ore."), what may stay on ore (drills, belts, pipes, poles, rails, vehicles), an assembler crossed out for everything else, and cleared ground with a working line: drills feed electric furnaces, which feed assemblers making gears, cables or walls from the map's main ore.
  3. A card with the goal (how many satellites win the map, the first kills the biters) and the next-map poll.

The staged buildings on ore are placed and kept only if the map's own building rule allows them there, so the scene can't show something a preset refuses. The stage has its own force, so its smelting doesn't count toward the players' research triggers (Steam power wants 50 iron plates) or their production statistics. Its power comes from a hidden electric energy interface, and infinity chests remove what the line makes, so it never backs up.

The map's own ore isn't filmed: near spawn it holds about 90 per tile, which the game draws so small it looks like bare ground.

Change

  • map_gen/maps/danger_ores/modules/cutscene.lua: the cutscene, its stage and its auto play setting. A player who turned auto play off gets the map info and the /replay hint straight away, as in Show the map info to new players who don't auto play the intro cutscene #1664, with the hint's shared cutscene_controller.replay_hint text.
  • configuration.lua: cutscene.enabled, on by default, so every Danger Ores map plays it. Safety Ores turns it off: its rule is the opposite (build only on ore).
  • scenario.lua: the title card's name and twist come from the map poll's display name ('<Name> (<twist>)'), else the map name.
  • Locale: the strings in every language.
  • changelog.lua: a line for it.

Tests

  • map_gen/maps/danger_ores/modules/cutscene_tests.lua:

    • the poll name splits into the map and its twist;
    • the title card names the map and its twist;
    • the last card shows a satellite goal only on maps won by satellites, and the poll line only where there's a poll;
    • the cards name this map as the poll does, with its goal;
    • the stage leaves off the ore what the map refuses (a stand-in rule refusing cars);
    • the stage's drills feed its furnaces and the furnaces its assemblers, starting with them empty;
    • a new player who doesn't auto play it still gets the map info.

    Each was checked by breaking what it covers (keeping everything on ore, inserters facing the wrong way, no start-up with auto play off, the goal always shown): each then fails, saying what went wrong.

  • pwsh .github/scripts/run-all.ps1 <factorio> on every Danger Ores template: all pass (the modded ones are skipped as usual). luacheck .: 0 warnings / 0 errors.

  • Played in a 2.1.23 client on a density 2 display (3840x2160) and a density 1 display (1920x1080): both look the same.

Screenshots

1_title_card 2_spawn 3_buried 4_rule 5_allowed 6_refused 7_cleared 8_goal_card

🤖 Generated with Claude Code

@lex
lex force-pushed the danger-ore-cutscene branch 3 times, most recently from a264d12 to 77a9c52 Compare November 1, 2026 14:12
@lex
lex marked this pull request as ready for review November 2, 2026 20:20

@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.

I think this is fine, but I have a suggestion.

if card.win_satellite_count then
title = {'danger_ores.cutscene_goal_title'}
lines[#lines + 1] = {'danger_ores.cutscene_goal', card.win_satellite_count}
lines[#lines + 1] = {'danger_ores.cutscene_biters'}

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.

I guess launching the first rocket killing all biters is true of all maps that have a win_satellite_count. But that didn't used to be the case, there is still a rocket_launched.lua which has biter waves after rocket launch, we just don't use it anymore.

But this makes me think we might not want to tie the win_satellite_count with biters being killed. Maybe we should expose if the rocket launch module kills all the biters on first launch or not. Or maybe I'm overthinking this and we can address that when/if it happens (if we remember).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Exposed it in b3518fe: rocket_launched_simple says whether its first launch kills the biters (kills_biters_on_first_launch), and the cutscene's last card and the map info from #1601 show that line only when it does. Also rebased on develop; the Randomizer needed the cutscene to read the main ores on init (77f3a6d).

lex and others added 8 commits November 4, 2026 22:45
Off by default (DOC.cutscene.enabled). Welcome and spawn on the map, the building rule on a staged surface with a working line run by its own force, then the ore and a card with the map's name, twist and goal.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…, translations

- The title card welcomes players to the map by its poll name and says its twist; the
  last card has only the goal (when satellites win the map) and the poll line.
- On in every Danger Ores preset except Safety Ores, whose rule is the opposite.
- Tests: the cards, the stage leaving off the ore what the map refuses, the stage's line
  running from the drills to the assemblers, and the map info for players who don't auto
  play it.
- The strings in every locale.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Near spawn the map's ore holds about 90 per tile and is drawn so small it
looks like bare ground, so the shot 140 tiles north showed no ore. "Everywhere
else is buried in ore" now opens the staged scene, over its ore field, and the
last part is just the goal card.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The Randomizer picks its ores once the map's surface exists and errors when they are read while the scenario loads.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ocket module does

The rocket launch module says whether its first launch kills all the biters, and the map info and the cutscene's last card show that line only when it does, rather than whenever a map is won by satellites (grilledham's review).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@lex
lex force-pushed the danger-ore-cutscene branch from 77a9c52 to b3518fe Compare November 4, 2026 20:50
@grilledham
grilledham merged commit 5d08e6c into Refactorio:develop Nov 4, 2026
6 checks passed
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