• 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

Another Question

Here is the scrip I am using

hero.child[resLang].field[resMax].value += 2

Phase: Pre Attribute
Priority: 5000
Timing: Before scripts Calc trtFinal
 
This appears to work:

#resmax[resLang] += #trait[attrSma]
#resleft[resLang] += #trait[attrSma]
Phase: Final Priority: 2000 Timing: Before:Calc trtFinal

The first line adds to the maximum number of languages, and the second line adds to the number of languages remaining. This version changes the number of language slots to be equal to Smarts instead of equal to Smarts/2 for the Linguist Edge. If you want to add a specific number of language slots, substitute a number for #trait[attrSma].
 
Dartnet's solution is more appropriate. The value of #resleft is set equal to #resmax during the evaluation logic. If you increase the maximum before #resleft is set, then you only have to change one value PLUS any logic that uses #resleft is guaranteed to work as well.

The only change to Dartnet's code would be to use #resleft instead of the expanded syntax. So the line would change to:

Code:
#resmax[resLang] += 2

In situations like this, it's best to look for existing mechanics that do similar things. For example, the "New Power" edge increases the number of arcane powers by one. This is analogous to increasing the number of languages. The script for that edge is:

Code:
#resmax[resPowers] += 1

It has timing characteristics of:
phase = PreTraits
priority = 5000
timing before "Calc trtFinal"

Given that Dartnet's script uses that exact timing, I'm guessing that he copied the timing from the edge.
 
Back
Top