Build houses that spawn autonomous lumberjacks, link them to outposts for work areas, and power the network in single-player or multiplayer.
Mods introducing new content into the game.
Version: 0.1.33
Date: 2026-07-13
Bugfixes:
- Fixed a non-recoverable "Entity is not ghost." crash on tick when loading an older save that had trees/rocks marked for deconstruction. The 0.1.32 fix made tree/rock decons visible to the build-job pool for the first time, but `pool_key_for` (the fallback path for entities without a `unit_number`, which is exactly the case for trees in Factorio 2.0) was still using `entity.ghost_name or entity.name`. Reading `.ghost_name` on a non-ghost entity throws an error rather than returning nil, so the very first pool refresh that included a tree-decon crashed. `pool_key_for` now checks `entity.type` first and only reads `ghost_name` when the entity is actually an `entity-ghost` or `tile-ghost`.
Version: 0.1.32
Date: 2026-07-13
Bugfixes:
- Fixed lumberjacks getting stuck in a "Thinking" loop when a blueprint was placed on top of trees/rocks that the player had also marked for deconstruction. `surface.find_entities_filtered({force = X, to_be_deconstructed = true})` filters by the ENTITY's own force, not by which force ordered the deconstruction. Trees and rocks live on the `neutral` force, so a player-force deconstruction order on a tree was invisible to `force = house.force`-filtered scans. That meant `ghost_is_blocked_by_decon` (in the network build-pool refresh) never saw the tree, so a ghost sitting on top of the tree entered the pool as a normal build job; when the worker arrived, `ghost.revive()` silently failed because the tree still blocked the tile; the recovery fallback that mines blockers ran the same force-filtered query and also came up empty, so the worker looped forever between `seeking_build_job` → `moving_to_build_site` → `building_entity` (all three states show "Thinking" as their thought text). Both the pool scan (`get_or_refresh_network_build_scan`) and the recovery fallback (`try_complete_build_job`) now query without a `force` filter and post-filter results through `entity.is_registered_for_deconstruction(house.force)`, which correctly matches on the deconstruction-order's force. Trees and rocks are now visible as decon jobs, ghosts placed on top of them are correctly filtered out until the blocker is gone, and the AI proactively deconstructs blockers before attempting to build on top of them.
Version: 0.1.31
Date: 2026-07-13
Optimizations:
- Spatial chunk-index for build-job picking. In 0.1.30 the shared network build pool eliminated the per-camp queue duplication, but each camp still linearly scanned all `pool.jobs` (a hash map that could hold thousands of entries during a large blueprint) to find its nearest unclaimed job. With N lumberjacks in a network and T jobs in the pool, per-tick pick cost was O(N * T) in the worst case — measurable at ~1000+ Lua ops/tick with dense pools even before the O(1) claim / filter branches. The pool now maintains a second index `pool.jobs_by_chunk[chunk_key] = { [job_key] = job }` bucketed by 32-tile chunks (matching Factorio's native chunk grid). `pick_pool_job_for_camp` expands ring-by-ring from the worker's own chunk outwards and terminates as soon as no further ring can hold a closer job — for cluster picks (12-tile radius, which dominates in practice once a worker starts building near a blueprint) this reduces per-pick cost from O(T) to O(k) where k is the ~10-100 jobs in the local 1-3 chunks. Empty pools get a `next(pool.jobs) == nil` short-circuit so idle networks pay no pick cost at all.
- `remove_pool_job` now also removes the entry from `pool.jobs_by_chunk` in O(1) via the `_chunk_key` stamped on each job at pool-build time. Inline invalid-ghost cleanup during a pick also clears the chunk entry.
Version: 0.1.30
Date: 2026-07-13
Optimizations:
- Large-blueprint FPS: replaced the per-camp `camp.build_queue` model with a shared network-wide build-job pool. Previously every lumberjack in a network built and maintained its own private copy of the queue by iterating the entire scan of ghosts/decons/upgrades and re-doing bbox / work-area / decon-blocker / item-supply checks per entry every ~120 ticks. With N lumberjacks in a network and T ghosts in the shared scan, refresh cost was O(N × T) per scan window — for a 100-lumberjack network with a few-thousand-ghost blueprint that was measured in tens of milliseconds spent duplicating the same work N times, plus additional pathfinder churn from many workers racing to identical target lists. Now: one shared pool per network stored at `storage.network_build_pools[network_key]`. Refresh cost drops to O(T) per network per scan window regardless of camp count. Each job is claimable by at most one camp at a time (via `pool.claims[key]`), so workers naturally spread out onto distinct jobs instead of duplicating each other's scan effort. Claims carry a 60-second deadline so if a worker gets stuck/killed/respawned without releasing its claim, another camp can pick up the same job.
Changes:
- `refresh_build_queue` / `prune_build_queue` are now thin no-ops kept for backward compatibility with older save-loaded camps; the pool is refreshed lazily by `get_next_build_job` via `build_supply_helpers.pool_for_camp` and each rebuild preserves live claims from other camps' `current_build_job` (including recovery from pre-0.1.30 saves where jobs lack `_pool_key`).
- `clear_current_build_job(camp)` now releases the pool claim (or removes the job entirely if its ghost is invalid, i.e. build/decon/upgrade was completed). Every existing state-machine path that previously wrote `camp.current_build_job = nil` already routes through this helper, so no additional callsite changes were needed.
- `invalidate_network_caches()` wipes `storage.network_build_pools` as well, so old-network-key pools don't stay behind when houses are added/removed.
Version: 0.1.29
Date: 2026-07-13
Bugfixes:
- Fixed a rare "LuaEntity API call when LuaEntity was invalid" crash in `try_complete_build_job` after a lumberjack tried to revive a blueprint ghost. `ghost.revive({raise_revive = true})` destroys the ghost as part of a successful revive, but if a `script_raised_revive` handler (ours or another mod's) then invalidated the returned built entity before we validated it, the function fell through into the "build failed" recovery branch and read `ghost.bounding_box` on the already-destroyed ghost. The recovery branch now re-validates `ghost`, `worker`, `house` and `surface` before scanning for blockers, and the success tail re-validates `house` before touching the network inventory. Same class of bug could also have crashed on `house.force` / `worker.get_main_inventory()` / `surface.find_entities_filtered` after events fired during revive; all of those are now guarded.
Version: 0.1.28
Date: 2026-07-13
Bugfixes:
- Fixed lumberjack upgrades of underground belts (and loaders) always producing an "input" variant, so upgrading a paired underground-belt line via the upgrade planner turned every output half into a second input. `surface.create_entity` requires an explicit `type = "input" | "output"` for underground belts / loaders; without it the engine silently defaults to "input". The upgrade path now reads `belt_to_ground_type` (or `loader_type`) from the original entity and forwards it in both the fast_replace and the destroy+create fallback branches, so the input/output direction of the whole belt line is preserved through an upgrade.
Version: 0.1.27
Date: 2026-07-13
Bugfixes:
- Fixed a loop where a lumberjack would repeatedly walk to a blueprint ghost placed on top of a tree/rock that the same blueprint had marked for deconstruction. `ghost.revive()` silently fails when the target tile is blocked, and because both the ghost and the decon target were sitting in the build queue as independent jobs (with build-item clustering biasing selection towards other ghosts of the same item first), the worker could spend many trips retrying blocked ghosts before eventually picking the decon that would unblock them. Two fixes work together:
* When refreshing a camp's build queue, ghosts whose bounding box overlaps any `to_be_deconstructed` entity in the network are now skipped. The decon jobs remain in the queue and get picked first by proximity, and the ghost is re-added on the next refresh once the blocker is gone.
* If a build still fails at the site (typically because a decon was ordered after the queue was refreshed), the lumberjack now immediately mines any `to_be_deconstructed` entity that overlaps the ghost's bounding box, so subsequent build attempts succeed instead of looping indefinitely.
Version: 0.1.26
Date: 2026-07-13
Optimizations:
- Cut the per-tick cost of the "seeking tree/rock" AI loop on maps with many houses/outposts and a large scan area. `find_resource_for_camp` used to iterate every tree and rock in the network scan and, for each one, do 6-8 LuaEntity property reads plus a `table.concat` to rebuild the same `claim_key` string every 10 ticks. With ~100 lumberjacks and ~5000 trees in a big network that added up to tens of thousands of expensive property accesses per second. The network resource scan now precomputes `x`, `y` and `claim_key` per entry once at scan build time, so the hot loop only does arithmetic and hash lookups (plus one `entity.valid` check per candidate that beats the running best). Behaviour is unchanged; only the per-iteration cost drops.
Version: 0.1.25
Date: 2026-07-13
Optimizations:
- Fixed a significant FPS drop when placing large blueprints. The `on_built_entity` handler (and its robot/script/mined/died siblings) previously fired for every entity in the world event stream, including every single ghost placed by a blueprint. For a blueprint with hundreds or thousands of ghosts this meant hundreds/thousands of Lua callbacks per placement, each doing several table lookups just to determine "this is a plain ghost, not one of the ~20 entity names we actually care about". The handlers are now registered with engine-level name filters so Factorio only invokes the Lua callback for the entities relevant to the mod (house/outpost, storage-house, sapling proxies, tile/rock proxies, preview entities, managed trees). Blueprint-driven ghost placement no longer pays any per-ghost Lua cost from this mod.
Version: 0.1.24
Date: 2026-06-07
Changes:
- `/wcai-test-setup` now also stocks the starter chest with the turbo belt tier (turbo transport belt, turbo underground belt, turbo splitter) in addition to yellow / red / blue belts, so all four vanilla belt tiers are available for testing the lumberjack build pipeline. Turbo entries are silently skipped if Space Age is not installed.
Version: 0.1.23
Date: 2026-06-07
Bugfixes:
- Underground belt pairs now build atomically. Previously a lumberjack could revive the input half of a fast / express underground belt while the output half lingered as a ghost, because the queue cluster radius (8 tiles) was tighter than the maximum input/output spacing of red (8 tiles) and blue (10 tiles) underground belts. The cluster radius is now 12 tiles, and after reviving an underground belt the lumberjack immediately searches forward (input) or backward (output) along its direction for the matching paired ghost and revives it in the same tick, mirroring how construction bots end up placing both halves together. Yellow / red / blue undergrounds now consistently end up complete instead of input-only.
Version: 0.1.22
Date: 2026-06-07
Optimizations:
- Construction (ghost / deconstruction / upgrade) job lookup no longer hammers `get_item_count` on every linked house and storage chest for each ghost on every refresh and prune. Item availability is now cached per network on the shared build scan, so a single `entity.get_item_count` per item type per ~120-tick window is reused by all lumberjacks in that network. On busy networks with large blueprints this removes the per-tick FPS drop that scaled with (queue size * connected houses * lumberjacks).
- When a lumberjack reserves a build job, the cached network supply is decremented immediately so other camps in the same network see an up-to-date item count within the same tick. Prevents a stampede where many lumberjacks all picked the same "last" item.
Version: 0.1.21
Date: 2026-06-06
Bugfixes:
- Fixed a startup crash introduced in 0.1.20 ("too many local variables (limit is 200) in main function") that prevented the mod from loading. The new respawn helpers and Lumberjack Controls GUI are now scoped to do-blocks to stay within Lua's per-function local limit.
Version: 0.1.20
Date: 2026-06-06
Features:
- Opening a lumberjack now shows a small Lumberjack Controls panel with two buttons that preserve the carried inventory:
* "Reset (respawn here)" — despawns and immediately respawns the lumberjack at the same position. Clears any stuck pathing/recovery state.
* "Teleport to house" — despawns and respawns the lumberjack right outside its home.
Bugfixes:
- Fixed lumberjacks that, after a long uptime, would zigzag in place when approaching trees, build sites, or while idling. Walking direction now uses hysteresis (8-way direction is only changed once the target deviates more than ~32 degrees from the current heading) so borderline angles no longer flip every update.
- Lumberjacks that hit the teleport-recovery cooldown repeatedly are now automatically respawned at their house with inventory preserved, instead of remaining permanently stuck on the same tile.
- Increased path-waypoint advance distance so the worker no longer overshoots and reverses direction on the next update tick (another common zigzag source on long paths).
Version: 0.1.19
Date: 2026-06-05
Bugfixes:
- Fixed a crash when a house build was rejected at the current house cap and the mod tried to spill the refunded item using an outdated Factorio API signature.
- Automated house ghosts that are rejected by the house cap now print a throttled message to connected players on that force, so blueprint-heavy builds explain why some houses were cancelled.
Changes:
- Lumberjacks now deposit harvested wood into Storage Points first, falling back to other linked houses only if every Storage Point in the network is full. Previously wood would scatter across neighbouring house inventories and Storage Points often stayed empty.
- Storage Points now display a green dashed link line to their nearest connected house or outpost when the network is highlighted, matching how houses and outposts already show their inter-node links. Lines refresh immediately when Storage Points are placed or mined.
Version: 0.1.18
Date: 2026-06-04
Changes:
- Houses in the same connected network now share their item inventories for the lumberjack logistics pipeline. Workers can count, fetch, and deposit build materials across other linked houses instead of being limited to their own house inventory.
Bugfixes:
- Fixed lumberjacks getting stuck in "Heading home before dark" / sleeping flow for some houses. Camps in the sleeping state now always receive their wake-up tick, so the worker respawns reliably at sunrise.
- The house "Zzzz..." sleep indicator now appears immediately when a lumberjack goes inside for the night, instead of depending on a later housekeeping sync.
Version: 0.1.17
Date: 2026-06-04
Features:
- Added a new 3x3 Storage Point building using `graphics/buildings/storagehouse.png`. Lumberjacks now automatically deposit harvested wood into linked Storage Points in their network, while inserters can move items in and out just like a normal chest.
- Wood stored in linked Storage Points is now available to the lumberjack build pipeline, so house networks can consume shared lumber from storage when placing ghosts and running wood-based jobs.
- Added `/wcai-unlock-first-houses`, an admin command that instantly researches `woodcutter-houses-1` and unlocks the first 10 houses for fast testing.
- `/wcai-test-setup` now includes Storage Points in the starter test chest and directly in the player's inventory for quicker setup.
Version: 0.1.16
Date: 2026-06-04
Features:
- Added a 10-tier "House Settlement" research line. Each tier unlocks +10 buildable houses, capped at 100 total for performance. Tier 1 also unlocks the house recipe itself (locked from the start of a new game). Costs scale from 15 red science (tier 1) to 300 red + 300 green (tier 10).
- House placements over the current cap are rejected: the entity is destroyed, the item is refunded (player inventory → robot cargo → spilled on the ground), and a "House cap reached" flying text is shown.
Changes:
- Mod portal description rewritten.
Credits:
- Added Jstank as a contributor.
Version: 0.1.14
Date: 2026-06-04
Bugfixes:
- Fixed cursor and selected-entity range visualizations for houses and outposts to mirror vanilla roboport exactly: orange `construction_radius = 55` outer ring + green `logistics_radius = 25` inner ring. Previously the cursor preview drew a 55-tile green logistics circle (with construction radius zeroed out for the outpost variant, and a duplicate 55-tile orange + 55-tile green for the house variant), which made the buildings look radar-sized rather than roboport-sized. After upgrading a house/outpost to a vanilla roboport, the visible range now stays identical.
- Placed `house` (container) now also draws the 55-tile construction ring on selection. Previously containers drew nothing, so a placed house had no visible range at all while an outpost showed 55 tiles.
- Hidden link-anchor companions explicitly disable both construction and logistic radius visualization so they cannot leak any extra rings into the cursor preview.
Version: 0.1.13
Date: 2026-06-04
Bugfixes:
- Fixed cursor-preview link distance for houses/outposts. The roboport-preview prototype's `logistics_connection_distance` was set to 55 (one radius) instead of 110 (two radii), so the engine only drew preview lines half as far as a vanilla roboport's cursor would. Runtime network linking already used the correct 110-tile distance, so this only affected the visual when holding the item.
Version: 0.1.12
Date: 2026-06-04
Features:
- Added a shortcut-bar button for the Roboport Upgrade Planner. Click the new button (or assign a keybind in Controls) to grab the tool directly into the cursor without opening a chest.
Version: 0.1.11
Date: 2026-06-04
Features:
- Added a custom selection-tool item, "Roboport Upgrade Planner" (`wcai-roboport-upgrade-planner`), that marks houses and outposts for upgrade to vanilla roboport. Drag over an area to mark, alt-drag to cancel. Lumberjacks then execute the upgrade through the standard upgrade pipeline (destroy + create), refunding the original house/outpost item to the network. The vanilla upgrade-planner UI cannot be used here because Factorio 2.0 requires upgrade pairs to share the same prototype type; container/radar -> roboport is rejected at the data layer regardless of `fast_replaceable_group` or `next_upgrade`. The custom tool sidesteps this by calling `entity.order_upgrade{target = "roboport"}` directly.
- The /wcai-test-setup chest now stocks one of the upgrade tools so it can be tested immediately.
Version: 0.1.10
Date: 2026-06-04
Changes:
- House and outpost now share the exact roboport footprint (collision 3.4x3.4, selection 4x4) and AI radius (55 tiles), so the upgrade planner can be used to convert a network of houses/outposts directly into vanilla roboports (and back). House/outpost art is rescaled to fit the larger 4x4 selection. The shared `fast_replaceable_group` is the missing piece that previously made the upgrade-planner UI reject `house` -> `roboport` mappings.
Fixes:
- Lumberjacks can now execute upgrade-planner jobs that change the underlying prototype (e.g. `house` -> `roboport`). The execution path falls back to a `destroy + create` flow when the engine can't fast-replace across prototype types, so the original entity is cleaned up correctly (camp, link anchor and power node) before the new entity is built and the original item is refunded into the house.
Version: 0.1.9
Date: 2026-06-04
Features:
- Lumberjacks now service upgrade-planner orders within their work area, mirroring how construction bots do it: the upgrade-target item is consumed from the linked house, the original entity is replaced in place (preserving recipe, modules, circuit wiring etc. via fast-replace), and the original item is refunded into the house. Upgrades are clustered with regular build jobs of the same item name to maintain efficient pathing.
Fixes:
- Placing or removing a single house no longer destroys all existing lumberjacks across every surface. The on-built/on-removed handlers now only register/clean up the affected house instead of doing a full network rebuild, fixing the "lumberjacks despawn whenever I place a new house" bug.
Version: 0.1.8
Date: 2026-06-04
Optimizations:
- Major performance pass aimed at supporting ~100 lumberjacks in the same network. Previously each lumberjack issued its own surface-wide tree, rock and ghost searches every few ticks, so cost grew quadratically with population.
- Tree and rock searches are now performed once per connected network and shared across all lumberjacks in that network, with a 30-tick cache (180 ticks when no resources were found, so empty-forest networks short-circuit cheaply).
- Build/deconstruction ghost searches are now also network-shared on a 120-tick TTL, so the per-camp build queue refresh no longer issues N find_entities_filtered calls per house.
- Connected-houses graph is now cached across ticks (30-tick TTL) instead of recomputed every tick, with explicit invalidation when houses are built, mined or destroyed.
- Harvesting workers no longer re-issue selected/direction/orientation/walking_state/mining_state writes every 4 ticks; the writes happen once when the target changes and are skipped while we are still mining the same tree, eliminating thousands of redundant LuaEntity writes per second.
- Lumberjack camps are now indexed by state, so the per-tick on_tick loop iterates only the relevant buckets and samples long-interval states (sleeping, finished, waiting-for-space) every 5 ticks instead of every tick.
Version: 0.1.7
Date: 2026-06-03
Fixes:
- Fixed a non-recoverable crash when mining a regrown managed tree after extended gameplay; the planted-tree regrowth restart path now calls the sapling module helper correctly.
Version: 0.1.6
Date: 2026-06-02
Features:
- Holding the house item in the cursor now previews the network the same way the outpost item does: a circle around the cursor shows the house's AI radius, and lines are drawn from the cursor to existing outposts and houses within link range.
- Lumberjacks now perform deconstruction on entities within a linked house's work area: items marked for deconstruction (red X) are mined and deposited in the house, mirroring how construction robots service deconstruction orders.
Changes:
- The cursor preview connection lines now reach exactly as far as each house/outpost's own square AI range, instead of twice that range.
- Pressing Q (smart-pipette) over a placed house now retrieves the house item from inventory the same way it works for every other building.
- Hovering a lumberjack no longer auto-opens its inventory; press the regular open-gui key (E by default) over a lumberjack to view its inventory.
Fixes:
- Lumberjacks now preserve all stored ghost data when building from blueprints/ghosts: recipes on assemblers, modules, item-requests, circuit connections, fluid filters, and the input/output direction on underground belt pairs are all carried over instead of being lost.
- Houses placed before this version now also get a hidden link anchor on the next reconciliation pass, so cursor preview lines correctly draw to all existing houses regardless of placement order.
Version: 0.1.5
Date: 2026-06-02
Changes:
- Renamed lumbermills to outposts across items, entities, and UI text.
- Converted outposts from container entities to roboport-based network nodes so they no longer expose storage.
- Moved outpost network statistics into the selected-entity panel area on the right side of the screen.
Features:
- Holding an outpost or house item in the cursor now previews the full surface network: existing outposts within link range are connected by lines and their work areas are highlighted, helping plan placement.
- Outposts and houses now consume electricity from the power network: each outpost draws as much as an assembling-machine-2 (150 kW) and each house draws as much as a beacon (480 kW).
- Outposts and houses now appear as separate entries in the Electric network info window with their own icons, so consumption per building type is visible in the statistics.
- Outposts now show the standard "Consumes electricity" tooltip with maximum/minimum consumption and a green electricity bar when hovered, matching vanilla electric buildings.
- Hidden outpost link anchor entities are now reliably destroyed when an outpost is mined, deconstructed, or killed by enemies, instead of lingering on the surface.
- The "no power" alert icon is now also shown on outposts (previously only houses) and is rendered at the same size as the standard Factorio no-power overlay used by assemblers, boilers, and other vanilla buildings.
Version: 0.1.3
Date: 2026-06-01
Features:
- Lumberjacks now pick up and deposit any items they carry into the house, including marble paving, plank decking, gravel, and other mod-crafted goods.
- Lumberjacks now build floor tile ghosts (marble paving, plank decking, lawn grass, pool tiling, and more) in addition to entity ghosts.
Changes:
- Replaced the hidden electric beacon used for power alerts with a scripted no-power icon driven directly by the actual house power state.
- The funkis-house "Zzzz..." indicator now only appears when the lumberjack is not present in the world (hidden inside the house or not yet spawned).
Fixes:
- Fixed inserters being unable to deliver items to funkis-houses caused by a hidden power-node entity blocking inserter targeting.
- Fixed all houses showing a "no power" alert even when their collision overlapped a powered electric pole supply area.
- Fixed a crash on tree harvesting caused by an inventory iteration mismatch with the Factorio 2.0 inventory API.
Version: 0.1.2
Date: 2026-06-01
Features:
- Added lumberjack support for detecting and building nearby entity ghosts.
- Added planted tree regrowth loops so managed trees regrow from the same spot after being chopped down.
Changes:
- Rebalanced wood-house and funkis-house recipes to use 4 higher-tier inputs each.
- Added steel requirements to selected higher-tier construction items used in house crafting.
- Extended connected wood-house and funkis-house networks to share combined AI work and build ranges.
Fixes:
- Improved lumberjack recovery when movement gets blocked by nearby objects.
- Reduced passive AI update frequency for better performance with many houses.
Version: 0.1.1
Date: 2026-05-31
Features:
- Added funkis houses that spawn and house autonomous lumberjacks.
- Added linked wood houses that extend lumberjack work areas.
- Added powered house networks and house-crafted wood houses.
Changes:
- Renamed the published mod identity to Woodcutter AI.
- Added admin-only helper commands for starter-kit and house-network sync in multiplayer.
- Improved electricity statistics support for house power usage.
Fixes:
- Improved lumberjack path recovery when movement gets blocked.
- Fixed hidden house power consumers to use house icons in electricity statistics.