NPCs stuck using worse weapons

Discussion in 'Fallout General Modding' started by G-Flex, Aug 14, 2012.

  1. G-Flex

    G-Flex First time out of the vault

    Apr 28, 2010
    Example scenario: I set one of my NPCs to use "ranged, then melee" as their combat preference, then have them equip their best weapon (say, a rifle). In combat, they use the rifle, switch over to a melee weapon instead if they have one (presumably because they have enough AP left in their turn to use that but not the rifle), and then never use the rifle again in that fight.

    Has anyone had this happen before? It happened with melee weapons too; Sulik had two melee weapons, unwielded the preferential one for the worse one, and kept using the worse one.
  2. Lexx

    Lexx Background Radiant
    Moderator Modder

    Apr 24, 2005
    It was always like that, if I remember correct. Just don't tell them to have this combat preference. I always let them stick to ranged combat, in worst case they will go melee anyway.
  3. G-Flex

    G-Flex First time out of the vault

    Apr 28, 2010
    Damn. I could swear they were smart enough to, say, re-equip their guns after, sort of like how they'll punch if they have that much AP left but still use their guns next round.

    It was especially annoying to have Sulik permanently switching to his regular o' knife instead of his better melee weapon. I had to confiscate the damn thing from him.
  4. dudejo001

    dudejo001 It Wandered In From the Wastes

    Mar 6, 2010
    Personally, I only let them have one weapon, ever. The AI isn't good at juggling weapons choices so there's no real choice beyond giving them one weapon only.

    The AI script would need a check of some sort so they switch back to an assigned weapon whenever it's the character's turn. It would also have to account for an Out of Ammo scenario.
  5. Sduibek

    Sduibek Creator of Fallout Fixt Moderator Modder

    Oct 27, 2010
    Isn't there an option for sfall to override this? If not, I'm sure it's codeable.

    Scripting this is definitely possible. You'd just need to add checks for their currently-equipped weapon versus what setting you have them on, and whether the current weapon has ammo (like was said above me)