• 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

Maximum Attribute Prerequisites

RayPrancer

Well-known member
After looking at the pre-requisite scripts for the Power Attack feat I understand how to phrase minimum attibute prerequisites, but I have some Feats with requirements of no more than 9 Intelligence or no more than 10 Charisma - how would I go about adding these?
 
RayPrancer wrote:
>
>
> After looking at the pre-requisite scripts for the Power Attack feat I
> understand how to phrase minimum attibute prerequisites, but I have some
> Feats with requirements of no more than 9 Intelligence or no more than
> 10 Charisma - how would I go about adding these?


The prereq for Power Attack does this:

if (child[aSTR].field[aFinalVal].value >= 13) then
@valid = 1
endif

You can read this as "If the final strength value is greater than or
equal to 13, we're valid".


If you want to say "less than or equal" instead, you'd simply do this:

if (child[aSTR].field[aFinalVal].value <= 13) then
@valid = 1
endif

The only change is that the >= (greater than or equal) sign has been
swapped for <= (less than or equal). So a requirement for 9 or less
intelligence would look like this:

if (child[aINT].field[aFinalVal].value <= 9) then
@valid = 1
endif


Hope this helps,

--
Colen McAlister (colen@wolflair.com)
Chief Engineer, Lone Wolf Development
http://www.wolflair.com/
 
Thanks Colen, since the feat wasn't working it's likely something else - it looks like it's not recognising the stat for some reason, and this may be because I'd used the wrong value for the Charisma attribute on the other one. (aCha?)
 
RayPrancer wrote:
>
>
> Thanks Colen, since the feat wasn't working it's likely something else -
> it looks like it's not recognising the stat for some reason, and this
> may be because I'd used the wrong value for the Charisma attribute on
> the other one. (aCha?)


You should be using "aCHA" to get the charisma attribute. Case is
important, so "aCha" won't work.


Hope this helps,

--
Colen McAlister (colen@wolflair.com)
Chief Engineer, Lone Wolf Development
http://www.wolflair.com/
 
Back
Top