[BUG] Token Vision is not automatically applied by special ability
In the SWADE ruleset without any extensions loaded. When a Small Cat NPC is placed on the map. It does not get token vision automatically applied.
There are two possible solutions to fix this problem.
1. Find and fix where the code broke.
2. Manually go through and rewrite the all the NPC sheets and Special Abilities that affect the token vision. To get around the problem.
I am willing to do option 2 but someone needs to look at the code first. There is a danger I will make things worse. We may need to pay off some technical debt first.
First let’s look at how token lights used to be created:
Adding the Low Light Vision ability would automatically apply the vision. The script manager_vision_sw.lua has updateSenses function used to do this.
To demonstrate how it is supposed to work. Place a F15 Eagle vehicle on the map and notice that it automatically gets token vision – green night vision added as soon as the token is placed. The SWADE function also checks if the night vision vehicle modification is present and applies the correct vision.
I suspect this is very different to how coreRPG does it. The basic setup in gameelements.xml doesn’t seem to be getting used either. Also note that in map tools there are only three vision types available. Yet in both manager_vision_sw.lua and gameelements.xml there are four.
So what is wrong here? Why does the small cat not automatically get low light vision?
I can fix this by using the standard coreRPG command syntax [VISION: lowlightvision] into the description text of the low light vision ability. Simply adding that to the NPC ability will ensure that token vision is automatically applied. However, it has not been needed in the past.
It is a solution but one that I am not willing risk without someone else investigating why things have changed. Note this does affect any rules set using a SWADE layer. Like Savage Pathfinder. Savage Doswelk would have manually make the same changes for every NPC and ability in Pathfinder.