-
August 16th, 2020, 21:40 #1
[2E] Ability effects in CT not updating character sheet (onChildUpdate)
Hi,
Summary:
In the 2E ruleset the character sheet is not updated when you add/remove ability effects. For example "INT:-4"
This works fine in FGC, but not in FGU. As illustrated here:
int-fgc-fgu.png
I tried to trace down why this was in the ruleset code and ended at "cta/scripts/cta_combatants_host.lua" on line 12.
Code:DB.addHandler(DB.getPath(node, ".*.effects"), "onChildUpdate", updateForEffectChanges);
Related, the three following lines in the same file are never called in FGU either, but they are in FGC.
Code:DB.addHandler(DB.getPath(node, ".*.targets"), "onChildUpdate", onTargets); DB.addHandler(DB.getPath(node, ".*.targets"), "onChildDeleted", onTargetsDelete); DB.addHandler(DB.getPath(node, ".*.targets"), "onChildAdded", onTargetsAdd);
So it seems to me there might be an issue with the events here?
Oh, and I also did a diff on both the CoreRPG and 2E rulesets between FGC and FGU to make sure it was the same version I tested on.
Ruleset(s):
2E
Operating System / Language Setting:
Windows 10.
Steps to Reproduce:
In a new 2E campaign in FGU
- Create a character
- Add character to combat tracker
- Add an effect to the character "INT:-4"
- Observe that the INT stat is not updated in the character sheet
Extra info:
If you have added the effect as described above, then close FGU, open and launch the campaign again and open the character sheet, the INT modification will display correctly. So the "update sheet" code IS working, it is just not called after adding the effect.
I do not have enough knowledge of the rulesets / core systems to know where else to look to see if the problem lies elsewhere. But hopefully this will serve as a start for you who have deeper insights
Regards,
Tideturner
-
August 16th, 2020, 21:49 #2
Oh, I forgot a bit of info on my setup
FGU version: 2020-03-13
No extensions
Ruleset versions from the chat log:
Advanced Dungeons & Dragons 2nd Edition (c) Wizards of the Coast
2E v2020.08.06 For Fantasy Grounds& --by Celestian 2017-2020
CoreRPG ruleset v3.3.11B for Fantasy Grounds Copyright 2019 Smiteworks USA, LLC
-
August 17th, 2020, 00:18 #3My extensions for 3.5e and Pathfinder
Bug reports please here
-
August 17th, 2020, 07:02 #4
Hehe yeah that was a typo. My FGU version is 2020-08-13
-
August 17th, 2020, 15:46 #5
It does look like the handlers are not entirely working in FGU. I think this might have been reported before (I know I've looked at it myself also) but I it's not been addressed yet in patches.
I tested locally and used STR:10 and saw the same results you did. I use STR to test to make sure it's not just a window/refresh issue because the attacks should use the bonus as well. It did not, because as you noted the handler is just not adding the effect unless you restart FGU entirely.
Hopefully Carl/JPG will have the chance to take a look at this.Last edited by celestian; August 17th, 2020 at 15:53.
---
Fantasy Grounds AD&D Reference Bundle, AD&D Adventure Bundle 1, AD&D Adventure Bundle 2
Documentation for AD&D 2E ruleset.
Custom Maps (I2, S4, T1-4, Barrowmaze,Lost City of Barakus)
Note: Please do not message me directly on this site, post in the forums or ping me in FG's discord.
-
August 21st, 2020, 18:11 #6
Checked after patch today and not been addressed yet. Several unrelated issues resolved tho
---
Fantasy Grounds AD&D Reference Bundle, AD&D Adventure Bundle 1, AD&D Adventure Bundle 2
Documentation for AD&D 2E ruleset.
Custom Maps (I2, S4, T1-4, Barrowmaze,Lost City of Barakus)
Note: Please do not message me directly on this site, post in the forums or ping me in FG's discord.
-
August 21st, 2020, 19:36 #7
Yeah, took a look as well. The summary windows in the combat tracker no longer disappear, so that's very good
And much better (well, equally much better ), the "/reload" command has been implemented now. Phew.
Also, some extra info reg. the addHandler problem.
While this does not work:
Code:DB.addHandler(DB.getPath(node, ".*.effects"), "onChildUpdate", updateForEffectChanges);
Code:DB.addHandler(DB.getPath(node, "*.effects"), "onChildUpdate", updateForEffectChanges); DB.addHandler(DB.getPath(node, "*.effects.*"), "onChildUpdate", updateForEffectChanges);
Just guessing here, but that looks like an invalid DB path with the double dots.
Might be the path parser is more lenient in FGC than it is in FGU.
And no clue if this is then considered a FGU or ruleset bug
-
August 21st, 2020, 20:05 #8
Good catch. I spun up and tested it locally and it works. I did not notice the .*.effects versus *.effects.
Thanks for seeing this. I look over this code a lot and roll over such things. Second pair of eyes is a great help.
I'll push out a fix for this that should see "live" around Sept 1. I'm also cleaning up some other style issues that JPG was kind enough to point out that should resolve some of these issues in the future as well.
There are various situations where FGU's methods are more strict on formatting/style and this certainly seems to be the case. I reviewed the other calls and did not see any other handlers using this style.
"the "/reload" command has been implemented now."
I still get the message it's not working in alpha
Last edited by celestian; August 21st, 2020 at 20:13.
---
Fantasy Grounds AD&D Reference Bundle, AD&D Adventure Bundle 1, AD&D Adventure Bundle 2
Documentation for AD&D 2E ruleset.
Custom Maps (I2, S4, T1-4, Barrowmaze,Lost City of Barakus)
Note: Please do not message me directly on this site, post in the forums or ping me in FG's discord.
-
August 21st, 2020, 20:22 #9
-
August 21st, 2020, 21:58 #10
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 20,561
@celestian,
Make sure you are in the Live channel, and not the Prev channel.
Regards,
JPG
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks