Syntactic thing
I could probably work this out with trial and error, but thought maybe someone would already know.
Setting up my Thin Men, they have an ability that adds to their Toughness, but does so by giving them a bonus equal to half their Agility die. I'm guessing this is an eval script on the ability, but I couldn't quite figure out how it'd be constructed. |
I'd take a look at the derived trait for Toughness itself (trTough), since it is calculated by taking 1/2 Vigor. That should give you some idea of a way to use half of something to use as a modifier to add to something else. I always like to work from something that already does something similar to what I want to try and figure out how to do it. (oh, and sorry I don't know how to code it off the top of my head, thus the hint on what I where I would start to try and figure out how to code it.)
|
Hey, its more than I had. And I know what you mean; I was all set to ask how you set up Knowledge skills on creatures when I found an example on the lich and didn't need to.
|
Okay, I came up with something for this, but its not working. I suspect the problem is that I'm not correctly identifying what the program is storing the variable as here; I'd assumed it was the word "bonus" in the script, but since this isn't working I'm thinking I'm wrong). Just in case the problem is in the timing or other elements, I'll try to include them all:
Phase: Final Priority: 4000 Code:
var bonus as number So, any ideas here? I could, of course, be completely missing the boat since I kind of kitbashed some of the code from the Toughness calculation itself and the Tough As Nails edge together to get this. The test didn't have any objections, but as it is, it doesn't actually seem to do anything. |
I could be wrong, but you might play around with the Phase and Priority. If you haven't already.
|
I'll give it a try; I did a bit of fiddling with the Timing, but didn't try anything with those two.
|
Try Final 5000, without any of the "Before Calc trtFinal".
|
What is this line meant to do?
bonus = 6 + round(hero.child[attrAgi].field[trtRoll].value / 2,0,-1) It looks like it's only run if Agility is greater than d12. (Keeping in mind that a value of 7 in that instance is equivalent to d12+1, 8 is d12+2, and so on.) I don't know the text of the ability in question is why I'm asking just to see if that is going to do what you want it to. |
Quote:
Quote:
|
Quote:
|
All times are GMT -8. The time now is 05:36 PM. |
Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.