• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Class-Based Attack Penalties

tcharleschapman

Well-known member
Hi Everyone,

I'm developing a class that does the following:

1) The class takes attack penalties in all weapon groups except natural, bows, crossbows, and spears. It also takes no penalties on Melee or Ranged touch attacks.
2) This Penalty starts high at -8, then drops to -6 at level 5, -4 at level 10, and -2 at level 15.

I have been headbutting a wall for hours yesterday and this morning trying to figure out how this would look to not much success. Any assistance will be greatly appreciated!

Tom
 
I also do not know how to deal with the fact that "Unarmed Strike" appears in Monk and Close, two categories that take a penalty, and Natural, a category that does not take the penalty.
 
For anyone new to the editor my advice is getting pretty similar. :)

I would start with reading the Glossary of Terms to get a handle on the wording used in the editor.

I would look at FAQ#2 for all the places to get help on the editor. Watch the four Intro Videos as it covers the beginning of writing scripts. It will also show you how to find the Tags/Fields you need from Weapons so you can do a foreach loop.

You will need to have to write a foreach loop that gives a penalty to the weapons on the hero. Here is part of the script to get you started but you will need to fill in search "tags" (the section in red that says "ENTER YOUR SEARCH TAGS HERE") needs to be replaced.

Most of the below script works for ANY class ability that gets a bonus/penalty at different levels. So the script expects your class ability to be bootstrapped four separate times to the class and set at level 1, 5, 10, and 15th levels.

Code:
var penalty as number
[COLOR="Green"][B]
~ This penalty is just to display correctly on the Class List its not really used
~ on any weapons.
~ we are double the index value so at level 1=2, 5=4, 10=6, 15=8[/B][/COLOR]
penalty += field[xIndex].value * 2
[COLOR="Green"][B]~ calc the penalty value so 1=-8, 2=-6,3=-4,5=-2[/B][/COLOR]
penalty += -10

[B][COLOR="Green"]~Set the list name[/COLOR][/B]
field[listname].text = field[thingname].text & " " & signed(penalty)
[COLOR="Green"]
[B]~ If we're not shown, just get out now[/B][/COLOR]
doneif (tagis[Helper.ShowSpec] <> 1)
[COLOR="Green"][B]~ if we've been disabled, get out now[/B][/COLOR]
doneif (tagis[Helper.SpcDisable] <> 0)

[B][COLOR="Green"]~ Calculate the penalty that will be actually used and store it in abValue for
~ later use.[/COLOR][/B]
field[abValue].value += field[xCount].value * 2
field[abValue].value += -10
field[livename].text = field[thingname].text & " " & signed(field[abValue].value)

[B][COLOR="Green"]~ Loop through all weapons except natural, bows, crossbows, and spears.[/COLOR][/B]
foreach pick in hero from BaseWep where "[B][COLOR="Red"]ENTER YOUR SEARCH TAGS HERE[/COLOR][/B]"
   [B][COLOR="Green"]~ Set the penalty on to each weapon found[/COLOR][/B]
   perform eachpick.field[Penalty].value += field[abValue].value
nexteach
 
Thanks for this help. I've actually input about 200 custom classes, specials, and other things so I wouldn't exactly classify me as unfamiliar. I was just out of coffee, tired, and frustrated.

Thanks again.
 
Thanks for this help. I've actually input about 200 custom classes, specials, and other things so I wouldn't exactly classify me as unfamiliar. I was just out of coffee, tired, and frustrated.

Thanks again.
Ahhh. Sorry hard for me to tell sometimes based on the questions and I had just answered other people with really low post counts. So my bad I mean no offense by it..

Besides it could always help the next person reading this thread. ;)
 
Back
Top