Copy and paste

From Official Factorio Wiki
Revision as of 05:20, 10 February 2023 by Alfonse (talk | contribs) (Expanding section on copy-and-paste behaviors into its own page.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Copy and pasting is the process of selecting placeable elements in existing terrain and creating ghosts of them elsewhere for future placement, either by construction robots or the player. Blueprints are essentially saved copies that can be stored in ones inventory and pasted later. As such, the mechanics of placing a blueprint are identical to those of pasting from a copy.

Copying and cutting

By pressing CTRL + c, the cursor can be set to copy mode. A square of entities can be drawn to create a copy of those entities. This copy becomes the most recent copy, but previous copies are still accessible. All such copies are stored in the map data, so previous copies can be accessed after a save/reload. Copies are specific to a particular player on that map.

Cutting (initiated by CTRL + x) is a copy where the selected entities being copied are also set to be deconstructed.

A copy can copy either entities or placeable tiles, but not both. If the selected area contains no entities, then the copy operation will copy tiles.

Copies are able to capture virtually everything about the selected entities and tiles. This includes, but is not limited to:

- Chest limitations - Locomotive train schedules - Cargo wagon storage filters - Circuit network logic and conditions, as well as wiring - Electrical wiring between power poles

The actual contents of chests/belts/etc are not copied.

Creating a blueprint is largely equivalent to copying a selection. Unlike copies however, blueprints are able to contain both placeable tiles and entities.

Pasting

Pressing CTRL + v puts the cursor into paste mode. The most recently used copy is overlaid over the terrain. By using mouse-wheel-up/down, the user can flip through previous or more recent copies stored for that player. Once the appropriate copy is selected, it can be placed with Left mouse button. When a blueprint is placed, ghosts are created for each object in the blueprint.

Picking up a blueprint or blueprint book has a similar effect to entering paste mode, and all of the mechanics of pasting a copy apply to placing a blueprint.

Conflicting placement

Placing a blueprint, copy, or even just a ghost on top of existing terrain or structures work mostly the same way. The rules for resolving such conflicts can be complicated. For the purposes of this section, the term "terrain object" refers to the object that already exists. "Copied object" refers to the object that one is attempting to place a ghost of (even if it does not come from a "copy" operation).

If the player attempts to place a ghost atop existing objects, the placement system will attempt to resolve the conflict. When placing multiple objects at once (such as a copy or blueprint), conflicts will be resolved for each object individually.

If the copied object is the exact same object as the terrain object, then there is no conflict and the ghost can be placed. Note that "exact same object" means the same with regard to both the entity and several of its properties. Some properties conflict and some do not. The specifics will be detailed below.

If the terrain object is a tree, rock, or cliff, then the ghost cannot be placed. However, using SHIFT + Left mouse button to place the objects will cause those particular terrain objects to be marked for deconstruction and the ghost will be placed atop them. While the ghosts have been placed, they cannot be replaced by what the ghosts represent until any conflicting terrain objects have been removed.

By default, if the terrain object is player-placed and it is not the same as the copied object, then the ghost Left mouse button. When placing multiple ghosts at once, if you use SHIFT + Left mouse button to place them, any conflicts of this type are resolved by not placing ghosts that conflict with terrain objects.

Upgrades

There are exceptions to the previous rule about conflicting player-placed objects. The following rules apply only where the copied object exactly overlays the terrain object. Upgrading is also one of the places where there is a real difference between placing a single ghost (by holding one of the item and using SHIFT + Left mouse button) and doing a copy/paste/blueprint.

If the copied object is an upgraded form of the terrain object, then the ghost can be "placed" by left-clicking. This will cause the terrain object to be marked to be upgraded to the copied object. If there is a transport belt on the ground and you place a blueprint that exactly overlays the entity with a fast transport belt, then the belt will be marked to be upgraded to a fast belt.

The above is always true when directly placing a ghost by holding one of the item and using SHIFT + Left mouse button. However, when placing ghosts via copies or blueprints, there are a number of caveats with regard to upgrading. Some properties of entities, particularly recipes and modules, can confound the upgrading process.

If the two entities are the same entity with different recipes, the resolution works as follows. If the copied object has a recipe, then that will overwrite the recipe in the terrain object. If the copied object does not have a recipe, then it will leave the recipe (if any) in the terrain object untouched. So while a copy can change a recipe, it cannot remove a recipe (though it can change the recipe to something that cannot be produced if you want to effectively turn off production of something).

When it comes to upgrading buildings with recipes (like assembling machines), essentially nothing is upgradeable. You cannot upgrade any building that can have a recipe with a copy/blueprint at all. This is true even if both the terrain and copied object do not presently have recipes in them.

Basically, assembling machines cannot be upgraded via blueprints/copies; you must do it manually with an upgrade planner or direct placement (which works even via direct ghost placement).

While a blueprint cannot upgrade a building with a recipe, you can use the upgraded blueprint to check to see if you have manually upgraded all of the desired buildings. The new blueprint will not be able to be placed if you have not upgraded those buildings, and the conflicts will appear in red.

Modules are a bit simpler in that they are not taken into account at all when placing entities atop other entities. That is, the modules from the copied object change nothing about how placement interacts with the terrain object. Mis-matched modules do not cause a conflict; they are simply ignored. If the terrain object has no modules, modules will not be added to it by copying an equivalent object with modules.

Blueprinting atop an existing entity simply cannot change what modules are in it.

Ghosts atop ghosts

The rules for conflicting objects when the terrain object is a ghost are essentially unchanged. The only difference is that instead of upgrading the object, the ghost is replaced with the upgraded version. What causes an upgrade to be possible or forbidden are the same.

Circuits networks

Any circuit network wiring or conditions on entities that are copied will be part of the copy (or blueprint). When placing them, if there are matching or upgraded versions of that entity on the ground, any changes to circuit logic are also copied into the existing or upgraded entity. This means that blueprints can add or modify circuit logic to existing entities, for example, to turn on or off belts.

This also includes other properties, such as chest limits or storage chest filters, or splitter filters.

However, there is no notion of "turning off" circuit logic or "removing wiring" with blueprinting on top of existing entities. Once those entities have wiring or logic, they will be retained. New blueprints can change the logic however, so if you want to make a blueprint turn off a condition from an earlier one, you need to change the logic into one that always passes.

Water and landfill

A copy can either copy tiles or entities, but not both. This is not the case with blueprints, which can contain both tiles and entities.

This creates an unusual circumstance when it comes to water. A blueprint can contain landfill, which turns water tiles into buildable land. But a blueprint with landfill can also contain the entities that will sit atop that landfill.

To place such a blueprint, you must use SHIFT + Left mouse button to first place the landfill ghosts. Once the landfill tiles are actually placed, you can place the blueprint again.

Entity settings

While one can copy an entity and paste it onto other versions of itself, it can sometimes be useful to specifically copy just the settings of an entity and paste them onto a different entity. What exactly counts as "settings of an entity" depends somewhat on the destination entity to which they are being applied.

To select an entity as the source of a settings copy, use SHIFT + Right mouse button on that entity. The cursor does not change to indicate that a copy is underway. To paste the settings to an entity, use SHIFT + Left mouse button on that entity.

If the destination is the same entity type as the source, or is an upgradable version of it, the setting being copied are generally pretty obvious. Virtually every setting that is assessible from the entity's specific dialog box can be copied in this fashion. Everything from splitter filters to inserter stack limits, from cargo wagon filters to locomotive train schedules can be copied. Circuit and logistics network settings and conditions specific to that kind of entity are also part of such copies.

There are certain special cases of entity setting copy-pasting for particular uses. For example, for any building that produces a product based on a recipe, you can copy from a building with that recipe to a requester chest. This will automatically set the requests in the chest to request enough input materials for that recipe to make that machine run for 30 seconds.