PDA

View Full Version : Looking for assistance in finding out why Low-Light vision is not added to my char.



Elaith
July 24th, 2020, 17:03
Hello All,

I just noticed the other day that when I drag a race onto my character sheet that has 'Low-light Vision' - it is not automatically added to the "Senses" area for a pathfinder character sheet. If I change the wording in the race file to Lowlight Vision - this shows up just fine.

I did a search of the files and found the following in: 3.5 - manager_char.lua

RACIAL_TRAIT_LOWLIGHTVISION = "^low-light vision$";

elseif sTraitType:match(RACIAL_TRAIT_DARKVISION) or
sTraitType:match(RACIAL_TRAIT_LOWLIGHTVISION) or
sTraitType:match(RACIAL_TRAIT_SUPERIORDARKVISION) then
handleRacialVision(nodeChar, nodeSource);

So by the look of it, it should properly recognize "Low-light Vision".

I checked handleRacialVision, and I did not see anything that stood out there either.

Can anyone offer a suggestion as to where the problem might lie? Or if I am looking in the wrong spot.

I even did a search for possible entries for "senses" but that did not bring up anything useful.

Note: For the record this does correctly add it to the racial traits section, just not the "senses" line on the main tab.

Thanks,

-Elaith

Moon Wizard
July 24th, 2020, 17:08
The issue is that the "-" character is actually a special character in Lua expressions. It looks like the regular expression needs to be adjusted. Maybe "^low%-?light vision$" might work off the top of my head.

JPG

Elaith
July 24th, 2020, 17:11
Oh man, I should have thought of that. That worked wonders. Thank you very much. Just trying to find out how Lua ticks.

Moon Wizard
July 24th, 2020, 17:14
Yeah, just tested that pattern; and it appears to work for lowlight with or without the dash. I'll add it to ongoing maintenance fixes to come.

Regards,
JPG

Elaith
July 24th, 2020, 17:18
I appreciate the assistance Moon Wizard. And for adding it to list to be fixed.