FO4 console commands
A brief list of my favourite console commands.
Companion affinity
Insta-Idolize
- Open the console.
- Select the companion in question.
- Type: setav CA_affinity 999
- Hit enter and close console.
- Do something the companion likes. This should raise their affinity to 1014.
- The companion should now initiate the max-affinity dialog.
- 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
- Open the console.
- Select the companion in question.
- Type: setav CA_affinity 764
- Hit enter and close console.
- Do something the companion dislikes. This should drop their affinity to 749.
(See my helpful list of companion likes/dislikes if you need ideas!) - The companion should now initiate the breakup dialog.
- 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.
- Select the yapper in the console.
- Type setav 000002CC [value], where [value] is in seconds. This sets the minimum amount of time between lines.
- Type setav 000002CD [value], where [value] is in seconds. This sets the maximum amount of time between lines.
- 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)
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
- 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.
- Type moveto player (if you have them selected) or [refID].moveto player
- 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
- 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.
- Type player.moveto [refID]
- Exit the console and profit!
Disposing of evidence
- Open the console and select the corpse or item you want to dispose of.
- 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.
- 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).
- 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.
- 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
- 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).
- Select the dead NPC.
- type kill (even if they're already dead)
- Type resurrect and ignore all the shit that pops up.
- Type disable
- Type enable
- 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
- Raiders: they revive and will aggro, attacking you if you stand directly in front of them, but they won't run at you. They will not aggro/attack if you stand behind them. Raiders with guns will shoot at you but melee raiders won't move to attack. This also applies to gunners, trappers, Children of Atom, your standard hostile human NPCs.
- Animals: they will revive, including the random pack brahmin that show up dead on the road sometimes. The random brahmin won't move around, they'll just stand there making snuffling noises. Hostile animals will still aggro upon revival. They will move to attack if you're directly in front of them (and in the case of radstag, they will buck you if you're direcly behind them) but if you're beside them they won't attack. Here's something interesting: when you revive mole rats, they go back underground, but since you're not directly in front of them they won't move to attack and thus will never burst out of the ground.
- Traders: tested on the random trader by Hangman's Alley, you can still trade with them like normal after revival. They won't do idle interactions with things, but will change position if the cell reloads. As for Bunker Hill traders: Cricket can be revived. She'll stand and do nothing for a while, but if you reload the cell she'll be gone. She will continue to show up at Bunker Hill and at settlement trade posts.
- Settlers: results unclear. I tested it on County Crossing settlers (took their workshop by force and then revived the dead fellas afterward, which potentially had undesirable effects but I'm not sure). As per usual they revive and don't idle animate, but it also seems like they can't be assigned to tasks. I tried using recycleactor on one and then assigning him to a mutfruit crop, and he ended up shedding his clothes and literally sprinting over to stand naked in the middle of the mutfruit. He then refused to do anything else. Will do more thorough tests later.
- Charles View Ampitheatre: For some reason, the Initiates will do their idle animations upon revival, but the Missionaries will not.
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.
- 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.
- 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.
- Profit!