• NOW LIVE! Into the Woods--new character species, eerie monsters, and haunting villains to populate the woodlands of your D&D games.

Looking for a spell database...

That would be awesome... the more spells the better. I actually wrote a custom class to parse the information from a plain text file for when I import a lot of spells at once. The class I wrote is pretty easily modified, so I can really parse from any format you're comfortable putting the spells in.

The only thing that needs to remain constant is that each piece of spell information should be in the same format as all the other pieces. For example, some spells, like Protection From Chaos, etc., will only have Name, School, and Level, and maybe one or two other fields, and then it will say "As Protection From Good". I haven't coded the parser to be smart enough to pick up the rest of the fields from the other named spell, so all the missing fields would need to be copied. Not a big deal, but something to keep in mind. Also, because the long descriptions can span many lines, there must be a way to tell that the description is complete and the next spell block has begun. You can do this simply by starting each new spell with "Name:" like I did. Here's an example of the format I used:

Name: Acid Fog
Conjuration (Creation) [Acid]
Sor/Wiz 6, Water 7
V, S, M/DF
1 action
Medium (100 ft. + 10 ft./level)
Effect: Fog spreads 30 ft., 20 ft. high
1 round/level
None
Yes
Fog deals acid damage.

This spell's vapors are highly acidic... etc.

What the parser actually does is begin by reading in the first eleven lines. It knows that the first line is the name of the spell, the second line has the school information, the third is the components, and so on up to the eleventh line which is the short description. It knows to check for subschools in parentheses and descriptors in brackets on the school line, and it knows to separate the effect type (Area, Target, or Effect) before the colon from the actual effect (Fog, Ray, Cone, etc.) after the colon (I store these as separate fields so that you could more easily search for all Ray spells, or all Area effect spells, etc.).

After reading in the first eleven lines, the parser starts reading in each consecutive line and adding it to the spell's long description. For each line it checks to make sure that this line is part of the spell description and not the beginning of the next spell. That's where the "Name:" piece comes in handy. If that piece is there, the parser knows that it has finished reading in all the information for one spell. It then inserts that information into the database, and starts the whole process over with the next spell.

That's about it. Like I said though, the format is flexible. I can always modify the parser if you're more comfortable with a different format. Also, I plan on inputting Magic of Faerun next, so you can skip that one if you like. If you have any more questions, feel free to reply, email, or you can sometimes catch me on Yahoo or AOL instant messenger (my handle on both is javapadawan) or on ICQ (160687583). :)

Chris
 

log in or register to remove this ad

Piece of cake!

I have a great many of the spells already in text format. All I have to do is a little modification and they could fit into the format you have supplied. I'll get to work right away then.

I already have the entire Magic of Faerun in text format (amazing what one can do with a little time and a descent piece of OCR software :) ) If you have other things to work on I can compile that book into a text file and send it to you with the others, that could save you a fair amount of work.

MidKnight
 

Would you like a line in there about which source the spell came from? (Just for sorting purposes or maybe for the ability to turn off some sources...)

Or should I just keep the spells from the FRCS in one file and Relics and Rituals in another?
 

Wow... That would be so awesome... it would save me a ton of work, and I would really appreciate it. MoF is a real monster; I'd been putting it off for that reason. :)

As far as the sources go, whichever way is easier for you works for me. I had planned on adding the ability to turn off sources in the second release, but it looks like I'll have the time and good reason to get it into the first one instead!

Thanks!
Chris
 

javapadawan said:
Wow... That would be so awesome... it would save me a ton of work, and I would really appreciate it. MoF is a real monster; I'd been putting it off for that reason. :)

As far as the sources go, whichever way is easier for you works for me. I had planned on adding the ability to turn off sources in the second release, but it looks like I'll have the time and good reason to get it into the first one instead!

Thanks!
Chris

as long as you can impliment it into pcgen and pull info out of it and put it into it this would be great! It's all java based right??
 

Excel Database

Heya,
I was working on this before I saw this post...::sigh::
Anyway, if you'd like to see my work, you can grab it at this link
http://dinneen.dns2go.com/spellbook.zip
It's in excel, and all files must be located in c:\Spellbook or else it won't work. Dunno how it'll work on Macs, but it *should* be real easy for someone with a mac to change it around. Anyway, this is just viewing and adding spells right now, you can view the spells I've included to see how to add new ones. Next update will include filtering, and update after that will let you create spellbooks. Let me know of any bugs or ideas here on this post or at DougDinneen@bellsouth.net!

-Doug
 

Yes, it's Java based and uses an Access database for the spell information. I have PCGen but don't use it often (only because I usually end up making characters together with the group, and I don't always have my laptop with me) so I'm not that familiar with it. If you could point me to some specs or examples of the format PCGen uses for import and export of spells and/or spellbooks I would be happy to try to implement that. :)

Chris
 


Spell Database/organization

I would be interested in helping out and/or beta testing. I have some programming experience (including java, though I'm not too good at it).

I could also help with data input, etc...

let me know if I can help, my e-mail is:

dnd3eplayer@yahoo.com
 

dougdineen: Your spellbook program looks cool!

Crimson_Squirrel: Thanks for the offer, I'll post here and email you when it's ready for testing. :)

I'm working on export capabilities right now which I hope to finish either this weekend or soon thereafter. Once that's done I'll be putting it up for download, even though it won't be complete, so I can get some feedback.
 

Into the Woods

Remove ads

Top