Steve Jackson Games - Site Navigation
Home General Info Follow Us Search Illuminator Store Forums What's New Other Games Ogre GURPS Munchkin Our Games: Home

Go Back   Steve Jackson Games Forums > Roleplaying > GURPS

Reply
 
Thread Tools Display Modes
Old 06-04-2023, 06:20 PM   #1
Michael Thayne
 
Michael Thayne's Avatar
 
Join Date: May 2010
Default Project: creating custom spell prerequisite charts (for Dungeon Fantasy, etc.)

This project is in its very early stages but today I decided to start work on writing a tool to generate custom spell charts from GCA files. Fellow programmers can find the GitHub repo here—pull requests welcome. Sample output can be found here—as you can see it needs a lot of work but then I only just started playing around with Graphviz today. Shout out to Anaraxes for recommending Graphviz to me.
__________________
Handle is a character from the Star*Drive setting (a.k.a. d20 Future), not my real name.
Michael Thayne is offline   Reply With Quote
Old 06-06-2023, 06:27 AM   #2
sjmdw45
 
Join Date: Jan 2008
Default Re: Project: creating custom spell prerequisite charts (for Dungeon Fantasy, etc.)

I tried initially to use GraphViz for DFRPG spell charts but couldn't decide on a format (in the non-technical sense) that was actually readable. Everything was incredibly wide and tangly. I wound up just going with an interactive list instead (https://maxwilson.github.io/dfSpells/).

If you'd care to consume my data files you can find them at https://github.com/MaxWilson/dfSpell.../src/Spells.fs

I originally hoped to be able to generate these data files automatically by parsing the PDFs but I wound up needing to do so much data cleanup by hand that I didn't even check in the parser code.

Edit: on second look, I probably could have used a library to parse the PDF for me. PDF-to-data structure turns out to be a pretty common requirement in the ML world. See https://towardsdatascience.com/scrap...on-8607880c750

Last edited by sjmdw45; 06-06-2023 at 06:35 AM.
sjmdw45 is offline   Reply With Quote
Old 06-06-2023, 09:35 PM   #3
Michael Thayne
 
Michael Thayne's Avatar
 
Join Date: May 2010
Default Re: Project: creating custom spell prerequisite charts (for Dungeon Fantasy, etc.)

Quote:
Originally Posted by sjmdw45 View Post
I tried initially to use GraphViz for DFRPG spell charts but couldn't decide on a format (in the non-technical sense) that was actually readable. Everything was incredibly wide and tangly. I wound up just going with an interactive list instead (https://maxwilson.github.io/dfSpells/).

If you'd care to consume my data files you can find them at https://github.com/MaxWilson/dfSpell.../src/Spells.fs

I originally hoped to be able to generate these data files automatically by parsing the PDFs but I wound up needing to do so much data cleanup by hand that I didn't even check in the parser code.

Edit: on second look, I probably could have used a library to parse the PDF for me. PDF-to-data structure turns out to be a pretty common requirement in the ML world. See https://towardsdatascience.com/scrap...on-8607880c750
Here's my attempt at DFRPG spell charts with GraphViz. The result is... not terrible, I think. Aside from fixing some minor bugs, I think it will be pretty readable once I break things up by college?
__________________
Handle is a character from the Star*Drive setting (a.k.a. d20 Future), not my real name.
Michael Thayne is offline   Reply With Quote
Old 06-06-2023, 10:17 PM   #4
sjmdw45
 
Join Date: Jan 2008
Default Re: Project: creating custom spell prerequisite charts (for Dungeon Fantasy, etc.)

Quote:
Originally Posted by Michael Thayne View Post
Here's my attempt at DFRPG spell charts with GraphViz. The result is... not terrible, I think. Aside from fixing some minor bugs, I think it will be pretty readable once I break things up by college?
The main headache is that it's very wide and kind of tangled, and that makes spells like Concussion and Phantom hard to visually reason about.

I don't think you CAN break it up by college due to cross-college dependencies. Hmmm. I guess you could just show external dependencies anyway, with a dotted line border or something.

Maybe it will work. I'm unsure.

Last edited by sjmdw45; 06-06-2023 at 10:20 PM.
sjmdw45 is offline   Reply With Quote
Old 06-06-2023, 10:38 PM   #5
Michael Thayne
 
Michael Thayne's Avatar
 
Join Date: May 2010
Default Re: Project: creating custom spell prerequisite charts (for Dungeon Fantasy, etc.)

Quote:
Originally Posted by sjmdw45 View Post
The main headache is that it's very wide and kind of tangled, and that makes spells like Concussion and Phantom hard to visually reason about.

I don't think you CAN break it up by college due to cross-college dependencies. Hmmm. I guess you could just show external dependencies anyway, with a dotted line border or something.

Maybe it will work. I'm unsure.
Have you seen how the official spell charts game aid does it? I haven't played around enough with GraphViz to be sure if you can do exactly that, but I bet you can at least do something similar.
__________________
Handle is a character from the Star*Drive setting (a.k.a. d20 Future), not my real name.
Michael Thayne is offline   Reply With Quote
Old 06-07-2023, 09:04 AM   #6
Lovewyrm
 
Lovewyrm's Avatar
 
Join Date: Apr 2022
Default Re: Project: creating custom spell prerequisite charts (for Dungeon Fantasy, etc.)

Scrolling sideways past the bubble with:
"and one of (Alter Body or Alter Visage or Enlarge or Plant Form or Shapeshifting or Shrink or Body of Air or Body of Flames or Body of Ice or Body of Lightning or Body of Metal or Body of Plastic or Body of Shadow or Body of Slime or Body of Stone or Body of Water or Body of Wind or Body of Wood)" amused me quite a bit.

I think this is better in simple table text form, imho...

Graphs are a nice tool but I don't think at least this particular kind helped solve the problems that were intended to be solved.
__________________
If it's forbidden to say anything good about something, why believe the bad that's said about it?
If it's forbidden to say anything bad about something, why believe the good that's said about it?
Lovewyrm is offline   Reply With Quote
Old 06-07-2023, 10:16 AM   #7
Michael Thayne
 
Michael Thayne's Avatar
 
Join Date: May 2010
Default Re: Project: creating custom spell prerequisite charts (for Dungeon Fantasy, etc.)

Quote:
Originally Posted by Lovewyrm View Post
Scrolling sideways past the bubble with:
"and one of (Alter Body or Alter Visage or Enlarge or Plant Form or Shapeshifting or Shrink or Body of Air or Body of Flames or Body of Ice or Body of Lightning or Body of Metal or Body of Plastic or Body of Shadow or Body of Slime or Body of Stone or Body of Water or Body of Wind or Body of Wood)" amused me quite a bit.
Yeah, that's what I meant when I said there are a few bugs to work out.

Quote:
Originally Posted by Lovewyrm View Post
I think this is better in simple table text form, imho...

Graphs are a nice tool but I don't think at least this particular kind helped solve the problems that were intended to be solved.

The thing about a graph is that if a spell has a long prerequisite chain, you can trace up the graph and get the entire chain quickly. And if a spell doesn't have a long prerequisite train, you can see that easily too.
__________________
Handle is a character from the Star*Drive setting (a.k.a. d20 Future), not my real name.
Michael Thayne is offline   Reply With Quote
Old 06-07-2023, 10:53 AM   #8
Lovewyrm
 
Lovewyrm's Avatar
 
Join Date: Apr 2022
Default Re: Project: creating custom spell prerequisite charts (for Dungeon Fantasy, etc.)

Quote:
Originally Posted by Michael Thayne View Post
The thing about a graph is that if a spell has a long prerequisite chain, you can trace up the graph and get the entire chain quickly. And if a spell doesn't have a long prerequisite train, you can see that easily too.
Indeed, but if it's supposed to be an aid just for that specific purpose, then an alphabetized table, even if it takes up more space overall, is probably the most "to the point" thing.

Following these steps:
1.) Think of spell one wants to know prereqs for
2.) Find spell in alphabetized list
3.) It has a cell that shows all prereqs (perhaps even in order )

Applied to every single spell, meaning, all spells, those that are prerequisites to others, are also listed specifically, with their own prereqs.

That's a lot of data, with quite a bit of duplication (some spells share prereqs after all) but since it's not data that's used often, it should be fine to do it that way.

That way it really is just those three steps.
Know spell.
Look it up by name.
Get all the info.
__________________
If it's forbidden to say anything good about something, why believe the bad that's said about it?
If it's forbidden to say anything bad about something, why believe the good that's said about it?
Lovewyrm is offline   Reply With Quote
Old 06-07-2023, 11:12 AM   #9
sjmdw45
 
Join Date: Jan 2008
Default Re: Project: creating custom spell prerequisite charts (for Dungeon Fantasy, etc.)

Quote:
Originally Posted by Lovewyrm View Post
Indeed, but if it's supposed to be an aid just for that specific purpose, then an alphabetized table, even if it takes up more space overall, is probably the most "to the point" thing.

Following these steps:
1.) Think of spell one wants to know prereqs for
2.) Find spell in alphabetized list
3.) It has a cell that shows all prereqs (perhaps even in order )
That's exactly what I landed on for https://maxwilson.github.io/dfSpells/. The only reason I didn't include even more info about each spell (casting time, cost, spell type, difficulty) is purely because I don't want to offend Steve Jackson Games, not technical limitations.

Note: the reason it can't be a simple table is because of the various OR conditions in the prereq chains.

Last edited by sjmdw45; 06-07-2023 at 11:16 AM.
sjmdw45 is offline   Reply With Quote
Old 06-07-2023, 11:21 AM   #10
Varyon
 
Join Date: Jun 2013
Default Re: Project: creating custom spell prerequisite charts (for Dungeon Fantasy, etc.)

Quote:
Originally Posted by Michael Thayne View Post
Yeah, that's what I meant when I said there are a few bugs to work out.
In the particular case here, are there any "Body of <Thing>" spells that don't satisfy the prerequisite requirement here? If not, that one could be cleaned up with replacing "Body of Air or Body of Flames or Body of Ice or Body of Lightning or Body of Metal or Body of Plastic or Body of Shadow or Body of Slime or Body of Stone or Body of Water or Body of Wind or Body of Wood" with "one Body of [...]" or similar.

I don't think this format would work well for me, but then I'm not a big fan of College Magic anyway and thus am not really part of the intended audience.
__________________
GURPS Overhaul
Varyon is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Fnords are Off
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 03:07 AM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2024, vBulletin Solutions, Inc.