Lone Wolf Development Forums

Lone Wolf Development Forums (http://forums.wolflair.com/index.php)
-   HL - Pathfinder Roleplaying Game (http://forums.wolflair.com/forumdisplay.php?f=62)
-   -   Removing Darkvision (http://forums.wolflair.com/showthread.php?t=17680)

Pezmerga February 10th, 2012 07:50 AM

Removing Darkvision
 
I have a flaw that removes Darkvision and replaces it with Low-light.

Code:

First 510
perform hero.childfound[raDarkVis].delete[Helper.ShowSpec]
perform hero.childfound[raDarkVis].assign[Helper.SpcDisable]

perform hero.delete[thingid.raDarkVis] Doesn't work either

 if (hero.picklives[raDarkVis] <> 0) then
hero.child[raDarkVis].field[abValue].value = 0 ~Makes it so deepsight isn't a valid feat.
  endif

This Greys it out, but it doesn't actually remove it as far as feat requirements go. Night Stalker is still a valid feat for instance.

How do I actually remove it so that feats requiring Darkvision don't validate? I see the alternate racial abilities uses RaReplace, but I can't get it to work.


edit: tried perform hero.childfound[raDarkVis].delete[HasAbility.raDarkVis], which makes it so character doesn't qualify for flaw.

Code:

#hasability[raDarkVis] <= @ispick
is on Aspect of the Beast (Night Senses - Darkvision 30').

and

Code:

#hasability[raDarkVis] <> 0
is for Night Stalker.

As I said, perform hero.childfound[raDarkVis].delete[HasAbility.raDarkVis] makes the flaw invalid.

Also I just bootstrapped Low-Light vision, but I wouldn't mind an example of how to assign it in code either if anyone knows. Cuz
Code:

perform hero.assign[HasAbility.raLowLight]
doesn't work.

Pezmerga February 10th, 2012 08:41 AM

I used
Code:

validif (hero.picklives[raDarkVis] <> 0)
as a prereq. Keeps flaw valid, and
Code:

First 510
 if (hero.picklives[raDarkVis] <> 0) then
perform hero.childfound[raDarkVis].delete[Helper.ShowSpec]
perform hero.childfound[raDarkVis].assign[Helper.SpcDisable]
perform hero.childfound[raDarkVis].delete[HasAbility.raDarkVis]
hero.child[raDarkVis].field[abValue].value = 0
  endif

Disables it and makes it so feats don't validate for Darkvision! The only hiccup is if you get something else that would grant dark vision, like a magic item.... So if there is another way to do this, which would allow a magic item or something to regrant the ability, I'd love to hear it!

Now I just hope someone can tell me how to add something like Low-Light vision in an eval script. Just thought it'd be good to know.

Kendall-DM February 10th, 2012 11:03 AM

At least in the d20 files, having a value of 0 in the Value field of a special ability turns it off. So in the case above, if you just set the darkvision abValue to 0, I think that will turn it off. If something later comes along and adds something to abValue (such as from a magic item), it should then reappear. At least that is how it works in the d20 files with the Value field. Someone can correct me if I'm wrong regarding PF files.

Santok1972 May 30th, 2022 11:41 AM

Quote:

Now I just hope someone can tell me how to add something like Low-Light vision in an eval script. Just thought it'd be good to know.
Is there a way to do something like that?

ploturo June 1st, 2022 04:33 PM

Quote:

Originally Posted by Santok1972 (Post 299161)
Is there a way to do something like that?

You can't add picks from an eval script, only from UI elements like tables and actions.

The suggested way to add optional picks associated with another pick is to bootstrap all the optional picks so that they are always added with the original pick, and just change whether or not they are live using bootstrap conditions.

Hero Lab Scripting 401: Bootstrap Conditions http://forums.wolflair.com/showthread.php?t=47611


All times are GMT -8. The time now is 02:19 AM.

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