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.
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
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.