Eric Finley
First Post
If you're worried about messing up the .dnd4e files, then just add a _dsq to the file before the extension, and save as a copy. Or read the .dnd4e file first, immediately save it as a _bkp.dnd4e file, and then go to work on the primary. But if all you're doing is writing text into an XML tag's contents, the tag is known and unique, and the program is already failsafe'd against accidental insertions of XML code into the text you're inserting... then IMO the gains outweigh the risks considerably.
Testing a little more thoroughly... the <JournalEntry> XML is not actually dominant. That's output XML, it is not read by the Character Builder at all. The notes proper are given down at the very end of the file, the last thing before the closing tag. Each is a <textstring> tag, with one attribute of the form "NOTE_abcdef0123", and the contents are simply XML with the brackets and quotes safetied away into < and so forth. So the Char Builder reads those, makes them available as Journal entries, and then for your convenience also saves them in the savefile as easier-to-read XML as <JournalEntry> objects.
I've tested. Altering the <textstring> tag to change the title, contents, etc. of the resulting XML data, produces appropriate changes when the character is loaded in the Character Builder. This does not require changing the <JournalEntry> tags to match; the CB app clearly ignores those tags and overwrites them when you save. But I can manually add a <textstring> on the end, give it a name attribute such as [name="NOTE_dsqdata"], replicate the structure of an existing journal entry in the contents of the tag, but alter the actual stuff part where it says
...
... and the Character Builder accepts it without a hiccup. It appears that any reasonable <textstring name="NOTE_uniqueidentifierofchoice"> is legal, and provided its contents are in the proper form, it becomes a Journal Entry without quibble. As long as you stay clear of using XML special characters inside your data-storage format, you should be completely safe.
IMO the payoff is extremely high, and the risk quite acceptably low, doubly so if you automatically back up their character upon opening it.
Testing a little more thoroughly... the <JournalEntry> XML is not actually dominant. That's output XML, it is not read by the Character Builder at all. The notes proper are given down at the very end of the file, the last thing before the closing tag. Each is a <textstring> tag, with one attribute of the form "NOTE_abcdef0123", and the contents are simply XML with the brackets and quotes safetied away into < and so forth. So the Char Builder reads those, makes them available as Journal entries, and then for your convenience also saves them in the savefile as easier-to-read XML as <JournalEntry> objects.
I've tested. Altering the <textstring> tag to change the title, contents, etc. of the resulting XML data, produces appropriate changes when the character is loaded in the Character Builder. This does not require changing the <JournalEntry> tags to match; the CB app clearly ignores those tags and overwrites them when you save. But I can manually add a <textstring> on the end, give it a name attribute such as [name="NOTE_dsqdata"], replicate the structure of an existing journal entry in the contents of the tag, but alter the actual stuff part where it says
Code:
<Notes>Stuff stuff stuff</Notes>
... and the Character Builder accepts it without a hiccup. It appears that any reasonable <textstring name="NOTE_uniqueidentifierofchoice"> is legal, and provided its contents are in the proper form, it becomes a Journal Entry without quibble. As long as you stay clear of using XML special characters inside your data-storage format, you should be completely safe.
IMO the payoff is extremely high, and the risk quite acceptably low, doubly so if you automatically back up their character upon opening it.