• 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

Improving witch hex

AndrewD2

Well-known member
Working on an item that does one of two things, it either grants the use of a specific witch hex, but if they already have it it adds +2 to the DC of the hex. Gaining the Hex is easy, I'm not sure what to check for increasing the DC on the hex.

Thanks,
Andrew
 
I was thinking using if (hero.childlives[XXXX]) but I believe it would always come up because of the ability being bootstrapped by the item, which would defeat the purpose of the bonus.
 
And on another note, if I bootstrap the special early my DCs don't work correctly, but if I move them later I get this:

Code:
Linkage pick 'table' not located for current context
Location: 'eval' script for Component 'BaseCustSp' (Eval Script '#1') near line 3
- - -
Linkage pick 'table' not located for current context
Location: 'eval' script for Component 'BaseCustSp' (Eval Script '#1') near line 4
- - -
Linkage pick 'table' not located for current context
Location: 'eval' script for Component 'BaseCustSp' (Eval Script '#1') near line 7
- - -
Linkage pick 'table' not located for current context
Location: 'eval' script for Component 'BaseCustSp' (Eval Script '#1') near line 10
- - -
Linkage pick 'table' not located for current context
Location: 'eval' script for Component 'BaseCustSp' (Eval Script '#1') near line 13
- - -
Linkage pick 'table' not located for current context
Location: 'eval' script for Component 'BaseCustSp' (Eval Script '#1') near line 14
- - -
Linkage pick 'table' not located for current context
Location: 'eval' script for Component 'BaseCustSp' (Eval Script '#1') near line 15
- - -
Linkage pick 'table' not located for current context
Location: 'eval' script for Component 'BaseCustSp' (Eval Script '#1') near line 18
- - -
Linkage pick 'table' not located for current context
Location: 'eval' script for Component 'BaseCustSp' (Eval Script '#1') near line 20
- - -
Linkage pick 'table' not located for current context
Location: 'field calculate' script for Field 'xTotalLev' near line 4
 
also to make what I'm doing easier to understand here's the item description:

The lesser version of this circlet grants a witch the use of the scar hex class feature once per day. If the witch already possesses the scar hex class feature she can maintain one additional scar, add +2 to the DC and add an additional +5 to the DC to remove this curse effect. The greater version does everything a lesser version can, and in addition, it grants the witch use of the retribution hex class feature once per day. If the witch already possesses the retribution hex class feature add +2 to its DC, increase its duration by one round, and add the witch’s class level the damage the hexed creature suffers. The superior version does everything a greater version can, and in addition, it grants the witch use of the death curse hex class feature once per day. If the witch already possess the death curse hex class feature add +2 to its DCs (Will and Fort), increase its range by 30 ft., and the subject suffers the damage even if it makes the first save.
 
Set it up that each item checks to see if the hex is present, and if so add +2 DC to that Hex. If it isn't present add the 1 use per day tags and field values to the item, along with the tag to show itself on the Specials tab. No need to bootstrap the hex from the item.
 
The other question now is what do I do for the ones that grant multiple hexes each with a 1/day usage?

Bootstrap Helper Abilities, each doing the same as the item, checking for their corresponding hex, and then responding appropriately. You could even just use Helper Abilities if you wanted to show the DC.
 
so I created an ability abCroneSca for the scar hex. I have this code on it:

Code:
  if (hero.childlives[cWitScar] <> 0) then
     hero.child[cWitScar].field[abDC].value += 2
endif

And I get this error:

Code:
Attempt to access non-existent parent pick for a top-level container from script
Location: 'eval' script for Component 'Ability' (Eval Script '#1') near line 5
- - -
Attempt to access non-existent parent pick for a top-level container from script
Location: 'eval' script for Component 'Ability' (Eval Script '#9') near line 30
- - -
Attempt to access 'focus' pick from script when no focus exists
Location: 'eval' script for Component 'Ability' (Eval Script '#9') near line 32

I'm not sure if there's something I have to do so that only works when the item is worn since doing gIsEquip looked on the ability and not on the piece of equipment it's bootstrapped to.
 
The code you've posted is three lines long, but the error messages you're receiving refer to lines 5, 30, and 32, spread over two different eval scripts - #1 and #9. We'll need to see the relevant code in order to help you fix your bugs.

Make sure you copy everything in those eval scripts - even the blank lines, so that we can count lines of code and find lines 5, 30, and 32.
 
That's the thing, I have no clue where those are coming from, I did post all the code from the eval script. I've never even used an eval script #9.
 
Which tab are you creating these things on?

What "Uniqueness" did you set?

What is bootstrapping what? From which tab to which tab?
 
Ok figured out the errors, I had "Item Power Helper" enabled since I thought what's what I was doing, but evidently is not. I disabled that and no longer get the error, but I am getting the bonus before the item is equipped. If I equip it the bonus goes away, unequip bonus stays gone and then re-equip the bonus comes back and works normal.

This is an ability being bootstrapped to a wonderous item. Uniqueness for both the item and the ability are set to "No".
 
I was using Aaron's suggestion of helper abilities. I'm using them because two versions of the item need multiple tracked resources.
 
I'll fully explain what I have. There are 3 items, lesser, greater and superior. They all either boost the DC of a hex by +2 or give a 1/day use of it if the character doesn't already have the hex. Lesser gives it to one hex (Scar), Greater gives it to two hexes (Scar, Retribution) and Superior gives it to 3 curses (Scar, Retribution, Superior). So I have 3 Abilities made (on the Ability tab), one for each hex. They are bootstrapped as appropriate to their corresponding items and set with a condition of fieldval:gIsEquip <> 0.

The code on each is:
Code:
field[abValue].value += round(#levelcount[Witch]/2, 0, -1) + 10 + #attrbonus[aINT]

  if (hero.childlives[cWitDeathC] <> 0) then
     hero.child[cWitDeathC].field[abDC].value += 2
  else
     perform assign[Helper.ShowSpec]
     perform assign[User.Tracker]
     field[livename].text &= " DC (" & field[abValue].value & ")"
endif

The only difference is which Witch hex they reference.

All seems to be working except sometimes when I equip the item the bonus doesn't appear, but then appears when unequiped.

There are no eval scripts on the individual items.

I hope that's a better explanation (now that I'm not typing on a tablet).
 
So I've tried another method and I'm putting the logic on the item and bootstrapping a trackers for the extra hexes, but for some reason, even if I have the "Show on Tracked Resource List?" unchecked, it still shows up.
 
Back
Top