Migrating to DataModels - how to get data pre `cleanData`?
Hello. In the lancer system, we have some old fields in our Actor/Item models what predate the existence of UUIDs - they instead used a "RegRef" structure to achieve basically the same thing as a UUID now does. For context, a regref example:
Going forward, we'd prefer these just be a UUID string represented via a slightly modified StringField. The issue we are running into, though, is that it is difficult to migrate this data considering that the
_source
data of all actors is being modified via the DataModel._initializeSource
-> BaseActor._initializeSource
-> DataModel.cleanData
, which destroys the above object and replaces it with "[object Object]". I tried accessing them via game.actors._source
but it appears that the transformations in cleanData affect that data too. Is there a good way around this? ThanksM
Mana•353d ago
actor._source should not have cleanData applied unless it has been committed.
If it does, then it's a bug in Foundry and should be reported.
I don't know about game.actors._source tho, I'm speaking of specific actor data
E
Eranziel•353d ago
You could check
actor._source
vs that Actor's entry in the db to confirm. If it's [object Object] then it's been committed already.W
WHITESPINE•353d ago
Hasn't been comitted
because I can observe it happening across refreshes
Let me get the full stack
W
WHITESPINE•353d ago
DataModel constructor:
W
WHITESPINE•353d ago
BaseActor initializeSource:
W
WHITESPINE•352d ago
Using
game.actors._source
and a specific actor ._source
both appear to have the same transformations applied
I guess I'll file it since I've not been able to find any means of accessing the uncleaned data. If only I had tested before the v11 release Further investigation found game.data["actors"]
which provides what I need
Doesn't help with the case of compendium documents though... hm.Want results from more Discord servers?
More PostsWhat Licence is appropriate for systems?As the title suggests, I have found a system that is not available on Foundry, and would love to chaHey not sure if this is the right spot...SLA Industries system.Ok it's not good BUT I've cobbled together a semi working version 0.1 of the system. My hope is as IPointer module update (70€)**Type:** Module
**Short Description**: Uodate of the module Pointer and Ping (or Pnp)
**Long DescriUpdate FoundryVTT Tabbed Chatlog to allow for Creation/Deletion of Additional Chat Tabs**Type**: [module]
**Short Description**: Ability to create/remove Custom Additional Chat Log Tabs Google Sheet Character Sheet integration moduleIntegrate a highly formulaic google sheet into foundry for use for our custom ttrpg system that is iFallout 2d20: Radiation giving a visual indicator of reduced max HP**Type:** Module or Update, which ever is more convenient to the coder
**Short Description:** As it (DnD 3.5e) Body slot in inventory or a new tabType: module
Im looking for someone to make me a Body Slot module.
It would be something like the Overhead Tile Fade for All Tokens module update (v9 to v10, D&D 5e)**Type**: Module
**Summary description**: The module has stopped being updated, it is very simple, New Custom Tab for DnD 5e Sheet**Type:** Module.
**Short:** I need something like the spellcasting table as a new tab in the charaCrossBlade V9 -> CrossBlade v10 Compatibiltiy**Type**: [Module]
**Short Description**: A port of this older V9 module to V10
**Long Description**Modified character sheet for DND5EModule
Short: I want a character sheet for DND5E to have the esper genesis look. Specifically the skHow to run code from a specific userHi,
I have the function foo(bar)
and when you run this function it opens a window with some detailAnswer OverflowHey there! I have some great news:
__**Introducing @Answer Overflow indexing to The League!**__
TlAbout: #package-development**This thread is not for discussions about Foundry package development, but for discussing the purpoGood callIt's more reliable to enter the directory.Follow-up questionsFor Foundry v10+ here is the essential info for module integration as I gather you might want to loaIntegration of Vino Behaviour on TheatreSome time ago I had updated the module VINO (https://github.com/p4535992/foundryvtt-vino), the modul[CLOSED] UI panel for help to Transform/Polymorph tokenI have officially dropped the "Automated Polymorpher" module https://github.com/p4535992/foundryvtt-advancementOrigin flag@arbron I spotted a flag `advancementOrigin` on items granted by advancements but don't see it used comparing fomulaAnyone know of a foundry utility to compare two strings that might be dice formulae to tell which ha