PDA

View Full Version : PCGen export to NPC Module utility



Carthar
June 26th, 2014, 03:47
This utility exports an NPC from PCGen and creates a module you can import into FG.

It transfers over pretty much everything an NPC needs such as stats, defenses, attacks, damages, spells, special abilities (though most are just the text) and some class abilities.

The instructions on how to install and setup the utility are in the DirectDeposit_Docs.zip file. The instruction have a number of pictures to show you where options are, so the doc is a bit large.

The actual program and export xml style sheet are in the DD.zip file.

Limitations:
Windows 7 or 8.
PCGen only
Pathfinder, however 3.5E should also work.

I hope some people find it useful. It is the solution I was looking for a while ago and seeing as I couldn't find it, I made it.

Carth

jgovernale
July 3rd, 2014, 15:22
I could use your help. I think I have loaded it correctly. FG is located on my D drive. I placed DD.exe into the D:\PCGen\PCGen6021 directory. Added the dd.exe “%” c:\temp\ line to Output. Created an orc barbarian using the pathfinder GM rule set. On export chose the Direct Deposit V8 xml template. Destination and Rule set passed have check marks in Acceptable Data. Character File Passed does NOT have a check mark. Do you know why?
I rarely use 'stock' monsters so to get this to work would be great. Thank you for your assistance.

Carthar
July 4th, 2014, 04:24
If you are getting the window, you have loaded it correctly. The command line looks right.

The only thing that the "character file passed" checks for is if the exported xml file exists. Make sure you save the export xml when it asks you to and reject the option to open it up, as that can give you a file in use error.

If that doesn't work, please copy out what it has in the text field for character file passed and tell me if that file exists. I'll see if I can find out what is going on.

jgovernale
July 4th, 2014, 13:24
Typically, I save the xml file to my desktop . “C:\Users\Name\Desktop\Dryad Vampire.xml” It may be a timing issue. I can see the file on the desktop just after the application starts.

Carthar
July 4th, 2014, 14:48
Try exporting it. Choose cancel and then export it again. If it is just a timing issue that might fix it.

Everyone I've got to test DD, always saved the NPC as the NPC name to the default "characters" directory in PCGen. Which is rather quick. However I understood that the export command wasn't run until after the file was saved.

The other thing I am wondering about is if somehow windows is preventing DD.exe from seeing your desktop directory. It may not have privileges.

Below is the code for checking the file:



'check the inputs
If File.Exists(CharacterFile) And Right(CharacterFile, 3) = "xml" Then
MainForm1.CheckBox1.Checked = True
End If
MainForm1.CheckBox1.Enabled = False

jgovernale
July 4th, 2014, 15:40
Tried export then cancel then export again. Exported into character directory then cancel then export again. Same issue. Changed the name to all one word. I'm a local/machine admin on this pc. Tried several sources and the basic setup for GMs. I have exported to the root, default character folder. Since I have used PCGen for years I used another directory for the default characters. I reset PCGen back to the default and tried again. No change. Re downloaded the app. Used default setting on PCgen for character file locations. Created a default Orc. “D:\PCGen\PCGen6021\characters\Orc.xml” No change. Very strange.

jgovernale
July 4th, 2014, 15:45
I can have you log in to look if you want?

Carthar
July 4th, 2014, 16:05
Ok here is a build without the character file check.

Give a quick try and see if it works.

Trenloe
July 4th, 2014, 16:22
Right-click on DD.exe and select "Run as Administrator". Even if you're logging in as a user with admin rights, Windows can still block file writing in certain directories.

jgovernale
July 4th, 2014, 16:49
Same scenario as above Orc. Character File Passed “D:\PCGen\PCGen6021\characters\Orc.xml” Destination Path c:\temp\ Rule set passed PFRGP. Modularize is now available.
Pressed it. Error - Direct Deposit has stopped working.
Files that help describe the problem:
C:\Users\jgovernale\AppData\Local\Temp\WERC702.tmp .WERInternalMetadata.xml
C:\Users\jgovernale\AppData\Local\Temp\WERDD32.tmp .appcompat.txt
C:\Users\jgovernale\AppData\Local\Temp\WERDD81.tmp .mdmp

It created a C:\temp definition.xml file.

jgovernale
July 4th, 2014, 16:51
testing another way brb

jgovernale
July 4th, 2014, 16:55
Gave everyone full control permissions on PCgen and temp dir. Sorry was hopeful.

Carthar
July 4th, 2014, 19:12
Yup that is exactly where it would stop working if it couldn't find the character file. How odd, as it seems to be passing the file path fine. Are you sure the orc.xml file is being created? Can the orc.xml file be opened (ie. not corrupt)?

DD.exe isn't incredibly complicated. It should just take that xml, bundle it with the definition.xml it creates and zips them, then renames the file .mod. That is pretty much it.

You have a newer version of PCGen than I'm running. I'll download the new version and see if I get the same error.

Carthar
July 4th, 2014, 21:09
Ok just tried with PCGen v 6.02.1 and it worked fine.

Can you post the orc.xml file for me to check out?

jgovernale
July 4th, 2014, 23:25
I reinstalled PC Gen. Ocr.xml in the character dir. C:\temp\ only has definition.xml. No mod file was created.

jgovernale
July 4th, 2014, 23:26
Thanks again for your help. I can allow you access to my PC if you want?

Carthar
July 5th, 2014, 00:35
Ya remote desktop might be the best move. The orc.xml file looks fine. The definition.xml is for the dryad vampire.

I just need to see what PCGen is passing, as it looks like the files are all being created properly.

PM me if you want to do a remote desktop and we can setup a time for it.

Carthar
July 5th, 2014, 16:52
I was thinking about this last night.

I'm wondering if the quote marks around the percentage sign are not working for some reason for you. The quotation marks are not necessary. They can be removed, I just put them in as some people had issues without them.

Try this for the command line:

DD.exe % c:\temp\

jgovernale
July 5th, 2014, 17:17
You're a freak'in Genius. PCGen worked and DD created the mod. New issue. FG II sees the mod but will not list it in the library after opening it.

jgovernale
July 5th, 2014, 17:21
It does however list the token in the token screen.... Too goofy...

Trenloe
July 5th, 2014, 18:04
New issue. FG II sees the mod but will not list it in the library after opening it.
You'll find the NPC in the Campaign NPC list, not in the library. See page #5 of the document attached in post #1.

Carthar
July 5th, 2014, 18:05
Ok. Just so I understand. You can see the module in the "Data Module Activation", but it doesn't show up in the library?

If that is the case, as long as you can open the module in the data module activation (DMA) screen, everything is working as intended.

If the module opens you should see the NPC in the NPC list. It should have the small book next to the name. Don't forget to make a copy of the NPC and then close the module book in the DMA screen.

jgovernale
July 5th, 2014, 18:47
Sorry. I was not paying attention. This works Great. Thank you very much. My life as a GM is better now!!!! Thanks again.

Carthar
July 5th, 2014, 19:02
Glad to be of help. Enjoy torturing your players with totally unexpected monsters.

Bl00dyAngel
September 2nd, 2014, 00:48
Hi, seems there is a problem with 3.5E rules. The tool creates the .mod files without problems and it showed up in the module list in FG as well. But the npc isn't listet in npc list after loading.But There is no error feedback in the console.

Maybe this hardcoded link is a problem: "<recordname>..@PFRPG Bestiary</recordname>" but i am aren't deep enough in the npc structure from fg2 to be sure

Carthar
September 3rd, 2014, 03:22
The section you are referring is commented out, so it shouldn't be the problem. It's an old artifact that I should have got rid of a long time ago. If I ever get back to this project I'll remove it in the next update.

From your post I take it that you are using 3.5E rules. So you should be using the optional command line tag 3.5E It should look something like

DD.exe % C:\Users\Main\AppData\Roaming\Fantas~1\modules\ 3.5E

If you don't tell it to use 3.5E it will assume pathfinder by default. Pathfinder NPCs shouldn't show up in the module list though.

If that isn't it, the I'll need some more information. Posting the mod file you created would help me.

I just made a test 3.5E NPC and it imported fine for me. So it might be something local or a more rare xml tag that my testing just isn't using.

Carth

Carthar
September 3rd, 2014, 03:26
I've attached my tester file. The forum doesn't allow me to upload .mod files for some reason so you will need to rename this zip file to .mod

Please let me know if this one works.

Carth

Trenloe
September 3rd, 2014, 03:41
But the npc isn't listet in npc list after loading.
Where are you looking for the NPC? It should be in a new tab at the bottom of the NPC list (not in the library, click on the NPCs button on the right of the desktop) - the key thing is to look for a coloured tab (flag) at the bottom of the NPC window, see the little green flags at the bottom of the screenshot here: https://www.fantasygrounds.com/wiki/index.php/Campaign_Data#Campaign_Data_List

Bl00dyAngel
September 4th, 2014, 04:11
First, thanks for the fast answers.
I found the issue. There is a problem if there are allready more tabs in the npc list. After i created a 3rd one, the npc's showed up in this new created tab.

Carthar
September 4th, 2014, 04:21
Glad it worked for you.

Carth

Nylanfs
December 14th, 2014, 03:09
Hmm, I'm seeing some issues using PCGen 6.04.00

There's a ; in the Senses box, and the weapon's don't seem to be parsing correctly. Everything else appears to be working correctly

Also as a side note, how you mark spells as prepared?

Here's the pcg file, xml and the resulting mod.

Nylanfs
December 14th, 2014, 15:17
Hmm it appears that PCGen is now putting the magic + after the weapon which is borking up the parsing.


Battleaxe +1 +13/+8 (1d8+6/20/x3); Shield +1 (Heavy/Wooden) +11/+6 (1d4+5/20/x2); Masterwork Longbow (Composite/+4) +11/+6 (1d8+4/20/x3);

as opposed to


+1 Battleaxe +13/+8 (1d8+6/20/x3) or mwk composite Longbow +11/+6 (1d8+4/20/x3)

Carthar
December 15th, 2014, 04:22
hmm...I'm not sure that is very easy to fix from an output file. I'll look into it and see if I can work around it.

Nylanfs
December 15th, 2014, 14:09
Talk to Andrew &/or Stefan about updating your output sheet here.
https://groups.pcgen.org/viewforum.php?f=21&sid=59cedb42688fcaa759c8487044d9b52b
I asked about switching the magic plus's (https://groups.pcgen.org/viewtopic.php?f=9&t=131)

Also PCGen is switching to using Freemarker for a template engine for the output sheets which may or maynot help people make custom output sheets.
https://wiki.pcgen.org/Template_Engine

Carthar
December 17th, 2014, 01:09
Ok I had trouble reproducing the problem, because if you double click it rolls the right dice for me. It was the magic shield that didn't roll properly. Something I must admit I never tried doing. Anyways I eventually found the issue.

I can hack it to fix the problem. An inelegant solution, but putting a ;: between the weapon ie. battleaxe+1 and the +8/13 seems to fix the problem.

updated xml sheet attached. Let me know if it works for you. If it does I'll include it in the base package.

Carth

Nylanfs
December 17th, 2014, 13:31
Hmm, I don't think I actually tried to roll it, just saw that the highlighting was messed up so assumed that the roll would be messed up.

BillTheButcher
July 20th, 2021, 20:57
Excellent work, and thank you!