Lone Wolf Development Forums

Lone Wolf Development Forums (http://forums.wolflair.com/index.php)
-   HL - d20 System (http://forums.wolflair.com/forumdisplay.php?f=46)
-   -   Creating a penalty to a skill (http://forums.wolflair.com/showthread.php?t=67722)

saintaurik March 30th, 2023 10:00 AM

Creating a penalty to a skill
 
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?

Dami March 30th, 2023 10:53 PM

That macro has to be in the format:
#competencebonus[pick, bonus]

Without checking I'd say that should be:
#competencebonus[hero.child[kListen], -1]

saintaurik April 1st, 2023 12:27 PM

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?

Dami April 1st, 2023 05:07 PM

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.

Lord Magus April 2nd, 2023 03:56 AM

Timing of your script?

Sendric April 2nd, 2023 06:09 AM

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.


All times are GMT -8. The time now is 03:11 PM.

Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.