Skip to content

Pumpjack terminal offsets likely wrong for East and West on Factorio 2.1 #81

Description

@wormeyman

Status: strongly evidenced, not confirmed in-game. The prototype data below is authoritative; the conclusion drawn from it is a derivation. It should be cheap for anyone with Factorio 2.1 to settle - see "How to verify" at the bottom.

What changed in the game

Factorio 2.1 changed the pumpjack's output fluid box. Captured with tools/capture-factorio-oracle.sh from two real installs:

2.0.77 stable        positions: [[1,-1], [1,-1], [-1,1], [-1,1]]    <- 2 distinct corners
2.1.14 experimental  positions: [[1,-1], [1,1],  [-1,1], [-1,-1]]   <- 4 distinct corners

That array is indexed by rotation (north, east, south, west). In 2.0, north and east share an output corner, and south and west share one. In 2.1, every rotation gets its own corner.

This is FFF #442 shipping: "The Pumpjack was always a touch strange with the rotations, maybe it was adding to the puzzle, but these days we are more of the opinion it is just making things more awkward."

Notably, this is the only planner-relevant difference between 2.0.77 and 2.1.14. directions, modules, and all nine other entities in the oracle fixture are byte-identical across the two versions.

What the planner assumes

src/FactorioTools/OilField/Helpers.cs:20-26:

Tuple.Create(Direction.Up,    new Location(1, -2)),
Tuple.Create(Direction.Right, new Location(2, -1)),
Tuple.Create(Direction.Down,  new Location(-1, 2)),
Tuple.Create(Direction.Left,  new Location(-2, 1)),

The derivation

Take "the pipe tile is the prototype position, one step further out in the facing direction". That rule reproduces the planner's north offset in both versions ((1,-1) + one step north = (1,-2)), and matches the ASCII diagram in that file's own doc comment. Applying it to each rotation:

rotation 2.0.77 implies 2.1.14 implies planner has matches
north (1,-2) (1,-2) (1,-2) both
east (2,-1) (2,1) (2,-1) 2.0 only
south (-1,2) (-1,2) (-1,2) both
west (-2,1) (-2,-1) (-2,1) 2.0 only

So the planner appears correct for 2.0 and wrong for 2.1 on east and west, placing the pipe on the opposite corner from where the pumpjack actually outputs.

Why this matters

If it holds, this is a second, independent cause of "mis-rotated pumpjacks" reports, distinct from the direction-encoding bug fixed in #77. It is pre-existing and was not introduced by that PR.

It also raises a harder design question: a single hardcoded offset table cannot be correct for both 2.0 and 2.1. Either the planner picks a target version, or terminal offsets need to come from the oracle rather than being hardcoded - which would be the natural fix, since the data is already captured in test/FactorioTools.Test/OilField/factorio-oracle.json.

Why it is not confirmed here

I tried to settle it by scripting the game and stopped after three attempts: LuaFluidBox has no class page in 2.1's bundled doc-html, and get_pipe_connections does not appear in runtime-api.json at all. Fluidbox scripting was reworked in 2.1 and I did not want to keep guessing at method names.

How to verify

In Factorio 2.1, place a pumpjack facing east and look at which corner the output pipe stub comes from:

  • north-east side, offset (2,-1) from center -> the planner is right, close this issue
  • south-east side, offset (2,1) from center -> the planner is wrong, this is real

One screenshot settles it. Repeat facing west for the second half.

Related

Both oracles are reproducible: tools/capture-factorio-oracle.sh --factorio <path to 2.0.77> versus the committed 2.1.14 fixture. The committed fixture deliberately targets 2.1.14 (experimental), since that is where the bug reports come from.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions