Fallout 4

Fallout 4

View Stats:
How add friendly automated Turrets in settlements via console command?
Spawning the wall/ceiling mounted turrets (automated turrets) onto walls of my settlements is pretty easy, but the problem is they automatically target me lol
http://steamcommunity.com/sharedfiles/filedetails/?id=920056553
PlaceThere 001a854d 1
So to temporarily turn that off I used
targetID.tai

I've tried changing the items faction
targetID.removefromallfactions
targetID.addtofaction 0001c21c 0 (this is player faction)
targetID.addtofaction 00068043 0 (this is minutemen faction)
targetID.addtofaction 0001d289 0 (this is nonhostile faction)

But this doesn't work. Anyone know how this can be done? Since some vaults have them set to friendly to player... there's a way to do this.. just need to know the right console commands, thank you if you know and share or try to help figure this out!

edit:
1. Look at where you want the fancy turret
2. ~ into console
3. player.placethere <turret ID> 1
4. ~ to exist console
5. ~ immediately back into console
6. click on freshly spawned HOSTILE turret to get it's target ID
7. target_id.removefromallfactions
8. target_id.addtofaction 0001c21c 1
http://steamcommunity.com/sharedfiles/filedetails/?id=920605161
Also found this doesn't always work either... when doing this at The Castle.. the turret will still target me. The turret also disappears (for me) after re-loading the save file.

This is halfway working... the turret will target everything else but you until we figure out the faction issue with it concerning companions, settlers, traders, and OTHER turrets lol. Which can get complicated because the possibly many factions of different companions? Help figuring this out would be most appreciated!
http://fallout.wikia.com/wiki/Fallout_4_factions

edit 2:
Well.. until this is figured out, modangle and modpos can be used on build-able turrets to get a less pretty but similar effect.
http://steamcommunity.com/sharedfiles/filedetails/?id=920647097
Last edited by DirectorGunner; May 6, 2017 @ 5:43pm
< >
Showing 1-11 of 11 comments
maobe May 6, 2017 @ 2:57am 
if they target you, you somehow create aggro. do you have an active tesla-field on your powerarmor and walked by a bramin? this could trigger aggro from the defenses...
casualsailor May 6, 2017 @ 8:39am 
Do you have Active Sensors on your power armor helmet? I've read of several issues where this caused friendly assets to become hostile. Particularly when there is a choice to be made like when encountering Skinny Malone. The sensors will be perceived by the game as a hostile act. Just a thought.
DirectorGunner May 6, 2017 @ 11:49am 
I just had a targeting helmet on, but that's it for the power armor that could cause any problem. I didn't hit it or touch it. But if it targets me on placement, it'll likely hit settlers when the settlement (spectacle island) is done. So are you both suggesting that when placing a non-craftable turret like I did, it should be friendly right away unless damaged?

edit:
I don't mind if thread is later necro-d months later with a solution, at least share please if you have one.
Last edited by DirectorGunner; May 6, 2017 @ 12:11pm
Lifeisagame May 6, 2017 @ 12:25pm 
did you try "player.placethere 1a854d 1"?

Otherwise it will spawn as a Enemy ;-)
Last edited by Lifeisagame; May 6, 2017 @ 12:26pm
DirectorGunner May 6, 2017 @ 1:23pm 
Originally posted by LifeisagameCH:
did you try "player.placethere 1a854d 1"?

Otherwise it will spawn as a Enemy ;-)

Sorry but that seems incorrect.
I thought at first it worked because I wasn't shot at, BUT.. that was only because the turret was placed flat at 90degrees to the wall, facing toward the sky, so it couldn't target me since it was above my head.. but when I placed the turret on the ground.. it immediately targeted me.So player.placethere I don't think works that way.. I think it's just the long hand version for placethere.

http://steamcommunity.com/sharedfiles/filedetails/?id=920497307

Also, using the turret override program:
http://fallout.wikia.com/wiki/Turret_override_program
Only works on "hardlined" turrets, any idea how to spawn in such things?

edit 2:
After doing some digging, there may be a solution
http://fallout.wikia.com/wiki/Talk:Automated_turret
which might involve
player.placeleveledactoratme
base id of the RobCo turrets (in pest extermination mode)
might be allied to the player.

Anyone have the RobCo turret in extermination mode's base_id?
Last edited by DirectorGunner; May 6, 2017 @ 2:37pm
Lifeisagame May 6, 2017 @ 3:11pm 
okay did now place more then one and tested it too..
When i remove it from the factions and then add it with a 1 to the player fraction it wont attack me - settlers shoud be save too they belong to the player faction

*edit* dang and they still attack settlers.. well hell if you dont want set all factions manual Friendly its getting Hard :P
It attacked clara and a settler...
Did try around, it dint attack my settlers or codsworth, but it still did attack Shefflield and Clara even i did add traders fraction as Friendly :P
They litterary attack everything NOT on Friendly (1) list - Neutral gets attacked without mercy and they usualy just defend themself
Last edited by Lifeisagame; May 6, 2017 @ 3:34pm
DirectorGunner May 6, 2017 @ 3:51pm 
Originally posted by LifeisagameCH:
okay did now place more then one and tested it too..
When i remove it from the factions and then add it with a 1 to the player fraction it wont attack me - settlers shoud be save too they belong to the player faction

*edit* dang and they still attack settlers.. well hell if you dont want set all factions manual Friendly its getting Hard :P
It attacked clara and a settler...
Did try around, it dint attack my settlers or codsworth, but it still did attack Shefflield and Clara even i did add traders fraction as Friendly :P
They litterary attack everything NOT on Friendly (1) list - Neutral gets attacked without mercy and they usualy just defend themself

Thank you for sharing, I went to mechanist layer. typed "help turret 4", and tried some of the listed turret base_ids that stood out to see if any after being placed are friendly, no luck so far, they all immediately attacked. Also found that the only turrets that were left in mechanist layer even after beating it, once turned on are hostile. I read that there were friendly turrets in that level but I haven't found them yet. In researching I found an unrelated thing, a faction missing from the wikia page that prevents NPCs from being companions, it's 00075d56, I added it to the wiki chart http://fallout.wikia.com/wiki/Fallout_4_factions#Technical_factions

Would you mind sharing what console commands you're using so I can troubleshoot with you?
For some reason when I use target_id.addtofaction 0001c21c 0 the turret (which ever one I place) stays hostile..
From reading your response seems you do the following?
target_id.removefromallfactions
target_id.addtofaction 0001c21c 1
correct?

Is there a code to list all current faction an NPC (didn't realize turrets count as NPCs but they do) belongs to?
Thank you for helping!

edit:
tried
target_id.removefromallfactions
target_id.addtofaction 0001c21c 1
and that works beautifully as you wrote, but definitely need to prevent it from killing friendly NPCs.
is the 0 flag for addtofaction mean hostile?
Maybe can just add all the creatures and raider/robot factions as hostile to it if so...
but as you said, they still target everything not in a faction set to friendly on the specific turret.
Last edited by DirectorGunner; May 6, 2017 @ 4:03pm
DirectorGunner May 6, 2017 @ 4:49pm 
help faction 0 gave these options, maybe one uncommonly used command will work
SameFaction
GetFactionRankDifference
GetInFaction
GetFactionRank
SameFactionAsPC
SetFactionRank
ModFactionRank
SetCrimeFaction
GetIsCrimeFaction
GetFactionReaction
SetFactionReaction
ModFactionReaction
GetPCFactionMurder
SetPCFactionMurder
GetPCEnemyofFaction
SetPCEnemyofFaction
GetPCFactionAttack
SetPCFactionAttack
AddToFaction (Addfac)
RemoveFromFaction (Removefac)
GetFactionCombatReaction
ClearFactionPlayerEnemyFlag <--- this might be useful
ClearActorsFactionsPlayerEnemyFlag <--- this might be useful
RemoveFromAllFactions
GetInSharedCrimeFaction


So those are all the commands from console help faction 0.
Thoughts / experiment results?

maobe May 7, 2017 @ 3:45am 
ahm, if you want to use those turrets, there a a few mods on nexus which seem to have solved the problem. just have a look and test.
DirectorGunner May 7, 2017 @ 6:56pm 
Originally posted by maobe:
ahm, if you want to use those turrets, there a a few mods on nexus which seem to have solved the problem. just have a look and test.
Rather find a solution via for vanilla for now till I've beaten and exhausted all I can from the game, but thank you.
DukeNuGets Aug 22, 2020 @ 8:06am 
Very interesting, so i try to make a batch for spawn a Heavy Machinegun Turret with all commands once. But i'v got a problem, i can't do this ...

Batch File: "Game folder/data/heavy.txt"

player.placeatme 1167A8
picklastref.removefromallfactions
picklastref.addtofaction 0001c21c 1
picklastref.addtofaction 00068043 1
picklastref.addtofaction 0001d289 1


InGame command: "bat heavy"

picklastref can't get and set ID with the returned value :(
Someone will know what function will allow to do it ?
< >
Showing 1-11 of 11 comments
Per page: 1530 50

Date Posted: May 6, 2017 @ 2:49am
Posts: 11