FOSE has a direct command for it as Cipscis said but you can also do it with an object effect which you put on the weapon.
You put the scripted object effect on the weapon, and you create a variable somewhere, either a quest variable or a global. The weapon would apply an extra damage effect based upon the value of whatever you set that value to.
If you were using a quest variable and quest script to modify the weapon damage, the pair would look something like this:
scn MyWeaponDamagyQuestSCRIPTshort ExtraDamagebegin gamemodeif (I want a really powerful weapon) set ExtraDamage to 50elseif (I wanna bit more damage) set ExtraDamage to 25else (I want no extra) set ExtraDamage to 0)endifend
scn MyHappyEffectSCRIPTref TargetBEGIN ScriptEffectStart set Target to GetSelf if target != player Target.damageav health MyWeaponDamageyQUEST.ExtraDamage endifEND
The effect script itself could be allowed to mess with the variables, but the variable must live outside of the weapon damage script, such as in that quest or as a global. Each instance of the weapon script will, I believe, re-run each time the weapon makes a hit, and it'll refresh any variable values that are defined within it. An outside quest variable or global will allow it to maintain state on variables throughout multiple hits.
To do this you first create a base effect
http://geck.gamesas.com/index.php/Base_Effect
then create an object effect
http://geck.gamesas.com/index.php/Object_Effect
then you put the base effect into your object effect.
For an example, look at:
base effect MQ01BehemothWeaponEffect
object effect EnchBehemothWeapon
weapon BehemothFireHydrant
when you create your effect script, don't forget to set the dropdown on the top right for "Effect" instead of "Object" or you'll be sitting there for hours wondering why your script is missing from the list of available scripts when you try to put it onto your effect.