4e Powers Scripts
4e Powers Scripts
I am working on the Ranger powers for chartool. Since a lot of the work on the powers is already done, I want to add the scripts in for requirements, damage etc. The Ranger powers are much more complicated than the rogues so rather than blast my brain, I am just going to ask for some assistance. I need to make scripts for various properties for the ranger class. The class has properties that are rather complex. Here are a few that I need help with...
Requirements met -> You must be wielding two melee weapons or a ranged weapon
Attack -> if melee then X, else Y
damage -> (damage from primary weapon) + (damage from off-hand weapon)
damage-> (if attack was melee then X, else Y)
secondary attack requirement -> first attack hits
I think that is it for now... I would appreciate any guidance or examples for the property scenarios above...
Thanks in advance...
Requirements met -> You must be wielding two melee weapons or a ranged weapon
Attack -> if melee then X, else Y
damage -> (damage from primary weapon) + (damage from off-hand weapon)
damage-> (if attack was melee then X, else Y)
secondary attack requirement -> first attack hits
I think that is it for now... I would appreciate any guidance or examples for the property scenarios above...
Thanks in advance...
Re: 4e Powers Scripts
and(root.weapon.melee, root.offHand.melee)jstgtpaid wrote:Requirements met -> You must be wielding two melee weapons or a ranged weapon
if(root.currentWeapon.melee, 'X', 'Y')jstgtpaid wrote:Attack -> if melee then X, else Y
Hmmmm, that one is gonna be tough. I'll have to think about it some.jstgtpaid wrote:damage -> (damage from primary weapon) + (damage from off-hand weapon)
if(root.currentWeapon.melee, 'X', 'Y'). If it is just x[W] damage then the code handles all of that for you already.jstgtpaid wrote:damage-> (if attack was melee then X, else Y)
We can't handle this case because there isn't any way to tell if the 1st attack hits. The scripts don't have access to the target's defenses. That's why the power table allows you to select which attack to roll.jstgtpaid wrote:secondary attack requirement -> first attack hits
Several of the rangers powers utilize multiple melee weapons. Shall I handle the multiple attacks using the secondary and tertiary attack properties? The issue with that is how do I identify the weapon damage source? Should that be another property that defaults to currentweapon but could be offhand?
- UntoldGlory
- Great Wyrm
- Posts: 1649
- Joined: Sun Mar 16, 2008 8:12 pm
I agree. I added this to the PDS:
Code: Select all
<property><description>Flag indicating that the power uses the off hand weapon for secondary attacks</description></property>
Checking to see if they are using two melee weapons or a ranged weapon isn't too hard. I don't think there are many ranger abilities that require a specific 'build' of ranger. Some of the other classes give bonuses based on the 'build' of class. I know that the rogue and warlocks powers have 'build' bonuses for powers.UntoldGlory wrote:The real problem is that many ranger powers use off hand *if* it's a melee ranger, or main hand if it's a bow ranger!
The down side of the class builds concept is I don't think that we have a way of checking for that yet in Chartool. If we did, then I could go back and revise a lot of the powers to check for the build and add the build bonus. I probably would be a simple matter to add a build property to the class properties.
- UntoldGlory
- Great Wyrm
- Posts: 1649
- Joined: Sun Mar 16, 2008 8:12 pm
I couldn't find that in the PDS. I could be looking in the wrong place though. The PDS version that I have is from 7/24/08. Did your update make it into the SVN version?jay wrote:I agree. I added this to the PDS:Code: Select all
<property><description>Flag indicating that the power uses the off hand weapon for secondary attacks</description></property>
It's not checked in. Go ahead and add that line to your PDS for now. I'm in the middle of editing other stuff so I don't think it is a good idea to check it in right now. If you send in the powers to Fobbo make sure you have him add the line before he does any testing.jstgtpaid wrote:I couldn't find that in the PDS. I could be looking in the wrong place though. The PDS version that I have is from 7/24/08. Did your update make it into the SVN version?
I'm going to use the support for feats to do the class build support. I've already implemented it for the Fighter Weapon Talent and we can do the same thing for the rogue builds. It lets the user select the class specific stuff they want and then allows the scripts to find out which one was chosen.jstgtpaid wrote:The down side of the class builds concept is I don't think that we have a way of checking for that yet in Chartool. If we did, then I could go back and revise a lot of the powers to check for the build and add the build bonus. I probably would be a simple matter to add a build property to the class properties.