Dark Matter Replicators Reborn

by Jaer985

Adds replicators — machines that produce almost any item using only electricity. From ores to planetary science packs, if it can be crafted, it can be replicated. Works with any modlist, tiered 1-5, Space Age planetary variants, quality support and high-UPS optimisation; tenemut ore can now also be replaced by a Dark Matter Synthesizer.

Utilities
11 hours ago
2.0 - 2.1
1.15K
Manufacturing Cheats

Changelog

Version: 4.5.0
Date: 2026-10-22
  Features:
    - Annihilation Coil (dmrsa-annihilation-coil): a 2x2 burner-generator that burns dark matter
      straight into electricity, with no heat stage at all - no heat pipes, no water, no heat
      exchangers and no steam turbines. The ledger is the chamber's, unchanged:
      25 GJ -> 41.6667 MW x 600 s, no heat, no water, 2x2.
    - Technology dmrsa-annihilation-coil (prerequisite: dmrsa-annihilation) unlocks it. The build
      recipe costs about two thirds of the chamber's, because the coil replaces the exchanger and
      turbine block a chamber needs behind it: 20 matter conduits, 8 dark-matter transducers,
      75 processing units, 100 advanced circuits, 200 steel plates.
  Changes:
    - The coil burns dark matter only (private fuel category) at effectivity 1.0: coal, nuclear
      fuel and fusion cells are refused, and one unit can never return more than its 25 GJ.
    - Locale (English and Spanish) for the coil, its technology and its recipe; both files keep the
      same key set and LF line endings.
Version: 4.4.0
Date: 2026-10-19
  Features:
    - Accelerator Ring (dmrsa-collider): 250 MW, 25 tenemut + 1 Nanophase Conduit -> 1 dark matter
      every 200 s (50 GJ of work for 25 GJ of fuel). The first machine that produces dark matter
      in quantity.
    - Dark matter burns ONLY in the Annihilation Chamber (private fuel category): 25 GJ per unit,
      returned as ~600 s of heat at 41.6667 MW through the vanilla heat-exchanger/turbine chain.
      No neighbour bonus, and vanilla reactors cannot burn it.
    - Fuel Duplication research (tiers 3/4/5): +100%/+200%/+300% cumulative output on the chemical
      fuel replication recipes, taking the loop from a net loss to 2.00x at the last tier.
    - Timing model v3: every replication time comes from one closed form (6.32 s x 2^(tier-1) x
      complexity, complexity = 1 + 0.02 x production steps capped at 1.50, 200 s ceiling applied
      after the difficulty multiplier). Science packs and planets get fractional tiers.
    - Quality Refiner: unlocks next to the quality discovery (replication-2 + quality-module) with
      a tier-2 build cost and research unit.
  Changes:
    - Quality Refiner recipes are selectable again: the machine picker had been empty since 4.1.0
      (recipes were flagged hidden instead of hide_from_player_crafting).
    - Quality Refiner: 1 MW instead of 4 MW, success chances x5, destruction risk 5% -> 1%.
    - Fuel replication is priced against a 2.5x burner and runs on the tier-1 replicator: a plain
      boiler build can never profit, a heating-tower build reaches 2.00x at the last tier.
    - Replicated items can no longer be recycled for more than they cost: the arbitrage floor is the
      recycle break-even (a quarter of the parts bill), so 225 of 259 replication times sit at or under
      the 200 s ceiling; only the true megastructures remain above it (34, worst 4.1 h).
    - Tenemut replication is a tier-5 technology again, and priced at the 200 s ceiling (915 MJ per
      unit): 25 tenemut is 22.9 GJ of the Accelerator Ring's 50 GJ cycle, so the ore line matters.
    - Efficiency modules and beacons no longer apply to replicators (they crossed the energy floor).
    - High-density fuels (nuclear fuel, uranium fuel cell, fusion power cell) are no longer
      replication targets: their burn value makes any fair replication time absurd.
    - Locale: 180 dead keys removed per language, EN/ES key sets identical, Spanish dropdown values
      translated, two files converted from CRLF to LF.
  Bugfixes:
    - space-platform-starter typo fixed: the Space Age starter pack is now a replication target.
    - Sprite geometry corrected for the Accelerator Ring, Annihilation Chamber, replicators, the
      replication lab and the planetary replicators (scale and centring against the real art bounds).
    - The refiner research unit no longer ignores the "Tenemut research required" setting.
Version: 4.3.1
Date: 2026-10-17
  Info:
    - Updated the mod description shown in-game and in the mod portal browser so it
      covers the current feature set: tenemut source modes with the Dark Matter
      Synthesizer, the Quality Refiner, the research mirror tech progression and
      the v4.2 tier/cost rebalance.
    - No gameplay, prototype, balance or locale changes — identical to 4.3.0 apart
      from the description text.
Version: 4.3.0
Date: 2026-10-16
  Features:
    - Tenemut source setting (dmrsa-tenemut-source, mod portal request by
      evil_star): "Ore patches" (default, unchanged behaviour), "Ore patches +
      synthesis", or "Synthesis only" — the latter removes tenemut from world
      generation completely (no autoplace spec, no autoplace-control, no planet
      map-gen injection).
    - Dark Matter Synthesizer: a 1 MW machine that produces tenemut out of
      electricity alone — no item input at all, 4 s per tenemut (4 MJ/unit,
      ~18x the energy a mining drill spends per ore). Unlocked by the new
      "Replication: Dark Matter Synthesis" technology (prerequisite
      electronics, automation science only), so the whole replication chain is
      reachable with zero tenemut ore on the map.
    - Option to drop the DMR material packs from research
      (dmrsa-tenemut-research-required, default on): when disabled, replication
      techs require the vanilla science packs of their tier instead of tenemut /
      scoop / transducer / conduit.
  Notes:
    - The tenemut resource prototype stays registered in every mode (save
      compatibility): existing saves keep their ore patches and stay loadable,
      and the new setting only changes what a NEW map generates.
    - The synthesis recipe is deliberately not hand-craftable and forbids
      productivity — an ingredient-less recipe that is hand-craftable or
      productivity-boostable is free items. The machine takes no modules and no
      speed beacons (allowed_effects governs them): electricity IS the cost.
  Tests:
    - Suite: test_tenemut_source 48 + test_mirror 82 + test_cost_bands 257 +
      run_tests 54 + test_refiner 48 + test_planet_routing 14 +
      test_step_filter PASS.
Version: 4.2.1
Date: 2026-08-23
  Changes:
    - Excluded from replication: Angel's vehicle equipment (-vequip, 6 items)
      and 8 RPG potions (drop-only, no production chain).
    - Consumable tier alignment: depleted fuel cells x4 -> 3, mushell-seed ->
      4, fossil-larvae -> 4, fission-construction-robot -> 3 (floor, never lowers).
  Tests:
    - Suite: test_mirror 68 + run_tests 54 + test_refiner 41 PASS.
Version: 4.2.0
Date: 2026-08-23
  Info:
    - Accumulated since portal 4.0.0; includes the unreleased 4.1.0 (Quality Refiner).
  Features:
    - Quality Refiner (4.1.0): upgrades replicable items one quality grade at a
      time (3x energy, per-grade chance, ~5% loss); only with quality mods.
    - B1: leveled tech chains split into one mirror per level (7 chains).
    - Replicators replicable; research cost per tech (not per item); quality
      only via the refiner.
  Changes:
    - B2 cost model: power over time — replication bands 2.7-200s, replicator
      power 1/3/8/15/30 MW, difficulty scales replication times, fixed +0.5
      penalty, ore rarity by mining time.
    - Mirror tree: process-output tech inheritance, universal material-tier
      floor, science packs forced to progression tier, tree-depth clamp removed
      (was inflating 458/474 mirrors to tier 5).
    - ADAPTABILITY: unknown science packs anchor dynamically from the modlist's
      own tech tree — works on any modlist.
  Bugfixes:
    - localised_name crash (numeric params), tenemut load-order pack
      substitution, versioned Bob's equipment, factory-circuit-connector /
      spidertron-cannon, planet routing (spaceship-scrap, foundry/lava, carbon,
      burner-pumpjack).
  Tests:
    - Suite PASS (49+43+29+41 at the time).
Version: 4.0.0
Date: 2026-08-12
  Features:
    - Factorio 2.1 ONLY. Mirror tree: one replication tech per original game
      tech; tier = science level of the original. Materials chain gates every
      mirror (machine -> replication-materials-N -> mirrors).
    - Setting dmrsa-require-original-tech (default ON); tech distribution
      Mirror / Individual (legacy); 144 exclusions (weapons, armor, combat
      capsules, vehicles, equipment; ammo/fuel-cells/seeds/fish stay).
  Bugfixes:
    - 2.1 API fixes (assembler pictures, recipe categories), locale, icons.
Version: 3.7.1
Date: 2026-08-14
  Bugfixes:
    - Minor portal-reported load fixes.
Version: 3.7.0
Date: 2026-08-11
  Features:
    - Dynamic generation moved to data-final-fixes (PASS 0) with optional
      Bob's deps — tiers/prereqs computed after overhaul mods.
    - Re-attach original-tech prereqs (118 items fixed); gem ores tiered to 5;
      combat/mech step filter.
  Bugfixes:
    - Under-tiered items (367), missing prereqs (118), scrap routing.
Version: 3.6.4
Date: 2026-08-11
  Bugfixes:
    - Animation/idle fixes; Combat Mechanics Overhaul + Bottleneck Lite compat.
Version: 3.6.3
Date: 2026-08-10
  Bugfixes:
    - Additional animation and icon polish.
Version: 3.6.2
Date: 2026-08-10
  Bugfixes:
    - Icon mipmaps / large-icon rendering fixes.
Version: 3.6.1
Date: 2026-08-11
  Bugfixes:
    - Hotfix idle_animation animation_speed = 0 -> 0.01 (portal crash).
Version: 3.6.0
Date: 2026-08-09
  Features:
    - Idle animation; research-pack-order setting; grouped categories (16
      subgroups); research-difficulty setting; module/military category split;
      grouped cost multiplier default 10x; lab inputs validation.
  Changes:
    - Chemical Replicator before planets; science pack tiers by progression;
      scrap -> Fulgora.
  Bugfixes:
    - Machine efficiency category names; Unknown key item-name.X; icon
      rendering; chemical pack research using wrong conduit.
Version: 3.5.25
Date: 2026-08-09
  Features:
    - Replicators now visibly "turn off" when idle: added `idle_animation` to
      the graphics_set (same sprite sheet, frame 0) with a dark tint (0.55
      brightness). Factorio displays the dimmed static frame whenever the
      replicator has no recipe/input, and the normal animated sprite while
      working. No new assets required — closes the v3.6.0 QoL item inherited
      from the upstream 0.8.0 roadmap ("replicators that turn off visually
      when they have no input").
Version: 3.5.24
Date: 2026-08-09
  Bugfixes:
    - Fixed icon misrendering (only top-left corner shown) on replication
      technologies for items with large/custom icons. Two hardening fixes in
      get_tech_icons:
      * `icon_mipmaps` is now dropped from copied icon layers — mipmaps belong
      to the original item's own rendering pipeline; copying them into a
      bordered 128x128 tech icon with a different scale misrenders on
      high-DPI / large-icon items (inherited upstream 0.8.0 bug).
      * `icon_size` is nil-safe per layer: if a layer or parent omits it (or
      it is non-numeric/<=0), fall back to 64 instead of producing a bogus
      scale.
Version: 3.5.23
Date: 2026-08-09
  Features:
    - New startup setting `dmrsa-research-pack-order` controlling the order of
      research pack ingredients in replication technologies' tech tree:
      'DMR Item First' (default, unchanged behavior) or 'Science Pack First'
      (vanilla/SA science packs listed before the custom DMR intermediate).
      Cosmetic only — research cost is unchanged. Applies to both individual
      and grouped techs. Locale EN/ES.
Version: 3.5.22
Date: 2026-08-09
  Changes:
    - data-final-fixes PASS 4 (lab inputs) extended: also ensures the
      replication-lab accepts space-science-pack and promethium-science-pack
      (tier 5 packs), not just the four planetary packs.
    - Added defensive validation: after the add-loop, warn if any intended
      science pack is missing from lab.inputs, or if the lab/inputs table is
      absent. This surfaces "no lab will accept all the science packs" errors
      at load time with a clear message instead of failing silently at
      research time.
Version: 3.5.21
Date: 2026-08-09
  Features:
    - Replication recipes now grouped by CATEGORY in the crafting menu
      (replication-ore, replication-chemical, replication-module,
      replication-military, etc. — 16 subgroups mirroring replcategory-name).
      Previously recipes were grouped only by tier (Tier 1-5 replications),
      which made finding a specific item (modules, weapons, chemicals)
      require scanning multiple tiers. This addresses sp518's feedback on the
      mod portal: "create subgroups for replication so that is easier to find
      it and/or a search when using the replicator". Planetary items keep
      their replication-resources subgroup.
  Bugfixes:
    - Fixed "Unknown key: item-name.X replication (Recipe)" warnings for ALL
      placeable items (chests, furnaces, miners, inserters, electric poles,
      assemblers, walls...). These items have `place_result` and their locale
      lives in [entity-name], NOT [item-name]. The recipe localised_name now
      uses `entity-name` prefix when the target item has `place_result`
      (93 base items affected; mods add more).
Version: 3.5.20
Date: 2026-08-09
  Bugfixes:
    - MACHINE_EFFICIENCY category names fixed to match the real Space Age
      internal names (verified against space-age/prototypes/recipe.lua):
      `metallurgic` → `metallurgy`, `electromagnetic` → `electromagnetics`,
      `cryogenic` → `cryogenics`, `organic-or-egg` → `organic`. The old keys
      never matched, so Foundry (metallurgy) and other SA machines fell back
      to the neutral 1.0 multiplier instead of the intended values (e.g.
      Foundry should be 1/3 like smelting).
    - Added `captive-spawner-process` (1.5x — captive biter spawner,
      biochamber, more complex) and `hand-crafting` (1.0 — neutral).
    - Audit note: `farming`/`brewing` kept for mod compatibility (some mods
      use those names even though vanilla SA uses `organic`).
Version: 3.5.19
Date: 2026-08-09
  Bugfixes:
    - Science pack replication tier is now FORCED (absolute), not just a floor.
      The cost-solver recipe chain could push chemical-science-pack to tier 4-5
      (advanced circuits, engines, sulfur), which made its replication research
      use matter-conduit (tier 4/5 pack) instead of dark-matter-transducer
      (tier 3 pack). Science packs' replication tier is defined by their
      progression position (chemical=3, planetary=4, space/cryo=5), not by
      their crafting ingredients, so the override now forces the tier both
      up AND down.
Version: 3.5.18
Date: 2026-08-09
  Bugfixes:
    - `scrap` (Space Age, Fulgora) is now classified to the Fulgora planetary
      replicator. Previously it fell through to the generic tier-1 replication
      category, so scrap replication was available from the simple replicator
      instead of requiring the Fulgora planetary replicator.
Version: 3.5.17
Date: 2026-08-09
  Bugfixes:
    - Chemical Replicator (tier 3) is now VISIBLE and unlockable before the
      planets with Space Age. Previously `dmrsa-replication-3` was hidden with
      empty effects in SA, so the Chemical Replicator had no visible tech and
      appeared "with the planets". Now it unlocks at tier 3 (after logistics,
      before vulcanus/fulgora/gleba/aquilo).
    - Tier 4 research now requires `dmrsa-replication-3` as a prerequisite
      (planets are tier 4; chemical is tier 3).
    - Tier 3 research no longer requires metallurgic-science-pack (planetary);
      it uses chemical science only. Tier 4 uses the planetary packs.
    - chemical-science-pack (and production/utility) replication tier fixed:
      they were pushed to tier 5 by the cost-solver recipe chain; now anchored
      to tier 3 by name. Science pack replication tiers now match progression:
      automation/logistic=1, military=2, chemical/production/utility=3 (before
      planets), planetary=4, space/cryo/promethium=5.
    - `get_tier_from_tech` science-pack mapping updated to the same progression
      (chemical→3, production/utility→3, planetary→4).
Version: 3.5.16
Date: 2026-08-09
  Features:
    - Added `dmrsa-research-difficulty` startup setting (Easy (Fast) / Medium / High).
      Scales research count and time for ALL replication technologies:
      * Easy (Fast) — default, no change (historical behavior)
      * Medium — 1.5x count, 2x time
      * High — 3x count, 5x time
      Applied to: individual techs, grouped techs, tier techs (technologies.lua),
      and planetary techs (planetary-tech.lua).
  Changes:
    - `dmrsa-grouped-tech-cost-multiplier` default raised 5.0 → 10.0. Grouped
      technologies unlock many items at once, so their research cost is now at
      least 10x per unlockable item (user request: grouped should be noticeably
      more expensive by number of unlockables).
Version: 3.5.15
Date: 2026-08-09
  Bugfixes:
    - Fixed startup crash "Error in assignID: technology with name 'spidertron-unit'
      does not exist. It was removed by moon-eneas." The grouped technology
      `dmrsa-grouped-repl-5-general-tech` (and any tech whose group includes
      spidertron items) referenced `spidertron-unit` as a prerequisite, but the
      external mod moon-eneas deletes that technology in its data-final-fixes
      phase. Because DMR's data-final-fixes ran BEFORE moon-eneas's (no declared
      dependency), the PASS 1 prerequisite-stripping never saw the deletion, and
      the invalid prereq survived to the assignID phase.
    - Fix: declared `? moon-eneas` as an optional dependency in info.json. This
      forces Factorio to load DMR's data-final-fixes AFTER moon-eneas's, so
      PASS 1 strips the now-missing `spidertron-unit` prerequisite and PASS 3
      re-routes any orphaned grouped tech as designed. The same mechanism
      generalizes to any other mod that deletes vanilla/moddable techs — add an
      optional dependency to force load order.
Version: 3.5.14
Date: 2026-08-09
  Features:
    - Split module and military replication categories by progression tier.
      Previously ALL modules were gated at tier 5 (cryogenic) and ALL weapons
      at tier 4 (space), regardless of vanilla unlock timing. Now:
      * Modules (`*-module`, `*-module-2`) → tier 3 (chemical), mirroring
      vanilla where speed/eff/productivity 1-2 unlock with chemical science.
      * Advanced modules (`*-module-3`) → tier 4 (space), mirroring vanilla
      where module 3 unlocks with space science.
      * Basic weapons/ammo (pistol, shotgun, magazines, grenades, capsules,
      land-mine, rocket, cannon-shell) → tier 3 (chemical).
      * Endgame ordnance (uranium, artillery, explosive-rocket, cluster-grenade,
      explosive-cannon-shell, spidertron, nuke) → tier 5 (cryogenic).
    - Added two new replication categories: `module-advanced` (tier 4) and
      `military-advanced` (tier 5), with locale entries in en and es-ES.
    - This addresses player feedback (mod portal + in-game) that modules and
      weapons were invisible in low-mid tiers and only appeared very late.
Version: 3.5.13
Date: 2026-08-09
  Bugfixes:
    - Fixed asteroid chunk name mismatch: `carbonaceous-asteroid-chunk` →
      `carbonic-asteroid-chunk` in lib/cost-solver.lua (BASE_RESOURCE_COSTS)
      and lib/target-mapper.lua (hidden-item whitelist). The Space Age item
      is named `carbonic-asteroid-chunk`; the code had a stale name, so the
      chunk was not mapped to tier 4 and fell through to the low-tier
      fallback (appeared in the chemical/tier-3 replication tech before the
      player had launched a rocket). Now it maps to tier 4 like the other
      asteroid chunks.
Version: 3.5.12
Date: 2026-08-09
  Bugfixes:
    - Added TARGET_BLACKLIST to lib/target-mapper.lua, excluding UI/utility items
      from replication: red-wire, green-wire, copper-wire, artillery-targeting-remote,
      discharge-defense-remote, spidertron-remote, blueprint, blueprint-book,
      deconstruction-planner, upgrade-planner, copy-paste-tool, cut-paste-tool,
      selection-tool, rail-planner. These items are player-carried utilities, not
      production materials, so replicating them adds no value and pollutes the
      replication tech lists (user report: red-wire/green-wire and spidertron-remote
      were shown as replicable before ever being unlocked).
    - Added filled-barrel exclusion in lib/target-mapper.lua. Filled barrels
      (fill-<fluid>-barrel and <fluid>-barrel patterns) are containers that
      would let players duplicate fluids without a replication recipe for the
      fluid itself. The empty barrel ("barrel") remains replicable.
Version: 3.5.11
Date: 2026-08-09
  Bugfixes:
    - Fixed cost-solver fallbacks assigning tier 1/2 to items that couldn't be
      resolved, polluting low-tier grouped techs with overhaul-mod and Space Age
      items. Root cause from mod portal report "Replication: Components (Tier 1)
      contains too much stuff?" (with Bob's): many intermediate items have cyclic
      recipes or unknown recipes, and the fallbacks hardcoded tier 1 (cycle) and
      tier 2 (unknown). Now both fallbacks use the item's unlock-tech tier via
      `get_tier_from_tech` when a tech exists, so a Bob's item gated behind a
      mid-game tech no longer lands in Tier 1.
    - Relaxed the ingredient-tier + 1 cap when ingredients resolve to tier 1.
      Previously, an item whose ingredients were all degraded by cycles (tier 1)
      could never have its unlock-tech tier apply (capped at 2). Now the cap
      only applies when the ingredient tier is > 1, so genuinely simple items
      stay protected from "blue bottle" inflation while fallback-degraded items
      can reach their true tier.
Version: 3.5.10
Date: 2026-08-09
  Bugfixes:
    - Fixed planetary grouped tech `localised_name` passing 3 parameters to a
      2-placeholder template. The template `dmrsa-grouped-repl-planet-tech` is
      `Replication: __1__ (__2__)`, but the code passed `replcategory-name.X`,
      `planet-name.X`, AND a literal `planet_suffix` as a third positional
      argument. Factorio reported the extra argument as `parameter-2` in the
      runtime log. Removed the redundant literal `planet_suffix` parameter;
      now passes exactly 2 parameters matching the template's 2 placeholders.
Version: 3.5.9
Date: 2026-08-09
  Bugfixes:
    - Added `promethium-asteroid-chunk` to BASE_RESOURCE_COSTS in cost-solver.lua
      with tier 5 (cost 10.0). Previously this Space Age asteroid chunk was
      missing from the table and fell through to the cost-solver's recursive
      path, which returned a fallback tier 1 because the item is mined (not
      crafted), causing it to be assigned to a tier 1 grouped tech.
    - Added new `FLUID_TIER_OVERRIDES` table in cost-solver.lua for fluids
      that have no crafting recipe (passive building outputs). Currently used
      for `fusion-plasma` (Space Age fusion reactor output) at tier 5 (cost
      25.0). Without this, fusion-plasma had no recipe path to compute tier
      from and was silently assigned to the tier 1 fallback.
Version: 3.5.8
Date: 2026-08-09
  Bugfixes:
    - Fixed Space Age planetary classification for cryogenic fluids in
      prototypes/recipes/dynamic-generator.lua. The aquilo (cryogenic)
      branch had `name == "fluoroketone"` (exact match) which never matched
      because the actual internal names are `fluoroketone-cold` and
      `fluoroketone-hot`. Changed to `string.find(name, "fluoroketone")` so
      both variants route to the aquilo planetary recipe category.
    - Added `fluorine` to the aquilo branch. Fluorine is a Space Age
      cryogenic fluid that was being routed to the generic tier 3 chemical
      category instead of aquilo, even though it logically belongs with
      other cryogenic materials (ice, lithium, fluoroketone variants).
Version: 3.5.7
Date: 2026-08-09
  Bugfixes:
    - Extended MACHINE_EFFICIENCY in cost-solver.lua with 8 Space Age recipe
      categories that were silently falling back to the neutral 1.0x multiplier:
      farming, brewing, metallurgic (set to 1/3 like foundry), electromagnetic,
      cryogenic, organic-or-egg, crushing, and crafting-with-fluid-or-recycling.
      Without these, recipes made in agricultural towers, biochambers, foundries,
      electromagnetic plants, and cryogenic plants had no efficiency adjustment.
  Changes:
    - Removed unused `localized` field from each repltypes entry. The category
      display name is sourced from the locale `[replcategory-name]` section
      keyed by category name, not from hardcoded English strings in code.
      This avoids locale drift between code and translation files. No behavior
      change — the field was never read.
    - Fixed malformed `order = "f[dark-matter]"` string in dark-matter.lua for
      the hidden dmrsa-dark-matter item. Changed to standard `"z"` format.
      Cosmetic only (item is hidden), but keeps the code consistent with
      other order strings.
Version: 3.5.6
Date: 2026-08-09
  Bugfixes:
    - Replaced "Mirrors [entity-description] ..." placeholder text in
      [item-description] for the 5 tier replicators with the actual descriptions.
      Previously, holding a replicator item in the cursor showed the literal
      placeholder string because Factorio resolves [item-description] for items,
      not [entity-description]. Both locales updated.
Version: 3.5.5
Date: 2026-08-09
  Bugfixes:
    - Fixed replicator item subgroup: tier 1-5 replicators (item prototypes)
      used `subgroup = "production-machine"` (vanilla subgroup), placing them
      in the vanilla "Production" tab instead of the DMR "Replication" tab.
      Changed to `gprefix .. "replicators"` so all 5 tiers join the planetary
      replicators and the replication lab in the custom subgroup.
    - Added localized names for the 5 dynamic-recipe subgroups
      (`dmrsa-replication-tier-1` through `-5`) in en and es-ES. Previously
      these subgroups existed in code but had no locale entries, so the
      crafting menu displayed the raw subgroup keys for every dynamic recipe.
Version: 3.5.4
Date: 2026-08-09
  Bugfixes:
    - Fixed LocalisedString parameter rendering in dynamic-generator.lua. The
      individual-technology path passed `"?"` as a parameter inside the
      localised_name array, but Factorio 2.x interprets `"?"` as a KEY (used
      for fallback selection), not as a parameter. The result was that all
      dynamic recipes and individual techs displayed the literal string
      "parameter-0", "parameter-1", etc. in their names and descriptions,
      instead of the actual item name.
      The fix precomputes the correct localisation prefix from target.type
      (item, ammo, armor, gun, capsule, tool, module, item-with-entity-data,
      item-with-tags, spidertron-remote, space-platform-starter, fluid, entity)
      and uses a single-parameter LocalisedString. This restores the intended
      display "Replication: <item name>" and "Replication: <item name>
      (Tier N)" / "Replication: <category> (<planet>)" for grouped techs
      (which were already correct).
Version: 3.5.3
Date: 2026-08-09
  Bugfixes:
    - Fixed `dmrsa-use-machine-efficiency` description in en and es-ES locales.
      The description claimed the setting was "Disabled by default" while the
      actual default in settings.lua is `true`. Aligned text with code.
    - Fixed `order = "1-1-3"` conflict in settings.lua. The `replication-in-space`
      setting shared its order key with `replstats-speed-base`, causing them to
      render out of order in the mod settings UI. Moved to `1-6-1`.
  Changes:
    - Added `dmrsa-log-level` name and description in en and es-ES locales.
      Previously the setting existed in code but had no locale entries, so
      users saw the raw key. Documented all five log levels (none, error, warn,
      info, debug) with their behavior.
    - Rewrote all entity descriptions for the 10 replicators (tiers 1-5 plus
      vulcanus/fulgora/gleba/aquilo) and the replication lab. Old descriptions
      were from the original Factorio 0.x fork and predated v3.5.x. New text
      reflects current tier classification (cost-solver, machine efficiency,
      planetary science packs in Space Age).
    - Added item description for `dmrsa-tenemut` (was missing in both locales).
    - Added `item-subgroup-name` and `recipe-category-name` sections to both
      locales with localized names for the 2 subgroups and 4 planetary recipe
      categories. Players previously saw raw internal keys in the crafting UI.
    - Added names and descriptions for the 5 tier technologies
      (`dmrsa-replication-1` through `-5`). These technologies existed in code
      but had no locale entries, so the tech tree displayed the raw keys.
      New descriptions explain what each tier unlocks and reference the
      v3.5.x behavior (planetary techs in Space Age, SA requirements for
      tier 4 and 5).
    - Replaced the legacy "#unused after the dmrsa name change?" placeholder
      block in [item-description] with explicit "Mirrors [entity-description]"
      pointers, making it clear that the canonical descriptions live in the
      entity section.
Version: 3.5.2
Date: 2026-08-09
  Bugfixes:
    - Fixed data-final-fixes PASS 3 tier 3 reassignment under Space Age. Previously,
      orphaned grouped technologies whose tier digit resolved to "3" had their
      `target_tech_name` set to `nil`, causing their recipe unlocks to be silently
      discarded (the orphan tech was hidden but its effects were never migrated).
      Now the unlocks are reassigned to the hidden `dmrsa-replication-3` placeholder
      tech, preserving them. This bug only triggered in the rare case where ALL of
      a grouped tech's prerequisites were stripped by other mods in their own
      data-final-fixes phase.
    - Added defensive warning when an orphan technology does not match either the
      tier pattern or the planet pattern in PASS 3. Previously, such cases failed
      silently; now a `warn` log entry identifies the unmatched tech name so the
      patterns can be extended if needed.
Version: 3.5.1
Date: 2026-08-09
  Bugfixes:
    - Fixed recipe selection in cost-solver to correctly evaluate recipes that use
      `normal.ingredients` (Factorio 2.0+ format) via a new `get_ing_count()` helper.
      Items whose recipes previously defaulted to ingredient count 99 now compete
      correctly in the simplicity comparison, fixing persistent tier misclassification
      with overhaul mods (Bob's, Angel's, Krastorio 2) where intermediate items were
      incorrectly assigned to Tier 1.
    - Fixed fallback heuristic order in `get_tier_from_tech()`: technologies with 5+
      unique science packs now correctly reach tier 3 instead of being capped at
      tier 2 (the previous `>= 3` check fired before `>= 5`).
    - Fixed data-final-fixes PASS 3 to handle orphaned planetary grouped technologies.
      Added `planet_match` pattern that captures the planet from names like
      `dmrsa-grouped-repl-vulcanus-ore-tech` and reassigns unlocks to the corresponding
      `dmrsa-replication-{planet}-tech`. Previously, these orphan techs were disabled
      but their recipe unlocks were silently lost.
    - Fixed config-setting fallback for `dmrsa-use-machine-efficiency` to match the
      default value declared in settings.lua (`true`). Code now uses `true` as the
      fallback instead of `false`, eliminating the documentation/code discrepancy.
    - Added nil-safety to `prototypes/raw-resources.lua` settings access. Replaced
      direct `settings.startup["tenemut-near-spawn"].value` access with a nil-check
      pattern (`spawn_setting and spawn_setting.value == false`).
  Changes:
    - Removed unreachable `device2`-`device5` categories (4 dead entries from the
      v3.5.0 category refactor). These were defined in `repltypes.lua` and locale
      files but never assigned by `get_item_category()`. Active categories: 14
      (ore, element, shape, alloy, chemical, organic, military, module, life,
      exotic, magic, alien, science, general).
    - Added `require("defines")` to `prototypes/raw-resources.lua` and replaced
      hardcoded `gprefix` in `lib/target-mapper.lua` for consistency with the rest
      of the codebase.
    - Removed dead code branch (`tier > 5`) in `get_tech_icons()` border selection.
    - Added documentation comment for the `math.min(efficiency, cat_eff)` semantics
      in machine-efficiency multiplier selection.
Version: 3.5.0
Date: 2026-07-19
  Compatibility:
    - Dual compatibility with Factorio 2.0 and 2.1. Recipe category field uses version detection:
      `category` (string) on 2.0, `categories` (array) on 2.1.
      recipe_has_category() and machine-efficiency detection handle both formats.
  Features:
    - Refactored category system to use fixed tiers per category (from original fork).
      Category now determines the FLOOR tier; cost-solver can only push HIGHER.
      This fixes persistent tier misclassification with overhaul mods (Bob's, Angel's, etc.)
      where items with simple ingredient chains were incorrectly placed in low tiers.
    - Expanded replication categories from 7 to 18: ore, element, shape, alloy, chemical,
      device2-5, organic, military, module, life, exotic, magic, alien, science, general.
      Each category has a FIXED tier: ore=1, element/shape/device2=2, alloy/chemical/device3=3,
      device4/military=4, device5/module/life/exotic/magic/alien=5.
    - Added "Military & Weapons" category (tier 4). Guns, ammo, armor, and capsules
      no longer fall under "Components" — they get their own grouped technology.
    - Machine efficiency multipliers (replvar system from original). Startup setting
      "dmrsa-use-machine-efficiency" (default: true) adjusts replication costs based on
      the original recipe's machine type: electric furnaces cost less to replicate,
      oil refineries and centrifuges cost more.
    - Smart prerequisite cleanup: removes redundant prerequisites from grouped technologies
      (if A requires B and B requires C, C is removed from A's list since it's implied).
  Improved:
    - get_tier_from_tech(): added detection for military science packs, Bob's advanced-logistic
      science pack, numbered science packs (modname-science-pack-N), gold, alien packs.
      Added fallback heuristic using unique science pack count.
    - get_item_category(): expanded auto-classification to cover all 18 categories.
      Element detection via periodic table name matching, shape detection via
      item name patterns (gear, pipe, stick, cable, brick, bearing, etc.).
  Localization:
    - Added replcategory-name entries for all 18 categories in EN and ES-ES.
    - Added setting name/description for dmrsa-use-machine-efficiency.
Version: 3.3.6
Date: 2026-07-15
  Features:
    - Re-enabled original item technologies as prerequisites for dynamic replication
      technologies (individual and grouped), with safe existence check. If another mod
      removes a technology in data-final-fixes, the prereq is gracefully skipped instead
      of crashing. This ensures replication techs are properly gated: you must research
      the original item's technology before you can replicate it (fixes "blue bottle in T5"
      scenario where mid-game items were replicable at endgame tiers).
  Balance:
    - Capped tech-tier contribution to ingredient-tier + 1 in cost-solver. Prevents mods
      with deep tech trees (Bob's, Angel's) from inflating replication tiers of simple
      intermediate items. An item whose ingredients are T2 will no longer jump to T5 just
      because its original unlocking-tech requires space science.
Version: 3.3.5
Date: 2026-07-08
  Bugfixes:
    - Fixed "no lab will accept all the science packs" startup crash when using Space Age
      with grouped technology distribution. The Vulcanus planetary grouped technologies
      (e.g. dmrsa-grouped-repl-vulcanus-chemical-tech) required both metallurgic-science-pack
      and dmrsa-dark-matter-scoop, but the replication-lab's inputs were conditionally set
      in data.lua via ternary (mods["space-age"] ...). Moved to a belt-and-suspenders approach:
      lab base inputs are now unconditionally the 4 DMR science items, and Space Age planetary
      science packs are added in data-final-fixes.lua as a guaranteed safety net.
    - Added explicit research_category = nil to the replication-lab to ensure it matches
      all technology categories regardless of engine defaults.
  Balance:
    - Implemented diminishing returns compounding formula for "Recursive Steps (Compounding)"
      cost calculation method. Each additional recipe depth level adds a smaller surcharge
      (penalty/(depth+1)) instead of a full 1.5x on every level, preventing exponential
      blowup for deep recipe chains. Logistic science pack compounding cost reduced from
      ~5x to ~2.5x relative to base resource cost.
    - Added hard cap of 600s on energy_required for any replication recipe, preventing
      edge-case extreme costs from compounding in deep chains regardless of mode.
Version: 3.3.4
Date: 2026-07-03
  Bugfixes:
    - Fixed "Error in assignID: technology 'aai-loader' does not exist" crash when using
      aai-loaders-sane mod. Root cause: original item technologies (e.g. 'aai-loader') were
      being added as prerequisites for grouped replication technologies in data-updates.lua,
      but could be removed by other mods in data-final-fixes.lua. The order in which
      data-final-fixes.lua runs between unrelated mods is alphabetical, so if another mod
      runs after DMR, the removal would happen after DMR's strip pass, causing an assignID
      crash. Fix: removed the addition of external original techs as prerequisites for all
      dynamic DMR technologies (grouped and individual). The replication tier requirements
      are sufficient to gate these technologies.
    - Refactored data-final-fixes.lua into a 3-pass safety net with proper Lua pattern
      escaping for the 'dmrsa-' prefix (the '-' character is a lazy quantifier in Lua
      patterns and MUST be escaped). Added cross-mod validation and orphan tech reassignment.
Version: 3.3.3
Date: 2026-06-28
  Bugfixes:
    - Added data-final-fixes.lua that strips missing technology prerequisites from all DMR
      technologies at the end of the loading cycle. Fixes "Error in assignID: technology with
      name 'X' does not exist" crashes when other mods remove technologies (e.g. moon-eneas
      removing spidertron-unit).
    - Added prerequisite deduplication pass during grouped technology generation to prevent
      "Technology prerequisite 'X' is registered more than once" errors with mods that share
      technology names (e.g. Angel's Smelting + Angel's Petrochem both registering
      angels-basic-chemistry).
    - Added existence check before adding original item technologies as prerequisites for
      grouped replication technologies, preventing crashes when referenced techs are missing.
Version: 3.3.2
Date: 2026-06-12
  Bugfixes:
    - Fixed technology research tier classification when using mods that replace science packs with custom items (such as Krastorio 2 tech cards). Technology requirements are now resolved using pattern matching, preventing late-game science packs from being unlocked at replication Tier 1.
Version: 3.3.1
Date: 2026-06-11
  Bugfixes:
    - Fixed "Technology prerequisite 'X' is registered more than once" startup crash when mods like Angel's Smelting + Angel's Petrochem both register the same technology. Wrapped data:extend() in pcall so the replicator mod gracefully falls back to baseline unlocks instead of crashing.
Version: 3.3.0
Date: 2026-06-11
  Changes:
    - Removed dead de-replication code and zombie 'dmrsa-dereplication-ratio' setting that were disabled since v3.0.0.
Version: 3.2.1
Date: 2026-06-11
  Bugfixes:
    - Added deduplication of technology prerequisites in data-final-fixes to prevent "registered more than once" startup errors when using conversion mods like Angel's petrochem.
Version: 3.2.0
Date: 2026-06-08
  Features:
    - Added "Grouped Categories" replication technology distribution mode as the new default setting.
    - Consolidated replication recipe unlocks into thematic category technologies per tier and planet (e.g. Ores, Alloys, Fluids, Modules, Components).
    - Implemented dynamic research cost scaling for grouped technologies based on the number of items in that category, with a customizable cost multiplier setting (defaulting to 5.0).
    - Increased research cycle time for grouped technologies to 25 seconds to enforce time-gating.
  Bugfixes:
    - Dynamically registered all required planetary and custom science packs as acceptable inputs for the Replication Lab in data-final-fixes to prevent "no lab will accept all science packs" startup crashes.
    - Excluded hidden technologies (such as 'basic-logistics') from being registered as prerequisites for replication technologies, preventing unresearchable warning prompts from mods like PlanetsLib.
Version: 3.1.2
Date: 2026-06-08
  Bugfixes:
    - Added fail-safes to dynamic recipe generator to skip recipes/technologies if the crafting category, science packs, or prerequisite technologies do not exist, preventing startup crashes.
Version: 3.1.1
Date: 2026-06-08
  Bugfixes:
    - Fixed "Non-contiguous levels: 2, followed by 4" startup error when Space Age is enabled by registering replication-3 as a hidden technology prototype.
Version: 3.1.0
Date: 2026-06-08
  Features:
    - Split replication-3 technology into 3 parallel planetary technologies (Vulcanus, Fulgora, Gleba) to allow non-linear planetary progression.
    - Added replication support for metallic, carbonaceous, and oxide asteroid chunks (Tier 4, cost 2.0).
  Changes:
    - Rebalanced Promethium Ore to Tier 5 with a base cost of 20.0.
    - Restrained Promethium Science Pack replication recipe to space platforms only (Tier 5, cost 50.0).
    - Removed obsolete hr_version from Tenemut graphics to fix startup warnings.
Version: 3.0.2
Date: 2026-06-07
  Bugfixes:
    - Fixed the Replication crafting menu tab icon being cropped and offset by correcting its icon_size from 64 to 128 to match the actual image dimensions.
Version: 3.0.1
Date: 2026-06-06
  Bugfixes:
    - Fixed Tenemut ore not spawning on Nauvis due to incorrect initialization order of resource patch sets.
Version: 3.0.0
Date: 2026-06-06
  Changes:
    - Removed dark-matter requirement from replication recipes. Replicators now produce items using only electricity.
    - Scaled recipe crafting time (energy_required) proportionally to calculated resource cost to balance energy usage.
    - Disabled de-replication recipe generation.
    - Layered custom border graphics onto replication technology research icons to distinguish them from regular research.
    - Hidden the pure dark-matter item and removed its refining recipe from technologies and base recipes.
Version: 2.0.4
Date: 2025-03-12
  Changes:
    - Typo on the github url fixed.
Version: 2.0.3
Date: 2025-03-11
  Changes:
    - Moved Elevated Rails and Rail Supports to tier 4 device from 5, as they can be unlocked
      before space science.
    - Quality Modules are defined similarly now to the other modules and will not be locked
      to just the tier 5 devices.
  Bugfixes:
    - Seems some DMR techs are having normal science packs add to their research ingredients,
      and as DMR labs only accept DMR resources, fixing them having non DMR ingredients.
Version: 2.0.2
Date: 2025-03-10
  Bugfixes:
    - Fix for replicators appearing invisible
Version: 2.0.1
Date: 2025-03-10
  Changes:
    - Technologies for the replication stages will now vary based on the default tenemut
      spawning planet setting, and whether or not Space Age is enabled.
      If the default planet is Nauvis, or Space Age is disabled, the required science packs
      are the same.
      If the default planet is Vulcanus, Fulgora, or Gleba, the associated science pack from
      each planet is added to the requirement.
      If the default planet is Aquilo, all of the science packs including the four planet
      sciences are added.
    - Fix for other mods (including my own) adding science packs to dmr lab and technologies.
Version: 2.0.0
Date: 2025-03-09
  Changes:
    - As I do not feel comfortable releasing my changes to the public domain, I have relicensed
      this version under the GNU Public License version 3 (GPL3).
    - Fixed for Factorio 2.0 and Space Age
    - When Space Age is enabled, you can choose which planet Tenemut will spawn on, defaulting
      to Aquilo.
    - Also when Space Age is enabled, you can choose to spawn Tenemut on other planets as well,
      with options to include Nauvis or not.
    - Replications for Elevated Rails, Quality, and Space Age have been added when the associated
      mods are enabled.
Version: 1.1.11
Date: 2023-12-30
  Bugfixes:
    - added code to remove products that no longer exist
      useless recipes will remain, but leaves things intact otherwise
    - iterate results with pairs, not ipairs
    - re-do logic results a bit, should not error when a recipe of result has a main product
  Changes:
    - some more Krastorio 2 and/or SE replications
    - tried to add some Noble Metals (bzgold) compatibilty
    - report anything to discussions
Version: 1.1.10
Date: 2023-01-23
  Changes:
    - scan in data-final-fixes to remove a technology prerequisite if it no longer exists (for dmr18 techs)
      (fixes missing technology "radar" bug with K2SE)
Version: 1.1.9
Date: 2022-11-12
  Bugfixes:
    - recipe with 1 result and "" main product (which would use recipe icons, not the item)
    - Bio Industries was very very out of date. Many more replications work now (wood time increase, take note)
Version: 1.1.8
Date: 2022-11-09
  Bugfixes:
    - finding item/fluid results of a recipe was weird. re-did that. Report bugs
  Changes:
    - removed SE post-process as a dependency cause it says to
    - changed how many other mods were detected, now that mods["some_name"] exists in data
  Additions:
    - se heat shielding and stone tablets? It allows some more replications to succeed
Version: 1.1.7
Date: 2022-10-13
  Bugfixes:
    - missing dependencies for angelspetrochem and angelsrefining (thanks for reporting)
Version: 1.1.6
Date: 2022-09-25
  Bugfixes:
    - do not error when "replicate space science packs" is set to false and SE is active
  Changes:
    - name in new-map ores tab has tenemut ore icon next to it
Version: 1.1.5
Date: 2022-08-05
  Changes:
    - rebalanced production, utility, and space science packs. It will hurt a little.
    - removed some log prints
Version: 1.1.4
Date: 2022-08-05
  Changes:
    - workaround for SE adding rocket science packs and space science packs
    - adjust techs further when SE is present: previously: production and utility science
      now with se: rocket science and space science (roughly the same, balance wise)
      post on discussions if problems
    - replicator techs are no longer "upgrades" and searching for replicator will show all of them in the tech screen
Version: 1.1.3
Date: 2022-05-12
  Additions:
    - omnimatter compatibility
Version: 1.1.2
Date: 2021-05-08
  Changes:
    - updated autoplace for tenemut, generates similar to uranium
  Additions:
    - Setting to allow replicators in space, default false (SE)
    - Setting to disable generation near spawn
    - core fragment for SE
  Bugfixes:
    - changelog didn't load v_v
Version: 1.1.1
Date: 2020-12-15
  General:
    - thanks chipgeekjr for the help with this one :P
  Bugfixes:
    - Missing prefixes for some bob and angel things
    - Hopefully fixed the error with process icon whatever thing line 143
Version: 1.1.0
Date: 2020-12-04
  General:
    - 1.1 release, should be symmetric with 1.0.X updates until 1.1 is stable
Version: 1.0.0
Date: 2020-12-03
  Bug Fixes:
    - changed some of the icon generation (icons before icon)
    - bio industries fertilizer names
    - SE exclusion for the extra science packs
Version: 0.18.5
Date: 2020-06-02
  Bug Fixes:
    - LOG PRINTS
Version: 0.18.4
Date: 2020-06-02
  Changes:
    - make unique all DMR recipes/items/tech etc to prevent collisions with other mods
      (may not have prevented *all* collision bugs, and still more work to do)
Version: 0.18.3
Date: 2020-03-05
  Bug Fixes:
    - boolean precedence error (and is before or, not after) if using Angels without bobs
Version: 0.18.2
Date: 2020-03-05
  General:
    - Update icon sizes. They look right now
Version: 0.18.1
Date: 2020-03-04
  General:
    - initial Factorio 0.18+ release
    - Port of Dark Matter Transmuters_R
    - all credit to previous authors
    - previous changes in changelog-previous.txt
    - any compatibility patches probably require some re-work, post to discussions

  Known Issues:
    - recipe vs technology icons are interpreted differently (bug)?

  Bug Fixes:
    - change tenemut mining particle type to "optimized-particle"
    - fix icon sizes in tenemut tab