Chad Perrin: SOB

3 August 2008

Pathfinder RPG a3 XP converter

Filed under: Geek,RPG — apotheon @ 04:31

This is part of my RPG series of entries here at SOB. See the inaugural entry in the series for more details.

I hacked together a simple command line utility (in Ruby) today that converts XP totals from D&D 3.5 advancement rates to Pathfinder RPG playtest (Beta and Alpha 3) advancement rates. It’s called pfconv.

edit: . . . and now, there’s the pfconv Web interface.

another edit: Since the Character Advancement and Level-Dependent Bonuses table in the release version of Pathfinder Roleplaying Game is the same as in the test versions, this information about converting experience points between D&D 3.5 and PRPG is no longer just about the Alpha and Beta test versions.

Level Advancement in PRPG playtest versions

The beta and third alpha test releases of Pathfinder RPG, like D&D 3.5, have a character experience advancement chart. In the PHB from WotC, the chart is called “Table 3-2: Experience and Level-Dependent Benefits”. In PRPG Beta and Alpha 3, it’s called “Table 4-1: Character Advancement and Level-Dependent Bonuses”. In each case, the chart shows the minimum XP total needed to qualify for a given level.

The PRPG playtest versions, unlike the 3.5 PHB, have three columns showing experience point totals for each level. The first is for a slower advancement rate, and the third is for a faster advancement rate, than the column in the middle. They are, appropriately enough, labeled “Slow”, “Medium”, and “Fast”. None of these three advancement rates use the same experience totals as the 3.5 PHB chart, so some XP and level conversion needs to be done for basically any character that isn’t first level with zero XP.

One could, of course, just keep the XP the same, and recreate the character at the new level. This is the sort of thing that would upset quite a few players, though, most likely. Even the fastest advancement rate in the PRPG playtest versions is somewhat slower than the advancement rate in the PHB, which means that for many possible experience totals the conversion would mean a loss of levels. In some cases — such as most characters converted to the medium or slow advancement rates — that could actually mean a loss of several levels.

The obvious answer is to somehow “convert” XP totals. The fairest way to do this, in my opinion, is to determine what percentage of the distance between the minimum for a character’s current level and the minimum for its next level has been covered already by earned experience. For instance, a second level D&D 3.5 character with 2000 XP has earned 50% (1000) of the experience needed (2000) above and beyond the current level’s minimum (1000) to reach the next level (3000). That percentage, then, is used to determine how many experience points constitute the same percentage advancement between second and third levels for a given PRPG advancement rate. For the medium advancement rate, 50% of the way between second level (2000) and third level (5000) is 3500 XP total for the character. This hypothetical character, translated from D&D 3.5 to PRPG, would then be 2nd Level still (of course), but now with 3500 XP.

Computers Are For Drudgery

Unfortunately, that’s kind of a cumbersome amount of arithmetic. By “cumbersome”, I mean that the average gamer would probably find it annoying, if not difficult, to try to perform the arithmetic operation in question entirely in his or her head. After completing exactly two such conversions, and realizing I would have to convert two more in the same evening, I decided to create a Ruby method in irb (an interactive Ruby shell application) to ease the process. It worked brilliantly — then it ceased to exist the moment I exited irb.

I thought about this for a bit, and realized that there was a distinct possibility I might have four players converting characters from D&D 3.5 to PRPGa3 in the near future. Knowing how tedious and repetitive the task of converting XP totals would be, and knowing that accomplishing tedious and repetitive tasks for us so we don’t have to do them ourselves is basically what computers are for, I decided I needed to write a Ruby program to perform this task for me.

As such, I started hacking together a command line utility to do all the drudgery for me. Of course, I have real difficulty doing such a thing as a “throw-away” script. Whenever I want to create a command line program that performs some simple, but tedious and repetitive, task for me, I end up giving it a formal command option syntax, clear usage documentation, and a somewhat extensible form so that I can add functionality to it later as the need arises. As a result, I ended up creating a command line utility that might be worth sharing with other PRPG playtesters.

Even Better

My plans, at this point, include writing a couple of UI wrapper scripts for the program. One will be a Tk-based GUI so you can open up a little GUI widget, type the necessary information into a form, and click a button to get a converted XP total. Another, if I decide to write it, would be a captive interface text console based application, which would ask you for each bit of information after starting the program rather than expecting you to specify it all when you run the program in the first place.

Because these will be wrapper scripts rather than standard interfaces for the program, you need only “install” as much or as little as you want (you’ll need the core program for its functionality, but the TUI and GUI wrappers each need be “installed” only if you want to use them — and you only need to “install” the one you want, if you only want one of them.

I keep putting “scare quotes” around “install” because there isn’t really any “installing” to do, particularly. Just copy each script you want into a convenient place on your computer, and you’ll be ready to go. In the case of the Tk-based GUI wrapper, of course, you would need to install the Tk library itself and the Ruby “tk” gem as well. The GUI wrapper hasn’t been written yet, so don’t worry about it unless and until I get around to writing it (probably very soon).

If you think of any other conversion functionality you’d like to see this program provide, aside from converting character XP totals, or if there’s some way you’d like me to expand the XP conversion capabilities of the program, please let me know. I’m willing to accept feature requests, bug reports, and patches, if you want to offer them.

This program is free/libre/open source software, distributed under the terms of a copyfree license (specifically, the Public Distribution License Open Works License). You are free to redistribute, modify, use, abuse, fold, spindle, and mutilate it to your hearts content, subject only to the very unrestrictive terms of the license. I hope, though, that if you want others to have it, you’ll direct them here (and not directly to the script URL itself).

Edit: As pointed out by Joseph in comments, a Web interface would be a good idea too. Therefore, I developed a Web interface. As of this writing, the GUI still has not been written.


The program is at:

You can download it by right-clicking on the link and choosing the appropriate item in the context menu, and you can view it online without downloading just by left-clicking on it. Making it work on MS Windows is not my primary concern right now, and it hasn’t in fact been tested anywhere except on my FreeBSD laptop and my SigO‘s Debian GNU/Linux laptop. It should work on basically any (sane) Unix-like system with Ruby installed without necessitating any finagling with the code, though you’ll probably want to set the executable bit and put it in a directory that’s in your shell’s PATH variable so you don’t have to type ruby pfconv or specify the complete path to the script every time you run it.

I recommend you run pfconv --help the first time you try it out to get a look at the option syntax for it. Note that every necessary option has a default value, but some of those defaults will be useless to you (such as defaulting to 0 as the current XP of a character you want to convert).

As things currently stand, it automatically rounds off fractional numbers. It rounds any number ending in five-tenths or greater to the next whole number, and rounds any fraction below that down. I’m considering whether to offer some kind of configurable behavior here. Let me know if you want different behavior from it.


  1. How about a web interface?

    Comment by Joseph A Nagy Jr — 3 August 2008 @ 05:34

  2. Ooh, good idea. I wonder why I didn’t think of that.

    Comment by apotheon — 3 August 2008 @ 05:41

  3. I did it: pfconv – Web Interface

    Comment by apotheon — 4 August 2008 @ 04:03

  4. Very nice, and fast.

    Comment by Joseph A Nagy Jr — 5 August 2008 @ 06:53

  5. Glad you like it. Let me know if you come up with any feature requests or notice any buggy behavior.

    Comment by apotheon — 5 August 2008 @ 07:42

  6. […] you can see, my last SOB entry just before this one, Pathfinder RPG a3 XP converter, is the number two hit for 3.5 exp level chart. That seems pretty odd, considering the D&D 3.5 […]

    Pingback by Chad Perrin: SOB » D&D 3.5 Experience Level Charts — 5 August 2008 @ 03:51

  7. […] characters for that game to PRPGa3 rules that I decided to create the pfconv utility — see Pathfinder RPG a3 XP converter for details. Some of the rules in the EPH were not perfectly suited to PRPGa3, and some of them […]

    Pingback by Chad Perrin: SOB » Elan for PRPGa3 — 6 August 2008 @ 09:43

  8. […] 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, […]

    Pingback by Chad Perrin: SOB » calculating XP (and other leveling data) for D&D 3.5 — 29 August 2008 @ 11:23

  9. […] during the playtest period, though, and what I’ll be doing if necessary in the future: I’ll use the pfconv utility I wrote specifically for this purpose. You can get a copy of the current form of this Ruby script for […]

    Pingback by Chad Perrin: SOB » Pathfinder Conversions — 10 August 2009 @ 10:16

  10. […] like me, this time to fulfill the need for someone running a game in which I'm a player. Whereas a previous program I wrote, called pfconv, is used to perform XP conversions from D&D 3.5 to Pathfinder RPG for character […]

    Pingback by Chad Perrin: SOB » Attractiveness Score Calculator — 6 January 2012 @ 06:59

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

All original content Copyright Chad Perrin: Distributed under the terms of the Open Works License