Pathfinder Spell Database Library (UPDATED 19.0811.1)

Show off your RPG maps, campaigns, and tokens. Share your gaming experiences and stories under General Discussion and save this forum for things you've created that may help others run their own games. Use the subforums when appropriate.

Moderators: Azhrei, dorpond, trevor, Gamerdude

User avatar
Full Bleed
Demigod
Posts: 4444
Joined: Sun Feb 25, 2007 11:53 am
Location: MD
Contact:

Re: Pathfinder Spell Database Library (UPDATED 19.0727.1)

Post by Full Bleed »

aranginor wrote:
Sun Jul 28, 2019 4:48 am
Would like to see functions that will:
I can do this, just need a bit more details of how you want to query the data and what data you expect in return.
Full Bleed wrote:
Sun Jul 28, 2019 1:29 am
Would like to see functions that will:

+Pull list of available spells by class/level.
getSpellList(Class, level, delim) : Default delim to "," which would return comma delineated string list. If "json" is delim, return JSON Array. Similar to other functions in MT (like Wiki: getSelected()).
+Pull Domain spell by type/level.
+Pull Bloodline spell by type/level.

getDomainSpell(Domain Name, Level, delim)
getBloodlineSpell(Bloodline Name, Level, delim)

Delim handled as above.
+Shortcut to display Bloodline info.
+Shortcut to display Domain Info.
This will just dump you on those info pages for easy link from character sheets. You might have something for this already since you have allowed people to set a Class home.

gotoBloodline("bloodline name")
gotoDomain("domain name")

I am assuming that pfspells. will be appended to those function names.


Speaking of bloodlines, I noticed that most (but not all) of the bloodlines on the bloodline list page have "Bloodline" in the name. That's redundant (and I don't think it's always been that way.) You can just list the bloodline names. The ones with "Sorcerer" do need to keep that though.
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."

User avatar
Full Bleed
Demigod
Posts: 4444
Joined: Sun Feb 25, 2007 11:53 am
Location: MD
Contact:

Re: Pathfinder Spell Database Library (UPDATED 19.0727.1)

Post by Full Bleed »

First set of graphics. Wanted to make something that was friendly to narrow windows and good with light and dark frame styles.
Attachments
PFS Color Wheel Curve graphics.zip
(133.68 KiB) Downloaded 16 times
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."

aranginor
Giant
Posts: 131
Joined: Fri Dec 05, 2008 2:32 pm

Re: Pathfinder Spell Database Library (UPDATED 19.0727.1)

Post by aranginor »

The original intent of the overrides was to do the opposite of what was selected. I see now that it makes more sense when a source is selected to automatically select everything in it. Will make the changes.
Actually, this is a problem. When enabling a source, such as Pathfinder Core by default, I will have to enable all the classes, domains, subdomains, schools, subschools and spells. This would create hundreds and possible thousands of entries into the override settings. By default. This is too much data bloat.

The current method is this.

if Advanced Player's Guide is enabled
If antipaladin is checked, it will be disabled.

if Advanced Player's Guide is disabled
if antipaladin is checked, it will be enabled

The overrides operate as on opposite setting to the source setting. There is descriptive text on each setting section explaining this.

This method keeps the sources and override settings data very small.

aranginor
Giant
Posts: 131
Joined: Fri Dec 05, 2008 2:32 pm

Re: Pathfinder Spell Database Library (UPDATED 19.0727.1)

Post by aranginor »

getBloodlineSpell(Bloodline Name, Level, delim)
getDomainSpell(Domain Name, Level, delim)
if you provide a bloodline and a level, you can only have one result. why the delim?
same with domain

User avatar
Full Bleed
Demigod
Posts: 4444
Joined: Sun Feb 25, 2007 11:53 am
Location: MD
Contact:

Re: Pathfinder Spell Database Library (UPDATED 19.0727.1)

Post by Full Bleed »

aranginor wrote:
Sun Jul 28, 2019 3:58 pm
getBloodlineSpell(Bloodline Name, Level, delim)
getDomainSpell(Domain Name, Level, delim)
if you provide a bloodline and a level, you can only have one result. why the delim?
same with domain
You're right... I guess it would matter if you wanted it returned as a json (though I mostly use string lists so I'm not sure how valuable that is to others.)
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."

User avatar
Full Bleed
Demigod
Posts: 4444
Joined: Sun Feb 25, 2007 11:53 am
Location: MD
Contact:

Re: Pathfinder Spell Database Library (UPDATED 19.0727.1)

Post by Full Bleed »

aranginor wrote:
Sun Jul 28, 2019 2:50 pm
The original intent of the overrides was to do the opposite of what was selected. I see now that it makes more sense when a source is selected to automatically select everything in it. Will make the changes.
Actually, this is a problem. When enabling a source, such as Pathfinder Core by default, I will have to enable all the classes, domains, subdomains, schools, subschools and spells. This would create hundreds and possible thousands of entries into the override settings. By default. This is too much data bloat.

The current method is this.

if Advanced Player's Guide is enabled
If antipaladin is checked, it will be disabled.

if Advanced Player's Guide is disabled
if antipaladin is checked, it will be enabled

The overrides operate as on opposite setting to the source setting. There is descriptive text on each setting section explaining this.

This method keeps the sources and override settings data very small.
Gotcha. I think my wires got crossed because the tab for Sources shows a check mark when a source is enabled, but switches in Classes/Bloodlines/Domains/Subdomains both enable and disable.

That said, I think the override section is currently a bit broken. I'm not able to get most things to work. I can't override anything from core. If that's as intended then you can just remove Core from the overrides.

But if I select Advanced Class Guide, then try to override Bloodrager it's still showing up at Home>Class.

And APG won't stay checked in the Source selection.

There are probably other things but I suspect these things might be related.



As for creating more clarity once the section works again:

1) Maybe make the core settings tabs be General, Sources, Overrides. Then have the Overides tab open tabs to Classes/Bloodlines/Domains/Subdomains. That way all the tabs function the same when your under overrides and it's somewhat apart from the way Sources works.

2) How about greying out the things in Overrides that are currently not enabled so you know at a glance what's enabled and how your check mark is going to, or how it's currently, affecting things?
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."

aranginor
Giant
Posts: 131
Joined: Fri Dec 05, 2008 2:32 pm

Re: Pathfinder Spell Database Library (UPDATED 19.0728.1)

Post by aranginor »

new version up (19.0728.1)
getSpellList(Class, level, delim) : Default delim to "," which would return comma delineated string list. If "json" is delim, return JSON Array. Similar to other functions in MT (like Wiki: getSelected()).
pfspells.getClassSpellList(class, level, delim) should be ready. Give it a try and try and break it.
getDomainSpell(Domain Name, Level, delim)
pfspells.getDomainSpell(domain, subdomain, level, delim)
for domain only queries subdomain should be ""
getBloodlineSpell(Bloodline Name, Level, delim)
pfspells.getBloodlineSpell(bloodline, level, delim)
First set of graphics. Wanted to make something that was friendly to narrow windows and good with light and dark frame styles.
integrated
That said, I think the override section is currently a bit broken.
should be fixed now
Maybe make the core settings tabs be General, Sources, Overrides.
done
How about greying out the things in Overrides that are currently not enabled
done

goto functions coming soon....

User avatar
Full Bleed
Demigod
Posts: 4444
Joined: Sun Feb 25, 2007 11:53 am
Location: MD
Contact:

Re: Pathfinder Spell Database Library (UPDATED 19.0728.1)

Post by Full Bleed »

aranginor wrote:
Sun Jul 28, 2019 9:47 pm
pfspells.getClassSpellList(class, level, delim) should be ready. Give it a try and try and break it.
You asked for it... I did manage to break it by putting in a spell level 10+... ;)

Otherwise, it's just what we need.
Maybe make the core settings tabs be General, Sources, Overrides.
done
Minor aesthetic suggestion to add bold pipes between settings tabs in getSettings():

Code: Select all

[h: hid_output = hid_output + "<b> | </b><span class=enabled>" + macrolink(hid_page,"[email protected]" + getMacroLocation(),"none",hid_args) + "</span>"]
How about greying out the things in Overrides that are currently not enabled
done
Much better.

Though I think is should always reflect the current state of availability. So if I check box a grayed out selection, then Save, you should then see a check box and an "available" color text. If I check boxed an "available" item, then Save, you would see a check box next to "greyed out" item. Basically, I think it should just reflect the same available/unavailable display that the search pages do. That way, under overrides, the check boxes are just indicative of exceptions to the full source permissions while still providing an accurate picture of what's actually enabled and what's not.

Same could be said of the Settings>Source tab. Though the check box indicates what's enabled, when you use the indented greyed out sources it provides for easier readability (over eye-tracking from check box to each source.)

Bugs:
-In Class>Level X page seeing "Level X" twice in the breadcrumb.
-School links in Class>Level X pages throw error.

Consistency issue: Under alpha's the list shows Spell Name and Source. Under Class>Level we get Spell Name and School. I know you removed having all three in order to allow for more narrow display... but now that spell names and sources wrap you can probably use 3 character school abreviations (with tooltips) without much issue. A personal setting to "Display School in Spell Lists" and Display Source in Spell Lists" might be nice... but not sure how much trouble that's worth. If I had to pick one I'd probably choose source because, as a GM, I'm looking at spells as resources to be managed (which this library is now incredible at)... however, players might be more interested in the school since that's core info about the spells they're using. *shrug*
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."

aranginor
Giant
Posts: 131
Joined: Fri Dec 05, 2008 2:32 pm

Re: Pathfinder Spell Database Library (UPDATED 19.0729.1)

Post by aranginor »

new version up (19.0729.1)
You asked for it... I did manage to break it by putting in a spell level 10+...
fixed
Minor aesthetic suggestion to add bold pipes between settings tabs in getSettings():
done
Though I think is should always reflect the current state of availability...
I think I got them all
-In Class>Level X page seeing "Level X" twice in the breadcrumb.
-School links in Class>Level X pages throw error.
fixed

Query functions
pfspells.getBloodlineSpell(bloodline, classlevel, [type])
Spoiler
bloodline; name of the bloodline you wish to query
classlevel; 1-20
type; options are "json", or omit completely
While getBloodlineSpell() will always return a single entry, the type option is provided in the event the caller wishes to return a json array
pfspells.getClassSpellList(classname, spelllevel, [delim])
Spoiler
classname; name of the class you wish to query
spelllevel; 0-9
delim; options are "json", delimiter of your choice, or omit completely
getDomainSpell(domain, subdomain, spelllevel, [type])
Spoiler
domain; name of the domain you wish to query
subdomain; "" or name of subdomain
spelllevel; 1-9
type; options are "json" or omit completely
While getDomainSpell() will always return a single spell, the type option is provided in the event the caller wishes to return a json array
pfspells.getSpellDetail(spellname, spelldetail, [type])
Spoiler
spellname; name of the spellname you wish to query
spelldetail; detail of the queried spell
spelldetail options can be retrieved from pfspells.getSpellDetailList()
type; options are "json" or omit completely
While getSpellDetail() will always return a single entry, the type option is provided in the event the caller wishes to return a json array
pfspells.getSpellDetailList([delim])
Spoiler
delim; options are "json", delimiter of your choice, or omit completely

Navigation functions
pfspells.gotoBloodline(bloodline)
Spoiler
bloodline; name of the bloodline you wish to goto
pfspells.gotoClass(classname, [spelllevel])
Spoiler
classname; name of the class you wish to goto
spelllevel (optional); options are "", 0-9, or omit completely
pfspells.gotoDomain(domain, [subdomain])
Spoiler
domain; name of the domain you wish to goto
subdomain (optional); options are "", name of subdomain, or omit completely
pfspells.gotoSpell(spellname)
Spoiler
spellname; name of the spellname you wish to goto

aranginor
Giant
Posts: 131
Joined: Fri Dec 05, 2008 2:32 pm

Re: Pathfinder Spell Database Library (UPDATED 19.0729.2)

Post by aranginor »

new version up (19.0729.2)

added Player Maintenace to GM Settings
added a new identifier for players so probably a good idea just to run the macro deleteAllSettings

User avatar
Full Bleed
Demigod
Posts: 4444
Joined: Sun Feb 25, 2007 11:53 am
Location: MD
Contact:

Re: Pathfinder Spell Database Library (UPDATED 19.0729.2)

Post by Full Bleed »

I wanted to make it easier to add a new graphics set so I wrote a macro that would add 50 more table spaces, label them, and update the image table to account for the new set.

It uses the table's "Roll" field to see and set how many table entries the table is using. I do this for all of my database tables. So you'll have to use the new image table I provided below for it to work properly. It's fully compatible with the current version.

New Table Graphics macro:

Code: Select all

[h: entryCount = 50]

[h: tableEntriesNum = getTableRoll("pf.spells.images")]

[h: resultGraphicsList = "title, classes, bloodlines, domains, schools, descriptors, rules, chat, home, settings, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved"]

[h, COUNT (entryCount): addTableEntry("pf.spells.images", roll.count + tableEntriesNum + 1, roll.count + tableEntriesNum + 1, listGet(resultGraphicsList, roll.count))]

[h: setTableRoll("pf.spells.images", tableEntriesNum + 50)]

[h: currentGraphicCount = table("pf.spells.images", 30)]
[h: setTableEntry("pf.spells.images", 30, currentGraphicCount + 1)]

[h: broadcast("<table border = 1><tr><b>Table target:</b> pf.spells.images<br><b>Action:</b> 50 additional table spaces created for a new PFSpells graphics set.</tr></table>")]
Not sure how you might to incorporate this but that's the core code.


In addition to updating the image table to work with the New Table Graphics Macro I also added a new 3rd Graphics option, added reserved spaces for the second option, and labeled previously empty spaces for the 1st so it was consistent.
Burning Sample.jpg
Burning Sample.jpg (90.4 KiB) Viewed 677 times
Attachments
pf.spells.images.mttable
(516.44 KiB) Downloaded 16 times
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."

aranginor
Giant
Posts: 131
Joined: Fri Dec 05, 2008 2:32 pm

Re: Pathfinder Spell Database Library (UPDATED 19.0729.2)

Post by aranginor »

As soon as I get to a computer, I will definitely add this. Good stuff!!!!

I was also thinking, what if we add the font and color options as entries in the images tables to complete the themes options?

User avatar
Full Bleed
Demigod
Posts: 4444
Joined: Sun Feb 25, 2007 11:53 am
Location: MD
Contact:

Re: Pathfinder Spell Database Library (UPDATED 19.0729.2)

Post by Full Bleed »

aranginor wrote:
Tue Jul 30, 2019 8:14 am
As soon as I get to a computer, I will definitely add this. Good stuff!!!!

I was also thinking, what if we add the font and color options as entries in the images tables to complete the themes options?
Yeah, I was thinking that being able to load a single "Theme" would be cool (with all the color choices, frame choice, and graphic choice pre-selected.)

And I also thought about maybe putting the work of creating some "Themes" in the hands of the players. Let them sort of poke around, select everything they like and be able to save and name it in some way that allows other players to load those settings.
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."

aranginor
Giant
Posts: 131
Joined: Fri Dec 05, 2008 2:32 pm

Re: Pathfinder Spell Database Library (UPDATED 19.0729.2)

Post by aranginor »

The players already have the ability to play with things. They can choose their own frames, graphic set, font, font color, link color and disabled color. These could be auto populated or overwritten by choosing a theme and then allowing further customization which is saved by player. I could add the ability for one player to clone the "theme" settings from another player.

The biggest problem I see is that players will not be able to customize graphics, since by default, they do not have access to the pf.spells.images table. I could allow access to the table with an option, which would be off by default. Since there is no way to test if a table entry has an image, trying to get the image from a table entry that has no image causes an error. Allowing players to edit this table could cause the library to stop working. This is why I have put a warning on the increaseImages macro you sent me.

Maybe set it up where they can choose, from predefined themes, which graphics they want from each theme. So they could choose the title from one theme, bloodlines from another, domains from another and so on. These settings would be saved to the player and then clone-able.

What do you think?

aranginor
Giant
Posts: 131
Joined: Fri Dec 05, 2008 2:32 pm

Re: Pathfinder Spell Database Library (UPDATED 19.0729.2)

Post by aranginor »

Also, I have been thinking about what would happen when multiple players connect at the same time. They could all be trying to write to the settings table at the same time. I separated each player into their own table entry to reduce the problem, but it could still happen especially when two or more players connect at the same time and create their initial settings.

I am thinking of creating a table per player or token to hold their settings. I may do token instead of player because if a player has more than one token they may want their wizard to open to the wizard page and their cleric to open to the cleric page.

Actually I am thinking I may move my framework to this idea. The first line of each player or token settings table will contain an array with settings names with their indexes corresponding to their table position, similar to how I am handling pf.spells.settings now. Or something like that. I have to think about it because sometimes we have a token with more than one owner or a single player with multiple tokens.

Post Reply

Return to “User Creations”