PDA

View Full Version : Question on the XML declaration for 5E spells



rpotor
September 17th, 2015, 15:29
Most likely this is a newbish question, but hopefully someone might be able to help me with. Sorry for the wall of text in advance :-)

I'm very new to Fantasy Grounds and our group is considering changing to it after long long years of using Maptool (I hope I'm not stepping on anyone's feet in case this might be a curse word or something like that around these halls :-) in which case I'm sorry), but we're not yet committed to cough up hundreds of dollars from our group wallet for the 5E character modules. So we are going to do a test run in the near future and for this purpose I recently purchased a monthly paid Ultimate license to make this as painless for our wallets as possible.

I noticed that Fantasy Grounds has the capability and gives users the opportunity if they're willing to get their hands dirty with XML to basically enter their own data using an existing ruleset. I was very happy to find out this and I delved right under the hood to see if I can whip up a basic library. Seems fairly easy to do thanks to a really cool tutorial on the FG wiki, and I envisioned a library module in which I would for example make a little "spellbook" containing only the spells the players have for quick reference at the virtual table, just to spice up the testing of FG. I'm not necessarily planning on adding the spells to the players' character sheets and not looking towards automation at this time, but I'd like to see a "proper" spell window opening when I click on a spell name. I think I need XML definitions of the spell reference window for this purpose. Now if I look for example at the 3.5E ruleset and more specifically at the ref_spells.xml file I can figure out what XML tags a 3.5E spell description window has to have, like "name", "school", "components", etc. and if I look at the 3.5E-spells module in client.xml I see the spell descriptions conforming nicely to this XML declaration, so I think I'd easily be able to make for example a custom made 3.5E spell and save it as a library.

Now if I look at the 5E ref_spells.xml file I kind of go: "wha...?" because I can't seem to find out what kind of XML tags a proper 5E spell description window could have. Instead I'm seeing in this .xml file a call to a lua script. My thinking is that because of some copyright or licensing reasons the XML declaration is hidden behind a script and the script maybe basically makes up the spell reference XMLs from the official 5E databases sold in the FG store.

My questions:
1. Is this a correct assumption or am I just missing something here because of me being a complete newbie at this?
2. Does this mean that for the 5E ruleset there is no possibility for users to implement for example their own custom spells in a separate library? Is this maybe an intentional limitation of the 5E ruleset and essentially we are kind of "stuck" with only the official modules here and no dice if we'd like to manually enter data for spells?

Sorry if these questions are already answered somewhere and this is common knowledge. If that's the case I'm sorry for the long winded explanation above and I'm going right back under a rock to hide. :-)

Trenloe
September 17th, 2015, 15:34
Answering question 2: The PAR5E application is designed to create custom libraries - not just spells, but it can work for spells too. Instead of you messing around in XML, you create the spell entries in a text file, using the markup documented with the PAR5E application. Download details here: https://www.fantasygrounds.com/forums/showthread.php?18123-Project-Par5e

If nothing else, you could create a couple of spells with data in all of the fields and get an idea of the XML format from the PAR5E generated XML.

And welcome to the forums! :)

You might also consider the $3 Basic rules module to give you a base set of spells, character classes, monsters. This will give you a good idea of what can be done and give you some base info to use. Available here: https://www.fantasygrounds.com/store/product.xcp?id=WOTC5EDDBASICRULES

rpotor
September 17th, 2015, 15:48
You might also consider the $3 Basic rules module to give you a base set of spells, character classes, monsters. This will give you a good idea of what can be done and give you some base info to use. Available here: https://www.fantasygrounds.com/store/product.xcp?id=WOTC5EDDBASICRULES

Oh, thanks very much for pointing me there! I think that's exactly what I need, I feel my virtual wallet is going to open up soon... :D

Nylanfs
September 17th, 2015, 17:21
Yes welcome to the community! :)

Trenloe
September 17th, 2015, 17:27
Oh, thanks very much for pointing me there! I think that's exactly what I need, I feel my virtual wallet is going to open up soon... :D
This won't give you the base XML (the module is encrypted). What it will give you is an idea of what all of the entries look like within Fantasy Grounds. Sorry if I misled you on that point...

Zacchaeus
September 17th, 2015, 18:09
And, in order to give you a super start have a look at this here (https://www.fantasygrounds.com/forums/showthread.php?21835-D-amp-D-Basic-Rules-PDF-Parser).

What this does is automatically create some basic stuff (Some character classes, some spells, some monsters, equipment list etc) from the free basic PDF that was released by WotC many moons ago. It also creates many text files which will give you a very good idea of how these files need to be set up so that they will parse using the par5e tool. Furthermore it will give you and your players many things which will allow you to see what FG is capable of and how you can run games within it at no additional cost.

rpotor
September 17th, 2015, 18:45
Thanks for the warm welcome Nylanfs (and Trenloe too of course :D), think I'll hang around and see what's what.

Trenloe
September 17th, 2015, 18:47
I keep forgetting about Valeros's excellent basic rules parser (I used to push it quite a lot). Thanks Zacchaeus for mentioning it. rpotor the output from the Basic Rules parser will be pretty much what you're looking for in terms of example XML you can get access to and a ready to go spells module too! :)

rpotor
September 17th, 2015, 18:47
This won't give you the base XML (the module is encrypted). What it will give you is an idea of what all of the entries look like within Fantasy Grounds. Sorry if I misled you on that point...

Hmmm, I see. Well, no problems, it's really not that expensive at $3, so I think I'll buy it nevertheless, and see what it looks like then try to go forward from there by trial and error. :D

rpotor
September 17th, 2015, 18:52
I keep forgetting about Valeros's excellent basic rules parser (I used to push it quite a lot). Thanks Zacchaeus for mentioning it. rpotor the output from the Basic Rules parser will be pretty much what you're looking for in terms of example XML you can get access to and a ready to go spells module too! :)

Yeah, I saw that on the forums in passing, but first I thought that maybe it's not fully compatible with the official XML declarations and thereby might cause issues when I mix it with the official ruleset of 5E. Though that's just a guess on my part, so I'll definitely take a look at that too, thanks for pointing me there Zacchaeus and Trenloe. Guess I have to travel a long way with this to understand how everything clicks together :D

rpotor
September 17th, 2015, 20:20
Just one more spam, I promise! :D Thanks again guys for your useful pointers, my very first custom made module is up and running. Just wanted to say that: This. Is. Awesome. I mean the possibilities here are really kind of endless. I could even include a hungarian translation for the spells for my non-English speaking players and it seems it's absolutely not messing up with the character sheet when I drag onto it a spell modified with the weird hungarian letters. Okay it's not that pretty because it seems I can't use UTF-8 in the XML files, but still it sure beats flipping through the rulebooks and now we can just click a button to have a spell description right on our screens in a moment. Now how the hell could I miss Fantasy Grounds for the past 10 years and why have I just found it? :D

Zacchaeus
September 17th, 2015, 20:22
Isn't it amazing what you can learn from playing D&D. I mean I never heard of Szekesfehervar before and now I know that it is a very big city and used to be Hungry's capital city and it's a pretty awesome place by the looks of it. :)

Zacchaeus
September 17th, 2015, 20:24
Just one more spam, I promise! :D Thanks again guys for your useful pointers, my very first custom made module is up and running. Just wanted to say that: This. Is. Awesome. I mean the possibilities here are really kind of endless. I could even include a hungarian translation for the spells for my non-English speaking players and it seems it's absolutely not messing up with the character sheet when I drag onto it a spell modified with the weird hungarian letters. Okay it's not that pretty because it seems I can't use UTF-8 in the XML files, but still it sure beats flipping through the rulebooks and now we can just click a button to have a spell description right on our screens in a moment. Now how the hell could I miss Fantasy Grounds for the past 10 years and why have I just found it? :D

Probably because of the wider audience it is getting from the licensing agreement with WotC. I only stumbled upon it when it came up on my recommended list from Steam; which I almost never pay attention to, but I did that day about a year ago. :)

rpotor
September 17th, 2015, 20:31
Thanks, thanks! Very true. Szekesfehervar is indeed a nice place, but I guess you have much older castles and ruins there in Scotland, so the D&D feeling could be stronger there. :-)

Zacchaeus
September 17th, 2015, 20:35
Yep, and we have the Loch Ness Monster! :D

rpotor
September 17th, 2015, 20:40
Probably because of the wider audience it is getting from the licensing agreement with WotC. I only stumbled upon it when it came up on my recommended list from Steam; which I almost never pay attention to, but I did that day about a year ago. :)

That might very well be true. I think I found out about the FG software from this series of reviews (https://www.madadventurers.com/fantasy-grounds-and-dd-part-1/) which was a very good read and it's really a honest and thorough account of FG's capabilities.

But... I feel I'm kind of drifting towards being off-topic in my very own topic, so I guess we should let this topic sink to the archives slowly and surreptitiously... :D