PDA

View Full Version : 5E Vision and Sunlight Sensitivity



ScriedRaven
June 18th, 2020, 03:15
Intended for use with Aura Effects (https://www.fantasygrounds.com/forums/showthread.php?57417-5E-Aura-Effects), but it can be used separately.

This adds effects for Darkness (spell), Dark (nonmagical darkness), Darkvision, Devils Sight, Light, Sunlight, andSunlight sensitivity. In the extension is a readme with examples of how the effects should look.

Additionally there a module with NPCs with traits listing the effects needed for the auras, and all the different effects in the window.

Updates:
06/18/20 V1.1: Added Dimlight, and Dangersense
06/20/20 Compatibility with Reliable Talent Added
06/24/20 V1.2: Added See Invisibility, Blindsight and Truesight now see through Dark and Darkness
07/11/20 Compatibility with 5E Combat Enhancer and Pack Tactics
02/25/21 FG Update
03/19/21 V2.0 Complete revamp for compatibility, removed Blindsight, Truesight, Blur, Dangersense, and Dimlight

vaughnlannister
June 18th, 2020, 08:33
Nice :)!!!

Three of Swords
June 18th, 2020, 12:32
This has a lot of potential. Thanks!

eriktedesco
June 18th, 2020, 17:43
Hi ScriedRaven, could your extension be used as a complement to Kent one or as a substitute?

Tanks a lot for your hard work!

ScriedRaven
June 18th, 2020, 18:17
Hi ScriedRaven, could your extension be used as a complement to Kent one or as a substitute?

Tanks a lot for your hard work!

It's an expansion on his, so substitute. It still has Blindsight and Truesight, but I expanded their functionality to include the vision effects.

Zacchaeus
June 18th, 2020, 19:46
Did you get permission to use Kent's code? I don't see anything in the extension which indicates you did.

kentmccullough
June 18th, 2020, 20:45
Awesome @ScriedRaven! Yes @Zacchaeus he did.

eriktedesco
June 18th, 2020, 20:48
Awesome @ScriedRaven! Yes @Zacchaeus he did.

Really nice job, both Kent and ScriedRaven!

Zacchaeus
June 18th, 2020, 22:18
Awesome @ScriedRaven! Yes @Zacchaeus he did.

Jolly Good.

ScriedRaven
June 19th, 2020, 00:27
Update: Added Dimlight and Dangersense. Also a module with the coding information

PiP
June 23rd, 2020, 00:02
It's an expansion on his, so substitute. It still has Blindsight and Truesight, but I expanded their functionality to include the vision effects.

Good Evening, very nice extension! Thankyou very much

There is one minor problem, It appears that the "Blindsight;" and "Truesight;" are not overcoming the "dark" and "darkness" effects.... The "Devils sight" effect are overcoming the "dark" anda "darkness" effects as intented

ScriedRaven
June 23rd, 2020, 00:29
There is one minor problem, It appears that the "Blindsight;" and "Truesight;" are not overcoming the "dark" and "darkness" effects.... The "Devils sight" effect are overcoming the "dark" and "darkness" effects as intented

I know I went back and forth on this, but their ability to overcome those are based on their radius which can be small enough to not be needed for this., with rogues getting a blindsight type ability of like 10 ft, which isn't going to cover much. I'll probably add a "See invisibility" effect, and go ahead and make the other two overwrite Dark and Darkness as well.

PiP
June 23rd, 2020, 04:47
I know I went back and forth on this, but their ability to overcome those are based on their radius which can be small enough to not be needed for this., with rogues getting a blindsight type ability of like 10 ft, which isn't going to cover much. I'll probably add a "See invisibility" effect, and go ahead and make the other two overwrite Dark and Darkness as well.

Thanks for your reply and for the extension! I apreciate it a lot! For now i will use the Devils sight effect insteado of truesight to overcome dark and darkness.

WinterSoldier7
June 23rd, 2020, 10:24
As a noob, I need this watering down, sorry; I like the sound of it but not sure exactly what it does and how it could benefit me. Can anyone explain it to me like I'm 5?

ScriedRaven
June 24th, 2020, 13:48
Thanks for your reply and for the extension! I appreciate it a lot! For now i will use the Devils sight effect instead of truesight to overcome dark and darkness.

It's been updated. Turns out that I actually had decided to give it to them by default, I just messed up the coding.


As a noob, I need this watering down, sorry; I like the sound of it but not sure exactly what it does and how it could benefit me. Can anyone explain it to me like I'm 5?

It just adds different names for the blinded effect, and effects that ignore the different effects. It's not going to be something every campaign needs, but it's nice to have.

matjam
June 30th, 2020, 22:12
del

vaughnlannister
July 1st, 2020, 13:10
Hey, I'm also slightly puzzled what this extension does? In the mod there were also NPCs with effects? Would be really helpful if you could take a screenshot of what it does?

Thanks!

vaughnlannister
July 1st, 2020, 13:15
Ok I found the readme, but what are the NPCs in the module for?

ScriedRaven
July 1st, 2020, 14:29
They're for if you use Advanced Effects extension, drop one on the ct, then onto the map and the aura will automatically appear.

vaughnlannister
July 1st, 2020, 18:23
Oh I see, there for Paladin's Aura, get it now.

shoits
July 6th, 2020, 07:29
Hey, nice extension! I found one incompatibility between this extension and the Combat Enhancer for 5e, and since the coder for the latter has already established he will not further develop the extension, I´d be nice to inform you. Basically, while running both extensions, some features of the combat enhancer cannot be used (such as flanking and automatic range attacks). I know nothing about coding, so I´m not sure if it's his extension or your that´s causing the problem, but I´m just letting you know.

LordEntrails
July 6th, 2020, 17:14
@ScriedRAven,
I am starting to ask all community developers to consider making an explicit licensing statement on their work. It helps future community developers honor your wishes in regards to your work. Their is a discussion and some suggested licensing statements here; On Licensing & Distributing Community Content (https://www.fantasygrounds.com/forums/showthread.php?53781-On-Licensing-Distribution-of-Community-Content). Thanks for your contribution and considering adding a licensing statement to your original post :)

Note, I know you had permission from Kent to build off his code, so please check with him so you don't accidentally release his work in a way he does not wish. Thanks!

Saiki Kusuo
July 8th, 2020, 20:57
Hello,
I am unable to get the darkness, dark and dimlight effects working. The others that I tried that do work are truesight and blur so I at least know the extension is installed and partially working. I am using FGC without the combat enhancer. Has anyone else had issues with the dark or darkness effects not working? Thanks!

ScriedRaven
July 9th, 2020, 01:01
Hey, nice extension! I found one incompatibility between this extension and the Combat Enhancer for 5e, and since the coder for the latter has already established he will not further develop the extension, I´d be nice to inform you. Basically, while running both extensions, some features of the combat enhancer cannot be used (such as flanking and automatic range attacks). I know nothing about coding, so I´m not sure if it's his extension or your that´s causing the problem, but I´m just letting you know.

They both try to modify the same file, I'd have to redo this completely from scratch. Which I might do, but that'll take some time. In the short term if you want to use both then you can copy the code from mine about whatever effects you want, and paste them into his (the main file you'd need to change is manager_action_attack)


@ScriedRAven,
I am starting to ask all community developers to consider making an explicit licensing statement on their work. It helps future community developers honor your wishes in regards to your work. Their is a discussion and some suggested licensing statements here; On Licensing & Distributing Community Content (https://www.fantasygrounds.com/forums/showthread.php?53781-On-Licensing-Distribution-of-Community-Content). Thanks for your contribution and considering adding a licensing statement to your original post :)

Note, I know you had permission from Kent to build off his code, so please check with him so you don't accidentally release his work in a way he does not wish. Thanks!

I'll ask him, but personally I don't really care what people do with it.


Hello,
I am unable to get the darkness, dark and dimlight effects working. The others that I tried that do work are truesight and blur so I at least know the extension is installed and partially working. I am using FGC without the combat enhancer. Has anyone else had issues with the dark or darkness effects not working? Thanks!

Are you using any other extensions?

Saiki Kusuo
July 9th, 2020, 02:37
Are you using any other extensions?

Nearly all of Kent's extensions, and DiabloBob's extensions from the DMsguild. So I ended up turning everything off/on one at a time and found out that if either Kent's Automatic Flanking/Range OR Kent's Automatic Pack Tactics is on the darkness, dark effects do not work. Truesight and blur seem to work regardless however. So in order to get Darkness working I have to turn both the flanking/range and pact tactics extensions off. :-(

ScriedRaven
July 12th, 2020, 02:53
I figured it out. I had to add them to the effects list, which overfills the effects window, but it works now with Combat Enhancer Classic, and Pack Tactics. Presumably with Flanking and Range too.

Saiki Kusuo
July 13th, 2020, 01:54
I figured it out. I had to add them to the effects list, which overfills the effects window, but it works now with Combat Enhancer Classic, and Pack Tactics. Presumably with Flanking and Range too.

hmm even with both pack tactics & flanking ranged turned off the extension seems to have broken for me compared to the previous version. Essentially the advantage part works (if an enemy is in darkness but the PC is not the PC get advantage). But if the PC is in darkness the the enemy is not the PC is not rolling with disadvantage. The PC just does a normal roll. If both the PC and enemy (each does not have dark vision) were in dark or darkness they each roll advantage against each other instead of a straight roll. So in summary I am unable to get the disadvantage part working with the latest version. Not sure what else could be going on. :-( The previous version still works great though as long as I keep pack tactics and flanking off so I will just stick with that for now. Thanks for putting in the effort to troubleshoot would could be going on with me though. Were you able to get the disadvantage working on your end where if someone was in darkness they were rolling with disadvantage?

mordkhaan
October 24th, 2020, 22:27
With Sunlight Sensitivity, how do you indicate to the FG that its now sunny and so all those with Sunlight Sensitivity effect on them get DISADV or take damage or whatever?

ScriedRaven
October 28th, 2020, 15:34
With Sunlight Sensitivity, how do you indicate to the FG that its now sunny and so all those with Sunlight Sensitivity effect on them get DISADV or take damage or whatever?

You add an effect to the character labeled sunlight

nephranka
October 30th, 2020, 11:04
hmm even with both pack tactics & flanking ranged turned off the extension seems to have broken for me compared to the previous version. Essentially the advantage part works (if an enemy is in darkness but the PC is not the PC get advantage). But if the PC is in darkness the the enemy is not the PC is not rolling with disadvantage. The PC just does a normal roll. If both the PC and enemy (each does not have dark vision) were in dark or darkness they each roll advantage against each other instead of a straight roll. So in summary I am unable to get the disadvantage part working with the latest version. Not sure what else could be going on. :-( The previous version still works great though as long as I keep pack tactics and flanking off so I will just stick with that for now. Thanks for putting in the effort to troubleshoot would could be going on with me though. Were you able to get the disadvantage working on your end where if someone was in darkness they were rolling with disadvantage?

That is the same issue I am having. Additionally, when a pc is invisible and the other has see invisible the see invisible pc is not disadvantaged when attacking but the invisible pc still gets advantage while attacking.

mordkhaan
October 30th, 2020, 23:28
You add an effect to the character labeled sunlight

Right, seems I have another ext/mod that is interfering, just tested with only your ext/mod and working fine now thanks
Any chance of also adding Sunlight Hypersensitivity as per Vampires?
The vampire takes 20 radiant damage when it starts its turn in sunlight. While in sunlight, it has disadvantage on Attack rolls and Ability Checks.

mordkhaan
October 30th, 2020, 23:45
FYI, found conflicting extension, Automatic Pack tactics 1.7 it seems40614

ScriedRaven
November 2nd, 2020, 14:26
Right, seems I have another ext/mod that is interfering, just tested with only your ext/mod and working fine now thanks
Any chance of also adding Sunlight Hypersensitivity as per Vampires?
The vampire takes 20 radiant damage when it starts its turn in sunlight. While in sunlight, it has disadvantage on Attack rolls and Ability Checks.

I was looking into that, as well a couple other things, but I hit a roadblock. I'm still planning on it, but I haven't been feeling well these past couple months and haven't been able to do much.

Bonkon
November 2nd, 2020, 17:42
Good Day ScriedRaven :)
I hope you feel better soon :)

mordkhaan
November 2nd, 2020, 17:58
I was looking into that, as well a couple other things, but I hit a roadblock. I'm still planning on it, but I haven't been feeling well these past couple months and haven't been able to do much.

All good, take the time to be better of course!

Broken.Arrow
February 17th, 2021, 05:35
I don't see any recent postings so I hope this extension is still supported. I am getting the following error at load time with the Vision extension enabled.
[ERROR] Script execution error: [string "scripts/manager_actor2_vision.lua"]:7: attempt to index global 'ActorManager2' (a nil value)
Testing Conditions:
FGU v4.0.10 Ultimate (2021-02-04)
FGU update performed 2021-02-16
Build Channel: Live
Server Type: Cloud
Server List: Public
Extensions: 5E - Vision v1.3
Rulesets Used:
D&D 5e ruleset v3.3.12
Core RPG ruleset v.3.3.12A

Update: As of the latest FGU update "ActorManager2" no longer exists. All extensions using this will need to be updated to account for this change.

Fantasy Grounds\Extensions\5E - Vision\extension.xml (1 hit)
Line 19: <script name="ActorManager2VIS" file="scripts/manager_actor2_vision.lua" />
Fantasy Grounds\Extensions\5E - Vision\scripts\manager_action_attack_vision.lua (2 hits)
Line 168: local nBonusStat, nBonusEffects = ActorManager2.getAbilityEffectsBonus(rSource, sActionStat);
Line 226: local bDefADV, bDefDIS = ActorManager2.getDefenseAdvantage(rSource, rTarget, aAttackFilter);
Fantasy Grounds\Extensions\5E - Vision\scripts\manager_action_save_vision.lua (7 hits)
Line 126: local nMod, bADV, bDIS, sAddText = ActorManager2.getSave(rActor, sSave);
Line 326: local nBonusStat, nBonusEffects = ActorManager2.getAbilityEffectsBonus(rSource, sSaveAbility);
Line 503: local nMod, bADV, bDIS, sAddText = ActorManager2.getSave(rActor, "constitution");
Line 681: if ActorManager2.getPercentWounded(rSource) >= 1 then
Line 685: local _,sOriginalStatus = ActorManager2.getPercentWounded(rSource);
Line 757: local _,sNewStatus = ActorManager2.getPercentWounded(rSource);
Line 840: local nMod, bADV, bDIS, sAddText = ActorManager2.getSave(rActor, "constitution");
Fantasy Grounds\Extensions\5E - Vision\scripts\manager_action_skill_vision.lua (3 hits)
Line 72: local nMod, bADV, bDIS, sAddText = ActorManager2.getCheck(rActor, sAbility:lower(), sSkill);
Line 122: nMod, bADV, bDIS, sAddText = ActorManager2.getCheck(rActor, sAbility, sSkill);
Line 268: local nBonusStat, nBonusEffects = ActorManager2.getAbilityEffectsBonus(rSource, sAbility);
Fantasy Grounds\Extensions\5E - Vision\scripts\manager_actor2_vision.lua (4 hits)
Line 7: ActorManager2.getDefenseAdvantage = getDefenseAdvantage;
Line 8: ActorManager2.getDefenseValue = getDefenseValue;
Line 157: nDefenseStatMod = ActorManager2.getAbilityBonus(rDefender, sDefenseStat);
Line 187: nBonusStat = ActorManager2.getAbilityEffectsBonus(rDefender, sDefenseStat);

MasterZamna
February 21st, 2021, 22:18
Actualy editing the scripts\manager_actor2_vision.lua and changeing all instances of ActorManager2 for ActorManager5E should do the trick, it worked in other one, seems with the systems updates they changed the name of that variable.

Edit, actually in all 4 scripts should be changed I think.

Broken.Arrow
February 22nd, 2021, 13:13
Thanks for the assist. Modifying the instances worked. You wouldn't by chance know a quick fix for this error:

[ERROR] Script execution error: [string "scripts/manager_action_save_vision.lua"]:681: attempt to call field 'getPercentWounded' (a nil value)

It appears when the character drops to 0 hp.

ScriedRaven
February 23rd, 2021, 18:10
Actualy editing the scripts\manager_actor2_vision.lua and changeing all instances of ActorManager2 for ActorManager5E should do the trick, it worked in other one, seems with the systems updates they changed the name of that variable.

Edit, actually in all 4 scripts should be changed I think.

Thanks, I've been a bit busy the past while, so I haven't had time to look into what the update changed. I'll try and update the extension when I can

ScriedRaven
February 25th, 2021, 19:52
Thanks for the assist. Modifying the instances worked. You wouldn't by chance know a quick fix for this error:

[ERROR] Script execution error: [string "scripts/manager_action_save_vision.lua"]:681: attempt to call field 'getPercentWounded' (a nil value)

It appears when the character drops to 0 hp.

I fixed this in the new version, but what happened is they changed "getPercentWounded" to "getWoundPercent".

Megaprr
February 26th, 2021, 16:58
Hmmmm I seem to be having a similar issue today.

[2/26/2021 10:35:40 AM] [ERROR] Script execution error: [string "scripts/manager_actor5E_vision.lua"]:7: attempt to index global 'ActorManager5E' (a nil value)
[2/26/2021 10:35:40 AM] [ERROR] Script execution error: [string "scripts/manager_hp.lua"]:286: attempt to index global 'ActorManager5E' (a nil value)

That second one was from another extension that has the same issue I think, as I tried it on the 5e sample campaign with just this extension enabled and just got this one:

[2/26/2021 10:50:10 AM] [ERROR] Script execution error: [string "scripts/manager_actor5E_vision.lua"]:7: attempt to index global 'ActorManager5E' (a nil value)

Testing conditions for the sample campaign are:
FGU v4.0.10 Ultimate (2021-02-04)
Build Channel: Live
Server Type: Private LAN
Extensions: 5E - Vision v1.3, Theme: Wood
Rulesets Used:
D&D 5e ruleset v3.3.12
Core RPG ruleset v.3.3.12A

ScriedRaven
February 26th, 2021, 18:22
Hmmmm I seem to be having a similar issue today.

[2/26/2021 10:50:10 AM] [ERROR] Script execution error: [string "scripts/manager_actor5E_vision.lua"]:7: attempt to index global 'ActorManager5E' (a nil value)

Testing conditions for the sample campaign are:
FGU v4.0.10 Ultimate (2021-02-04)
Build Channel: Live
Server Type: Private LAN
Extensions: 5E - Vision v1.3, Theme: Wood
Rulesets Used:
D&D 5e ruleset v3.3.12
Core RPG ruleset v.3.3.12A

I tried recreating the conditions, but I'm not getting the same error when loading in, attacking, or making death saves. What exactly are you doing before the error pops up?

Megaprr
March 1st, 2021, 02:07
It actually seems to be a problem with a few other extensions I have too. Both Druid Wildshape and 5E Constitutional Amendents were also throwing ActorManager5E nil value errors. Though in the case of wildshape it was only throwing it when actually trying to morph into a monster. And only the token change failed, as the actual stats and abilities switched to those of the monster properly.

Hmmm. If you're unable to reproduce it maybe it's a problem on my end. I'll try updating FG and see if that helps at all. I'll post an update when I do so.

EDIT: Yep. Evidently something must have been broken in my install as a general update seems to have fixed the issue.

ScriedRaven
March 19th, 2021, 16:30
Complete overhaul to increase compatibility with other extensions (ironically now incompatible with the extension the original was based on). It has been specifically tested with Mattekures Status Indicators, and Kent McCulloughs Automatic Pack Tactics as those were ones it was previously mentioned to be incompatible with. I also ran it with my standard list of extensions and didn't see any problems, but I didn't specifically test every use of those so I won't list them. I didn't test Combat Enhancer, but that's because I'm not sure how stable that is right now.

I also ended up removing Blindsight, Truesight, Blur, and See Invisibility, as they were part of the problem. I removed Dangersense because it expanded the extension to be larger than I'm comfortable with.

Megaprr
March 19th, 2021, 17:36
Have you by chance looked into the new lighting in the test builds? I'm wondering how this extension will play with that once it's released proper.

ScriedRaven
March 19th, 2021, 20:14
I was unaware of this coming update, so I didn't plan on it. Looking into it they don't conflict, nor are they redundant to each other. I won't change anything until they go live, but with how things look to be going I doubt I'll update anything beyond the spells module. To use them together as is, all you'd need to do is change it from "VISION: [#] darkvision" to "VISION: [#] darkvision; Darkvision;"

Henrique Oliveira Machado
April 13th, 2021, 01:40
Do someone please explain to me how that works?
I managed to add a Darkness token and then applyed the effect AURA: 20; Darkness; Darkness into it.

It worked as intended and the characters in the area got a FROMAURA: Darkness; Darkness effect on them.
Characters that has darkvision seems to still have disavantage while on aura. As i seem to understand, i need to add an Race effect VISION: 60 darkvision to all my characters that already has darkvision so they don't get disavantage?

ScriedRaven
April 13th, 2021, 17:00
Do someone please explain to me how that works?
I managed to add a Darkness token and then applied the effect AURA: 20; Darkness; Darkness into it.

It worked as intended and the characters in the area got a FROMAURA: Darkness; Darkness effect on them.
Characters that has darkvision seems to still have disadvantage while on aura. As I seem to understand, i need to add an Race effect VISION: 60 darkvision to all my characters that already has darkvision so they don't get disadvantage?

This extension just checks for an effect called "darkvision". I'll update it to include the more complicated text for when that update becomes live

Ethkazin
May 17th, 2021, 07:15
Is the extension still useful with the new light update?

ScriedRaven
May 19th, 2021, 00:06
Is the extension still useful with the new light update?

This extension adds tags for disadvantage and advantage, which are not included in the new update. So yes it is still helpful

similarly
July 17th, 2022, 15:08
After the latest update today, I'm getting an error with 5e - vision:
When I cast a spell, I get this error:
[7/17/2022 10:47:57 PM] [ERROR] Handler error: [string "scripts/manager_action_save_vision.lua"]:30: attempt to call field 'getActor' (a nil value)

ScriedRaven
July 17th, 2022, 22:02
After the latest update today, I'm getting an error with 5e - vision:
When I cast a spell, I get this error:
[7/17/2022 10:47:57 PM] [ERROR] Handler error: [string "scripts/manager_action_save_vision.lua"]:30: attempt to call field 'getActor' (a nil value)

Hmm, I'm unable to replicate this, do you have the most recent version? "scripts/manager_action_save_vision.lua" doesn't exist in the download file.

And I just realized that they never implemented the auto disadvantage in darkness, and I never fixed the effect names, yay.

similarly
July 18th, 2022, 00:46
Thank you. I'll check I have the most recent version and then test again. It may be a conflict with another extension. I just know that when 5e-vision was active, I was getting an error, and when disabled, I wasn't.

similarly
July 18th, 2022, 13:17
I downloaded it again, and now I'm not getting an error, so maybe I had an old version, or maybe I had a glitch, or maybe whatever was conflicting and throwing up the error got fixed (fgu updated again today). Either way, seems all good now. Thanks for the fast help!