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

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

Re: Spell Reference D&D 3.5/Pathfinder SRD

Post by Azhrei »

Your issue with the semicolons should be fixed in the latest build (b63) as I found a problem with the handling of string property lists and Trevor indicated the patch had made it into the code. It could be that the semicolons are tickling a different -- but related -- bug somewhere else. I may look into that if I get some time.

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

Re: Spell Reference D&D 3.5/Pathfinder SRD

Post by aliasmask »

Unless the code recognizes there is no accompanying equals sign, it's just not formated correctly to a string property. ie, val1="val1";val2="val2";val3='val3'

val1 and val3 are fine, but val2 is &quot and there is probably another property val2&quot with no associated value.

jsharen
Giant
Posts: 196
Joined: Tue Feb 05, 2008 3:39 pm

Re: Spell Reference D&D 3.5/Pathfinder SRD

Post by jsharen »

aliasmask,
Excellent work, quick question. I am attempting to integrate with plothos's spell manager and am having some challenges. I only have a basic understanding of the macro language (really looking forward to the eventual js integration).

How would I give a spellname to your functions and just have a link to the spell description appear?

Thanks for any assistance!

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

Re: Spell Reference D&D 3.5/Pathfinder SRD

Post by aliasmask »

If you look at post 2 it will give some details. I wrote a special macro, not in current download, to handle the plothos and wrathgon naming conventions for the spells. One is called searchSpellLink for a single spell (assumed valid spell name) and makeKeywordSpellList for a list of spells (doesn't assume valid spell name).

I'll go ahead and get off my butt today and add those to new download, but you'll still have to modify the lib files in the spell manager to call those functions at the right place. (Looking at post 2) I do a check to see if the macro is defined as a UDF so it doesn't interfere with the normal process if my SpellLib is not loaded.

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

Re: Spell Reference D&D 3.5/Pathfinder SRD

Post by aliasmask »

Okay, I posted my latest release and this should be it for awhile. Go to the first post to download, or click the link in my signature.

Post 2 has info on integration with the spell managers.

wrathgon
Dragon
Posts: 735
Joined: Wed Feb 06, 2008 10:28 am
Location: Guildford, UK

Re: Spell Reference D&D 3.5/Pathfinder SRD

Post by wrathgon »

Well you beat me to the punch, i been talking with Azhrei and he can take a spellbook from DMGenie which has ALL the spells from SC and turn them into a json object and break each into fields. You may want to PM him to see if can help you do the same. I see what i can do with adding this into my code, been fighting with the PrC for last few days and trying to get my d20 doc ready to be used by tonight but....

anyways give me a few days and should have a update for my program, then i look at adding this as well.

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

Re: Spell Reference D&D 3.5/Pathfinder SRD

Post by aliasmask »

wrathgon wrote:Well you beat me to the punch, i been talking with Azhrei and he can take a spellbook from DMGenie which has ALL the spells from SC and turn them into a json object and break each into fields. You may want to PM him to see if can help you do the same. I see what i can do with adding this into my code, been fighting with the PrC for last few days and trying to get my d20 doc ready to be used by tonight but....

anyways give me a few days and should have a update for my program, then i look at adding this as well.
I used the DB from WoTC and srdpathfinder to put the spells in my mssql db. From there I cleaned up the data and exported them to xml format as json objects. The real trick was sorting the data in to the various indexes and I saved that in a separate table. I'm pretty sure I have all the official spells from both systems.

For the spell descriptions, position 0 is the spell index which is a json array and the spell name at position X +1 is the index for the data in the rest of the table for the json.object data.

For the indexes, it uses a similar method where position 0 in an index of the indexes and it too is an array, but inside each array position is a json.object specifying index type. ie ({"domain":"Air"},{"domain":"Good"},{"descriptor":"air"}

I did it that way because of the name overlap for domains and descriptors although I later changed all the descriptors to lower case and made a new property for RawIndexNames to speed up some processes. Some of the indexes are 1 dimensional arrays and others are 2 dimensional arrays depending on the sort method (ie by name or by level then name)

This mod is pretty much done, unless some feature requests come through or bugs I overlooked, or I get bored and to add some tweaks.

It's pretty easy to get a link back.. simply use searchSpellLink(spellName) and it will return a link if found or spellName if not found. makeKeywordSpellList(spellNameList) does the same thing, but with a list.

I cached all the spell links in to a json object where the key is the spell name in lowercase with all non-letters pulled out. So, even faster than using searchSpellLink, you can do json.get(glp("cachedSpellLinks"),spellName) that's if spellName meets the above criteria. Since the data coming in isn't trusted, I have to do some filters and some data checks before doing the json.get.

As for more spells from different sources, it's not a big deal to add as long as I can get it in to mssql with all the relevant data. Doing the indexes is more of a chore, but I have a system of running my query for the keyword, pasting it in to excel or text editor to create the format for a json.array in an xml document then uploading it as a table.

wrathgon
Dragon
Posts: 735
Joined: Wed Feb 06, 2008 10:28 am
Location: Guildford, UK

Re: Spell Reference D&D 3.5/Pathfinder SRD

Post by wrathgon »

Well i am thinking about how to using it for my system, which breaks down spells into rarity(common uncommon) and complexity(Simple, Complex) so got to look into how i add those to the spells easy

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

Re: Spell Reference D&D 3.5/Pathfinder SRD

Post by aliasmask »

wrathgon wrote:Well i am thinking about how to using it for my system, which breaks down spells into rarity(common uncommon) and complexity(Simple, Complex) so got to look into how i add those to the spells easy
Sounds like you want to generate a spellbook based on rarity. Other than that, I'm not sure why you would want to do that. That is something that crossed my mind too... generating available spells (a template), but I was going to just simply save global spell books and name them like "wizard 11" and plop them on npcs wizards.

What I created so far is just a reference to a spell. It doesn't assume any game mechanics like casting spells, giving DCs or making spell lists. I'm always running across a spell that I just don't quite remember all the details, so I pull out the players handbook and look it up. Having this mod, saves me some time.

What I'm working on next is going to be a huge project. I'm going to try and tackle the combat system as a whole, duplicating many things in 3.5 core already done but I'm going to try and streamline and interconnect many things as well as add my own personal house rules as options. I'm going to try and break it in to smaller chunks and keep it compatible with what's out there right now. One of the chunks is having separate spell information for combat, (range formulas for ranged spells, damage formulas, area formulas, applying target effects and damage).

An example would be casting fireball. A token casts fireball and a fireball token appears. The player moves the center of fireball token and runs the macro on the token to select targets and apply damage. All targets with in range now get a macrolink to make saving throws, apply defenses and confirm damage. The GM will have a master list and can do confirmation for players and NPCs and will see any outstanding combat damage not applied. But there are some things I need to do before that, like building a routine to apply damage and healing while keeping it intuitive and fast. I'm trying to brainstorm all the parts I'm going to do before hand so I don't end up doing one thing and forgetting another thing.

I thought about doing my own simplistic spell manager where I manually input the caster level, class and ability mod, then chose my spells and casting method (memorize and forget, spell slot) and then be able to save, copy and edit it later for a token, but it can be stored globally to be reused on another token. I could use the class as a basis for choosing spells, or use all spells, or use a saved spellbook. But again, what's out there now doesn't make this a top priority and there are other things I want to do.

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

Re: Spell Reference D&D 3.5/Pathfinder SRD

Post by aliasmask »

As it turns out, it looks like Plothos' spell manager is a little more complicated to update. I went ahead and rewrote (added 2 new blocks of code and changed a variable name) for "View Spells Text" under "1 Spell Management", so here it is:
View Spells Text

Code: Select all

<html>
  <head></head>
    <body>
      <table border="1" width="800" background="[r:getImage('Lib:spells')]">
        <tr background="[r: getImage('image:fog')]">
          <td>

[h:classviewed=macro.args]
[h:lvl0=getProperty(classviewed+"0")]
[h:lvl1=getProperty(classviewed+"1")]
[h:lvl2=getProperty(classviewed+"2")]
[h:lvl3=getProperty(classviewed+"3")]
[h:lvl4=getProperty(classviewed+"4")]
[h:lvl5=getProperty(classviewed+"5")]
[h:lvl6=getProperty(classviewed+"6")]
[h:lvl7=getProperty(classviewed+"7")]
[h:lvl8=getProperty(classviewed+"8")]
[h:lvl9=getProperty(classviewed+"9")]
[h:dom1=Domain1]
[h:dom2=Domain2]
[h:dom3=Domain3]
[h:dom4=Domain4]
[h:dom5=Domain5]
[h:dom6=Domain6]
[h:dom7=Domain7]
[h:dom8=Domain8]
[h:dom9=Domain9]
[h,if(classviewed=="Assassin"):maxlev=AMSL]
[h,if(classviewed=="Bard"):maxlev=BMSL]
[h,if(classviewed=="Blackguard"):maxlev=BGMSL]
[h,if(classviewed=="Cleric"):maxlev=CMSL]
[h,if(classviewed=="Druid"):maxlev=DMSL]
[h,if(classviewed=="Paladin"):maxlev=PMSL]
[h,if(classviewed=="Ranger"):maxlev=RMSL]
[h,if(classviewed=="Sorcerer"):maxlev=SMSL]
[h,if(classviewed=="Wizard"):maxlev=WMSL]

<font size="+2"><b>{classviewed} Spells Known</b></font>
 [r:macroLink("Main", "Spell Main@Lib:spells", "none", classviewed,token.name)]
 [r:macroLink("Learn", "Learn Spell@Lib:spells", "none", classviewed,token.name)]
 [r:"Known"]
 [r,if(BGMSL+CMSL+DMSL+PMSL+RMSL+WMSL>0),code:{[r:macroLink("Prepare", "Spell Prep@Lib:spells", "none", classviewed+",4",token.name)]};{[r:macroLink("Prepare", "Not a Prepper@Lib:spells", "self", "",token.name)]}]
 [r,if(BGMSL+CMSL+DMSL+PMSL+RMSL+WMSL>0),code:{[r:macroLink("Prepped", "View Prepped@Lib:spells", "none", classviewed,token.name)]};{[r:macroLink("Prepped", "Not a Prepper@Lib:spells", "self", "",token.name)]}]
 [r:macroLink("Cast", "Spell Cast@Lib:spells", "none", classviewed,token.name)]
 [r:macroLink("Spec Abils", "Spec Abil Main@Lib:spells", "none", "",token.name)]
<br><br>

[r,if(AMSL>0 && classviewed!="Assassin"),code:{[r:macroLink("Assassin Spells","View Spells@Lib:spells","none","Assassin",token.name)+" "+" "]};{[r,if(AMSL>0):"Assassin Spells  "]}]
[r,if(BMSL>0 && classviewed!="Bard"),code:{[r:macroLink("Bard Spells","View Spells@Lib:spells","none","Bard",token.name)+" "+" "]};{[r,if(BMSL>0):"Bard Spells  "]}]
[r,if(BGMSL>0 && classviewed!="Blackguard"),code:{[r:macroLink("Blackguard Spells","View Spells@Lib:spells","none","Blackguard",token.name)+" "+" "]};{[r,if(BGMSL>0):"Blackguard Spells  "]}]
[r,if(CMSL>0 && classviewed!="Cleric"),code:{[r:macroLink("Cleric Spells","View Spells@Lib:spells","none","Cleric",token.name)+" "+" "]};{[r,if(CMSL>0):"Cleric Spells  "]}]
[r,if(DMSL>0 && classviewed!="Druid"),code:{[r:macroLink("Druid Spells","View Spells@Lib:spells","none","Druid",token.name)+" "+" "]};{[r,if(DMSL>0):"Druid Spells  "]}]
[r,if(PMSL>0 && classviewed!="Paladin"),code:{[r:macroLink("Paladin Spells","View Spells@Lib:spells","none","Paladin",token.name)+" "+" "]};{[r,if(PMSL>0):"Paladin Spells  "]}]
[r,if(RMSL>0 && classviewed!="Ranger"),code:{[r:macroLink("Ranger Spells","View Spells@Lib:spells","none","Ranger",token.name)+" "+" "]};{[r,if(RMSL>0):"Ranger Spells  "]}]
[r,if(SMSL>0 && classviewed!="Sorcerer"),code:{[r:macroLink("Sorcerer Spells","View Spells@Lib:spells","none","Sorcerer",token.name)+" "+" "]};{[r,if(SMSL>0):"Sorcerer Spells  "]}]
[r,if(WMSL>0 && classviewed!="Wizard"),code:{[r:macroLink("Wizard Spells","View Spells@Lib:spells","none","Wizard",token.name)]};{[r,if(WMSL>0):"Wizard Spells"]}]
          </td>
        </tr>
[H, if(isFunctionDefined("makeKeywordSpellList")), code: {
   [H: varList = ""]    
   [H, c(maxlev+1): varList = listAppend(varList,"lvl"+roll.count)]
   [H, if(classviewed=="Cleric"),code: {[c(maxlev): varList = listAppend(varList,"dom"+(roll.count+1))]};{}]
   [H: varStr = ""]
   [H, foreach(spellList,varList), code: {[H: varStr = listAppend(varStr,spellList+"="+makeKeywordSpellList(eval(spellList)),";")]}]
   [H: varsFromStrProp(varStr)]
};{}]
        <tr background="[r: getImage('image:fog')]">
          <td>

[r,if(lvl0!=""):"<br><b>Level 0:</b><br> "+lvl0]<br>
<br><b>Level 1:</b><br> {lvl1}[r,if(classviewed=="Cleric"):"<br><font size='-2'><i>DOMAIN:</i></font> "+dom1]<br>
[r,if(maxlev>1):"<br><b>Level 2:</b><br> "+lvl2][r,if(maxlev>1 && classviewed=="Cleric"):"<br><font size='-2'><i>DOMAIN:</i></font> "+dom2]<br>
[r,if(maxlev>2):"<br><b>Level 3:</b><br> "+lvl3][r,if(maxlev>2 && classviewed=="Cleric"):"<br><font size='-2'><i>DOMAIN:</i></font> "+dom3]<br>
[r,if(maxlev>3):"<br><b>Level 4:</b><br> "+lvl4][r,if(maxlev>3 && classviewed=="Cleric"):"<br><font size='-2'><i>DOMAIN:</i></font> "+dom4]<br>
[r,if(maxlev>4):"<br><b>Level 5:</b><br> "+lvl5][r,if(maxlev>4 && classviewed=="Cleric"):"<br><font size='-2'><i>DOMAIN:</i></font> "+dom5]<br>
[r,if(maxlev>5):"<br><b>Level 6:</b><br> "+lvl6][r,if(maxlev>5 && classviewed=="Cleric"):"<br><font size='-2'><i>DOMAIN:</i></font> "+dom6]<br>
[r,if(maxlev>6):"<br><b>Level 7:</b><br> "+lvl7][r,if(maxlev>6 && classviewed=="Cleric"):"<br><font size='-2'><i>DOMAIN:</i></font> "+dom7]<br>
[r,if(maxlev>7):"<br><b>Level 8:</b><br> "+lvl8][r,if(maxlev>7 && classviewed=="Cleric"):"<br><font size='-2'><i>DOMAIN:</i></font> "+dom8]<br>
[r,if(maxlev>8):"<br><b>Level 9:</b><br> "+lvl9][r,if(maxlev>8 && classviewed=="Cleric"):"<br><font size='-2'><i>DOMAIN:</i></font> "+dom9]<br><br>

        </td>
      </tr>
    </table>
  </html>
It won't do anything different if AliasSpellLib isn't loaded, but it will make all the spells under Spells Known have links to the spell library. Just copy and paste code text in to macro. I used v1.3.0 as my template.

*side note: code=php doesn't like the above code. Not sure why.

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

Re: Spell Reference D&D 3.5/Pathfinder SRD

Post by aliasmask »

Gaaa... I just noticed the 3.5 db still has 3.0 spell names (ie Floating Disk rather than Tenser's Floating Disk) I'll have to go through the spell list and update those for the next release. PF has Floating Disk as well, but I'm assuming that's the way it's supposed to be since I don't play PF. Maybe I'll just copy the spell under the other name or do something else like make an alias list. I think I like that idea. I can combine alias' and custom spells in to the same functionality. I'm just worried about slowing things down. I'll have to mull it over.

wrathgon
Dragon
Posts: 735
Joined: Wed Feb 06, 2008 10:28 am
Location: Guildford, UK

Re: Spell Reference D&D 3.5/Pathfinder SRD

Post by wrathgon »

no in my system not everyone can cast complex spells, so i need to know which are complex and which are simple. The rarity is to learn and ID spells, which doesnt need to be added in now but want to be able to have spellcraft checks rolls so those that make it see the spell name those that dont get cast a spell.

Azhrei should be able to have these added into the json object automatic and have templates too. i have not looked at your work yet will so this week.

If all it is, is an look up i got DMGenie for that!

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

Re: Spell Reference D&D 3.5/Pathfinder SRD

Post by aliasmask »

wrathgon wrote:If all it is, is an look up i got DMGenie for that!
Yep, that's all it is. I haven't used DMGenie, so I guess it's the same. I'm guessing you have to pay for DMGenie as well. I used to use http://www.d20srd.org/ for online lookup, but I can't always get online when I'm playing.

wrathgon
Dragon
Posts: 735
Joined: Wed Feb 06, 2008 10:28 am
Location: Guildford, UK

Re: Spell Reference D&D 3.5/Pathfinder SRD

Post by wrathgon »

yea its like $20 but was well worth it as i been making PCs with it for 3 years. Now it is a dead program with no updates but still has all my PrC and spells for both PF and 3.5 in it so. Well i add that line into my manager as does not do anything if not using your Lib token so. I hope to have the PrC done this weekend and then you can use your request(i should of updated when i finished that but o well PrC took longer than i thought!

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

Re: Spell Reference D&D 3.5/Pathfinder SRD

Post by aliasmask »

I found a minor bug. When I did the index I sorted by name assuming the id's were is alphabetical order (most are), but wotc decided "," was smaller than " " and it entered in to the table in that order. Sooo, I had to redo 1 line in the SpellDescriptions table, entry 0 to change the order or the array items to match the id's. I'll post the fixed file separately and update the full download.

Having them in the wrong order caused some spell data to not match the spell name, ie (Invisibilty Purge shows Invisibility, Greater data) but it only happened on spells that have both a name followed by a comma and space.

Post Reply

Return to “Drop-In Macro Resources”