Skip to content

fix: preserve Yuoki behavior across Factorio 2.1 API changes - #18

Merged
jatmn merged 2 commits into
release/1.3.0from
fix/1.3.0-factorio-2.1-compatibility
Oct 8, 2026
Merged

jatmn merged 2 commits into
release/1.3.0from
fix/1.3.0-factorio-2.1-compatibility

Conversation

@jatmn

@jatmn jatmn commented Oct 8, 2026 •

Copy link
Copy Markdown
Owner

Problem and change

Factorio 2.1 changed quality-effect units and moved pipe connection visibility into each connection definition. The startup port left Yuoki's quality effect at 0.1, raising its normal-quality chance from 1% to 10%, and left eight pipes using the removed fluid-box flag.

  • Use 0.01 to preserve the YI Quality Module's previous 1% chance; retain its consumption and productivity effects.
  • Move hidden-connection flags to the existing 22 connections on eight pipe prototypes, preserving geometry, capacity and underground reach.
  • Describe Yuoki 1.3.0 as the current release in README, update release dates to October 8, 2026, correct the repository homepage, and add changelog entries.

Targets release/1.3.0 only. Follows the startup compatibility work in #11 and the baseline in #17. No version bump or gameplay rebalance.

Validation

Official Factorio 2.1.21, build 87673, Linux headless, using the built mod ZIP:

Configuration (all include Yuoki) Prototype load, fresh map, 120 ticks
Base Pass
Recycler Pass
Recycler + Quality Pass
Space Age + Elevated Rails + Recycler, Quality disabled Pass
Space Age + Elevated Rails + Recycler + Quality Pass

The quality regression fails on starting source 62d9981: the official runtime reports 0.1 instead of expected 0.01. With this change, a save made from that source retains its installed module and reports 0.01 on both the item prototype and placed assembler; consumption/productivity remain unchanged. It completes 120 ticks, as does a fresh save. The run-owned probe uses real Yuoki and official expansion mods; no dependency substitutes.

Full before/after prototype comparisons for all five configurations show only the intended quality scalar and pipe-flag migrations. Yuoki boilers also pass 2.1.21's stricter temperature validation, and the optional quality-module guard behaves correctly.

Lua 5.2.4 syntax, Luacheck 1.2.0 (zero warnings), StyLua 2.5.2, package build/validation, ZIP membership inspection, README links and git diff --check pass. All changed hunks reviewed; committed tree matches the validated candidate.

Reviewed commit: 664b3c5a21a7030cb5895499188d8aedf025cd96. Packaging, archive contents and diff checks pass on this final tree. Lua and engine evidence above was obtained on b79fbc4 and remains applicable: the follow-up changes only README wording, release dates and the homepage URL.

Sources and limits

Official 2.1 changelog, PipeConnectionDefinition, and runtime entity effects.

Headless validation does not prove rendered pipe indicators, full third-party mod combinations, or migration of Factorio 2.0 saves. Unloaded legacy files and unrelated historic circuit/productivity behavior are outside this repair. The audit found no further startup blocker in the tested configurations.

Summary by Sourcery

Preserve Yuoki Industries behavior and compatibility across Factorio 2.1 API changes.

Bug Fixes:

  • Restore the YI Quality Module’s normal-quality chance to 1% under Factorio 2.1 while preserving its existing consumption and productivity effects.
  • Update Yuoki pipe prototypes for Factorio 2.1 by applying hidden connection metadata to individual connections without changing pipe behavior.

Enhancements:

  • Refresh the README with Factorio 2.1 compatibility, installation, validation, and upgrade guidance.

Documentation:

  • Update release metadata and changelog entries for Yuoki 1.3.0, including release dates and the repository homepage.

@jatmn jatmn self-assigned this Oct 8, 2026
@jatmn
jatmn marked this pull request as ready for review October 8, 2026 21:17
@jatmn

jatmn commented Oct 8, 2026

Copy link
Copy Markdown
Owner Author

@pullfrog review

@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 reviewed your changes and they look great!

Sourcery assessment

Needs a human reviewer. If the quality conversion is wrong, production runs can create items with incorrect quality probabilities, and those results remain in saved games after reverting the mod. The impact is bounded to gameplay state and can generally be repaired by rolling back or correcting affected saves; the pipe changes mainly affect connection indicators and are reversible runtime behavior.


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

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

✅ No new issues found.

Reviewed changes: Reviewed all five changed files and both commits against release/1.3.0, including active loading paths, related compatibility work, and official Factorio API contracts.

  • Quality chance: Changing quality from 0.1 to 0.01 preserves the module's normal-quality 1% upgrade chance while leaving consumption and productivity unchanged. The 2.0 contract multiplied the effect by the quality's next_probability; the 2.1 contract uses the direct percentage scalar.
  • Pipe visibility: All 22 connections across the eight affected prototypes receive hide_connection_info, matching the 2.1.20 connection API, without changing directions, positions, capacities, or underground distances.
  • Release documentation: README compatibility and installation guidance match info.json and the optional module guard; release dates, homepage, and changelog entries are consistent.

Independent validation passed: package build, package validation covering all 1,038 release files, and PR whitespace checks. The current Lua and packaging CI checks also pass. I did not rerun the headless engine or local Lua tooling in this review; the PR's reported engine tests remain the runtime evidence, with graphical behavior, Factorio 2.0 save migration, and full third-party combinations outside that coverage.

Pullfrog  | View workflow run | Using gpt-6.1-sol | 𝕏

@jatmn
jatmn merged commit 5778161 into release/1.3.0 Oct 8, 2026
8 checks passed
@jatmn
jatmn deleted the fix/1.3.0-factorio-2.1-compatibility branch October 8, 2026 21:25
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