Console commands (Fallout 4)/Targets

An overview of console commands for on commands, targets, and shorthands

Overview
The console is a debugging tool in the PC version of Fallout 4. It is used for altering content while in-game. It cannot be used in the game console versions or in Survival mode.

Types
The commands listed on this page will appear in two types and are accordingly formated:
 * – Targeted commands. These will either be listed here with targetID or player as target.
 * Targeted commands also work by selecting the target with the mouse or using before the command.
 * – Untargeted commands.
 * Some commands will be noted to be able to both be used either with a target or without one, resulting in a global or targeted effect.

Targets
Targeted commands will require a reference as target usually entered before the actual command, as noted by the separating dot in between. For the majority of functions, a Form ID will be needed. For example, if you want your player character (PC) to be the target, you can:
 * Use the PC's reference ID:
 * Example: – Adds 1 Pipe Wrench to the PC's inventory.
 * Left-click on the PC (while the console is open you will be given a cursor to click on objects/characters in the world to select them as targets), at the console's header " 00000014 [EP] will show up, indicating the ID of your PC as target. Now you can enter any targeted command without needing to enter a target as the console will automatically preface it with your selected ID. To deselect your target, simply click on it again and it will disappear from the header.
 * Example:
 * Selecting items in difficult environments, and scroll wheel augmented selection: Pointing and left-clicking may not select the expected item when in a crowded environment, or in the presence of items whose boundaries extend beyond their visible edges. When in doubt, verify the selection with non-destructive console commands:
 * After attempting to click on an NPC, the (show inventory) command is a convenient validator. If a plausible inventory is shown, it is very likely that the expected NPC was selected.
 * After attempting to click on an arbitrary item, the command can be used to increase the altitude of the selected item by one unit (a few pixels for nearby items; less for more distant items). If the desired item moves up, the selection was successful. Whether successful or not, always reverse the effect of that command by using the command  before doing anything else. (If the item shimmers or is blurry after, that can be fixed by using a command that will not move the item, like .)
 * If the desired item was not selected, rotate the mouse's scroll wheel to select the next item in the scene that falls behind the point that was clicked; the ID shown at the top/middle of the console will change with each increment of rotation. (If the pointer is within the console area, the console text may also scroll, but that is unrelated to the ID shown. Also, when using the scroll wheel to scroll the console text, beware the scroll wheel's dual purpose, because after scrolling, the item you originally selected probably isn't the item that is currently selected, which can lead to terrible mistakes.) For each new ID that appears as the scroll wheel is rotated, use one of the selection verification procedures discussed above until the desired item is found.
 * If the ID of the item is already known, the ambiguity of mouse selection can be avoided by using the command (Pick Reference ID) to select a target (the player character, in this example). To deselect it, just enter.
 * Example:
 * In case of the player character, you can actually just use "player" as a reference ID which the console will automatically convert to 00000014 upon executing the command. This is the only such placeholder in the game, "targetID" is merely a placeholder on this page, to indicate commands which require a target.
 * Example:

Leading zeroes
Each item, object, character, etc. has an eight character hexadecimal reference ID. When typing IDs, leading zeroes may be omitted.
 * Example: is the same as.

Multiple commands
You can enter several commands at once to be executed in a row one after the other. Simply separate them with ; between each command, as seen in the below example.
 * Example:

Logic
You can use logical operators in your commands in order to have branching conditions. The syntax to do an if statement in the console is as follows. .
 * Example:
 * f are bottle caps (For bottle caps have the form id of ; leading zeroes can be omitted)
 * 1f66c is 5mm ammo (ditto)

Explanation

 * 1) The amount of money is checked.
 * 2) * If the player has more than 300 bottle caps then the if the statement is true.
 * 3) * Otherwise, the statement is false and nothing happens.
 * 4) In the if true section the game then removes 300 bottle caps from the player and adds 150 5mm ammo.
 * 5) * This is to provide a means of resupply out in the commonwealth.
 * 6) * You can change the values or the items to be whatever you want.
 * 7) In this example, we didn't use the elseif or else blocks because they are optional and not required.