FO4 console commands

A brief list of my favourite console commands.


Companion affinity

Insta-Idolize

  1. Open the console.
  2. Select the companion in question.
  3. Type: setav CA_affinity 999
  4. Hit enter and close console.
  5. Do something the companion likes. This should raise their affinity to 1014.
  6. The companion should now initiate the max-affinity dialog.
  7. Profit!

You can't just use setav CA_affinity 1000. They won't initiate the dialog this way. It's the same for breaking up.

Insta-Breakup

  1. Open the console.
  2. Select the companion in question.
  3. Type: setav CA_affinity 764
  4. Hit enter and close console.
  5. Do something the companion dislikes. This should drop their affinity to 749.
    (See my helpful list of companion likes/dislikes if you need ideas!)
  6. The companion should now initiate the breakup dialog.
  7. Profit!

Idle Chatter

This works to fix the 'companion won't shut up after dismissing them to a settlement' bug, as well as on any current companion and NPC followers such as the Brotherhood Squires.

  1. Select the yapper in the console.
  2. Type setav 000002CC [value], where [value] is in seconds. This sets the minimum amount of time between lines.
  3. Type setav 000002CD [value], where [value] is in seconds. This sets the maximum amount of time between lines.
  4. Profit!

For example, if you want your companion to talk every 1-2 minutes, you would type setav 000002CC 60 and setav 000002CD 120, respectively. There's 5 0's.


Object placement

modpos

Shorthand for 'modify position' (I assume), this command allows you to modify the position of the object. Very helpful when building settlements, especially if you're attempting to repair an existing structure.
To use it, select the desired object and type modpos [axis] [value]. The inputs can be any numeric value and can be positive or negative. The axes are X, Y, and Z respectively. Z moves the object up or down, and X/Y move it forward/backward/left/right depending on what direction the object is facing in(?- unclear). It's a little finicky sometimes, it might not always behave the way you expect it to, so it takes some playing around.
Objects will stay right where you put them, I've never had any issues with positioning things in this way, except that NPCs might not recognize stairs as valid pathways if they're modpos'd into place rather than being snapped.

setangle

setangle sets the angle of the object. To use it, select the object and type setangle [axis] [value]. The axes are once again X Y and Z, with X being forward/back tilt, Y being left/right tilt, and Z being the direction the front-end of the object is facing.
Please note that this command sets the angle, it doesn't modify the existing angle. A helpful diagram for you: (in which the point of the pencil is the front of the hypothetical object)

Angle will not be altered BY 90 degrees
Angle will be set TO 90 degrees

Because of this property, unless you know exactly what angle you're placing your object to face, I recommend just placing the object wherever, setting the angle to 0, and adjusting it from there, so you don't accidentally undo a bunch of careful placing work.


Moving to player

moveto player

  1. Get the ID of the thing you're trying to move. For a stuck NPC, you can simply click on them in the console. For a missing NPC, you can look up their ref ID on their Wiki page.
  2. Type moveto player (if you have them selected) or [refID].moveto player
  3. Exit the console and profit!

In some cases, you may want to move yourself to an NPC. If so, you would do this instead:

player moveto

  1. Get the ID of the NPC you want to move to. Click on them while in the console, or look up their ref ID if they're missing.
  2. Type player.moveto [refID]
  3. Exit the console and profit!

Disposing of evidence

  1. Open the console and select the corpse or item you want to dispose of.
  2. Type disable. The item should disappear. If not, you selected the wrong thing- probably a random light effect. Type enable to bring it back, just in case.
  3. Type enable to bring back whatever you just got rid of. If it was the item, great. If not, re-select the item and try again. Close the console so that the item shows back up. (Its inventory will refresh, so take advantage of that extra loot, wink wonk).
  4. Now that you've toggled the item to make sure you've selected the right object, type markfordelete, close the console- you may notice the item's texture/lighting changes slightly- and then exit the game and reload the save.
  5. Item gone. Profit!

It's important to toggle the item first so you can make extra double sure that you've selected the right item- you don't want to accidentally permanently delete the wrong object.
You could type disable and leave it at that- it's certainly the faster option- but that means the corpses will still be sitting there taking up game space, rather than being erased entirely. It's a better option to delete them.


Reviving dead NPCs

I've done some testing with this one. For reasons beyond my comprehension, revived NPCs usually don't engage in idle animations (walking around, sitting on chairs, etc).

The process

  1. Step 1, very important, don't exit the console at any point during these commands. I don't know why, but that made it not work as well for me. Just type them all in a row (entering between each one).
  2. Select the dead NPC.
  3. type kill (even if they're already dead)
  4. Type resurrect and ignore all the shit that pops up.
  5. Type disable
  6. Type enable
  7. Exit the console and profit!

Your NPC should now be on their feet and able to be interacted with! Excellent trick for reviving dead vendors.

Effects on NPCs I've noticed so far

Use this set of commands at your discretion. If you don't like how the NPCs behave you can just kill them off again like normal.


Change essential status of NPC

There's no console command to set an NPC as simply 'protected' but there is this one.
Essential NPCs cannot be killed. All companions are by default essential.

  1. Open the console and find the formID of the NPC you want to be killable. The formID is different to the refID that comes up when you select an NPC in the console. To find the formID, type help "name" 4 npc_, "name" being the name of the NPC (keep the quotes!), and use the formID it supplies you with.
  2. Once you have your formID, type setessential [formID] 0 to allow the NPC to be permanently killed. Alternatively, type setessential [formID] 1 to make the NPC unkillable.
  3. Profit!