In other languages:

Copy and paste: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
(→‎Conflicting placement: Fixed misinformation about upgrading via blueprints/copies)
(Massively simplify conflicting placement explanation, don't repeat circuit network note, remove misleading "upgraded entity" mentions in this section, logistic connections can be turned off with blueprints)
Line 25: Line 25:
== Pasting ==
== Pasting ==


Pressing {{Keybinding|ctrl|v}} puts the cursor into paste mode. The most recently used copy is overlaid over the terrain. By using {{Keybinding|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 {{Keybinding|lmb}}. When a blueprint is placed, [[ghost]]s are created for each object in the blueprint.
Pressing {{Keybinding|ctrl|V}} puts the cursor into paste mode. The most recently used copy is overlaid over the terrain. By using {{Keybinding|mwu}}/{{Keybinding|mwd}}, the user can cycle through previous or more recent copies stored for that player. Once the appropriate copy is selected, it can be placed with {{Keybinding|lmb}}. When a blueprint is placed, [[ghost]]s 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.
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.


An overlay of the entities to be placed via a copy/blueprint is shown as you move your mouse over the screen. Entities that can be placed are shown in green; entities that conflict with already existing objects are shown in red. If placement will upgrade or overlay an existing, it is shown in blue.
An overlay of the entities to be placed via a copy/blueprint is shown as you move your mouse over the screen. Entities that can be placed are shown in green. Entities that conflict with already existing objects are shown in red, they cannot be placed. If placement is exactly on top of an existing entity, it is shown in blue and does not block placement.


While being in paste mode or holding a blueprint, the entire selection can be rotated using the {{keybinding|r}} key.
While being in paste mode or holding a blueprint, the entire selection can be rotated using the {{keybinding|R}} key.


Selections can usually be flipped horizontally or vertically using {{keybinding|f}} or {{keybinding|g}} respectively. However, there are some entities which are asymmetric and cannot be flipped ([[oil refinery]], [[chemical plant]]). Also, the placement of [[rail signal]]s, [[rail chain signal]]s, and [[train stop]]s on particular sides of [[rail]]road tracks defines how trains are expected to travel across the rail network. As such, you cannot flip any selection which has signals or train stops. These can still be rotated.
Selections can usually be flipped horizontally or vertically using {{keybinding|F}} or {{keybinding|G}} respectively. However, there are some entities which are asymmetric and cannot be flipped ([[oil refinery]], [[chemical plant]]). Also, the placement of [[rail signal]]s, [[rail chain signal]]s, and [[train stop]]s on particular sides of [[rail]]road tracks defines how trains are expected to travel across the rail network. As such, you cannot flip any selection which has signals or train stops. These can still be rotated.


== Conflicting placement ==
== 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 any existing terrain or structure is in the way of a ghost when trying to place a blueprint with {{Keybinding|lmb}}, the entire blueprint cannot be placed.


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.
Using {{Keybinding|shift|lmb}} forces the blueprint to be placed anyway and all individual ghosts which are not conflicting with structures will be placed. In that case, [[tree]]s, [[rock]]s, or [[cliff]]s that are in the way are marked for deconstruction and ghosts 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.


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 a ghost is placed on top of a structure that is the same entity (or same ghost) with the same orientation, then there is no conflict and the ghost can be placed. Doing so will apply properties from the ghost on the existing structure. These properties include, but are not limited to:


If the terrain object is a [[tree]], [[rock]], or [[cliff]], then the ghost cannot be placed. However, using {{Keybinding|shift|lmb}} 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.
* [[circuit network|circuit and logistic conditions]]
 
* [[Train stop]] names and other settings
By default, if the terrain object is player-placed and it is not the same as the copied object or does not exactly overlay that object (ie: is offset from it), then the {{Keybinding|lmb}} will not place the copy, even if there are non-conflicting entities in the copy. The conflicting objects will be shown as red in the UI. When placing a copy with multiple objects at once, if you use {{Keybinding|shift|lmb}} to place them, all objects which are not conflicting will be placed.
 
Note that what "the same" means is very specific; even if the two are identical entities, they must also match in orientation. As such, a copy cannot change the orientation of a belt/inserter/building; attempting to do so will cause a conflict.
 
=== Properties ===
 
There are a few exceptions to the previous rule about conflicting player-placed objects. If the copied entity exactly overlays the terrain object (ie: is not offset from it), and the two entities are exactly the same ([[upgrade planner#valid entities|upgrade versions of that type of entity do not count]]), then the properties of the copied entity are applied to the terrain entity. These properties include, but are not limited to:
 
* [[circuit network|circuit and logistics conditions]]
* [[Train stop]] names and properties
* Circuit wiring
* Circuit wiring
* [[Splitter]] filters and priorities
* [[Splitter]] filters and priorities
* Crafting recipies for [[Assembling Machine]]s and the like
* Crafting recipes for [[Assembling machine]]s and the like
* etc
 
Some properties cannot be "unset". For example, once a circuit/logistics network condition is set onto an entity, a copy of that entity cannot turn that condition off. A copy ''can'' change the condition to one that is always true, but that is the only way to "unset" a condition.
 
Also, modules are not considered a "property" of an entity. Copying captures the state of the entity's modules, but it cannot update them onto an existing version of that entity. However, conflicting module arrangements do ''not'' prevent the copy from being placed. So if the entity in the terrain has some set of modules, and the copied entity has a different set, the copy can be placed but the terrain object's modules will not be affected.
 
=== 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.
 
=== 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.
=== Modules ===
Copying captures the state of the entity's modules, but it cannot update them onto an existing version of that entity. However, differing module arrangements do ''not'' prevent the copy from being placed. So if the entity in the terrain has some set of modules, and the copied entity has a different set, the copy can be placed but the terrain object's modules will not be affected.


This also includes other properties, such as [[chest]] limits or [[storage chest]] filters, or [[splitter]] filters.
=== Circuits and logistic connections ===


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.
There is no notion of "removing wiring" with blueprinting on top of existing entities. Once those entities have wiring, it 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 ===
=== Water and landfill ===

Revision as of 10:35, 30 May 2023


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:

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/Mouse wheel down, the user can cycle 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.

An overlay of the entities to be placed via a copy/blueprint is shown as you move your mouse over the screen. Entities that can be placed are shown in green. Entities that conflict with already existing objects are shown in red, they cannot be placed. If placement is exactly on top of an existing entity, it is shown in blue and does not block placement.

While being in paste mode or holding a blueprint, the entire selection can be rotated using the R key.

Selections can usually be flipped horizontally or vertically using F or G respectively. However, there are some entities which are asymmetric and cannot be flipped (oil refinery, chemical plant). Also, the placement of rail signals, rail chain signals, and train stops on particular sides of railroad tracks defines how trains are expected to travel across the rail network. As such, you cannot flip any selection which has signals or train stops. These can still be rotated.

Conflicting placement

If any existing terrain or structure is in the way of a ghost when trying to place a blueprint with Left mouse button, the entire blueprint cannot be placed.

Using SHIFT + Left mouse button forces the blueprint to be placed anyway and all individual ghosts which are not conflicting with structures will be placed. In that case, trees, rocks, or cliffs that are in the way are marked for deconstruction and ghosts 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.

If a ghost is placed on top of a structure that is the same entity (or same ghost) with the same orientation, then there is no conflict and the ghost can be placed. Doing so will apply properties from the ghost on the existing structure. These properties include, but are not limited to:

Modules

Copying captures the state of the entity's modules, but it cannot update them onto an existing version of that entity. However, differing module arrangements do not prevent the copy from being placed. So if the entity in the terrain has some set of modules, and the copied entity has a different set, the copy can be placed but the terrain object's modules will not be affected.

Circuits and logistic connections

There is no notion of "removing wiring" with blueprinting on top of existing entities. Once those entities have wiring, it 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 accessible 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.