Jump to content

prevent NPC from wearing power armor?


davidlallen

Recommended Posts

I have learned in a previous thread that NPC's never need power armor training. I have a robot NPC, which relies on a non-playable armor for their robotic appearance (from mod i_am_robot_nv). A beta tester has found that if they give the NPC power armor, the NPC will equip it because its DT is better. I don't want this to happen. Plus, when the NPC wears a power armor helmet, the voice modulation on top of the original robotic voice makes the dialog unintelligible.

 

Is there a way to prevent an NPC from wearing power armor / helmet? I could have a quest script which continuously checks for any equipped power armor(s) and helmet(s) and drops it; but that seems like a workaround. I'd prefer to just have the NPC decline to accept the armor.

Edited by davidlallen
Link to comment
Share on other sites

I have learned in a previous thread that NPC's never need power armor training. I have a robot NPC, which relies on a non-playable armor for their robotic appearance (from mod i_am_robot_nv). A beta tester has found that if they give the NPC power armor, the NPC will equip it because its DT is better. I don't want this to happen. Plus, when the NPC wears a power armor helmet, the voice modulation on top of the original robotic voice makes the dialog unintelligible.

 

Is there a way to prevent an NPC from wearing power armor / helmet? I could have a quest script which continuously checks for any equipped power armor(s) and helmet(s) and drops it; but that seems like a workaround. I'd prefer to just have the NPC decline to accept the armor.

 

Hmm, I notice that I tried to give Rex NCR armour, and he immediately drops it. A message says that "He cannot equip faction armour".

I could give him any other armour to hold fine, but NCR Combat Armour (IIRC) would make him drop it. I thought it strange that he wouldn't just hold it for me . So there could be a script doing this somewhere may be worth checking out :thumbsup:

Edited by PaladinRider
Link to comment
Share on other sites

Thanks for the tip. Unfortunately the implementation of that message is very specific to the named companions, and faction armor. The message you mention is named CompanionFactionArmorMsg, and it is produced by for example BrotherhoodFactionOutfitWarningScript, which contains repeated blocks like:

 

Begin OnAdd RexREF
ShowMessage CompanionFactionArmorMsg
DropMe
End

So there are two problems. First, I could edit this script and add my NPC, but then any other mod which also edited this script would cause a conflict. Second, there is other power armor, such as Remnants Power Armor, which is not faction aligned. The faction restriction would not prevent the NPC from wearing this armor.

 

Any other techniques I can try?

Link to comment
Share on other sites

Try including this in the NPC's script

 

 

if ((GetEquipped MYRobotArmor == 0) || (GetEquipped MYRobotArmorHelm == 0))
RemoveAllTypedItems Player 1 0 24 MyFormListWithAllowedArmor   ;Give it back to the player
endif

 

 

Link to comment
Share on other sites

Kert349 beat me to it - I was going to suggest it this morning. If your NPCs need to be sharing their inventory and pack-mule functions then the no-unequip flag is what you want. It worked in FO3 so it would be good to see if it still works. You should just need to do it once in a startup block of code.
Link to comment
Share on other sites

@ kert349 and rickerhk, thanks. That worked.

 

It is a little complicated due to some other things in my mod. Previously I had a unique armor, which comes in multiple variants, and its biped model list includes the helmet plus some other stuff. So I did not have to separately equip the helmet. It's the helmet which causes the problem, because the voice is a robot and the power armor helmet modulates it so it sounds awful. When I added an "equip <myhelmet> 1", this seems to equip a second copy of the helmet, or something, and I was getting extra modulation. I eventually turned off modulation on my helmet, and now it is ok, but it was working fine with modulation before the "equip 1".

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...