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

Velizar

First time out of the vault
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.
 
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:
Nice! :)

Would it use the flaming death animation? It's my main reason for wanting to deal fire damage.
 
Yes, you can set the engine to do the death anim calculation based on molotov cocktail (simpler one) or directly override the death anim.
 
Back
Top