• 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

darkvision question

jjashley

Well-known member
Is there a way to stack dark vision and have it reflect that in hero lab? Example would be a bugbear wearing a blue dragon mask. While wearing the mask he should have dark vision out to 120 feet.

Joe
 
Yes.

You have to bootstrap darkvision on the Blue Dragon Mask. On the field values you need to have two fields:

#1 - abValue with value 60
#2 - abValue2 with value 60

The way darkvision is calculated is that it loops through all bootstrapped Darkvision sources and sets the base range to the largest abValue. It then loops through all the abValue2 values and adds them to extend the ranges. If an thing has both, It only applies the abValue2 if there is another source of darkvision (it doesn't add both for the mask for a human for instance).

I think the dragon masks don't have any darkvision bootstraps, so these probably need to be added, you might want to open a ticket over on the community github to fix the dragon masks.
 
Last edited:
Yes.

You have to bootstrap darkvision on the Blue Dragon Mask. On the field values you need to have two fields:

#1 - abValue with value 60
#2 - abValue2 with value 60

The way darkvision is calculated is that it loops through all bootstrapped Darkvision sources and sets the base range to the largest abValue. It then loops through all the abValue2 values and adds them to extend the ranges. If an thing has both, It only applies the abValue2 if there is another source of darkvision (it doesn't add both for the mask for a human for instance).

I think the dragon masks don't have any darkvision bootstraps, so these probably need to be added, you might want to open a ticket over on the community github to fix the dragon masks.

ok the blue dragon mask does, at least in one of my packages. I didn't think about it working that way but makes perfect sense. Thank you very much for the reply.

J
 
ok another question. if I don't have Dark Vision as a racial ability but receive it thru a class ability where it is boot strapped, then get a potion or spell cast on me that adds to the Dark Vision, it doesn't seem to be adding just abValue at this point, it seems to add both abValue and abValue2. My example is Dark Velocity ability from the Blood Hunter that is up on the Beyond site, you then get a mutagen called Nighteye that you can make permanent at level 18. Darkvelocity gives you dark vision 30, and nighteye gives you 60 or an additional 60 if you already have darkvision. the result I'm seeing in Hero Lab is 150 feet, I believe the abValue 60 taking over as the higher value, but then for some reason it is adding the abValue2 from each of those 2 things. I have bootstrapped as you indicated here, thought I do have conditions on the bootstraps, one is a level condition and the other is a condition based on user choice, both of the conditions seem to function correctly.

J
 
Yeah, never ran into that issue before but I can see what's happening.

I've tried looking deeper in a copy of Darkvision and there's a few lines that go:

Code:
        ~ If we've found a copy other than ourselves, then add the abValue2
        ~ field from that copy to our own abValue2 field.
        if (eachpick.uniqindex <> uniqindex) then
          field[abValue2].value += eachpick.field[abValue2].value
          endif

So after it runs on Dark Velocity dark velocities darkvision totals are:
abValue = 60
abValue2 = 60 + 30 = 90

When the code runs on Nighteye
abValue = 30
abValue2 = 30 + 60 = 90

Then due to timing on the darkvision scripts we calculate distance, which I missed the first time.

So highest abValue plus abValue2 is 150 rather than the 120 you expected.

I'm thinking that items that extend darkvision might need to have a line of script that runs and checks to see if the character has darkvision before assigning an abValue2 number.

The hero tag [Hero.HasDarkVis] gets assigned in First/5000, but the calculations for distance occur in Final/10000. So I think just add some code that runs maybe in pre-levels that checks for the tag and if the tag is there, add an abValue2 to the darkvision that's bootstrapped to the ability... Would take some playing around to get it right...

Maybe ShadowChemosh or a dev wants to chime in and make sure I got the logic right this time? Actually I don't think that would work necessarily either, but just trying to figure it out...
 
Last edited:
Yeah, never ran into that issue before but I can see what's happening.

I've tried looking deeper in a copy of Darkvision and there's a few lines that go:

Code:
        ~ If we've found a copy other than ourselves, then add the abValue2
        ~ field from that copy to our own abValue2 field.
        if (eachpick.uniqindex <> uniqindex) then
          field[abValue2].value += eachpick.field[abValue2].value
          endif

So after it runs on Dark Velocity dark velocities darkvision totals are:
abValue = 60
abValue2 = 60 + 30 = 90

When the code runs on Nighteye
abValue = 30
abValue2 = 30 + 60 = 90

Then due to timing on the darkvision scripts we calculate distance, which I missed the first time.

So highest abValue plus abValue2 is 150 rather than the 120 you expected.

I'm thinking that items that extend darkvision might need to have a line of script that runs and checks to see if the character has darkvision before assigning an abValue2 number.

The hero tag [Hero.HasDarkVis] gets assigned in First/5000, but the calculations for distance occur in Final/10000. So I think just add some code that runs maybe in pre-levels that checks for the tag and if the tag is there, add an abValue2 to the darkvision that's bootstrapped to the ability... Would take some playing around to get it right...

Maybe ShadowChemosh or a dev wants to chime in and make sure I got the logic right this time? Actually I don't think that would work necessarily either, but just trying to figure it out...

Is all good, when I get back home I'll do some toying around as well.
 
Back
Top