Aaron
LOELeague of Extraordinary FoundryVTT Developers
•Created by Aaron on 12/18/2024 in #system-development
Extend ActiveEffect.changes
Not sure I understand your "empty" ArrayField comment. I found the {required: false}, which allows for spare arrays. Is there some sort of {empty: ?} option for ArrayFields that removes the spares property?
88 replies
LOELeague of Extraordinary FoundryVTT Developers
•Created by Aaron on 12/18/2024 in #system-development
Extend ActiveEffect.changes
Is my use of getData to merge not ideal?
88 replies
LOELeague of Extraordinary FoundryVTT Developers
•Created by Aaron on 12/18/2024 in #system-development
Extend ActiveEffect.changes
There are a couple of data prep functions, which one should I look at?
88 replies
LOELeague of Extraordinary FoundryVTT Developers
•Created by Aaron on 12/18/2024 in #system-development
Extend ActiveEffect.changes
I sorta need a 1-1 match so I can do some backend calculations & change.value fading (custom system rules). Given there is no unique key, I'm left with an index to do the matching.
88 replies
LOELeague of Extraordinary FoundryVTT Developers
•Created by Aaron on 12/18/2024 in #system-development
Extend ActiveEffect.changes
88 replies
LOELeague of Extraordinary FoundryVTT Developers
•Created by Aaron on 12/18/2024 in #system-development
Extend ActiveEffect.changes
88 replies
LOELeague of Extraordinary FoundryVTT Developers
•Created by Aaron on 12/18/2024 in #system-development
Extend ActiveEffect.changes
I supposed I can perform a filter during the merge...
88 replies
LOELeague of Extraordinary FoundryVTT Developers
•Created by Aaron on 12/18/2024 in #system-development
Extend ActiveEffect.changes
Yuck, when I make the ArrayField not required the merge of changes and system.changes no longer is 1-1 and it makes a mess of things.
88 replies
LOELeague of Extraordinary FoundryVTT Developers
•Created by Aaron on 12/18/2024 in #system-development
Extend ActiveEffect.changes
Like I said I have it working. I'm willing to try more suggestions to make it work better or more inline with foundry/dev recommendations.
88 replies
LOELeague of Extraordinary FoundryVTT Developers
•Created by Aaron on 12/18/2024 in #system-development
Extend ActiveEffect.changes
BTW: I'm learning alot in this thread. Thanks for your time!
88 replies
LOELeague of Extraordinary FoundryVTT Developers
•Created by Aaron on 12/18/2024 in #system-development
Extend ActiveEffect.changes
If I delete the last change and the array indexes 1-X are sequential, it coerces into an array just fine.
88 replies
LOELeague of Extraordinary FoundryVTT Developers
•Created by Aaron on 12/18/2024 in #system-development
Extend ActiveEffect.changes
the coercion into an array bypasses this issue.
88 replies
LOELeague of Extraordinary FoundryVTT Developers
•Created by Aaron on 12/18/2024 in #system-development
Extend ActiveEffect.changes
88 replies
LOELeague of Extraordinary FoundryVTT Developers
•Created by Aaron on 12/18/2024 in #system-development
Extend ActiveEffect.changes
taking out my "custom" fix and see if it coerces like you said is should.
88 replies
LOELeague of Extraordinary FoundryVTT Developers
•Created by Aaron on 12/18/2024 in #system-development
Extend ActiveEffect.changes
88 replies
LOELeague of Extraordinary FoundryVTT Developers
•Created by Aaron on 12/18/2024 in #system-development
Extend ActiveEffect.changes
88 replies
LOELeague of Extraordinary FoundryVTT Developers
•Created by Aaron on 12/18/2024 in #system-development
Extend ActiveEffect.changes
Foundry cheated by coercing data.changes into an array. I just did the same for data.system.changes. Looks like a dataModel isn't really neceessary in this specific case.
88 replies
LOELeague of Extraordinary FoundryVTT Developers
•Created by Aaron on 12/18/2024 in #system-development
Extend ActiveEffect.changes
I did get it working:
88 replies
LOELeague of Extraordinary FoundryVTT Developers
•Created by Aaron on 12/18/2024 in #system-development
Extend ActiveEffect.changes
debugger stuff. The one with red circles is the formData.
88 replies
LOELeague of Extraordinary FoundryVTT Developers
•Created by Aaron on 12/18/2024 in #system-development
Extend ActiveEffect.changes
88 replies