Using fire damage for energy weapon removes aimed shot & uses small guns

Discussion in 'Fallout General Modding' started by Velizar, Jul 18, 2019.

Tags:
  1. Velizar

    Velizar First time out of the vault

    5
    Jul 17, 2019
    I'm trying to add an energy weapon handgun which deals fire damage. I've noticed those two problems, both of which disappear if I switch the damage type:

    1. Aimed shot becomes unavailable
    2. The handgun uses small guns instead of energy weapons

    Is there a known solution, or do we just avoid fire damage type for energy weapons?

    My best guess is: since there isn't a flag for which skill the weapon uses, the engine must have this check at the time of attack is used (could be slightly wrong):

    Code:
    if (action == throw)
      throwing
    else if (attack_type in ['throw punch', 'kick leg'])
      unarmed
    else if (attack_type in ['swing', 'thrust']]
      melee weapons
    else if (big_guns) // yes, weapons have a flag "big guns"
      big guns
    else if (damage_type in ['laser', 'plasma', 'electrical'])
      energy weapons
    else
    // even if it's fire damage
    // I haven't tested for explosive and EMP, but I'd assume they're also small guns
      small guns
    
    I haven't tested most of this, but it seems most likely.
     
  2. NovaRain

    NovaRain Casual Modder Modder

    Mar 10, 2007
    Yes, your guess is pretty much how the engine thinks which skill the weapon uses. Only the check for damage type is before the "big guns" flag.

    EDIT: I just tested a script to change the laser pistol to deal fire damage. You can set your weapon as a weak laser pistol (damage type laser) in proto, use sfall hook script to change the damage type to fire right after the hit roll (if it's not miss), and reset it back to laser after the damage is calculated for next ToHit calculation. So the weapon still uses EW skill for calculating ToHit and is capable of aimed shots, but deals fire damage.
     
    Last edited: Jul 18, 2019
  3. Velizar

    Velizar First time out of the vault

    5
    Jul 17, 2019
    Nice! :)

    Would it use the flaming death animation? It's my main reason for wanting to deal fire damage.
     
  4. NovaRain

    NovaRain Casual Modder Modder

    Mar 10, 2007
    Yes, you can set the engine to do the death anim calculation based on molotov cocktail (simpler one) or directly override the death anim.
     
    • [Rad] [Rad] x 1