Spell Reference D&D 3.5/Pathfinder SRD

These are tools and utilities that make it easier to run games. This includes Lib: macro tokens dropped into MapTool to manage the game, a conversion file for CharacterTool to allow use in MapTool, or just about anything else you can think of -- except graphics with macros and anything specific to a particular campaign framework. Those are already covered by the Tilesets subforum and the Links and External Resources forum.

Moderators: dorpond, trevor, Azhrei, giliath, Gamerdude, jay, Mr.Ice

Post Reply
User avatar
aliasmask
RPTools Team
Posts: 9023
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Spell Reference D&D 3.5/Pathfinder SRD

Post by aliasmask »

New update has bug fixes and while I was in there I added short descriptions to spell links created for the spell managers. Since the only changes I made were to the token, I included the token separately at the bottom with all the pages pre-cached to 3.5 and Pathfinder (PF). So, if you already have SpellLib loaded, then all you need is the token. Otherwise, download main download and then add the appropriate token if you like.

Possible future release features:
  • Be able to add custom spells. (working on now)
  • Increase data in tables to include combat information for other mods.


! The previous versions 0.5 & 1.0/1.0a should be deleted including the campaign properties, Lib:AliasSpellLib token, SpellDescriptions and SpellListIndex tables and replaced with the files in the download.

Image

Current Feature Summary:

Version 1.2
  • Look up spell details through dynamic browsing
  • Page caching for improved performance
    • Download the 3.5 Preloaded token below to save time on configuration.
  • Cached links for improved performance with Spell Managers
    • The spell manager code still has to be edited to access Spell Lib
    • Spell links now have tooltip with short description
  • Nifty interface, Frame or Dialog
  • Not Token centric. Anyone in campaign can access and use.
  • Easy to integrate and implement with existing mods.
  • Fast and easy for everyone in campaign to use. One Button.
  • Compatible with 1.1 tables, only token is needed


Example Output:
Screen shots
SpelllibExample.png
SpelllibExample.png (452.04 KiB) Viewed 27246 times
Read Me File:
ReadMe.txt

Code: Select all

AliasSpellLib version 1.2 (developed on maptools 1.3 b63, but probably compatible with previous versions)
   Credits:
      Author: Chris Randall (aliasmask @ rptool.net)
      WOTC D&D 3.5 SRD mssql database of spells
      www.pathfindersrd.com open source pathfinder database (csv)
      Western Washington University Libraries Special Collections for Lib image
      Random open source library for paper image.
      The lovely people at RPTool.net for answering my dumb questions and inspiring me to contribute.
   
   Distribution and licensing:
      Open source. No part of this may be redistributed for resale without expressed written permission
      from the above credited people or their agents.
      
   Release Date: January 25, 2010

Files Included:
* AliasSpellLib_dnd35_pathfinder_v1.2.rptok - Library Token
* SpellDescriptions.mttable - Spell Descriptions Table
* SpellListIndex.mttable - Spell indexing table
* PFSpellDescriptions.mttable - Spell Descriptions Table
* PFSpellListIndex.mttable - Spell indexing table

Instructions to Install mod:
* After unpacking Zip, drag Library Token on to your map.  Make sure it is named correctly "Lib:AliasSpellLib"
* Go to Tables and Import "SpellDescriptions.mttable"
* Go to Tables and Import "SpellListIndex.mttable"
* Go to Tables and Import "PFSpellDescriptions.mttable"
* Go to Tables and Import "PFSpellListIndex.mttable"
* Set up campaign properties for lib token

I used SpellLibGlobals and put in the properties of the following:

SpellDescriptionTableName
SpellListIndexTableName
SpellIndexKeywords
isFrame
PageCaching
cachedPage
SpellIndexKeywordsRaw
cleanSpellNames
cacheMenu
cachedIndexLinks
cachedSpellLinks
isPathfinder

In the Lib file, run Config_Library and set up your system. Defaults are the best settings.  But here is how to set it up manually:
- For D&D 3.5
** spellDescriptionTableName - set to SpellDescriptions or the name of the Spell Descriptions table.
** SpellListIndexTableName - set to SpellListIndex or the name of the Spell List Index table.
- For Pathfinder
** spellDescriptionTableName - set to PFSpellDescriptions or the name of the Spell Descriptions table.
** SpellListIndexTableName - set to PFSpellListIndex or the name of the Spell List Index table.
* isFrame - set to 1 or 0 (1 is for frame popup and 0 is for dialog popup)
* PageCaching - set to 1 or 0 (1 is to cache pages for speed, 0 to turn it off)
* cachedPage - set to {} if empty, otherwise, leave it alone.  You can also delete all the pages cached by setting to the default.
** The below values should really only be set by Config_Library
* SpellIndexKeywordsRaw - this is an array of unique keywords from the SpellIndexKeywords Property.
* cleanSpellNames - used for creating spell links for other Aps (ie Plothos'/Wrathgon's Spell Managers)
* cacheMenu - this is the top alpha menu A-Z cached data.
* cachedIndexLinks - these are the cache links from all the index pages.
* cachedSpellLinks - pre-generated links for spell to help speed things up
* isPathfinder - set 1 for pathfinder, 0 for D&D 3.5 and -1 to reset and run Config_Library from scratch.

To integrate with another lib file you can go to lib token and import "AliasSpellLib_v1.1_macroset.mtmacset" and update your campaign properties to include the above campaign properties and values.

! Note: do not set the campaign properties with default values because it will not work.

Functions Included:
   Setup Group
      onCampaignLoad() - loads the UDFs
   Private Group (Holds UDFs)
      SpellLibrary(breadcrum,isFrame(opt)): void
      - This macro creates a popup of the spell description or a spell index given the breadcrum path.
      -  optionally, the popup can be changed to dialog or a frame
         breadcrum - Path of page being displayed.
         isFrame - determins output type, frame(1) or dialog(0)
         
      getSpellIndex(spellName): Index(int)
      - This macro looks up the table index given a spell name      
         spellname - name of the spell being indexed (case sensative)
         
      getSpellData(spellName | Index): DescriptionData(String Property List)
      - This macro retrieves the data structure given a spell name or table index
         spellname - name of the spell being referenced
         index - table number in SpellDescriptions table
         
      framePopup(frameVarName,htmlOutput,isFrame): void
      - This macro will create a popup frame or dialog given the passed html format
         frameVarName - This is the variable name of the frame (not the title)
         htmlOutput - Any character string to be displayed in frame
         isFrame - determins output type, frame(1) or dialog(0)

      glp(libPropertyName): libPropertyValue(any)
      - This macro gets the library property with a shorter name and some error checking
         libPropertyName - Name of property to be retrieved
         
      slp(libPropertyName,libPropertyValue): void
      - This macro sets a library property with a shorter name and some error checking
         libPropertyName - Name of the property to be set
         libPropertyValue - Value to be set

      css_SpellLibrary(): void
      - This macro holds the CSS data for the display page.
      
      cache(): void - Removed
      
      cl(keyword): link(string)
      - This macro will grab a cached link (cl) from cachedIndexLinks Library Properties
         keyword - keyword must be in the SpellIndexKeywordsRaw Library Properties.
         
      mil(string,filter,type): link(string)
      - This macro makes index links (mil) from a passed string.
         string - String being passed to convert to links
         filter - category type of links in string
         type - Currently only using 1 method and that is a string list. "list"
         
      msl(spellRef,breadcrum(opt)): link(string)
      - This macro makes a spell link (msl) from a passed string
         spellRef - This is either the spell name or index of a spell
         breadcrum - This is an array of the path to the spell
         
      getBody(bodyObj,breadcrum): htmlOutput(string)
      - This macro sorts through bodyObj to output spell links or indexes. Create because of macro nesting limitation
         bodyObj - This is either a 1 or 2 dim array hold line data to be outputed
         breadcrum - This is an array of the path to the spell

      getPageCache(breadcrum): isCashed(bool)
      - This macro will output a cached page and will abort any further code in caller or return 1 if not cached
         breadcrum - path of page is used to retrieve the cacheKey from storage in Lib Token
         
      getSpellName(index): spellName(string)
      - This macro will convert the index of a spell to its db name
         index - table number in SpellDescriptions table
         
      setPageCache(breadcrum,output): void
      - This macro will store a generated html page.
         breadcrum - path of page is used to set the cacheKey for storage in Lib Token
         output - generated html text to be stored and displayed later

      getShortDescription(spellname | index): shortDescription(string)
      - This macro gets the short description of a spell
         spellname - name of the spell being referenced
         index - table number in SpellDescriptions table
         
      csl(cleanSpellName): link(string)
      - This macro will return a spell link
         cleanSpellName - name of spell with only a-z characters in name
         
      makeKeywordSpellList(keywords): linkList(string)
      - This macro will convert a list of spell names and convert found spells in to links
         keywords - list of spell names
         
      searchSpellLink(keyword): link(string)
      - This macro will a spell link given the spell name
         keyword - spell name
         
   Tools Group
      Open Spell Library(): (macro button)
      - Opens the spell library.  Can be copied to campaign macros for others to use.

      Config_Library(): (macro button)
      - This macro can reset all the Library Properties with input from the user, but these should only be input by Config:
         * SpellIndexKeywordsRaw - this is an array of unique keywords from the SpellIndexKeywords Property.
         * cacheMenu - this is the top alpha menu A-Z cached data.
         * cachedIndexLinks - these are the cache links from all the index pages.
         * cachedSpellLinks - pre-generated links for spell to help speed things up
         * isPathfinder - set 1 for pathfinder, 0 for D&D 3.5 and -1 to reset and run Config_Library from scratch.

Changes made for v1.2
   Error checking for misloading tables and properties
   Added "Install Tips" tab to first time load
   Changed displayPage to SpellLibrary and set Auto Execute to OFF
   Added tooltip to spell links with short description
   Not including macroset seperately.  I doubt it was being used, but is still available as part of token.

Changes made for v1.1
   Combined 3.5 and Pathfinder functionality using the Config_Library macro
   Changed the DB on for both PFSpellDescriptions.mttable and SpellDescriptions.mttable to fix data issues
   Added spell link caching to help speed up Plothos'/Wrathgon's spell managers
   Made many changes to various macros to help integrate and speed up processes
   Added failsafe to Open Spell Library to run Config_Library when needed

Changes made for v1.0a:
   displayPage() - added default value for xpCost_ because it's not included in pathfinder db
   cache() - added the default keywords for pathfinder when clearing the cache.
   Token Lib:AliasSpellLib - Added lib property "isPathfinder" for future config and current caching.
   Table PFSpellDescriptions - added database for pathfinder spells
   Table PFSpellListIndex - added database indexes for the various spell lists and indexing.

Changing from 3.5 to Pathfinder and back
   Run Config_Library
   * To get intro message, delete  isPathfinder entry.
   
Final Note:
   Future release will have additional spell info for development of other mods.
Attachments
AliasSpellLib_dnd35_pathfinder_v1.2_PFPreload.rptok
PF Caching Preloaded - lib token only
(323.51 KiB) Downloaded 1228 times
AliasSpellLib_dnd35_pathfinder_v1.2_35Preload.rptok
3.5 Caching Preloaded - lib token only
(306.59 KiB) Downloaded 1101 times
Last edited by aliasmask on Sat Oct 09, 2010 9:34 am, edited 29 times in total.

User avatar
aliasmask
RPTools Team
Posts: 9023
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: Spell Reference SRD 3.5

Post by aliasmask »

Quick Install Instructions

In a new campaign:
  • Drag and Drop preloaded token on to map - (pick PF for patherfinder). If a number appeared after the lib name, delete it. The token name should be "Lib:AliasSpellLib". Also, make sure the "visible" checkbox is checked. The lib token has to be visible to be used. But you can change the layer to the hidden layer so players can't see it.
  • Install tables - From the "Tables" window (click Window at top and make sure "Tables" is checked) click import. Browse to where you unzipped the files and import the SpellDescritions and SpellListIndex tables of the game system you're playing (ie PF for Pathfinder).
  • Run onCampaignLoad - Click the lib token and click the onCampaignLoad button to set up the functions.
  • Copy Spell Library Button - Drag the "Spell Library" button under the "Campaign Window Macros" group to your Campaign Window so others can use it and for easy access. Oops, I haven't release that yet. I'll do that by tomorrow.
You are now ready to go. If you get an error, it may be memory related. I run my game on a machine with 2gigs of memory and my Maptool setting are set to 1024 max mem and 2 for stack. Some people may want to try a stack of 3, but if it runs on 2, stick with that.

Special Note: You won't need to set up the campaign properties if you use the preloaded token. But if you need to set up the properties then do the following:
  • Create a new Token type - Under Campaign Properties, go to Token Properties.
    • Under name put "SpellLibGlobals".
    • In the box below copy and paste these properties:

      Code: Select all

      SpellDescriptionTableName
      SpellListIndexTableName
      SpellIndexKeywords
      isFrame
      PageCaching
      cachedPage
      SpellIndexKeywordsRaw
      cleanSpellNames
      cacheMenu
      cachedIndexLinks
      cachedSpellLinks
      isPathfinder
    • Click "Update" and click "Okay"
  • Change lib token Properties type - Double click lib token. Click the Config TAB. Under "Properties", select "SpellLibGlobals"
  • Click "Okay"
Last edited by aliasmask on Mon May 17, 2010 12:38 pm, edited 10 times in total.

Shpena
Cave Troll
Posts: 97
Joined: Tue Oct 13, 2009 11:41 pm
Location: Japan

Re: Spell Reference SRD 3.5

Post by Shpena »

Great stuff man.

It would be interesting to see how to meld this and Plothos/Wrathgon's thing.
"Time is a great teacher, but unfortunately it kills all its pupils."
- Louis-Hector Berlioz

User avatar
aliasmask
RPTools Team
Posts: 9023
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: Spell Reference SRD 3.5

Post by aliasmask »

Shpena wrote:Great stuff man.

It would be interesting to see how to meld this and Plothos/Wrathgon's thing.
It should be Easy, just change the output when a spell is cast to a macrolink that calls displaySpellDescriptionFrame(SpellName). That is one way to integrate. I plan on creating a header to search by Letter and create links to the various spell lists. Ultimately, I would like to see a spell manager, combat system that is integrated where you can cast a spell and it will roll damage or display effects and can select targets and apply effects automatically... but that's just a pipe dream for now. I'm tempted to start my own dumbed down spell manager, with some inspirations from Plothos/Wrathgon, but I'm intentionally making mods they can use to see how it works out.

I spoke to Plothos(edit) briefly, but I haven't had a chance to test things out with a different casting method I use. If that goes well, I'll probably continue to stay the course with the current spell manager.

Oo, I almost forgot. I had an idea for creating a class database that can help automate some things in the 3.5 core.. like Saving Throws, HD, HP and traits. I really like the direction the core is going using items. It would be nice if someone could create a database of basic items and magic items. One thing I would like to see is the items updating skills and having on/off buttons like a special ability in the spell manager, but linked to the item.

User avatar
aliasmask
RPTools Team
Posts: 9023
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: Spell Reference SRD 3.5

Post by aliasmask »

I had fun making the download button from psp tutorial.

Aqua Gel Cap Tutorial

User avatar
aliasmask
RPTools Team
Posts: 9023
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: Spell Reference SRD 3.5

Post by aliasmask »

Here is a sneak of the newer interface. I'm still formating and deciding on colors and backgrounds, then I'll tackle linking the macrolinks for the various spell list features.

The A-Z will sort spells alphabetically. I'll also toss in a left and right arrow for general browsing. All the classes, schools, domains, subschools, and descriptors will be grouped. I've already done all the indexing and data work, it's just a matter of a little more code and text formating to make it pretty.
Example with Search.png
Example with Search.png (14.15 KiB) Viewed 27355 times

User avatar
loogie
Dragon
Posts: 267
Joined: Wed Sep 05, 2007 4:53 pm
Contact:

Re: Spell Reference SRD 3.5

Post by loogie »

looks good! i'm not a dnd player, so I would suggest making it a possible open lookup library where you could create your own uses (as in, create a library, and the entries you want for each item, and then allow users to add to the library) that way any system could use it for more things then just spells...

as is, i think the only thing that might be usefull would be a search option, so that you could just search the lib for a spell with a word in it... interesting stuff!

User avatar
aliasmask
RPTools Team
Posts: 9023
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: Spell Reference SRD 3.5

Post by aliasmask »

Thanks for the input. I'm saving the spell data in a table for accessibility and speed, but it doesn't allow for modification (on the fly) and the same is true for the indexing method. I will down the road add the ability to add your own spells which will be saved as macros (i think) for ease of portability since there isn't really an accessible db with MT.

As for a key word search, that will be limited to spell names. Currently, you have to type in the exact spelling and the word is case sensitive just until I got the functionality down. But I'm changing that now as we speak. I'm adding indexes for the before mentioned, so you'll be able to browse for spells as well. It'll be path specific from Home | (class,domain,school) categories | (class,domain,school) | spell description, so you'll be able to check out many related spells quickly. And the spell descriptions will have all the links relating to that spell as well including descriptors and subschools which can also be accessed by browsing from the Home page. Clicking the SpellLib icon will always bring you to home page. I still have some more code to do (i put on hold to work on my current dnd game), but I'm nearly finished with everything I spoke about.

I'm not actually interested in making a db framework, but my code can easily be adapted for other dbs. Most of the changes would be done on the html pages for your specific db (variable names and such). Dropping in the data and indexes was the easy part. If you have another db you would like to apply to my spell framework(??), I can guide you in how to adapt it. But we should wait until 1.0 comes out first :)

Generally speaking, the format of the table is 0 holds the index which is an array. The position in the array for the searched item is the table index +1. So, for spell descriptions, it's just a string property list (name = value;) when the names are then used as variable name with varsFromStrProp(string,"UNSUFFIXED") which adds "_" to the name so it doesn't interfere with other variable names. So, if you can come up with you own list of names and values and you write your own html page to display, you can pretty much use anything. I try to keep the hardcoding out of my code and usually refer to a set variable in most cases.

User avatar
aliasmask
RPTools Team
Posts: 9023
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: Spell Reference SRD 3.5

Post by aliasmask »

I'll be uploading version 1 later today. It's all done, but I'm putting together documentation and stuff. I hope there is someone out there who will use it.

As a super brief overview I added all the index navigation and I didn't really see a need for a Spell keyword search. On top is the spells listed by first letter, or you can navigate from home, along the breadcrum or the links on the spell description page. Jumping to pages with a lot of data is instantaneous if cached. School, Domain and Class list the spells and short descriptions. It seems pretty bug free as is, so I'm calling it v1. I plan on taking a look at Plothos/Wrathgons spell manager and see where I can insert my macro to offer the Spell Library Reference for a spell. But I did notice one thing already and that is the spell names have been modified removing commas and special characters which will be a problem since I use the names as is in the book.
SpelllibExample.png
SpelllibExample.png (257.87 KiB) Viewed 27270 times

User avatar
Paradox
Dragon
Posts: 724
Joined: Fri Feb 27, 2009 4:01 pm

Re: Spell Reference SRD 3.5

Post by Paradox »

Awesome!

I missed this thread somehow.. but I love that you customized the spell entry. Once you have some documentation, I'll start putting something together to e-mail you all the Pathfinder spells. I just need to know how to set it up for you.

If you can do what you say, that is take data e-mailed to you, I can promise this will get used.

If you can inter-relate it to to Plothos' work.. so much the better!
I no longer believe that MapTools is usuable or intended just for programmers. MapTools is for everyone.

User avatar
Azhrei
Site Admin
Posts: 12086
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Re: Spell Reference SRD 3.5

Post by Azhrei »

aliasmask wrote:But I did notice one thing already and that is the spell names have been modified removing commas and special characters which will be a problem since I use the names as is in the book.
Naw, a simple use of Wiki: replace() should do the trick. Something like:

Code: Select all

[h: newStr = replace(oldStr, "[, ']+", "") ] 
(The plus sign isn't needed but should speed up the replacement a little bit.)

User avatar
aliasmask
RPTools Team
Posts: 9023
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: Spell Reference SRD 3.5

Post by aliasmask »

New Version is available at top of thread. Feedback is always appreciated.

User avatar
Paradox
Dragon
Posts: 724
Joined: Fri Feb 27, 2009 4:01 pm

Re: Spell Reference SRD 3.5

Post by Paradox »

All I can say is how heartening it is to see the planned Pathfinder Support. Thank you!
I no longer believe that MapTools is usuable or intended just for programmers. MapTools is for everyone.

User avatar
aliasmask
RPTools Team
Posts: 9023
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Spell Reference SRD 3.5 AND PATHFINDER

Post by aliasmask »

I have added a download for Pathfinder Spell Reference Library.

User avatar
aliasmask
RPTools Team
Posts: 9023
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: Spell Reference D&D 3.5/Pathfinder SRD

Post by aliasmask »

I'm going to tweak the db, change it to json rather than a String Property List because of the ;'s found in the description text. It doesn't crash anything, but it does cut off the rest of the descriptions on about 40 spells (i'm guessing), like symbol of death. I'm also going to add <p> to the Pathfinder descriptions so the formatting matches 3.5. That along with the functions to handle plothos and wrathgons' versions of the spell managers and we'll call it version 1.1. I'm doing some traveling today, so I'll post it tomorrow.

I should just add the config popup too. It won't have much, but it'll be there to build on later.

I trying to decide on my next project and I'm leaning towards either tweaking core3 framework to apply status changes a little better while adding my own combat rules tweak or making a db for spells to apply damage and effects. I know I can't complete that though without the ability to manipulate images with macros, but I can do the damage part though. So, if a spell can do damage, it'll do it based on spell and caster level.

edit: Okay, I'm late.. I know. The rework putting the db on a token has brought up some speed issues that I'm trying to resolve... that and I have been putting it off. I could have a break through anytime now though.. I just have to keep pecking at it until it gets to a working state.
Last edited by aliasmask on Thu Jul 08, 2010 1:10 am, edited 1 time in total.

Post Reply

Return to “Drop-In Macro Resources”