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

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 »

Hey would you be able to look at the datebase code for my program that adds and deletes spells from various groups like classes and schools. I have not got to working the way i want it to and without really knowing alot about databases i am at a loss. If you got a min that would be great.

My next feature i will add is take combat spells and healing spells and start gathering the info for them to be used ON tokens. I think i will start with a few then let the user define the ones they want, then ask anyone using the program to post these objects so i can add them into a master database.

But i see need to get the bugs worked out still not working well enough to rely on in a game.

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 »

Adding your lib token but it is not linking spells, take a look new update has your lib in it.

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

Re: Spell Reference D&D 3.5/Pathfinder SRD

Post by aliasmask »

Did you configure the Spell Lib... choosing 3.5 or PF and did you run the onCampaignLoad to define the functions?

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 »

yep did all that, followed setup rules to the letter. The file is uploaded if want to have a look when u got a min

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

Re: Spell Reference D&D 3.5/Pathfinder SRD

Post by aliasmask »

I downloaded your 10c and changed the one line that outputs in View Spells Text.

Code: Select all

...
[r:makeKeywordSpellList(replace(json.toList(check),"-[BSD]",""))]<br>
...
 
Of course, you'll have to put the full if check I wrote so if ppl don't have the lib then it won't break.

Seems to work. I'll attach the campaign file. You can send me yours and tell me what where you're trying to call my UDF.
Attachments
SpellManagerRewriteV10c.cmpgn
(1.04 MiB) Downloaded 107 times

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

Re: Spell Reference D&D 3.5/Pathfinder SRD

Post by aliasmask »

I also updated Show DomSpec Spells.
Show DomSpec Spells

Code: Select all

[h:passed=macro.args]

[h:spec=getStrProp(passed,"Spec")]
[h:dom=getStrProp(passed,"Dom")]
[h:classviewed=getStrProp(passed,"Class")]
[h:spelllevel=getStrProp(passed,"Lvl")]
[h:prep=getStrProp(passed,"Prep")]


[r, if(spec !=""), CODE:{
    [r:"<br><i><font size='-2'><b>SPECIALIST</b>:</font></i> "] 
    [r:makeKeywordSpellList(replace(spec,"-[BSD]",""))]
};{}]
[r, if(dom !=""), CODE:{
    [r:"<br><i><font size='-2'><b>DOMAIN</b>:</font></i> "] 
    [r:makeKeywordSpellList(replace(dom,"-[BSD]",""))]
};{}]
 

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 »

the casting is still not linking to any spell when i cast a spell though.

Not sure what that new code is trying to do, i dont seen any changes in the view spells frame when i load it.

Once it starts to work, can i use your link search to do the following

looks for a name of spell, finds it, checks it object dmg=1 if so read in dmg type and dice damage and returns it to calling function.

That way i can start inputing spell damages to be called and even healing spells to be applied to tokens

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

Re: Spell Reference D&D 3.5/Pathfinder SRD

Post by aliasmask »

I accidentally posted the reply to this post on another thread, but I loaded 10c in to my existing campaign with my previously set up tokens. I cast a spell and it gave a link. I clicked the link and it showed me the spell. So, seems to work okay.

Maybe you can send me your campaign file and I may be able to debug for you. But I do have a busy weekend coming up and I'm not sure how much time I can dedicate at the moment since my new job, but I don't expect the problem to be too bad.

You should also update your campaign properties for your download to include CasterInfo and other required fields in the basic config. (That's why I saved the lib file and loaded it in to my other campaign).

PS - Ah, the -D -S -B spells need to be filtered to be linked. I suggest wrapping the variable in replace(VARNAME,"-[BSD]","").
Last edited by aliasmask on Thu Jan 14, 2010 11:56 pm, edited 1 time in total.

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 »

10c has your framework installed in it, so if you load that up click on caster token and cast a spell it wont show the link

I do notice the cachedSpellLinks object is empty and your searchlink macro looks like uses that to grab link from and post it back
Last edited by wrathgon on Thu Jan 14, 2010 11:59 pm, edited 1 time in total.

User avatar
aliasmask
RPTools Team
Posts: 9029
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:10c has your framework installed in it, so if you load that up click on caster token and cast a spell it wont show the link
My 10c I downloaded doesn't have the needed campaign properties, like CasterInfo. I wasn't sure of the all the variables needed, so I just saved and loaded the lib file in to my working campaign.

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 »

they are in already in 3.5 and PF token properties, but i added them into basic as well now for next upload

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 »

how can i use your subschools to check if a spell cast is in the subschool? I still cant get the links working though

User avatar
aliasmask
RPTools Team
Posts: 9029
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:how can i use your subschools to check if a spell cast is in the subschool? I still cant get the links working though
I'm not sure why. Just delete all the data in the lib file and run config again. I loaded your lib and it seems to work for me as is. I posted a slight change where you should filter the link to remove the -D, -S -B so it will create a link.

About the school lists. It's kind of complicated because there's a lot of converting needed from your system to mine. But the lists are in SpellIndex.mttable in the first row (row 0). It's an array of objects where the array position is the index position in the table. So, first item (index 0) in array is first row.

Code: Select all

[H: SpellListIndex = table("SpellListIndex",0)]
[H: obj = json.set("{}","school","Enchantment")]
[H: index = json.indexOf(SpellListIndex,obj)]
[H: spellList = table("SpellListIndex",index+1)] 
This returns a json.array of indexes to SpellDescriptions Table. You can access the names only with

Code: Select all

[H: spellName = json.get(table("SpellDescriptions",0),index-1)] 
or the spell data with

Code: Select all

[H: spellData = table("SpellDescriptions",index)] 
PS. You can change the obj to "subschool","charm" if you want subschool lists. Also, the property SpellListKeywords has a list of the various spell lists. ie

Code: Select all

[H: subschoolList = json.get(getLibProperty("SpellListKeywords"),"subschool")] 
Last edited by aliasmask on Sat Jan 16, 2010 4:18 am, edited 2 times in total.

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 »

hmmm ok it might be easier just to make a list i want to check against and store it like i do schools and such.

ok will try to del all the info and rerun that did the trick :)

where did you post the code? was it those changes from before, i put them in but it still put out a -D after

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 »

aliasmask wrote: PS - Ah, the -D -S -B spells need to be filtered to be linked. I suggest wrapping the variable in replace(VARNAME,"-[BSD]","").

ok will try this

Post Reply

Return to “Drop-In Macro Resources”