I was trying to figure out why Bastila was dying so quickly to sand people even tho I gave her Brejik's armband and belt (supposedly effective vs melee attacks). The 2da reference thread had nothing useful, but it wasn't hard to figure out.
Damage types:
The game has 13 damage types and each weapon can have one or more of these types.
baseitems.2da has a column called damageflags. It's a bitfield that says which type of damage a weapon deals by default. In order of least significant bit to most significant (right to left) it goes like this:
0 1 Bludgeoning
1 2 Piercing
2 4 Slashing
3 8 Universal
4 16 Acid
5 32 Cold
6 64 Light side
7 128 Electrical
8 256 Fire
9 512 Dark side
10 1024 Sonic
11 2048 Ion
12 4096 Energy
The value itself is stored as a simple decimal integer (tho some other columns use hex - bioware just being inconsistent). The values in the second column are what you'd find in baseitems.damageflags - to have multiple damage types, add those numbers together and put the resulting sum in that column.
These types are used anywhere where damage comes in play - for example in all item properties related to damage, including damage bonus, damage immunity, damage penalty, damage resistance and so forth.
Weapons by damage type:
Disclaimer: This is using the weapon rebalance mod which changes disruptors from 7 (Bludgeoning+Piercing+Slashing) to 8 (Universal damage). It's a change that makes sense. Highly recommended.
Quarter_Staff Bludgeoning
Stun_Baton Bludgeoning
Long_Sword Slashing
Vibro_Sword Slashing
Short_Sword Piercing
Vibro_Blade Piercing
Double_Bladed_Sword Slashing
Vibro_Double_Blade Slashing
Lightsaber Energy
Double_Bladed_Lightsaber Energy
Short_Lightsaber Energy
Blaster_Pistol Energy
Heavy_Blaster Energy
Hold_Out_Blaster Energy
Ion_Blaster Ion
Disrupter_Pistol Universal
Sonic_Pistol Sonic
Ion_Rifle Ion
Bowcaster Energy
Blaster_Carbine Energy
Disrupter_Rifle Universal
Sonic_Rifle Sonic
Repeating_Blaster Energy
Heavy_Repeating_Blaster Energy
Blaster_Rifle Energy
Ghaffi_Stick Piercing
Wookie_Warblade Slashing
Gammorean_Battleaxe Slashing
Creature_Item_Slash Slashing
Creature_Item_Pierce Piercing
Creature_Weapon_Sl_Prc Piercing
Or transposed:
0 Bludgeoning Quarter_Staff, Stun_Baton
1 Piercing Short_Sword, Vibro_Blade, Ghaffi_Stick, Creature_Item_Pierce, Creature_Weapon_Sl_Prc
2 Slashing Long_Sword, Vibro_Sword, Double_Bladed_Sword, Vibro_Double_Blade, Wookie_Warblade, Gammorean_Battleaxe, Creature_Item_Slash
3 Universal Disrupter_Pistol, Disrupter_Rifle
4 Acid
5 Cold
6 Light side
7 Electrical
8 Fire
9 Dark side
10 Sonic Sonic_Pistol, Sonic_Rifle
11 Ion Ion_Blaster, Ion_Rifle
12 Energy Lightsaber, Double_Bladed_Lightsaber, Short_Lightsaber, Blaster_Pistol, Heavy_Blaster, Hold_Out_Blaster, Bowcaster, Blaster_Carbine, Repeating_Blaster, Heavy_Repeating_Blaster, Blaster_Rifle
(Who TF decided a tab size of 8 is a good idea? Also this forum needs a table feature.)
So I have my answer now. Gaffi sticks are Piercing damage, and Brejik's stuff protects only v Bludgeoning/Slashing. I feel like this is false advertising. I've been bamboozled.
Also, if you have Damage resistance Universal 5/-, it doesn't mean you resist 5 points of any kind of damage, it means you resist 5 points of the damage type "Universal", which is semantically just confusing as heck.