Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - d20 System
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
AWizardInDallas
Senior Member
 
Join Date: Aug 2008
Location: Plano, TX
Posts: 147
Send a message via AIM to AWizardInDallas Send a message via MSN to AWizardInDallas Send a message via Yahoo to AWizardInDallas Send a message via Skype™ to AWizardInDallas

Old January 26th, 2009, 10:09 PM
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!
AWizardInDallas is offline   #1 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old January 27th, 2009, 12:55 PM
Start off with a quick check that we're at least 2nd level:
Code:
 
if (field[xTotalLev] <2) then
   done
endif
Next, here's a piece from two-weapon defense which will make sure that you have things equipped in each hand:
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
Now, we need to find our main weapon;
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
That will search until it finds a weapon wielded in the main hand. Then it will add +1 to hit. If you're at least 4th level, it will add another +1. Note that I'm just using a simple field[Bonus].value, rather than trying to figure out how two-weapon fighting penalties are calculated - it'll come out the same as the user sees it.

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).
Mathias is online now   #2 Reply With Quote
AWizardInDallas
Senior Member
 
Join Date: Aug 2008
Location: Plano, TX
Posts: 147
Send a message via AIM to AWizardInDallas Send a message via MSN to AWizardInDallas Send a message via Yahoo to AWizardInDallas Send a message via Skype™ to AWizardInDallas

Old February 9th, 2009, 06:20 PM
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.
AWizardInDallas is offline   #3 Reply With Quote
Dastir
Member
 
Join Date: Sep 2008
Posts: 48

Old June 16th, 2009, 07:22 PM
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
Dastir is offline   #4 Reply With Quote
TobyFox2002
Senior Member
 
Join Date: Nov 2013
Location: Andover, Ma
Posts: 632

Old December 7th, 2013, 06:46 PM
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.
TobyFox2002 is offline   #5 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 3,147

Old December 9th, 2013, 09:53 AM
I'm going to look into this, and while I'm at it, I'll add this class to the community set.
Sendric is offline   #6 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 3,147

Old December 12th, 2013, 05:54 AM
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
Sendric is offline   #7 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 3,147

Old December 12th, 2013, 05:55 AM
Quote:
Originally Posted by TobyFox2002 View Post
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.
I have a question about this ability. Can the Tempest apply all feats at once, or just one at a time? I think it will be easier to code all at once, so I'll start there, but if anyone has any insight on this please let me know. Thanks.
Sendric is offline   #8 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 3,147

Old December 12th, 2013, 10:05 AM
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
Script 2 (Post-attributes/10000)
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
I also threw in this script so that the name of the ability didn't become stupidly long:

Script 3 (Render/10000)
Code:
field[livename].text = "Two-Weapon Versatility (Ex)"
And finally, for the chooser custom expressions, I used the following:

Chooser 1 (feat)
Code:
 
component.BaseFeat & (HasFeat.fImpCrit | HasFeat.fWepFoc | HasFeat.fWepSpec2 | HasFeat.fGrtWepFo2 | HasFeat.fGrtWepSp2)
Chooser 2 (weapon)
Code:
component.BaseWep & (Hero.MainHand | Hero.OffHand) & !wClass.TwoHanded
I didn't bother to worry about whether or not the feat could be legally applied to the weapon because HL is already doing that. If you choose a feat you do not qualify for with the weapon, an error will appear on the weapon.

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.
Sendric is offline   #9 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 3,147

Old December 13th, 2013, 10:30 AM
With this, the Tempest is complete and will be included in the next release.
Sendric is offline   #10 Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 09:19 AM.


Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.