I've run into an issue switching DSTs: dynamic_sheet_attrs
is empty of all but the default required fields (e.g. character name, campaign) when changing to a new DST, preventing the new DST from importing old character data.
I've been working on a DST (for Wraith: the Oblivion) with the hopes of making it interoperable with other DSTs. (There isn't a Wraith DST for the World of Darkness system, so my group started with a generic one, and I was hoping to be able to switch characters to the Wraith DST with minimal work on the part of players.) I've implemented most of it, and added it to Obsidian Portal for testing. When I edited a test character and switched to the new DST, all but the default required fields were blank. This was unexpected as the original and new DST use the same field names for most of the static fields (and the new DST can import some fields that have different names).
Checking the source data, dynamic_sheet_attrs
had none of the DFSs from the original DST. Looking at the site source (application-….js), the DST is loaded in bindDstSelect
, which gets the new DST using the URL path `/dynamic_sheet_templates/${dst_ID}/with_character`
(the "with_character" is noteworthy). The response HTML includes a (bare-bones) dynamic_sheet_attrs
, overwriting the existing one. When switching back to the original DST, dynamic_sheet_attrs
containing the original data is reloaded, so the original data isn't lost, it's just not accessible to other DSTs.
From my understanding, old character data should be accessible when switching DSTs (though the site only fill out DSFs that use the same names). The above behavior goes against my understanding. Is the above behavior by design, or is it a bug? Is there some way to make character data from another DST accessible when switching?
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
Steps to Reproduce
My expectation was that after changing the sheet, the fields with the same names would be filled out with the old values. Instead, all fields have default/empty values.
Thanks for pointing this out. Yeah, what you were expecting (same named fields get the values from the original DST) should have happened. I'll dig into this and figure out what changed.
Obsidian Portal Developer
@neqis, thanks again for pointing this out! Try out switching the DST now, and you should see what you expected (same named fields get the same values). Let me know if you see any issues.
For background ... a while back a member switched a Character to a different DST, and then Saved, and that blew away the data in the DST fields that were not on the current DST. To fix that, we made a change so that the DST data wouldn't get blown away like that ... but in doing that we introduced the bug you found where no data was being copied across DSTs. Now, both bugs should be fixed.
Obsidian Portal Developer
Thanks. There are a few tweaks I have to make, but my DST is now importing character data when switched to.