PDA

View Full Version : 5E - Random Spellbook Generator



fxg42
August 20th, 2021, 15:10
Random Spellbook Generator

Extension for the 5E ruleset that adds the option of creating random spellbooks. The main use case is generating random loot for wizard PCs.

How

The "Items" window now has a "Spellbooks" button next to the Forge button.

The Random Spellbook window allows the DM to specify:

a name for the spellbook;
a way of generating a random spellbook name;
spell selection preferences and weights;
the number of spells per spell levels to select.


https://user-images.githubusercontent.com/425363/130239583-514f0cba-8fe5-4a61-9a13-ede2c88ae91c.png

The theme used in this screenshot is SirMotte's Hearth: https://github.com/SirMotte/FGU-Theme-Hearth/releases

Ranked Spell Selection

When selecting spells, the generator will first shuffle the list of spells. It will then rank each spell according to the set of chosen preferences. If a spell matches the preference, the associated weight is added to the spell's rank. Ranked spells are then reverse sorted by rank and the target number of spells per spell level are added to the new spellbook.

Links


Forge: https://forge.fantasygrounds.com/shop/items/189/view
Ext releases: https://github.com/fxg42/random-spellbook/releases
Source code: https://github.com/fxg42/random-spellbook
SirMotte's Hearth theme: https://github.com/SirMotte/FGU-Theme-Hearth/releases


Why

For my second extension, I primarily wanted to learn how GUI programming works in FGU (windows, templates, anchors, etc) and starting a new campaign with a wizard PC gave me an excuse :)

Known Issues


Conflicts with SilentRuin's excellent Equipped Effects Extension

vaughnlannister
August 20th, 2021, 15:25
Awesome dude thanks! :)

fxg42
August 20th, 2021, 15:32
My pleasure! Hope you like it!

MeAndUnique
August 20th, 2021, 21:54
Ooooh, very nice indeed!

fxg42
August 20th, 2021, 22:01
Thank you so much!

Zacchaeus
August 20th, 2021, 22:36
Jolly Good

fxg42
August 20th, 2021, 22:39
Thanks!!

graphil
August 21st, 2021, 12:03
Should this show up in extensions once added from FG Forge since I'm not seeing it after doing check for update?

fxg42
August 21st, 2021, 13:07
Thanks for the info! I changed some settings in the Forge regarding the extension type. Go ahead and try again. If it still doesn't show up, you might try the old-fashioned way and copy the ext file directly in the extensions folder.

graphil
August 21st, 2021, 13:18
The extension is downloading OK into the extensions folder. However under load campaign in the extensions area it is not showing up.

fxg42
August 21st, 2021, 13:44
It might be something with the ext file then... I'll submit a new build to the forge later today. Thanks again!

graphil
August 22nd, 2021, 09:08
OK bit of progress. Can add it to load now however no spellbook extra button on the items section.

fxg42
August 22nd, 2021, 13:42
Interesting... Must be conflicting with other plugins. A better option would probably be for me to move the button to someplace else.

graphil
August 22nd, 2021, 13:53
I'll see if I can narrow it down. I'm testing quite a few at the moment.
Currently running Extraplanar containers, ammunition manager, mad nomads coin manager;charsheet effects display;charater sheets tweeks, silentruin generic actions;map parcel;polymorphism;equipped effects, inventory search, token height indication, spell tokens, better combat effects, kit'n'kaboodle, party item identified, better menus.

graphil
August 22nd, 2021, 14:14
It is a conflict with Silentruin's equipped effects

fxg42
August 22nd, 2021, 14:28
Great find! Thank you! The plugin is not open-sourced however so resolving the conflict would likely be a lengthy trial-and-error affair... I'll find another place to put that button and in the mean time, put a warning. Thanks again for your time and help!

graphil
August 22nd, 2021, 14:44
Maybe add it as a separate menu item?

fxg42
August 22nd, 2021, 15:00
That would most likely work. I just find that making it a menu item would take up a lot of "screen real estate" for a feature that most likely would not get a lot of routine use. I'll first try anchoring it some other way in the Items window and then, failing that, in the Spells window.

MeAndUnique
August 23rd, 2021, 05:12
You can also reach out to SilentRuin on discord, he's generally pretty amenable to working out conflicts by adding hooks or such as needed.

fxg42
August 23rd, 2021, 13:20
That's a good idea! I'll get the extension first and reach out to them. Thanks!

anathemort
October 12th, 2021, 19:15
This extension conflicts with the More Monster Filters extension (https://www.fantasygrounds.com/forums/showthread.php?57112-5E-More-Monster-Filters), but I believe the other author (kentmccullough) has been incognito for a while now. With both extensions loaded, the Spellbooks button does not show. Is there anything you can do on your side to resolve the conflict?

Zygmunt Molotch
October 20th, 2021, 09:37
would you consider supporting CORE, 3.5 or PFRGP? :)

I think it's just some windowclass name changes...

Gawain the Great
October 20th, 2022, 20:18
Did we ever figure out where the SpellBook button got relocated to?

I do have the "Enhanced Effects" on, and I no longer can see the SpellBook Button. I guess I can turn "Enhanced Effects" off and create a SpellBook, and turn it back on. I'll try that. The Spellbook is a really good idea, by the way.

That worked. Obviously, I don't have to have "Spellbook" on during game play. It's nice just to use it to create items I'll need for later. So, not a big deal to still be able to use it.

Thanks!

Navigat0r
November 17th, 2022, 15:40
Hello. I just found this extension and was trying it out in my 5e campaign when I got the following error message:

[ERROR] FormattedText SetValue XML Error: ' ' is an unexpected token. The expected token is ';'. Line 15, position 79.

I thought it might be an extension conflict, so I made a fresh campaign and tried without any extensions (it worked fine). After reactivating and checking each extension one by one in the test campaign, things still seem to be okay. Upon returning to the original campaign with the same extensions loaded, the above error popped up again. Does anyone have any ideas about what might be causing this situation?