Member
Join Date: Aug 2010
Posts: 53
|
What I actually want to do is create a feat so that a player can use any light or single handed slashing weapon to qualify for the Duelist's precise striking ability, not just the scimitar.
I'm thinking of including all single-handed axes, falcata, khopesh, kukri, longsword, sawtooth saber, shortsword, sickle, sword_aldori dueling, sword_bastard (only after the character can use 1-handed by taking exotic WP), temple sword, war razor and (even) whip. I have named it Blade Dance but I'm new at this and have zero experience with coding. So I used "copy new" using Dervish dance as a base and am wondering if any kind soul that knows how can reply with the proper code to replace #hasfeat[fWepMart] + hero.tagis[WepProf.wScimitar] <> 0 with one for all single handed slashing weapons... Or is it even possible? Thanks |
#1 |
Member
Join Date: Aug 2010
Posts: 53
|
SnapI just realized I also have to create a different weapon finesse feat and have blade dance accept that as a pre-req instead of regular weapon finesse...
|
#2 |
Senior Member
Join Date: Sep 2010
Location: Rochester, NY
Posts: 263
|
I am just starting to code, but I needed something similar where I needed a certain number of Item Creation feats to qualify for a Feat. The Help link in the toolkit has some sample scripts. One of them, the one I am working with, went through the feats you had and counted feats of certain types. I think your application would be an extension of this as well, but I think you would have to have it check each individual slashing weapon you want in there to see if the Profile contains that feat.
May be an easier way. my script-fu is not strong |
#3 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,217
|
What I'd do here is to start with a copy of Dervish Dance - study its script - see how it's searching for all the scimitars.
Then, make your copy look for all light/single slashing weapons that aren't scimitars - that way, between the two feats, they'll cover the scimitars and the rest of the weapons you want to cover. To figure out how the fact that a weapon is light or one handed is stored in Hero Lab, add many different weapons to a blank character - some light, some one-handed, some two-handed, and then in the Develop menu, make sure that the first option, "Enable Data File Debugging" is checked. Now, right-click on those various weapons, and select "Show Selection Tags for XXXXX". Compare the lists between the various weapons, and see if you can pick out how light/one-handed/two-handed is stored - it's the wClass tags - wClass.Light and wClass.OneHanded. Do the same for S vs. B vs. P - you'll find that those are the wType tags. So, now we modify the foreach - change what it's looking for: Code:
foreach pick in hero from BaseWep where "(wClass.Light | wClass.OneHanded) & wType.S & !IsWeapon.wScimitar" |
#4 |
Member
Join Date: Aug 2010
Posts: 53
|
Wow, thanks Mathias.
I did start out with the Dervish Dance, but had unsuccessfully tried changing the code. I didn't actually have Dervish Dance as a pre-req, but now that you mention it, it's probably a fair idea. Question is, how do I include it as a pre-req? Here's my description of the feat itself; Improved Dervish Dance You have learned to use different blades with your Dervish Dance. {b}Prerequisites{/b}: Dervish Dance, Dexterity 16, Weapon Focus, Perform (dance) 6 ranks, proficient with one-handed slashing melee weapon. {b}Benefit{/b}: When wielding any one-handed slashing melee weapon with one hand, you can use your Dexterity modifier instead of your Strength modifier on melee attack and damage rolls. You treat the weapon as a one-handed piercing weapon for all feats and class abilities that require such a weapon (such as a duelist's precise strike ability). The weapon must be for a creature of your size. You cannot use this feat if you are carrying a weapon or shield in your off hand. The code you wrote above, do I put that in Expr-reqs? Thanks again |
#5 |
Member
Join Date: Aug 2010
Posts: 53
|
Forget it, I see it goes in Eval scripts, and i think i got Dervish dance as the pre req all right... testing now...
ok I got an error; Syntax error in 'eval' script for Thing 'fImDerDan' (Eval script '#2') on live 7 -> One or more 'if' statements is missing the closing 'endif' statements. Here's my modified (from the original Dervish Dance) Eval script - ~ If we're disabled, do nothing doneif (tagis[Helper.FtDisable] <> 0) ~ Assign the piercing weapon tag so any 1-handed slashing weapons work with Duelist abilities. foreach pick in hero from BaseWep where "(wClass.Light | wClass.OneHanded) & wType.S & !IsWeapon.wScimitar" Last edited by Coopernicus; March 28th, 2011 at 09:20 AM. |
#6 |
Member
Join Date: Aug 2010
Posts: 53
|
line 7, not live 7...
|
#7 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,217
|
Go ahead and copy the entire script, please - that way, it's easier to count lines and see which one is line 7.
|
#8 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,217
|
Oh yeah - as a reminder, there are two Eval Scripts for dervish dance - you'll want to apply the same change to the foreach to both.
|
#9 |
Member
Join Date: Aug 2010
Posts: 53
|
Entire script, right - sorry...
~ If we're disabled, do nothing doneif (tagis[Helper.FtDisable] <> 0) ~ Assign the piercing weapon tag so any 1-handed slashing weapons work with Duelist abilities. foreach pick in hero from BaseWep where "(wClass.Light | wClass.OneHanded) & wType.S & !IsWeapon.wScimitar" ~ If we're disabled, do nothing doneif (tagis[Helper.FtDisable] <> 0) ~ If we have a shield equipped or another weapon in our off hand, do nothing, we are done. doneif (hero.tagis[Hero.EquipShld] + hero.tagis[Hero.EquipOff] <> 0) ~figure out the difference between our DEX and STR modifiers (minimum 0, since the feat says "can", not "must") field[abValue].value += maximum(#attrmod[aDEX] - #attrmod[aSTR], 0) ~ Otherwise, go through to all scimitars on the hero and replace their Strength bonuses to Hit and Damage with Dex bonuses... Also apply the piercing weapon tag so we count for precise strike. foreach pick in hero from BaseWep where "IsWeapon.wScimitar" eachpick.field[wAttBonus].value += field[abValue].value eachpick.field[wDamBonus].value += field[abValue].value nexteach |
#10 |
Thread Tools | |
Display Modes | |
|
|