Page 2 of 2 First 12
  1. #11
    celestian's Avatar
    Join Date
    Jan 2017
    Location
    DFW, Texas
    Posts
    2,052
    Quote Originally Posted by Kelrugem View Post

    Is just a display problem, so not really important because the automation of damage etc. is not affected, but I want to fix this

    Thanks a lot I should simply test a bit more and not make wrong assumptions
    Had a similar issue and to resolve you also need to monitor the effects.

    DB.addHandler(DB.getPath(nodeCT, "effects"), "onChildUpdate", onDataChanged);

    I did the same for damage pre-views as well.
    ---
    Coding the Official AD&D Ruleset
    My Twitch Channel for AD&D and FG related streams (See schedule for live days)
    My YouTube for FG related Tutorials and AD&D Actual Plays

  2. #12
    Kelrugem's Avatar
    Join Date
    Sep 2018
    Location
    Geneva, Switzerland, and Lyon, France
    Posts
    821
    Quote Originally Posted by celestian View Post
    Had a similar issue and to resolve you also need to monitor the effects.

    DB.addHandler(DB.getPath(nodeCT, "effects"), "onChildUpdate", onDataChanged);

    I did the same for damage pre-views as well.
    ah, okay, and this works well for you? My formulation of the first post was maybe not good enough but exactly this was my idea, too, but I was worrying about whether this is a good idea (because effects are normally not observed by these displays) due to performance things etc. (also because of Trenloe's answer but maybe he thought that I want to add these handlers now to all other fields in the character sheet, too, which may be affected by effects. But I only want to add such a thing for the CL stuff )

    thanks, this maybe means that my initial idea is not that bad at all when there is already a ruleset doing exactly that
    Last edited by Kelrugem; December 4th, 2019 at 20:46.

  3. #13
    celestian's Avatar
    Join Date
    Jan 2017
    Location
    DFW, Texas
    Posts
    2,052
    Quote Originally Posted by Kelrugem View Post
    ah, okay, and this works well for you? My formulation of the first post was maybe not good enough but exactly this was my idea, too, but I was worrying about whether this is a good idea (because effects are normally not observed by these displays) due to performance things etc. (also because of Trenloe's answer but maybe he thought that I want to add these handlers now to all other fields in the character sheet, too, which may be affected by effects. But I only want to add such a thing for the CL stuff )

    thanks, this maybe means that my initial idea is not that bad at all when there is already a ruleset doing exactly that
    Keep in mind that's more for CT for me than players. That won't update reliably for them. I treat it kinda like the ATK:1 effect for Player Side, that effect doesn't show up on the "preview" bonus to hit but shows up in the [EFFECT: X] on the roll output.

    But, both definitely will get the adjusted levels when they roll.
    ---
    Coding the Official AD&D Ruleset
    My Twitch Channel for AD&D and FG related streams (See schedule for live days)
    My YouTube for FG related Tutorials and AD&D Actual Plays

  4. #14
    Kelrugem's Avatar
    Join Date
    Sep 2018
    Location
    Geneva, Switzerland, and Lyon, France
    Posts
    821
    Quote Originally Posted by celestian View Post
    Keep in mind that's more for CT for me than players. That won't update reliably for them. I treat it kinda like the ATK:1 effect for Player Side, that effect doesn't show up on the "preview" bonus to hit but shows up in the [EFFECT: X] on the roll output.

    But, both definitely will get the adjusted levels when they roll.
    Ah, okay, I guess I understand you

    Thanks a lot for your help, Celestian and Trenloe, really appreciated Now I will play around a bit and I am optimistic that it is possible now without too much to do

  5. #15
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Denver, Colorado, USA (for a bit)
    Posts
    24,157
    The thing to keep in mind with using effects to modify a character sheet directly is that you will never be able to ensure that the data in the PC sheet is 100% accurate - I don't know if the DB event handler celestian posted above would trigger if the PC was removed from the CT (even accidentally) - leaving a modified character sheet. And if a PC record was exported (or accessed via manage characters) it would contain the modified data, but not the effect that modified it. Maybe edge cases, but something to consider as any opportunity for incorrect data should be avoided if possible.
    FG Con 15 Fantasy Grounds Online RPG Convention - Nov. 8-10, 2019
    Register at www.fg-con.com for all the latest info.

    Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!

  6. #16
    Kelrugem's Avatar
    Join Date
    Sep 2018
    Location
    Geneva, Switzerland, and Lyon, France
    Posts
    821
    Quote Originally Posted by Trenloe View Post
    The thing to keep in mind with using effects to modify a character sheet directly is that you will never be able to ensure that the data in the PC sheet is 100% accurate - I don't know if the DB event handler celestian posted above would trigger if the PC was removed from the CT (even accidentally) - leaving a modified character sheet. And if a PC record was exported (or accessed via manage characters) it would contain the modified data, but not the effect that modified it. Maybe edge cases, but something to consider as any opportunity for incorrect data should be avoided if possible.
    ah, that's a good point; indeed, that can be problematic. When I have time to look a bit more onto that then I will also test these edge cases a bit more and try to see whether there is some solution avoiding these

    Thanks, I got a lot of nice ideas and approaches today

  7. #17
    celestian's Avatar
    Join Date
    Jan 2017
    Location
    DFW, Texas
    Posts
    2,052
    Quote Originally Posted by Trenloe View Post
    The thing to keep in mind with using effects to modify a character sheet directly is that you will never be able to ensure that the data in the PC sheet is 100% accurate - I don't know if the DB event handler celestian posted above would trigger if the PC was removed from the CT (even accidentally) - leaving a modified character sheet. And if a PC record was exported (or accessed via manage characters) it would contain the modified data, but not the effect that modified it. Maybe edge cases, but something to consider as any opportunity for incorrect data should be avoided if possible.
    If the effect is there and then the pc is removed from the CT the update would be lost, that's the inconsistency I meant. I also do something similar for ability adjustments (so you can see them on the character sheet).

    You could trigger handlers if the CT has an entry removed.

    To do it like e 5e does you'd just not update the preview damage based on effects but utilize the effect if it existed when rolled.
    Last edited by celestian; December 4th, 2019 at 21:36.
    ---
    Coding the Official AD&D Ruleset
    My Twitch Channel for AD&D and FG related streams (See schedule for live days)
    My YouTube for FG related Tutorials and AD&D Actual Plays

  8. #18
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Denver, Colorado, USA (for a bit)
    Posts
    24,157
    Quote Originally Posted by celestian View Post
    To do it like e 5e does you'd just not update the preview damage based on effects but utilize the effect if it existed when rolled.
    That's really the recommended way to do it. Standard FG rulesets don't modify any data on the PC sheet directly via effects, only when a relevant action or event occurs.
    FG Con 15 Fantasy Grounds Online RPG Convention - Nov. 8-10, 2019
    Register at www.fg-con.com for all the latest info.

    Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!

  9. #19
    celestian's Avatar
    Join Date
    Jan 2017
    Location
    DFW, Texas
    Posts
    2,052
    Quote Originally Posted by celestian View Post
    You could trigger handlers if the CT has an entry removed.
    As a follow up, I fiddled with this during lunch and it worked. It gave me consistent results.

    Thanks for pushing this topic around, it got me thinking how to resolve it
    ---
    Coding the Official AD&D Ruleset
    My Twitch Channel for AD&D and FG related streams (See schedule for live days)
    My YouTube for FG related Tutorials and AD&D Actual Plays

  10. #20
    Kelrugem's Avatar
    Join Date
    Sep 2018
    Location
    Geneva, Switzerland, and Lyon, France
    Posts
    821
    Quote Originally Posted by celestian View Post
    As a follow up, I fiddled with this during lunch and it worked. It gave me consistent results.

    Thanks for pushing this topic around, it got me thinking how to resolve it
    cool

    Then I'll probably try the same and test that a bit, too, when I got more time thanks for the follow-up

Thread Information

Users Browsing this Thread

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

Posting Permissions

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

Log in

Log in