PDA

View Full Version : How do I backup the characters?



XpressO
September 10th, 2008, 07:30
I want to start a fresh campaign using module adventures, which I've not used up to this point. I want to copy the characters to the new campaign, which will serve as my base campaign with only characters in it for running the modules.

1) Where are the characters located?
2) What else should I copy?

Thank you in advance.

Spyke
September 10th, 2008, 08:08
Both the player characters and NPCs are located in the db.xml file in your campaign directory. You'll need to open the xml file, ideally in an XML editor, but Notepad would do. To be safe, backup the db.xml files for your campaigns before you start.

PCs are held in the <charsheet> ... </charsheet> section, with each character in its own <id-xxxxx> ... </id-xxxxx> section, where xxxxx is a number filling five characters with leading zeroes, e.g. <id-00001>. The tag must be unique, otherwise later characters will overwrite earlier ones when loaded into Fantasy Grounds.

To move the PCs to another campaign, copy the whole <id-xxxxx> ... </id-xxxxx> section for the character and paste it just before the final </charsheet> in the new campaign. Change the number in the <id-xxxxx> and </id-xxxxx> tags to one that hasn't been used yet in the new campaign's <charsheet> section. (You can also set the idcounter attribute in the<charsheet> tag if present to one higher than the highest id number used so far, but Fantasy Grounds seems to be able to sort this out by itself if necessary.)

The NPCs are held in the <npc> ... </npc> section, but inside <category> ... </category> sections below this. Each <category> corresponds to one of the named tabs on your personalities lists in your campaign. If you've not added any new tabs then your NPCs will be in the <category> where name="". Again copy the whole <id-xxxxx> section for the NPCs you want to move and paste them into the relevant category, just before the final </category> tag. Update the id number to one that is unique for the whole <npc> section in the new campaign, not just for the category you've chosen.

Note, of course, that you can only copy characters and NPCs between campaigns based on the same ruleset (unless the two rulesets have identical xml structures for PCs and NPCs).

Spyke

Griogre
September 10th, 2008, 08:27
Spyke is correct, but given your situation where you appear to have other than character data mixed in with your characters, you may find it easier to make a copy of the whole campaign folder which currently has your characters in it. Then in the copy of the campaign export the module to give you access to all the non character data.

Double check everything exported fine in the copy. Then go back to your original campaign and delete everything other than the characters.

XpressO
September 10th, 2008, 08:29
Done and done. Thank you very much, worked like a charm. :)