• 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

Error in the BaseSkill Component?

ShadowChemosh

Well-known member
So I am adding a Racial Cust Special that acts just like a tool giving a +2 circumstance bonus to a small list of skills. So to make sure they cover the "tools" rules I copied the script from "Thieves Tools" to give myself a place to start.

Thieves Tools:
Pre-Levels/10000
Code:
doneif (field[gIsEquip].value = 0)
perform hero.childfound[skDisable].field[skToolMod].modify[+,2,"Mwk Thieves Tools"]
So it has this new "modify" function that I can't find any documentation on the wiki. But seems easy enough to understand as its giving a +2 bonus to the skToolMod field and going to have wording of "Mwk Thieves Tools". Ok seems good so far.

I put the following script on my Racial Cust Special and I get an error:
Pre-levels/10000
Code:
perform hero.childfound[skDisable].field[skToolMod].modify[+,2,"Shadow"]
And I get the following error when I add it to my character:
Code:
Attempt to use inconsistent operator for field adjustment with history tracking for field 'skToolMod'
Location: 'eval' script for Component 'BaseSkill' (Eval Script '#8') near line 5
The amount and text is added to the skill still:
Image2.png

But I need to figure out "why" or "what" is causing the BaseSkill component to toss the above error. Mathias/Aaron could you give any insights or thoughts on what is happening at line 5 that is causing the issue?
 
This is a bug - if a field is set for "best" history tracking, which is the case for the skToolMod field, EVERY .modify[] that modifies that field must use the same modifier - +, -, * or /. The problem is that the script that says "we don't have any tools, therefore we get the -2 penalty" uses perform field[skToolMod].modify[-, 2, "No tools"].

So, because your script, at pre-levels/10000, used + on that field, the later use of - is incorrect.

The long-term solution is that the "no tools" penalty should be applied in a different way. Alternatively, we need a history tracking option other than best (personally, I think "Best" is a trap, because you can't handle things like the Fate's Favored trait, which adds a bonus to something that, for all other purposes, uses the maximum). For a short-term solution, perform hero.assign[ToolsAvail.skDisable] before Post-Attr/10000, and the fact that tools are available for this skill will mean that the penalty is not applied, so there's not a - and a + applied to the same field.
 
Back
Top