• 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

Creating a penalty to a skill

saintaurik

Well-known member
I'm trying to create a magic item that when equipped gives a penalty to a skill. The skill in question is Listen. I tried to mess around with things but I just am not getting the proper coding. Here is what I tried.

if (field[gIsEquip].value <> 0) then
#competencebonus[hero.child[kListen].field[Pentaly].value -= 1]
endif

The error I am getting says incorrect parameter count for macro reference.
Does anyone know what I might be doing wrong for this to not work?
 
Last edited:
That macro has to be in the format:
#competencebonus[pick, bonus]

Without checking I'd say that should be:
#competencebonus[hero.child[kListen], -1]
 
Last edited:
Thanks Dami for helping. It does compile however it does not give the penalty to the listen skill when the item is equipped. Maybe I am missing a setting or something?
 
Maybe it doesn't like the penalty... or something else on the character already gives a Listen competence bonus. I can't find an item in d20 to use as a reference - if you can think of any item that applies a penalty, try looking at how that's coded.
 
Are you including a line of code to only activate if the item is equipped? The entire script should look like this:

Code:
~ If not equipped get out now!
   doneif (field[gIsEquip].value <> 1)

   #competencebonus[hero.child[kListen], -1]

Edit: sorry. Apparently I glossed over the original post. could be timing. Make sure you set that to something other than the default. Pre-Attributes / 1000 should work fine.

Also make sure there aren't other competence penalties being applied by other things as they won't stack. If it still won't work, please provide the data file and I'll take a look.
 
Last edited:
Back
Top