PDA

View Full Version : Spells Known/Prepared Generator



Goober4473
2016-03-11, 08:12 PM
I put together a little app in Lua that will randomly generate a set of spells know/prepared (or in a spellbook), given some parameters like class, subclass, and favored keywords, pulled from a piece of my random monster generator, since I figure it could be useful to a lot of people on its own.

I may try and do it in Javascript too, with a nice UI, but for now, you can find the program here: https://dl.dropboxusercontent.com/u/526357/SpellListGenerator.zip

To edit the paremeters, open up Config.lua in any text editor and save it when you're happy. By default, it will create 5 copies of a level 5 spellcaster, pulling from all spell lists and with no favored keywords. There are a lot of little options in there to tweak what you get.

To run the program, either double-click main.exe on Windows, or run main.lua in any lua interpreter (or from the command line if you have lua installed on Linux/Mac). It will spit out an HTML file with the spell list(s) for you.

PoeticDwarf
2016-03-12, 06:08 AM
Wait, so this is randomly giving spells for spell levels 0-3. Because no list has all those spells and it only works for one level.

I thought this would be really cool, but sadly I can't use it in a game (because it is only for level 5 casters and because it is not from one spell list).

It is not really clear what you mean with editing it so you can get other things, but now I can not use it and I do not understand how I can change that all.

I mean, this could really help, but I just don't understand it now. It is my mistake and not yours but it is disappointing.

Goober4473
2016-03-13, 03:47 PM
I mean, this could really help, but I just don't understand it now. It is my mistake and not yours but it is disappointing.

Open the file Config.lua in Notepad or any other text editor. In that file, it explains how each parameter works and what you can do with it.

It looks something like this:

--Created by Chris "Goober" Ramsley

--Set this to the number of spell lists you want printed; each is randomized anew with the same parameters
COPIES = 5

--set this to a number between 1 and 20
CASTER_LEVEL = 5

--Set this to the ability score you want to determine the caster's spells
--leave it blank ("") to use the default for the class (or a random mental score for no class or more than one class)
CASTING_ABILITY_SCORE = ""

--Set this to the caster's casting ability score; for instance, a wizard with 14 Intelligence would be 14, while
--a cleric with 18 Wisdom would be 18.
CASTING_ABILITY_VALUE = 16

--Set this to true to use warlock spell slots; you can use warlock slots with any class,
--or normal slots with warlock spells if you want. It's all good!
WARLOCK_SPELL_SLOTS = false

--If true, will generate a spellbook instead of spells prepared/known;
SPELLBOOK = true

--Set this to true if you want to use the paladin/ranger spell progression
HALF_CASTER = false

--Set to true to include all subclass spells in addition to other prepared/known spells
ADD_SUBCLASS_SPELLS = false

--Set to true to allow only spells that fit the chosen keywords, and no others;
--this is the default if no class is chosen
KEYWORD_SPELLS_ONLY = false

--If true, will add a random school to the list of favored keywords, in addition to any you added yourself
RANDOM_SCHOOL_SPECIALIZATION = true

--Set this to false if you don't want Elemental Evil spell included
INCLUDE_ELEMENTAL_EVIL = true

--Change to true for each class you want to include; if you select only one class, it will follow the rules for
--spells known/prepared for that class. Otherwise, it will use a generic progression. If you choose no class, only
--spells from the chosen subclasses and keywords will be selected
BARD = false
CLERIC = false
DRUID = false
PALADIN = false
RANGER = false
SORCERER = false
WARLOCK = false
WIZARD = true

--Change to true for each subclass you want to include; This will add the subclass's spells to the list of options.
--cleric domains
DEATH_DOMAIN = false
KNOWLEDGE_DOMAIN = false
LIFE_DOMAIN = false
LIGHT_DOMAIN = false
NATURE_DOMAIN = false
TEMPEST_DOMAIN = false
TRICKERY_DOMAIN = false
WAR_DOMAIN = false

--druid of the land circles
ARCTIC_CIRCLE = false
COAST_CIRCLE = false
DESERT_CIRCLE = false
FOREST_CIRCLE = false
GRASSLAND_CIRCLE = false
MOUNTAIN_CIRCLE = false
SWAMP_CIRCLE = false
UNDERDARK_CIRCLE = false

--paladin oaths
ANCIENTS_OATH = false
DEVOTION_OATH = false
OATHBREAKER_OATH = false
VENGEANCE_OATH = false

--warlock patrons
ARCHFEY_PATRON = false
FIEND_PATRON = false
GREAT_OLD_ONE_PATRON = false

--Change to true for each keyword you want to be favored; other spells can be chosen (unless no class is chosen),
--but favored spells will be selected more often; the more keywords, the more varied and random the favored selections
ABJURATION = false
CONJURATION = false
EVOCATION = false
DIVINIATION = false
ENCHANTMENT = false
ILLUSION = false
NECROMANCY = false
TRANSMUTATION = false

CONCENTRATION = false
RITUAL = true

ACID = false
BLUDGEONING = false
COLD = false
FIRE = false
FORCE = false
LIGHTNING = false
PIERCING = false
NECROTIC = false
POISON = false
PSYCHIC = false
RADIANT = false
SLASHING = false
THUNDER = false

AIR = false
AREA = false
ATTACK = false
BUFF = false
CHARM = false
DEBUFF = false
DEFENSIVE = false
DETECTION = false
EARTH = false
EXPENSIVE_COMPONENTS = false
HEALING = false
INFORMATION = false
MOBILITY = false
STEALTH = false
SHAPESHIFTING = false
SOCIAL = false
SUMMONING = false
TELEPATHY = false
UTILITY = false
WALL = false
WATER = false

ABERRATION = false
BEAST = false
CELESTIAL = false
ELEMENTAL = false
FEY = false
FIEND = false
HUMANOID = false
PLANT = false
UNDEAD = false