Stencil

by Shemp

Drag-building when starting from a ghost that matches the cursor stack causes only matching ghosts to be built. Also supports mining buildings marked for deconstruction.

Utilities
6 days ago
2.1
19
Blueprints
Owner:
Shemp
Source:
N/A
Homepage:
N/A
License:
MIT
Created:
7 days ago
Latest Version:
0.1.1 (6 days ago)
Factorio version:
2.1
Downloaded by:
19 users

Stencil

A proof-of-concept mod for how I personally would like building in the early-game with blueprints to be facilitated, which I've made because it's unlikely to be added to the game. Uses the new pre-selection events in Factorio 2.1.22.

When you hover over a ghost with the corresponding item in your hand and begin drag-building, the cursor temporarily switches to a selection tool and builds only ghosts that match the item. You must be within building range.

The cursor will show a Stencil icon before building, so you know when this is about to happen. Also works for upgrading existing buildings that have been marked for upgrade.

There is a similar function when mining a building marked for deconstruction, you will only mine decon-marked buildings while dragging. If you're holding an item in the cursor, you will only mine marked buildings which match the cursor.

Press Ctrl-G (default binding) or click the shortcut to toggle the Stencil functionality.

Stencil aims to make early-game blueprints more usable, but still make building somewhat inconvenient and manual. Construction bots should feel like a substantial upgrade, and you can turn off the mod once you get them.

Stencil always enforces the player's build range. If you want to increase this, add another mod like Far Reach.

Limitations

  • Multiplayer is untested. The code should be desync-safe, but tool pre-selection state is separate from game state. The mod may behave strangely with latency.
  • It's not currently possible to use the deconstruction feature for tiles. I might add it if I can come up with an elegant method, or enough users ask for it.
  • There is no form of item insertion/removal, e.g. adding requested modules, putting ammo into turrets. Right now, I consider it out of scope.
  • Pausing time in the Editor might cause bugs.
  • The tool will show the icon of the currently hovered entity. I have asked for an option to have selection tools not show it.
  • Building will not show certain overlays (e.g. electric network coverage when building with an electric machine). I considered using place_result on the tool to implement this, but the behaviour is buggy currently and I can't use it.

Other mods

Stencil is less powerful than some other mods by design, and does not require any resources or technology milestones. You may instead want to consider:

  • Mouse-Over Construction: Automatically build every ghost on hover, repair anything damaged, mine buildings
  • Blueprint Shotgun: Craft a shotgun and shoot your items at the blueprints!
  • Nanobots - Make a weapon with nanobot canisters as ammo, and that ammo is spent to produce nanobots which act like personal construction bots
  • Picker Extended Reborn: Has a similar ghost revive function, plus a lot of other goodies.
  • Ghost Builder: Similar to Stencil's original implementation, where it doesn't require drag-building
  • Auto Placer: Similar to above, but also does deconstruction
  • Auto Ghost Builder: Build a ghost when you hover over it, unlimited range
  • Quick Auto Ghost Entity Build: Press the keybind to build all ghosts in range, or destroy marked entities in range