DICE PACKS BUNDLE
  1. #1

    [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.
    Last edited by Lonewolf; January 30th, 2024 at 16:14.
    Ultimate License holder.
    Over 10 years on Fantasy Grounds !

  2. #2
    It looks like the work around has also broken now. Only [VISION: lowlightvision] can be used. All other vision types no longer work and Darksight Power effects are also busted. The only option now is to manually apply a choice of three vision types available from map tools when adding tokens to the map.
    Ultimate License holder.
    Over 10 years on Fantasy Grounds !

  3. #3
    I just pushed a hot fix that I believe addresses the issue. (at least the small cat example is being processed correctly as far as I can tell, but not familiar with specific coding)

    Looking at the fix needed and the code changes over the last year or so, I didn't see any overlap in that function; so I'm not sure how much it worked before or what triggered the change.

    Regards,
    JPG

  4. #4

    Join Date
    Sep 2020
    Location
    Ballston Lake, NY
    Posts
    600
    Thank you Moon Wizard!
    It's working for me. I tested darksight, night vision, and low light vision with CT effects, items, and abilities.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
FG Spreadshirt Swag

Log in

Log in