This is part of my RPG series of entries here at SOB. See the inaugural entry in the series for more details.
This SOB entry could easily have been called "Mathematically Generating the D&D 3.5 Experience Chart", but I decided against that title.
The D&D 3.5 Player's Handbook contains an experience chart, "Table 3-2: Experience and Level-Dependent Benefits". The SRD — a collection of OGL materials released by WotC — does not, on the other hand. The d20 license, used to determine who may or may not display the d20 logo on an OGL product or claim d20 system compatibility, specifically restricts anyone from describing level advancement in a thusly licensed product.
I discussed a little of this very briefly in my D&D 3.5 Experience Level Charts entry here at SOB, along with a reference to how you can use my pfconv Web interface (or the pfconv command line utility, both of which are described in Pathfinder RPG a3 XP converter) to get around certain aspects of the WotC restrictions. It's far from a perfect solution, however.
This bit of stupidity from WotC is why so many third-party developers for systems that are effectively compatible with D&D 3.5 (even if the closest they can legally come to saying it is "compatible with the world's most popular roleplaying game") must choose between describing character leveling or displaying a d20 compatibility logo. When leveling is described, publishers of third-party materials end up creating their own variations on how leveling is accomplished, usually involving a very different looking chart. One example is the Pathfinder playtest releases' "Table 4-1: Character Advancement and Level-Dependent Bonuses" — against which, by the way, there doesn't seem to be any copyright reprinting restriction, unlike the equivalent "Table 3-2" in D&D 3.5.
Of course, with a halfway decent lawyer, one could probably get away with reprinting D&D's "Table 3-2", as long as one was clever about it, by claiming coverage by the doctrine of fair use. This is not something I particularly care to test, however, as I don't really care to have to get a halfway decent lawyer to defend something I've said in SOB about leveling in D&D. The problem is not that any copyright restriction prevents me from explaining how one increases in level in D&D, but that reprinting "Table 3-2" as printed in the book would involve verbatim copying of copyrighted material — and even slightly altering how it's presented might be argued to be nothing more than an attempt to circumvent copyright law inappropriately.
On the other hand, I don't actually have to reprint any useful information in that chart at all to provide a means for those of you with some basic tools at your disposal with a way to calculate the information in "Table 3-2" for yourself. It's pretty simple, really: I'll just describe the formulae for generating the information, and provide some Ruby code in case you want to actually generate the numbers yourself.
The formula to determine the XP total for a given level is:
F(L) where: L = target level, and F(L) = 0 if L = 1, else F(L-1) + (F(L-1)*1000) if n > 1.
The formula to determine the max ranks that can be put into a single class skill for a given level is:
L + 3 where: L = target level.
The formula to determine the max ranks that can be put into a single cross-class skill for a given level is:
(L+3) / 2 where: L = target level.
The formula to determine the number of feats you should have, discounting Fighter bonus feats or the extra feat for being human, is:
1 + (L/3), rounded down, where: L = target level.
The formula to determine the number of bonus attribute points you get for leveling is:
L / 4, rounded down, where: L = target level.
I've written some Ruby code that produces the output of the above formulae for levels one through twenty in a simple command line utility. To get the XP values, assuming you name your Ruby script phb3-2 (after the chart in the PHB), you would enter the command
phb3-2 xp. For max ranks in class skills per level:
phb3-2 cl; for cross-class skills:
phb3-2 xcl; for total feats:
phb3-2 feats; for total bonus attribute points:
This is the (ugly) code:
def up_xp(n) return 0 if n == 1 return up_xp(n-1) + (n-1)*1000 end def format(l,n,s) return sprintf("%1$*2$s : %3$*4$s", l, 3, n, s) end if ARGV == 'xp' 1.upto(20) do |l| puts format( l, up_xp(l), 6 ) end elsif ARGV == 'cl' 1.upto(20) do |l| puts format( l, l + 3, 2 ) end elsif ARGV == 'xcl' 1.upto(20) do |l| puts format( l, (l+3) / 2.0, 4 ) end elsif ARGV == 'feats' 1.upto(20) do |l| puts format( l, 1 + (l/3), 1 ) end elsif ARGV == 'attributes' 1.upto(20) do |l| puts format( l, (l / 4), 1 ) end end
Unfortunately, I won't be creating a Web interface for this script the way I did for pfconv, because then I'd be providing you with direct duplications of what's on "Table 3-2", and while I'm sure I could defend it in court if it came to that, I prefer to play things a bit more safely. I probably won't be cleaning up the code to make it more like a really useful command line utility any time soon, either, because I just don't care enough right now.
So . . . if you are reasonably good at arithmetic or can manage to get some Ruby code working on your system, you now have what you need to calculate all the values on "Table 3-2", one column at a time, if you didn't already.
. . . or you could just play Pathfinder RPG instead, and use the OGL (and thus freely reprintable) leveling chart data from the freely downloadable Pathfinder RPG Beta test rulebook PDF, which serves as the equivalent of (most of) both the PHB and DMG, all in one package. There's also a "softcover" book version of the Pathfinder RPG Beta you can get for $25, if you like having a physical book in your hands.
That's why I don't really care to put more effort into this Ruby script than I already have: it doesn't really matter that much to me, since I'm weaning myself off D&D 3.5 and replacing it with Pathfinder RPG instead.