Page 2 of 2

Re: Spellbook Generator Prototype

Posted: Fri Jun 14, 2019 1:54 am
by borgar
I was actually answering (late) to Pholus original entry.
I am very sorry to use such odd programming choices, but you go with what you know
Python has an actually syntax, not sure what I'd call what perl has.

Re: Spellbook Generator Prototype

Posted: Fri Jun 14, 2019 8:32 am
by borgar
Couldn't resists playing around with this so here is an example of a simple template based conversion. I stripped the spell info for a single spell (Magic Missile) into a YAML file and created a "text" and "latex" converter templates.

The included script ( uses the text template (spell_txt.templ) so you'll have to edit the script to use (spell_latex.tmpl).

Though I assume you already have a script to create the latex files already and haven't manually edited the 926 files.

I remember doing something similar close to 25 years ago (back when I played 1/2 ed AD&D). The scripting went fine but I could never force myself to type all the spell information into data files.

The perl script requires YAML and Template modules (from CPAN).

Re: Spellbook Generator Prototype

Posted: Sun Jun 16, 2019 9:41 am
by Pholus
This looks intriguing! When I have a bit more time next week I'll check it out.

The beauty of Basic Fantasy is that you don't have to type all the spells in -- they're already in editable documents! So it was pretty easy making all the little latex mini pages. My plan was to try to hit on something that could run platform agnostically and then reformat my latex spells into whatever the end format was.

But being able to hand my non-expert players a short sheet or pack of cards with their powers enumerated and described exactly? Priceless.