View Single Post
Paragon
Senior Member
 
Join Date: Feb 2010
Posts: 874

Old August 15th, 2014, 07:50 AM
At the suggestion of the estimable Zarlor, I thought I'd note this one:

Pre-Traits/5000
Code:
Code:
foreach pick in hero from WeapRange
if (eachpick.tagis[WeaponType.ModPistol] <> 0) then
eachpick.field[wpDmgBonus].value += 2
endif
nexteach
This was a bit of code on the Gunslinger Edge for my XCOM SW game, that allowed all modern pistols to do +2 damage in the Sniper's hands. It was put together by kitbashing together a couple of bits of code, one from Caped Crusader and one from (I'm guessing) Zarlor.

A couple of things to be aware of, though:

1. Damage bonuses are listed directly with the damage value, so if you have a pistol with something like, say, 2D6-1, this will produce a result that says 2D6-1+2. That actually gets you the correct result, but its a little--odd. As Zarlor says, if you want to fix that, you could do it by copying the problematic weapons, precluding the old ones, then moving the -1 into the damage bonus field.

2. You need to be aware of what types there are, and potentially do a more complicated code (Zarlor suggested:

Code:
foreach pick in hero from WeapRange
   if (eachpick.tagis[WeaponType.ModPistol] | eachpick.tagis[WeaponType.FutPistol] <> 0) then
      eachpick.field[wpDmgBonus].value += 2
   endif
nexteach
should be structured right) it you have more than one type you're trying to apply the modifier to. In addition, it may be necessary to change types on some things (if I wanted to apply it to the by the book Laser Pistol I'd need to copy-edit-preclude process, as its not actually tagged as a pistol of any sort, just an energy weapon).

Last edited by Paragon; April 24th, 2017 at 07:25 AM.
Paragon is offline   #10 Reply With Quote