FO4 commands

A compendium of my favourite and most frequently-used console commands.

This is PC, bitch! We use the tilde key in this motherfucker, better take your sensitive ass back to xbox!
Which is to say, sorry console users, you're chip outta luck, these hacks use... uh, the console.

Obligatory disclaimer: always save your game BEFORE you use console commands, so that in case you fuck something up you can just reload the save and undo your doings.


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.
    (See my helpful list of companion likes/dislikes if you need ideas!)
  6. The companion should now initiate the max-affinity dialog.
  7. Profit!

And no, you can't just hit em with the setav CA_affinity 1000. They won't initiate the dialog this way. I don't know why that's the case, but here we are. It's the same for breaking up by the way so don't get any ideas.

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!

Sneak peak affinity levels

  1. Open the console and select companion.
  2. Type getav CA_affinity.
  3. Profit!

Dialog Frequency

This works to fix the dreaded 'companion won't shut up after dismissing them to a settlement' bug, as well as on any current companion and any 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.

Thank you to this reddit thread, specificaly u/spacefiddle for providing me this solution


Object placement

modpos

Shorthand for 'modify position' (I assume), this command allows you to modify the position of an object.
To use it, simply select the desired object and type modpos [axis] [value]. The value can be any number 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(?). It's a little finicky sometimes, it might not always behave the way you expect it to (I sometimes find objects will move at an angle rather than straight forward/back), so it takes some playing around.

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 sometimes-frustrating 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.

Objects will stay 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. Also, moving objects around will sometimes cause the textures to look pixellated or blurry. Picking them up in the settlement build mode and then tabbing out (so the object goes back to where it was instead of being repositioned) usually fixes this for me.


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 (yes even if they're already dead- no I don't know why)
  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

For some reason, the Initiates at Charles View Ampitheatre will do their idle animations upon revival, but the Missionaries will not. ?????? Anyway, use this set of commands at your discretion. If you don't like how the NPCs behave you can just kill them 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. Close the console and profit!