Senior Member
|
I'm working on the Tempest and would like to know how to reduce the off-hand penalties for each weapon? I need to be able to reduce the penalty on the primary weapon by 1 (from -4 to -3 or from -2 to -1 if the offhand weapon is a light weapon) at 2nd level and do it again at 4th level (from -3 to -2 and +0 if the offhand weapon is a light weapon).
I looked at the ranger's two weapon fighting ability and didn't see anything that would be of help. Thanks! |
#1 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
Start off with a quick check that we're at least 2nd level:
Code:
if (field[xTotalLev] <2) then done endif Code:
~ Check to see if we have something equipped in each hand if (hero.tagis[Hero.EquipMain] + hero.tagis[Hero.EquipOff] < 2) then done endif Code:
foreach pick in hero where "isWeapon.? & Hero.MainHand" eachpick.field[Bonus].value +=1 if (field[xTotalLev].value >=4) then eachpick.field[Bonus].value +=1 endif nexteach Now to find a timing. Since we need field[xTotalLev].value, we'll need to be after the Level phase, and to hit calculations are handled in the Post-Attribute phase, according to the manual, so it sounds like UserPostLv, 100 is the place to try this script first. If that doesn't work, probably move earlier (the feat Two-Weapon Defense occurs ar Pre-level 20,000). You may have to replace your field[xTotalLev].value 's with tagcount[Classes.Tempest] (or whatever the tag reference to your class is). |
#2 |
Senior Member
|
I *think* I'm done with this. I passed it on to the players to test at any rate. It looks like the two-weapon penalties aren't being adjusted to me, but I'm not sure.
|
#3 |
Member
Join Date: Sep 2008
Posts: 48
|
Just thought I would let you know, I was also trying to get the Tempest class working and came across this post. The script provided did not work for me either, but I tinkered around with it a bit and got it working. here' what I have running a Post-Levels, Priority 20000:
Code:
~This script handles the ambidextrity ability var lvls as number var bonus as number lvls = hero.tagcount[Classes.Tempest] ~figure out bonus based on level, if less than 2 get out if (lvls >= 4) then bonus = 2 elseif (lvls >= 2) then bonus = 1 else done endif ~make sure we have a weapon equipped in each hand if (hero.tagis[Hero.EquipMain] + hero.tagis[Hero.EquipOff] < 2) then done endif ~walk througn the weapons and if they are equipped, add to the attack ~bonus foreach pick in hero where "component.BaseWep" if (eachpick.field[gIsEquip].value <> 0) then eachpick.field[wAttack].value += bonus endif if (eachpick.field[wIs2nd].value <> 0) then eachpick.field[wAttack].value += bonus endif nexteach |
#4 |
Senior Member
Join Date: Nov 2013
Location: Andover, Ma
Posts: 632
|
Sounds great, Tempest is a great class, but did you ever get the Two-Weapon Versatility to apply its bonuses?
"Two-Weapon Versatility (Ex): When a tempest of 3rd level or higher fights with two weapons, she can apply the effects of certain feats from one weapon to the other weapon as well, as long as those effects can be applied legally. She can use this ability only with the following feats: Greater Weapon Focus, Greater Weapon Specialization, Improved Critical, Weapon Focus, and Weapon Specialization. For example, a tempest who wields a longsword and a short sword and who has the Weapon Focus (longsword) feat can apply the effect of Weapon Focus to her short sword as well as to her longsword. If a tempest already has the feat with both weapons, she gains no additional effect. " Seems to me that would be something rather hard to code properly. I wouldn't even know where to begin logically. |
#5 |
Senior Member
Join Date: Jul 2010
Posts: 3,147
|
I'm going to look into this, and while I'm at it, I'll add this class to the community set.
|
#6 |
Senior Member
Join Date: Jul 2010
Posts: 3,147
|
For the record, here's my script for Ambidexterity:
Code:
Post-Attributes/10000 doneif (#levelcount[Tempest] < 2) doneif (hero.tagis[Hero.EquipMain] + hero.tagis[Hero.EquipOff] < 2) doneif (hero.tagis[Hero.MedArmor] + hero.tagis[Hero.HeavyArmor] <> 0) var bonus as number bonus = #levelcount[Tempest]/2 bonus = round(bonus, 0, -1) foreach pick in hero from BaseWep where "Hero.MainHand | Hero.OffHand & !wClass.TwoHanded" eachpick.field[wAttBonus].value += bonus nexteach |
#7 |
Senior Member
Join Date: Jul 2010
Posts: 3,147
|
Quote:
|
|
#8 |
Senior Member
Join Date: Jul 2010
Posts: 3,147
|
Ok. It was looking incredibly complicated to do it the way I originally intended to, so I did something else. I created the special ability with two choosers. The first is the feat you want to transfer, and the second is the weapon you want to apply the feat too. Trying to figure out how to pull the Broadcast tag from the first chooser was a gigantic pain in the ass (it's either beyond my ability or impossible), so I cheated. I created one script to apply the appropriate Broadcast tag to the various feats. I then used the second script to pull that tag then push it to the appropriate weapon.
Here are the scripts: Script 1 (Post-levels/10000) Code:
foreach pick in hero from BaseFeat if (eachpick.tagis[HasFeat.fImpCrit] <> 0) then perform eachpick.assign[Broadcast.ImpCrit] endif if (eachpick.tagis[HasFeat.fWepFoc] <> 0) then perform eachpick.assign[Broadcast.WepFocus] endif if (eachpick.tagis[HasFeat.fWepSpec2] <> 0) then perform eachpick.assign[Broadcast.WepSpec] endif if (eachpick.tagis[HasFeat.fGrtWepFo2] <> 0) then perform eachpick.assign[Broadcast.WepGrFoc] endif if (eachpick.tagis[HasFeat.fGrtWepSp2] <> 0) then perform eachpick.assign[Broadcast.WepGrSpec] endif nexteach Code:
doneif (field[usrChosen1].ischosen = 0) doneif (field[usrChosen2].ischosen = 0) var feat as string var hand as string feat = field[usrChosen1].chosen.tagids[thingid.?, " | "] hand = field[usrChosen2].chosen.tagids[Hero.?] foreach pick in hero from BaseFeat where feat perform eachpick.pulltags[Broadcast.?] nexteach foreach pick in hero from BaseWep where hand perform eachpick.pushtags[Broadcast.?] nexteach Script 3 (Render/10000) Code:
field[livename].text = "Two-Weapon Versatility (Ex)" Chooser 1 (feat) Code:
component.BaseFeat & (HasFeat.fImpCrit | HasFeat.fWepFoc | HasFeat.fWepSpec2 | HasFeat.fGrtWepFo2 | HasFeat.fGrtWepSp2) Code:
component.BaseWep & (Hero.MainHand | Hero.OffHand) & !wClass.TwoHanded Ideally, I'd like to make the first chooser just show the Basename of the feat, and only one instance of each, but at this point I'm calling this a win and moving on. Last edited by Sendric; December 13th, 2013 at 10:25 AM. |
#9 |
Senior Member
Join Date: Jul 2010
Posts: 3,147
|
With this, the Tempest is complete and will be included in the next release.
|
#10 |
|
|