Dave0910
September 5th, 2019, 09:05
While I was working on creating a 1E Database in Fantasy Grounds, the tedium of entering so many spells got to me (it was somewhere around half-way through the Cleric spells). So, I created a Parser, allowing me to simply copy and past the spells into the program and allowing them to write out the xml code.
When I finished entering the spells (about an hour after finishing the parser), I wrote a Monster parser as well.
Now, for me, it wasn't a major concern just going into the data modules and copy/pasting the xml code into a module, but I'm sure most of you wouldn't like that, so I created a ModBuilder that will take the data loaded from the parser and load it into a module file, for you.
There are a few things you should know about the parser, though. It will only take spells and monsters the way that they're coded in the PHB and Monster Manual, and since computers are extremely stupid, the formatting has to be perfect. Ideally, you should just be able to copy and paste from a pdf file or from text taken from an OCR program (I used both), but there can be formatting errors, and sometimes the wrong symbol will be copied. Unfortunately, it's on you to verify correct formatting. The parser is case-sensitive, as well.
Now, if you're tenacious enough to load all of the spells or monsters into one monumental text file and paste it into the parser, more power to you. However, it's safer to enter them individually, so that you can make sure the formatting is correct on each one. The parser simply appends new entries to the file. Just make sure you don't have a repeat ID number. That should be fairly easy as it automatically increases with each entry, and there's room for 10,000 ID numbers.
To enter Spells, make sure you're on the Spells tab. Choose a name for your Spell file (do not try to put spells and monsters in the same file!), and if you're entering divine (Cleric or Druid) spells, simply check the box, and it will fill the Sphere field instead of the School field.
For both Spells and Monsters, the parser looks for carriage returns and uses them to break up the descriptions into paragraphs. Be sure that you have these formatted properly when entering them.
Spells should be formatted as follows, they can be in either of these orders:
Spell Name (School or Sphere) Reversible
Level: <value>
Components: <value>
Range: <value>
Casting Time: <value>
Duration: <value>
Saving Throw: <value>
Area of Effect: <value>
Explanation/Description: <Spell Description>
Spell Name (School or Sphere) Reversible
Level: <value>
Range: <value>
Duration: <value>
Area of Effect: <value>
Components: <value>
Casting Time: <value>
Saving Throw: <value>
Explanation/Description: <Spell Description>
If a spell is not reversible, the field will be ignored.
Monster stats must be in this format and this order.
Monster Name
FREQUENCY: <value>
NO. APPEARING: <value>
ARMOR CLASS: <value>
MOVE: <value>
HIT DICE: <value>
% IN LAIR: <value>
TREASURE TYPE: <value>
NO. OF ATTACKS: <value>
DAMAGE/ATTACK: <value>
SPECIAL ATTACKS: <value>
SPECIAL DEFENSES: <value>
MAGIC RESISTANCE: <value>
INTELLIGENCE: <value>
ALIGNMENT: Neutral (evil)
SIZE: <value>
PSIONIC ABILITY: <value>
Attack/Defense Modes: <value>
LEVEL/X.P. VALUE: VIII /4000 + 20 /hp
Monster description goes here. If you have carriage returns separating paragraphs, the parser is smart enough to break them up in the XML Code.
The LEVEL/X.P. VALUE: field is optional, as this was not present in the Monster Manual. In these cases, the parser calculates XP value by calculating Hit Dice and checking for key-words relating to minor and major special abilities. I've found it to be fairly accurate.
Once you complete work with the parser, all you need to do is load up the ModBuilder and select the files containing your spells and/or monsters (They can be done separately or in a single file).
You even have the option to choose a thumbnail, though it must be a .png file.
One final note: While this parser will save you a great deal of time, you'll still have to handle formatting in many of the descriptions (for spell/monster descriptions that contain charts, for example). The parser, also, does not create the spell effects or monster attacks and powers.
Download URL: https://drive.google.com/open?id=1W9J-Or8tRVSrwOD35hbEQjyu_ZjDgwXi
When I finished entering the spells (about an hour after finishing the parser), I wrote a Monster parser as well.
Now, for me, it wasn't a major concern just going into the data modules and copy/pasting the xml code into a module, but I'm sure most of you wouldn't like that, so I created a ModBuilder that will take the data loaded from the parser and load it into a module file, for you.
There are a few things you should know about the parser, though. It will only take spells and monsters the way that they're coded in the PHB and Monster Manual, and since computers are extremely stupid, the formatting has to be perfect. Ideally, you should just be able to copy and paste from a pdf file or from text taken from an OCR program (I used both), but there can be formatting errors, and sometimes the wrong symbol will be copied. Unfortunately, it's on you to verify correct formatting. The parser is case-sensitive, as well.
Now, if you're tenacious enough to load all of the spells or monsters into one monumental text file and paste it into the parser, more power to you. However, it's safer to enter them individually, so that you can make sure the formatting is correct on each one. The parser simply appends new entries to the file. Just make sure you don't have a repeat ID number. That should be fairly easy as it automatically increases with each entry, and there's room for 10,000 ID numbers.
To enter Spells, make sure you're on the Spells tab. Choose a name for your Spell file (do not try to put spells and monsters in the same file!), and if you're entering divine (Cleric or Druid) spells, simply check the box, and it will fill the Sphere field instead of the School field.
For both Spells and Monsters, the parser looks for carriage returns and uses them to break up the descriptions into paragraphs. Be sure that you have these formatted properly when entering them.
Spells should be formatted as follows, they can be in either of these orders:
Spell Name (School or Sphere) Reversible
Level: <value>
Components: <value>
Range: <value>
Casting Time: <value>
Duration: <value>
Saving Throw: <value>
Area of Effect: <value>
Explanation/Description: <Spell Description>
Spell Name (School or Sphere) Reversible
Level: <value>
Range: <value>
Duration: <value>
Area of Effect: <value>
Components: <value>
Casting Time: <value>
Saving Throw: <value>
Explanation/Description: <Spell Description>
If a spell is not reversible, the field will be ignored.
Monster stats must be in this format and this order.
Monster Name
FREQUENCY: <value>
NO. APPEARING: <value>
ARMOR CLASS: <value>
MOVE: <value>
HIT DICE: <value>
% IN LAIR: <value>
TREASURE TYPE: <value>
NO. OF ATTACKS: <value>
DAMAGE/ATTACK: <value>
SPECIAL ATTACKS: <value>
SPECIAL DEFENSES: <value>
MAGIC RESISTANCE: <value>
INTELLIGENCE: <value>
ALIGNMENT: Neutral (evil)
SIZE: <value>
PSIONIC ABILITY: <value>
Attack/Defense Modes: <value>
LEVEL/X.P. VALUE: VIII /4000 + 20 /hp
Monster description goes here. If you have carriage returns separating paragraphs, the parser is smart enough to break them up in the XML Code.
The LEVEL/X.P. VALUE: field is optional, as this was not present in the Monster Manual. In these cases, the parser calculates XP value by calculating Hit Dice and checking for key-words relating to minor and major special abilities. I've found it to be fairly accurate.
Once you complete work with the parser, all you need to do is load up the ModBuilder and select the files containing your spells and/or monsters (They can be done separately or in a single file).
You even have the option to choose a thumbnail, though it must be a .png file.
One final note: While this parser will save you a great deal of time, you'll still have to handle formatting in many of the descriptions (for spell/monster descriptions that contain charts, for example). The parser, also, does not create the spell effects or monster attacks and powers.
Download URL: https://drive.google.com/open?id=1W9J-Or8tRVSrwOD35hbEQjyu_ZjDgwXi