Lone Wolf Development Forums

Lone Wolf Development Forums (http://forums.wolflair.com/index.php)
-   HL - Savage Worlds (http://forums.wolflair.com/forumdisplay.php?f=59)
-   -   Syntactic thing (http://forums.wolflair.com/showthread.php?t=50418)

Paragon August 21st, 2014 11:20 AM

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.

zarlor August 21st, 2014 11:48 AM

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

Paragon August 21st, 2014 01:08 PM

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.

Paragon August 23rd, 2014 11:17 AM

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
      bonus = #trait[attrAgi]
      if (bonus >= 6) then
      bonus = 6 + round(hero.child[attrAgi].field[trtRoll].value / 2,0,-1)
        endif
      perform #traitadjust[trTough,+,bonus,"Half Agility"]

Timing: Before Calc trtFinal

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.

jbearwillis August 23rd, 2014 12:48 PM

I could be wrong, but you might play around with the Phase and Priority. If you haven't already.

Paragon August 23rd, 2014 07:23 PM

I'll give it a try; I did a bit of fiddling with the Timing, but didn't try anything with those two.

SeeleyOne August 23rd, 2014 09:33 PM

Try Final 5000, without any of the "Before Calc trtFinal".

zarlor August 24th, 2014 05:53 AM

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.

Paragon August 24th, 2014 06:53 AM

Quote:

Originally Posted by zarlor (Post 191179)
What is this line meant to do?

bonus = 6 + round(hero.child[attrAgi].field[trtRoll].value / 2,0,-1)

Its from the basic Toughness calculation, and from what I understand, its to deal with what is supposed to happen, as you note, for attributes about 12.

Quote:


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.
Yeah, while I don't expect to generate a Thin Man with Agility that high, they do default to d10, so I figured I might as well include it.

Paragon August 24th, 2014 06:54 AM

Quote:

Originally Posted by SeeleyOne (Post 191165)
Try Final 5000, without any of the "Before Calc trtFinal".

Could you expand on this a bit? I thought you had to have something in the Timing box.


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.