Secret Santicore 2011
I took the opportunity of Secret Santicore to teach myself some Javascript.
First I took my table and implemented it as a Web 1.0 CGI script in Perl; then I ported that to Javascript.
The Javascript version is at santicore.fsf.net and the CGI version is linked from there.
The request was "Spells for door traps, the more obscure the better," so what I did was take the list of spells in Unearthed Arcana and select all the ones I could think of plausible door traps for.
Then I created a choice function. Actually, I created three:
One is straight-up Gonzo: equal chance of any spell, any level, any class.
One is Location-Independent: I assigned a weight to the class choice (15% Cleric, 5% Druid, 70% Magic-User, 10% Illusionist), and then a weight to each spell level (the top-level spell got one slot, the second-from-the-top two, and so on, until you get to the bottom of the list). Then within a class/level the choice is equally-weighted.
The third is Depth-Based. Basically, I rolled a d20 for the Level Of Characters That Should Be Exploring Here, and picked the highest-level spell of the chosen class (same weighted function as in Location-Independent) that a character could cast. Then I applied 4DF to it (4d3-8), capped at top or bottom as needed, and then picked a random spell of that class/level. This sort of approximates 3E Challenge Ratings, really.
Then for each spell, you may need to know the level at which it is cast, so that's the minimum level required for the spell plus 1d6-1.
First I took my table and implemented it as a Web 1.0 CGI script in Perl; then I ported that to Javascript.
The Javascript version is at santicore.fsf.net and the CGI version is linked from there.
The request was "Spells for door traps, the more obscure the better," so what I did was take the list of spells in Unearthed Arcana and select all the ones I could think of plausible door traps for.
Then I created a choice function. Actually, I created three:
One is straight-up Gonzo: equal chance of any spell, any level, any class.
One is Location-Independent: I assigned a weight to the class choice (15% Cleric, 5% Druid, 70% Magic-User, 10% Illusionist), and then a weight to each spell level (the top-level spell got one slot, the second-from-the-top two, and so on, until you get to the bottom of the list). Then within a class/level the choice is equally-weighted.
The third is Depth-Based. Basically, I rolled a d20 for the Level Of Characters That Should Be Exploring Here, and picked the highest-level spell of the chosen class (same weighted function as in Location-Independent) that a character could cast. Then I applied 4DF to it (4d3-8), capped at top or bottom as needed, and then picked a random spell of that class/level. This sort of approximates 3E Challenge Ratings, really.
Then for each spell, you may need to know the level at which it is cast, so that's the minimum level required for the spell plus 1d6-1.