4e Powers Scripts

Discussion of your thoughts & requests, help for users and game specific configuration files for Character Tool

Moderators: dorpond, Azhrei

User avatar
jstgtpaid
Giant
Posts: 142
Joined: Sun Jun 22, 2008 1:23 am
Location: Tampa, FL

4e Powers Scripts

Post by jstgtpaid »

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...

User avatar
jay
RPTools Team
Posts: 1767
Joined: Tue Feb 07, 2006 1:07 am
Location: Austin, Tx

Re: 4e Powers Scripts

Post by jay »

jstgtpaid wrote:Requirements met -> You must be wielding two melee weapons or a ranged weapon
and(root.weapon.melee, root.offHand.melee)
jstgtpaid wrote:Attack -> if melee then X, else Y
if(root.currentWeapon.melee, 'X', 'Y')
jstgtpaid wrote:damage -> (damage from primary weapon) + (damage from off-hand weapon)
Hmmmm, that one is gonna be tough. I'll have to think about it some.
jstgtpaid wrote:damage-> (if attack was melee then X, else Y)
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:secondary attack requirement -> first attack hits
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.

User avatar
jstgtpaid
Giant
Posts: 142
Joined: Sun Jun 22, 2008 1:23 am
Location: Tampa, FL

Post by jstgtpaid »

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?

User avatar
jay
RPTools Team
Posts: 1767
Joined: Tue Feb 07, 2006 1:07 am
Location: Austin, Tx

Post by jay »

I'm not sure what the answer to this is. Could you give me some example powers? I would think if they are two separate attacks then you might go with the secondary attack method. If not, then we need to figure out how to combine the weapon damage.

User avatar
jstgtpaid
Giant
Posts: 142
Joined: Sun Jun 22, 2008 1:23 am
Location: Tampa, FL

Post by jstgtpaid »

Numerous powers include an attack with both the primary weapon and the off-hand weapon. In addition, some of those powers have different multipliers for the off-hand. For example the main weapon may be 2[W] and the off-hand 1[W].

Cruel cage of steel is the first ranger power that comes to mind...

User avatar
jay
RPTools Team
Posts: 1767
Joined: Tue Feb 07, 2006 1:07 am
Location: Austin, Tx

Post by jay »

Those all look like they should be handled by placing them in the secondary attack.

User avatar
jstgtpaid
Giant
Posts: 142
Joined: Sun Jun 22, 2008 1:23 am
Location: Tampa, FL

Post by jstgtpaid »

How do I identify that the secondary attack uses the offhand weapon?

User avatar
jay
RPTools Team
Posts: 1767
Joined: Tue Feb 07, 2006 1:07 am
Location: Austin, Tx

Post by jay »

Good question! I have no idea. Let me think about it some and I'll get back to you.

User avatar
UntoldGlory
Great Wyrm
Posts: 1649
Joined: Sun Mar 16, 2008 8:12 pm

Post by UntoldGlory »

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!

Can you add a <secondAttackOffHand> property that takes a "yes" or "no"? Then the script could check for that?

User avatar
jay
RPTools Team
Posts: 1767
Joined: Tue Feb 07, 2006 1:07 am
Location: Austin, Tx

Post by jay »

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>

User avatar
jstgtpaid
Giant
Posts: 142
Joined: Sun Jun 22, 2008 1:23 am
Location: Tampa, FL

Post by jstgtpaid »

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!
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.

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.

User avatar
UntoldGlory
Great Wyrm
Posts: 1649
Joined: Sun Mar 16, 2008 8:12 pm

Post by UntoldGlory »

jstgtpaid wrote:
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!
...stuff...
Yeah, I was mostly just talking about off hand roll vs a second on hand. Jay's got it it seems.

User avatar
jstgtpaid
Giant
Posts: 142
Joined: Sun Jun 22, 2008 1:23 am
Location: Tampa, FL

Post by jstgtpaid »

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>
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?

User avatar
jay
RPTools Team
Posts: 1767
Joined: Tue Feb 07, 2006 1:07 am
Location: Austin, Tx

Post by jay »

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?
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.

User avatar
jay
RPTools Team
Posts: 1767
Joined: Tue Feb 07, 2006 1:07 am
Location: Austin, Tx

Post by jay »

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.
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.

Post Reply

Return to “CharacterTool”