PDA

View Full Version : Copy Character Sheets



ShotGun Jolly
September 16th, 2009, 00:49
Hi all,

One more question. I am currently creating 10 NPCs for a adventure. When I go to create the character sheet in FG, I need to type in each and every character, with all their equipment, and all of their stats over and over again.

I was wondering if there is a way to copy a character sheet? The main reason is not so much the character stats, but all of his equipment and the skills. (All of the characters starting off are all very similar)

Having to type each line in, over and over again is a little harsh. I thought I could go into the DB, copy the .xml text pertaining to a character which was fully kitted out, paste it, and rename it.. and hope when I restarted the mod, a new character was there with all the gear.

This in fact, didnt work and i ended up loosing the already 3 sheets I had made. I am pretty sure I did it wrong, thats why I lost the info already. But.. there has to be a way to copy this stuff.. isnt there?

Leonal
September 16th, 2009, 00:55
I don't use player character sheets for NPCs, but if you use the Personalities/NPC sheet and not the PC sheet, you can duplicate them. Click the "link box" after creating an NPC and drag it to the same personality window and it should duplicate.

Zeus
September 16th, 2009, 01:09
You can copy PC charactersheets from one campaign file to another. The trick is to ensure that the id for the character in the target campaign is unique. Each char is stored as a unique element under /root/charsheet in db.xml. eg. id-00001, id-00002, id-00003 ....

Under each <id-0000x> entry are the details for each character.

The entries do not have to be in any order but each entry must be unque. Its probably best to backup your db.xml files before editing them.

Alternatively to manually copying the characters, Tenian wrote a tool which enabled easy import/export/copying of chracters from one campaign file to another. You can grab it here: https://f1.grp.yahoofs.com/v1/gCqwSi4X7AidcAdpNifkuifA5xeJx-BWLf0Et3_8ZxdC9HC3V_w7bLSlmsbSP43SMXs0wlXeHJMsAhHH lPoue9DI4VYgAMFmo9mkF5BpiMjlzRyj6moC8Q/FG%20II%20Campaign%20Files/Campaign%20Tools%20Pack.zip


I also wrote a new .NET version of the tool (also incorporates a few other features like printing char sheets and importing characters). The new version also uses XSL for the transformations making it quite extensible. You can grab a copy here: https://zgp.eugenez.net/FGII%20Campaign%20Tools%20v2%20Beta/

Hope that helps.

ShotGun Jolly
September 16th, 2009, 01:14
Thanks, that does help.

The reason why I am creating all the NPCs is that these are the selection of characters the players can choose from to start off with, which ever ones dont get picked as PC's will become NPCs.

I dont usually do this, but its the way I am running this particular adventure.

Now, after thinking about it. I can just do up all of the 10 player sheets, and fill in one of them with all the gear. Then I can just go into the xml file, copy and paste the inventory entries over to all the others. Quick and simple. This saves me from haveing to worry about all those IDs which I tend to miss.

Thanks for your help again.

Spyke
September 16th, 2009, 09:59
If you use the GURPS 4e ruleset and create your characters in the GCA software, my utility can import any of the characters into FG2 either as PCs or NPCs. You can also use your first character as a template in GCA and then make minor adjustments for the remaining characters.

Spyke

ShotGun Jolly
September 16th, 2009, 23:47
I am using the GCA software for 3rd, so it wont work for me :(

gmkieran
September 23rd, 2009, 14:39
sadly, the link to Tenian's tool appears to be broken. I did grab and successfully install your .NET tool, Zephp, thanks! unfortunately, it refused to recognize any db.xml file I have as a valid target db. It gave me an error, "Unable to parse .XML. Please ensure that you have no TOKEN.XML erros." I have no idea how to even check for token errors and at least one of the files was just a blank db.xml - I hadn't created anything inside the campaign. Any thoughts? Thanks!

Tenian
September 23rd, 2009, 15:09
Zephp's tool does everything my old version did and more. The old version had so few users, I just stopped working on it.

You probably need to create a character in the target. Depending how much of my code he recycled, it looked for the charsheet nodes in the XML and wouldn't create them if they were missing.

gmkieran
September 23rd, 2009, 17:20
thanks, Tenian! We were headed that direction with the .xml hack, anyway. I'll try it with the tool, instead, and see what that does for me.

Zeus
September 23rd, 2009, 18:16
sadly, the link to Tenian's tool appears to be broken. I did grab and successfully install your .NET tool, Zephp, thanks! unfortunately, it refused to recognize any db.xml file I have as a valid target db. It gave me an error, "Unable to parse .XML. Please ensure that you have no TOKEN.XML erros." I have no idea how to even check for token errors and at least one of the files was just a blank db.xml - I hadn't created anything inside the campaign. Any thoughts? Thanks!

Make sure you first left click the node you want to select/copy, then right-click on it to export.

I have seen that error occur when you just right click on a node immediatly.

Its a problem to do with the right mouse click event not first not registering the node is selected.

If that doesn't work for you, send me your source db.xml file and I'll see what I can do.

My bad - just re-read your post. You need to make sure that the target campaign is a valid FGII db.xml file. It MUST contain the current schema including a <charsheet> tag for the characters to reside in. If your still struggling to get it to read it properly, send me a copy of the db.xml and I'll see if I can debug the issue for you.

gmkieran
September 24th, 2009, 02:07
thanks, zephp! I appreciate the offer greatly! adding a blank character sheet to the target campaign db did allow me to mount that db as a valid target. Unfortunately, I have a new problem and I don't know enough .xml to interpret this error:

System.Xml.XPath.XPathException: '//charsheet/ource Ca' has an invalid token.
at MS.Internal.Xml.XPath.XPathParser.ParseXPathExpres ion(String xpathExpresion)
at MS.Internal.Xml.XPath.QueryBuilder.Build(String query, Boolean allowVar, Boolean allowKey)
at MS.Internal.Xml.XPath.QueryBuilder.Build(String query, Boolean& needContext)
at System.Xml.XPath.XPathExpression.Compile(String xpath, IXmlNamespaceResolver nsResolver)
at System.Xml.XPath.XPathNavigator.Select(String xpath)
at System.Xml.XmlNode.SelectNodes(String xpath)
at System.Xml.XmlNode.SelectSingleNode(String xpath)
at FGII_Campaign_Tools_v2.MainForm.ExportPCtoFile(Str ing playercharacterid, String playercharactername, Boolean Unique, Int32 newplayercharacterid, Boolean target)
at FGII_Campaign_Tools_v2.MainForm.ExportPCtoTargetCa mpaign(String playercharacterid, String playercharactername)
at FGII_Campaign_Tools_v2.MainForm.ExporttoTargetCamp aign_Click(Object sender, EventArgs e)
at System.Windows.Forms.ToolStripItem.RaiseEvent(Obje ct key, EventArgs e)
at System.Windows.Forms.ToolStripMenuItem.OnClick(Eve ntArgs e)
at System.Windows.Forms.ToolStripItem.HandleClick(Eve ntArgs e)
at System.Windows.Forms.ToolStripItem.HandleMouseUp(M ouseEventArgs e)
at System.Windows.Forms.ToolStripItem.FireEventIntera ctive(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStripItem.FireEvent(Event Args e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEven tArgs mea)
at System.Windows.Forms.ToolStripDropDown.OnMouseUp(M ouseEventArgs mea)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Mes sage& m)
at System.Windows.Forms.ToolStrip.WndProc(Message& m)
at System.Windows.Forms.ToolStripDropDown.WndProc(Mes sage& m)
at System.Windows.Forms.Control.ControlNativeWindow.O nMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.W ndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


other than to say I'm quite certain it has something to do with not having gotten the correct tokens or put them in the correct place in the new campaign folder. Attached are "John's DB" - the source .xml and db - the target .xml. Any direction you can provide would be GREATLY appreciated!

Thanks, again!

Zeus
September 24th, 2009, 09:06
gmkieran, not sure why it gave you that error as it worked first time for me.

Here's the steps I took:

1) Opened up FGII Campaign Tools.
2) Click the Open Source Campaign, Navigated to and selected john's db.xml
3) Click the Open Target Campaign, Navigated to and selected db.xml
4) Left click on any character's name in the source campaign to select it
5) Right-click on the character name and select Export to Target Campaign
6) When prompted save the new target campaign file to a differenct file ( I chose db1.xml)
7) When prompted to -reload the db1.xml file as the target campaign (refreshes the Character tree so we can see its added the PCs)
8) Repeat steps 5-7 for any other characters we want to export

I have attached the db1.xml file as a zip for your reference.

Hope this helps.

gmkieran
September 24th, 2009, 15:53
Thanks, zephp! apparently my error was in step 6 - I kept trying to save to the existing db.xml file, rather than creating a new file. I will try again this evening, but if nothing else I can probably use your db1.xml file. Really appreciate your help on this!!!