Skip to content

Port Yuoki 1.3.0 startup to Factorio 2.1 - #11

Merged
jatmn merged 4 commits into
release/1.3.0from
codex/yuoki-1.3.0-factorio-2.1
Oct 8, 2026
Merged

jatmn merged 4 commits into
release/1.3.0from
codex/yuoki-1.3.0-factorio-2.1

Conversation

@jatmn

@jatmn jatmn commented Oct 5, 2026 •

Copy link
Copy Markdown
Owner

Summary

Yuoki 1.2.x cannot start on Factorio 2.1 because required prototype fields and assembler picture APIs changed. This ports Yuoki 1.3.0 to Factorio 2.1.20 while preserving existing gameplay values.

  • Import the official assembler picture tables instead of calling removed globals.
  • Convert item fuel categories and recipe categories to arrays, including generated-recipe helpers, without changing category values.
  • Use independent_probability for product results and shared helpers without changing probabilities.
  • Require both Quality and Space Age before defining the Space Age quality module.
  • Preserve Angel's Refining slag cleanup under the new recipe-category API: whenever Recycler is enabled, remove recycling recipes returning hidden y-slag and their technology unlock references, with Quality enabled or disabled. Match recycling in any category position and preserve unrelated recipes and effects.
  • Set version 1.3.0, factorio_version 2.1, and base/optional Space Age/Quality minimums 2.1.20. Yuoki 1.2.x remains the Factorio 2.0 line.

Targets release/1.3.0 in jatmn/Yuoki-Factorio-2.x.

Validation

Official Factorio 2.1.20 (build 87512, linux64, headless) with isolated mod and write directories. Each configuration passed generated-data assertions, created a fresh map, and completed 120 ticks with the final Yuoki 1.3.0 source:

Enabled mods Result
Base + Yuoki Pass
Base + Yuoki + minimal Angel's dependency fixture; Recycler and Quality disabled Pass
Base + Elevated Rails + Recycler + Space Age + Yuoki; Quality disabled Pass
Base + Elevated Rails + Recycler + Quality + Space Age + Yuoki Pass
Base + Elevated Rails + Recycler + Space Age + Yuoki + minimal Angel's dependency fixture; Quality disabled Pass
Base + Elevated Rails + Recycler + Quality + Space Age + Yuoki + minimal Angel's dependency fixture Pass

The recycling regression fails on starting head a7d5cdf: with Angel's and Recycler enabled but Quality disabled, y-slag-recycling, y_slag_granulate-recycling, and y_tile_slagfilled-recycling return hidden slag and retain their unlocks. The final source removes all three recipes and unlocks in both Quality configurations. A full before/after generated-data comparison shows only the intended recipe removals, unlock removals, and slag recycling flags changed.

The dependency fixture defines only angels-slag and the mod identity. Yuoki's real loading stages and the official Recycler perform the behavior under test. Controls verify normal slag recycling without Angel's, Angel's replacement without Recycler, unrelated recycling and technology unlocks, representative recipe/fuel categories and fuel values, asteroid probabilities of 0.2, and the optional quality-module guard. The official assembler-picture exports were verified as tables.

The repair hunk and affected contracts were reviewed; git diff --check passed. The committed tree exactly matches the tested candidate.

Reviewed and tested commit: bbd2ce77b0ec5b59623bd96347d95937d7658f17.

Scope and limitations

Quality scaling, module effects, balance, and disabled monuments remain unchanged. Unloaded legacy Bob's/Silica files and unrelated obsolete fields remain outside this startup port.

The full Angel's mod and other third-party mod gameplay were not runtime-tested. Headless validation does not establish visual correctness, gameplay balance, or old-save migration.

@jatmn jatmn self-assigned this Oct 5, 2026

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hey - I've found 3 issues

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="prototypes/integration/omnia/ir_atomics.lua" line_range="18" />
<code_context>
 			main_product = "y-unicomp-a2",
 			subgroup = "j-y-atomics-4",
-			category = "yuoki-atomics",
+			categories = { "yuoki-atomics" },
 			icons = {
 				{
</code_context>
<issue_to_address>
**Optional integration recipes retain old categories**

When bob’s Ores or Silica is installed and its integration prototypes are loaded, when the Bob’s Ores or Silica integration is loaded, its recipe prototypes still set the removed `category` field instead of `categories`; Factorio rejects those prototypes during startup, so the mod configuration fails to load.

Convert the recipe categories in the remaining integrations to `categories` arrays.
</issue_to_address>

### Comment 2
<location path="prototypes/entity/e_advmachinery.lua" line_range="78" />
<code_context>
 				volume = 200,
 				production_type = "input",
-				pipe_picture = assembler2pipepictures(),
+				pipe_picture = assembler_pictures.assembler2pipepictures,
 				pipe_covers = pipecoverspictures(),
 				base_area = 10,
</code_context>
<issue_to_address>
**Assembler prototypes receive functions**

When factorio 2.1's assembler-pictures module exports `assembler2pipepictures` and `assembler3pipepictures` as factory functions, the assembler-picture exports are factory functions, so assigning them directly gives `pipe_picture` a function instead of the required picture table; Factorio rejects the affected machine prototypes and startup stops.

Invoke each assembler-picture factory when assigning `pipe_picture` in all affected prototypes.

Also at `prototypes/entity/e_entity219.lua:84`, `prototypes/entity/e_entity220.lua:88`, `prototypes/entity/e_mastercrafted.lua:47`, `prototypes/entity/e_smelter.lua:134`, `prototypes/entity/y_entities.lua:400`, `prototypes/entity/y_entities.lua:477`.
</issue_to_address>

### Comment 3
<location path="prototypes/integration/space-age/r_metal-process.lua" line_range="9" />
<code_context>
 			icon = "__Yuoki__/graphics/icons/pure-iron-n.png",
 			icon_size = 64,
-			category = "metallurgy",
+			categories = { "metallurgy" },
 			subgroup = "vulcanus-processes",
 			order = "a[melting]-b[molten-iron]",
</code_context>
<issue_to_address>
**Hidden slag remains recyclable**

When angels Refining and Quality are enabled and a generated recycling recipe produces `y-slag`, `angelsrefining.lua` reads `recipe.category`, so it skips recycling recipes whose category is in Factorio 2.1’s `recipe.categories`; its cleanup leaves those recipes able to return hidden `y-slag` in the recycler.

Update the cleanup to check recycling categories through `recipe.categories`.

Also at `prototypes/recipe/r_metal-process.lua:154`, `prototypes/recipe/r_metal-process.lua:173`.
</issue_to_address>

Sourcery assessment

Approval pending. 3 findings to address first.

Blocking findings: prototypes/integration/omnia/ir_atomics.lua:18, prototypes/entity/e_advmachinery.lua:78, prototypes/integration/space-age/r_metal-process.lua:9


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Comment thread prototypes/integration/omnia/ir_atomics.lua
Comment thread prototypes/entity/e_advmachinery.lua
Comment thread prototypes/integration/space-age/r_metal-process.lua
@jatmn

jatmn commented Oct 8, 2026

Copy link
Copy Markdown
Owner Author

@pullfrog review

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Important

One Factorio 2.1 compatibility gap remains: Angel’s slag recycling cleanup is skipped when Recycler is enabled without Quality.

Reviewed changes: Reviewed all 32 changed files across the three commits porting Yuoki 1.3.0 to Factorio 2.1.20.

  • Assembler pictures: Imports the official picture-table exports instead of calling the removed globals; verified that these exports are tables, not functions.
  • Prototype fields: Migrates recipe and item fuel categories to arrays, including the active recipe-generation helpers, and preserves product probabilities through independent_probability.
  • Optional quality module: Requires both Space Age and Quality before defining the quality module and its recipe.
  • Angel’s integration: Updates recycling-category matching and removes technology unlocks for deleted slag-returning recipes, but retains a guard that misses Recycler-only configurations.
  • Release metadata: Sets Yuoki 1.3.0 and Factorio 2.1, with base and optional expansion minimums of 2.1.20.

Independent validation with official Factorio 2.1.20, build 87512: Base + Yuoki, Recycler + Quality + Yuoki, Space Age + Quality + Yuoki, and Space Age + Yuoki with Quality disabled each created a fresh map and completed 120 ticks. Generated-data assertions checked representative categories, fuel values, asteroid probabilities, and the quality-module guard. A minimal Angel’s dependency fixture reproduced the finding with Quality disabled and confirmed cleanup with Quality enabled; this does not constitute full Angel’s gameplay, visual, or old-save testing.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using gpt-6.1-sol | 𝕏

Comment thread prototypes/integration/angels/angelsrefining.lua
@jatmn
jatmn merged commit 18391b1 into release/1.3.0 Oct 8, 2026
1 check passed
@jatmn
jatmn deleted the codex/yuoki-1.3.0-factorio-2.1 branch October 8, 2026 22:41
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.

1 participant