• 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

Help with appending text to Darkvision

dungeonguru

Well-known member
Could use some help figuring this one out.

In some of the new materials, warlocks with Devil's Sight get the ability to see in magical darkness and the statblock reads:

Senses darkvision 120 ft. (penetrates magical darkness)

I've been able to figure out darkvision regenerates its name string at Render 10000, so I put the following in Render 15000 and it works everywhere but on the Race tab under Racial Abilities (although hitting the ? button shows correct as does the printing).

Code:
hero.child[raDarkVis].field[livename].text = replace(hero.child[raDarkVis].field[livename].text, ")", ", penetrates magical darkness)", 1)
hero.child[raDarkVis].field[sbName].text &= " (penetrates magical darkness)"
hero.child[raDarkVis].field[shortname].text &= " (penetrates magical darkness)"

Is there a way to change what displays under the race tab? Specifically, I'm thinking of changing the livename to "Darkvision (penetrates magical darkness)" somewhere earlier than Render 10000, then set it back to "Darkvision" before the script in raDarkVis runs at Render 10000 but that seems really clunky. Any thoughts or am I missing something?
 
Pretty sure that section of the UI pulls the name from field[thingname].text not the livename field. Meaning it can't be changes via scripts.

If you really want to make that change you can affect a Things name but remember this actually changes the Things name not the pick.

Code:
perform state.thing[raDarkVis].amendthing[name,"Darkvision (penetrates magical darkness)"]
This does mean that is the Things new name meaning you will end up with "darkvision (penetrates magical darkness) 120 ft." displayed.

I don't honestly recommend it as it can really mess with most scripts "assumptions" of what Darkvision name is.

Last thing is if you wanted to add more "text" for what Penetrates magical dankness does you can add text to "DescAppend" field on the Pick.

Code:
hero.childfound[raDarkVis].field[shortname].text &= "{b}Penetrates Magical Darkness:{/b} Blah blah blah blah"

Last tip is I would change all those "hero.child[]" to "hero.childfound[]" just encase the script runs on a character without darkvision you won't toss a whole bunch of errors.
 
Thanks for the tips on child vs. childfound. I hadn't thought of the case of adding another source of darkvision to the monsters but anything is possible.

I tried to make a copy of Darkvision but LW has some references to a "Darkvis sortas" that doesn't copy over and I'm not sure how that is defined or if I really want to keep barking up that tree given diminishing return on investment at this point.
 
Back
Top