Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - d20 System
Register FAQ Community Today's Posts Search

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
draco963
Member
 
Join Date: Jul 2015
Location: Ottawa
Posts: 58

Old December 13th, 2020, 12:14 PM
Ok I'll try to be clearer about the field[value] thing.

The way the Legacy items work, they reference the increment count of the Legacy adjustment. So, each Legacy item uses the code:
Code:
foreach pick in hero from BaseInPlay where "thingid.pRM_LgcyRitsWndr"
  if (eachpick.field[pChosen].chosen.tagis[thingid.ioRMAssHnd]<>0) then
    field[Value].value = eachpick.field[pAdjust].value
  endif
nexteach
The thingid's change for each Legacy item, based on if it's armour, weapon, or wondrous item, but the functionality is the same. to count the increment of the Adjustment for the individual Legacy item. That count is then "found", or maybe "assigned" is the better term, in each subsequent script for the Legacy item (most have over a dozen scripts by level 20), using this:
Code:
Rit = field[Value].value
So, for one item in particular, the Assassin's Hands, the plan is for them to increase the Sneak Attack dice. So, to do that, I searched how Sneak Attack works, and found this script:
Code:
hero.child[xSneakAtt].field[Value].value
So, I figure this following code should work to increase the Sneak Attack dice count:
Code:
hero.child[xSneakAtt].field[Value].value = hero.child[xSneakAtt].field[Value].value + 1
But, my concern was that the command to increase the SneakAttack value is nested under an If statement, which checks that Rit value assigned above. So, the whole thing looks like this:
Code:
var HD as number
HD = hero.tagcount[Hero.HitDice]
var Rit as number
Rit = field[Value].value

    if (HD >= 18) then
        if (Rit >= 3) then
            hero.child[xSneakAtt].field[Value].value = hero.child[xSneakAtt].field[Value].value + 4
        elseif (Rit >= 2) then
            hero.child[xSneakAtt].field[Value].value = hero.child[xSneakAtt].field[Value].value + 3
        elseif (Rit >= 1) then
            hero.child[xSneakAtt].field[Value].value = hero.child[xSneakAtt].field[Value].value + 1
        endif
    elseif (HD >= 14) then
        if (Rit >= 2) then
            hero.child[xSneakAtt].field[Value].value = hero.child[xSneakAtt].field[Value].value + 3
        elseif (Rit >= 1) then
            hero.child[xSneakAtt].field[Value].value = hero.child[xSneakAtt].field[Value].value + 1
        endif
    elseif (HD >= 11) then
        if (Rit >= 2) then
            hero.child[xSneakAtt].field[Value].value = hero.child[xSneakAtt].field[Value].value + 2
        elseif (Rit >= 1) then
            hero.child[xSneakAtt].field[Value].value = hero.child[xSneakAtt].field[Value].value + 1
        endif
    elseif (HD >= 9) then
        if (Rit >= 1) then
            hero.child[xSneakAtt].field[Value].value = hero.child[xSneakAtt].field[Value].value + 1
        endif
    endif
As you can see, in that long chunk above, there are two entirely separate things, The Ritual count and the Sneak Attack dice count, both referenced as "field[Value].value", which in my brain, breaks.

So, I finally tested it just now , and it does appear to work. But I truly do not understand why...

As for the ShowMenu drop-down list for Legacy Wondrous items:
I'm confused how/why this script is working also. In the Editor, the actual ShowMenu selection for the Wondrous Items Legacy Adjustment is currently set to "Current Armor". When I use the script you sent me, it nevertheless shows only the Magic Items on the Hero. I changed it to check BaseWonder instead, and now it shows only Assassin's Hands. This is great! Fantastic, wunderbar! But, is there any way to add a different entry to the ShowMenu list itself? I think I understand what the script is doing (replacing the selected drop-down list with the scripted one), but if I add a new tag to the ShowMenu drop-down in the Editor, the script breaks, and shows me every wondrous item, instead of those only on my hero. How can I build a new ShowMenu slection?

Thank you Sendric! I really appreciate the help and your explanations!
draco963 is offline   #11 Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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