Creating a new spells module [3.5e/PFRPG]
To make a library spell module that merges the existing 3.5E spells with any new spells you wish to add, perform the following steps.
- Make a copy of 3.5E-spells.mod (you will find this in the "modules" folder in your Fantasy Grounds Application Data folder).
- Rename the copy to "3.5E-spells-mine.zip" (note this includes changing the file extension from .mod to .zip).
- Unzip 3.5E-spells-mine.zip.
- There are three files in 3.5E-spells-mine: client.xml, definition.xml and thumbnail.png. Open definition.xml with Notepad (or your editor of choice). It has six lines. Change the <name> from "3.5E Spells" to "3.5E Spells Mine" (or whatever), then save the file and close it.
- Open the client.xml file. If you do not have a better editor, use Notepad (but I would recommend downloading and using the free Notepad++). On the fifth line, that starts <name type="string">, change the name to exactly what you changed the <name> to in the definition file (my suggestion was "3.5E Spells Mine"). It must match exactly, including case.
- You need to stop the spell lists from doubling up when they're displayed in the Library. So change the fourth line of the client file from <d20spells static="true"> to <d20spellsMine static="true"> (or whatever). You also need to change the change the closing element (further down the file, right above </library>) to match, from </d20spells> to </d20spellsMine>.
- Next you need to give all the lists of spells a unique name. To do that, find and replace every instance of "spelllists" with "spelllistsMine" (or whatever name you want). (NB. When mass replacing, it's a good idea to make a copy of the file beforehand, because you can really mess a file up with a mistake or typo, and it's often easier to start over than repair the mess.)
- That last change broke the links in the <library> entries, since they are now referring to "spelllistsMine", but still pointing at "3.5E Spells". To fix that, for each <library> entry, from <bard> to <domains>, change the end of the <recordname> from "@3.5E Spells" to "@3.5E Spells Mine". The library links will now point to the lists in this module, rather than the original one. Make sure you don't change any other instances of "@3.5E Spells" - only those between the <library> and </library> tags.
- Now scroll down to find the first spell entry, <acid arrow>. Move your cursor to the start of the next line under it, <acid fog>. Scroll down to the end of </zoneoftruth>, but before the closing </spelldesc> tag (this is a long way down - over half-way through the whole file). Hold down Shift and click at the end of </zone of truth>. You should now have every spell entry except the first selected. Press Delete to get rid of them, then save the file.
What have you done here? You've made a shell of the old library module. If you finished now, started Fantasy Grounds and activated both 3.5E Spells and 3.5E Spells Mine, you'd find you could still open spells in 3.5E Spells Mine and see the full spell descriptions. But didn't you just delete (almost) all the spells in 3.5E Spells Mine? You did, but you didn't delete the links in the spell lists that form the second half of the file - and these still point at the original 3.5E Spells module. If you deactivated the 3.5E Spells module, you wouldn't get the spell descriptions any more (and in the chat window you'd get a message saying something about the 3.5E Spells module being inaccessible). So as long as the 3.5E Spells library module is activated, all the original spells will be accessible from your new module.
- The next step is to add your spell(s) to your new module. You kept Acid Arrow as an example, so start by changing all the elements of this to your first new spell. Mostly you should only change the bits between the tags (eg changing <name type="string">Acid Arrow</name> to <name type="string">Mage Armor, Greater</name>), but you will need to change the opening and closing tags themselves (eg <acidarrow> and </acidarrow> to <magearmorgreater> and </magearmorgreater>) - note that these tags need to be unique to each spell, which shouldn't generally be a problem if you're using the spell names, but it's something to keep in mind. If you're feeling confident, copy and paste the spell template and keep adding new ones, otherwise carry on with the following steps. You can always come back and add more spells later.
- Next you need to add the new spell(s) to the appropriate class lists. Let's say I was adding Greater Mage Armor, a 3rd-level Sor/Wiz spell, and I've already input it into the <spelldesc> element, where I tagged it as <magearmorgreater>. Now I go down to <spelllistsMine> and find the nested <wizard> group which holds the <level3> spells. I want to insert my new spell in here. I'm going to follow the convention and insert the spell in the M listing, not the G. I scroll down and find where Greater Mage Armor should go - between <lightningbolt> and <magiccircleaginstchaos>. I copy and paste the <lightningbolt> entry so I have two copies of the entry, one after the other. Then I use the second <lightningbolt> entry as a template to make the link to the new spell, Greater Mage Armor. To do this, I change the element names from <lightningbolt> and </lightningbolt> to <magearmorgreater> and </magearmorgreater>. Next, I change the <recordname> to point at the new spell. In this example, I change "[email protected] Spells" to "[email protected] Spells Mine". Basically, I have just created a link to the spell description in this module (as with the library links in step 8, above).
- Copy and paste this new link into any other class lists, wizard school lists, or cleric domains you need to add the spell to. (In the example above, that would include the <level3> section of the <conjurationschool> of the <wizardschools> lists.) Make sure you adjust the level number if the spell is granted at different levels in other classes.
- Now save client.xml, close it, and zip the three files back together (client.xml, definition.xml and thumbnail.png). It is important you zip only the three files and do not include the folder the files are in. Rename the zip file "3.5Espellsmine.mod" (or whatever), including changing the .zip extension to .mod, then move it to the "modules" folder in your Fantasy Grounds Application Data folder.
You're now ready to run Fantasy Grounds and play with your new spellbook!