STAR TREK 2d20
Page 1 of 3 123 Last
  1. #1

    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.

    1. Make a copy of 3.5E-spells.mod (you will find this in the "modules" folder in your Fantasy Grounds Application Data folder).
    2. Rename the copy to "3.5E-spells-mine.zip" (note this includes changing the file extension from .mod to .zip).
    3. Unzip 3.5E-spells-mine.zip.
    4. 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.
    5. 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.
    6. 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>.
    7. 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.)
    8. 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.
    9. 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.
    10. 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.
    11. 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).
    12. 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.
    13. 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!
    Last edited by Callum; August 1st, 2014 at 09:08.

  2. #2

    Join Date
    Apr 2008
    Location
    Virginia Beach
    Posts
    3,096
    A very nice step-by-step on a shockingly complex thing. Nice, Callum.

  3. #3
    Thanks, Bidmaron. However, these instructions were originally written by Griogre, who thus deserves most of the credit. I later expanded, edited, and updated them, but the core of it is still his work!

  4. #4
    These instructions can also be used to create other types of library modules - for feats, classes, or what-have-you - with minor adjustments.

  5. #5
    Sticky and wiki! Definitely a resource that needs to be readily available.

    Cheers!

  6. #6
    I managed to successfully do this with the PFRPG Spells Module (great directions, thanks!), but I'm having trouble applying it to the Magic Items Module. It's written slightly differently.

    Line 3 simply says <library static="true"> instead of <library> followed by a second line with the library name and then the static reference. Since I didn't want to duplicate everything, I changed Line 3, and added Line 4, to read:

    <library>
    <CustomMagicItems static="true">

    and made closing tags

    </CustomMagicItems>
    </library>

    I followed all other directions exactly, changing the file name in the definition.xml file, and making all other changes into db.xml. However, when I add the module to my campaign, it shows up correctly, and it has the correct lists, but when you click on one of the lists, such as "Potions", it gives this error: Script Error: [string "common/scripts/windowtitlebar.lua"]:18: attempt to index local 'nodeTitle' (a nil value). Furthermore, the list is empty. No entries at all. This is true for all the lists.

    Could someone tell me what I've done wrong, please? Thanks!
    Art, Games, Life
    www.artystrique.com (In progress, so be kind, please)
    Discord https://discord.gg/grHbK6ck3Q

  7. #7
    Never mind, I figured it out. I changed the name of the pointer, as per the spells module directions, but failed to change the name of the corresponding reference. lol
    Art, Games, Life
    www.artystrique.com (In progress, so be kind, please)
    Discord https://discord.gg/grHbK6ck3Q

  8. #8
    JohnD's Avatar
    Join Date
    Mar 2012
    Location
    Johnstown ON
    Posts
    5,315
    Blog Entries
    1
    Quote Originally Posted by Callum View Post
    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.

    1. Make a copy of 3.5E-spells.mod (you will find this in the "modules" folder in your Fantasy Grounds Application Data folder).
    2. Rename the copy to "3.5E-spells-mine.zip" (note this includes changing the file extension from .mod to .zip).
    3. Unzip 3.5E-spells-mine.zip.
    4. 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.
    5. 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.
    6. 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>.
    7. 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.)
    8. 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.
    9. 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.
    10. 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.
    11. 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).
    12. 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.
    13. 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!
    Excellent instructions. Out of curiosity, how much would the above change if someone were to look at creating a custom spell module for Castles & Crusades?
    "I am a Canadian, free to speak without fear, free to worship in my own way, free to stand for what I think right, free to oppose what I believe wrong, or free to choose those who shall govern my country. This heritage of freedom I pledge to uphold for myself and all mankind."

    - John Diefenbaker

    RIP Canada, February 21, 2022

  9. #9
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    26,649
    Blog Entries
    1
    John - the instructions are pretty good for any CoreRPG based ruleset.
    There is a d20 Spell Book module that works with CnC floating around somewhere.
    You could peek in there too to compare notes.

  10. #10
    JohnD's Avatar
    Join Date
    Mar 2012
    Location
    Johnstown ON
    Posts
    5,315
    Blog Entries
    1
    Quote Originally Posted by damned View Post
    John - the instructions are pretty good for any CoreRPG based ruleset.
    There is a d20 Spell Book module that works with CnC floating around somewhere.
    You could peek in there too to compare notes.
    Ah yes, good idea... thanks for that reminder. Unfortunately my memory isn't what it once was. :|
    "I am a Canadian, free to speak without fear, free to worship in my own way, free to stand for what I think right, free to oppose what I believe wrong, or free to choose those who shall govern my country. This heritage of freedom I pledge to uphold for myself and all mankind."

    - John Diefenbaker

    RIP Canada, February 21, 2022

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
5E Product Walkthrough Playlist

Log in

Log in