worldbuilding
worldbuilding copied to clipboard
SimpleActor#data object no longer used; need support on new DataModel
Just posted this in Discord as well:
So, I am using Simple Worldbuilding together with pdfFoundry and have some complex macros. Upgrading to V10 killed my system.
I get warning in the console, that f.e.
"Error: You are accessing the SimpleActor#data object which is no longer used. Since V10 the Document class and its contained DataModel are merged into a combined data structure. You should now reference keys which were previously contained within the data object directly.
at logCompatibilityWarning (commons.js:1692:19)
at SimpleActor._logV10CompatibilityWarning (commons.js:6642:14)
at get data [as data] (commons.js:6542:24)
at eval (eval at executeScript (lib.js:175:13),
So, until now, I addressed an attribute (f.e. Charisma) this way: "actor.data.data.attributes.attr_charisma.value"
I had a look at the "Inspect Data" Possibility, it tells me that I should still use "actor.data.data.attributes.attr_charisma.value"
When using console.log (actor.data), I get another path that would lead to "actor.data.system.attributes.attr_charisma.value"
Does that mean, that I simply have to change all the code from "actor.data.data.(...)" to "actor.data.system.(...)" and I am ready to go?
Or does that mean that I have to rewrite the data structure of my characters?
Apologies, this issue seems to have slipped under the radar. actor.system.*
is what you should update your macros to (no data
in there at all). However, what you're seeing is just a warning, so I wouldn't expect it to entirely kill your system. Are there any other symptoms that you can provide that might help us diagnose the issue?