Wednesday, September 17, 2008

D&D Character Generator

UPDATE 2009.08.14 - I've posted a new build with PHB 2 races and classes, and a handful of new features. See the details here.

UPDATE 2009.04.01 - You will need Flash 10 to run this now. I've updated the "view as PDF" functionality so it uses the new Flash 10 feature to create files on the fly. It doesn't have to ask my server to create the file anymore. Hooray! I've also changed the size a bit. See the change log in the about box for more info.

Ok. I've FINALLY finished a project I've been working on for the last couple months. I've been giving it about two 4 hour sessions a week, and [AT LAST!] I'm satisfied enough with it to post it.

It's a character generator for Dungeons and Dragons 4th edition. I got the books in July when they released the set, and I thought it would be fun to put together a character generator that made it a bit easier to parse the whole thing.

This bad boy is written in Flex, so you can run it from any web browser with Flash 9. The general idea is that you build your character through the flex interface, and when you're done, click the "View as PDF" button and out pops a nice PDF for you to print out. It DOES NOT replace the Player's Handbook in any way. It's more of an easing function on the whole ordeal.

Use the app here. You'll need Flash 9. Don't forget that you can drag and drop your stat numbers in the Standard Array and Roll entry types. I haven't yet figured out a good way to indicate that they're draggable, as the Flex "useHandCursor" flag doesn't see to work.

Here's a list of caveats / known flaws / things that aren't implemented:


- choosing of equipment is not implemented. You'll need to use the PHB after you print your PDF.

- Half-Elf: after creating the PDF, be sure to choose an at-will power from another class for the dilettante race feature.
- Ranger: After creating the PDF, choose Dungeoneering or Nature as a skill. This will affect your modifier for the skill by 5 points, so don't forget!
- There appears to be an error in the class listings in the Player's Handbook. When a skill is automatically given (listed as "free" in my UI), it is also listed as a choice. In my code, I automatically remove the free skills from the choice list.
- I have not implemented languages. choose them on the PDF.
- Human: you get +2 to an ability of your choice. Do this on the PDF.
- The PDF has some fields that automatically fill as Zero. If there are certain ones you think should not be filled at all, let me know and I'll fix them.
- certain class and race features require you to choose between two things. In cases where this is not implemented, it is listed on the character sheet as a "choose x or y" listing under the class/race features sections.

UI bugs:
- there's a minor glitch in the positioning of the strength stat when you drag a number on top of it (only seen in the Roll entry type).
- Powers have no descriptions. They're intended to not have power descriptions, but they're supposed to say "See Player's Handbook".

Note that I got the character sheet pdf I'm currently using from here.

This was a very fun little project. I enjoy writing apps in Flex. In working on this, I learned about XML schemas, XFDF (a pdf format), and some Perl tricks I'm currently using on my server. I'll make some posts soon about all that stuff. I wrote some helper Flex apps that I'll post as well.


Julie said...

I manually rolled for my ability scores, so I went to enter them, but I had a question- I created an elf, which has +2 to DEX and WIS. So do I manually have to add the 2 points, or will it do it for me?

Luke Rymarz said...


Yup, you'll have to add that in yourself. For Manual stat entry I kept it simple; The number you enter is the number that will show up on the character sheet.

Julie said...

OK, thanks. I thought I would have to, but just wanted to check and make sure.

jyesmith said...

Wonderful tool, Luke. My friends and I are very grateful over here in Australia!


Azoun IV said...

Hi! A friend and I are planning to run a PBE D&D game, and we were looking for a good character generator. We found yours and we believe it's great!. Can we link it to our page?

Luke Rymarz said...


Link away! I've set up the tool itself to link back to my page, so you can link directly to the Flex App if you want (

Anonymous said...
This comment has been removed by a blog administrator.
Joe said...

Quick few things I've noticed:

You give the Eladrin Education racial feature's benefit, but you force the choice to be from Class Skill list.

You seem to be missing some feat selections: Neither Expanded Spellbook nor Jack of all Trades are in the feat list; there may be more but I was just trying to create my lv3 Wizard, and those are the two feats he happens to have.

Dunno if this is an error or not, but you seem to list feats whether or not the prerequisite is fulfilled.

Power selection for Wizards isn't correct: They're allowed to choose two dailies and two utilities at each level they gain them.

Other than those little quirks, it's a pretty cool start on a generator.

Nicholas Wolfwood said...

okay so I've got the character done, and it is an awesome tool. love the amount of detail. except for the small minor insignificant fact that when you go to save it as a pdf it in turn comes in as an XFDF file format, which I can't figure out how to open. Adobe Acrobat doesn't want to to look at it and there seems to be no other information about the file format on the internet. So its like you have a beautiful car that is sleek stylish and fun, but for some reason is bolted to the ground.

Luke Rymarz said...

Hi Nicholas,

Would you let me know what version of Adobe Reader you're running? Also what OS and internet browser are you using?

I'll see if I can clean up the character sheet the next chance I get to work on this.

For the record, I wrote this on Windows XP SP2 and tested on Firefox 2 and IE 7.


Nicholas Wolfwood said...

Hey Luke,
Running Vista with firefox 3, and am using acrobat 8.1. Everything else works great and its a really cool tool. I would still use it for stat generation and then just copy the numbers down to the character sheet. Keep up the good work!

Nicholas Wolfwood said...

okay problem is fixed now =) updated to adobe acrobat 9 and it opens it up just fine. that must have been my problem. Now your cool tool is even better!

Dork Girl Supreme said...

This is pretty cool. Are you going to update it to include races/classes from the Player's Handbook 2?

Luke Rymarz said...

@Dork Girl:

I just ordered the PHB 2 from Amazon. I'll have to read through it first, but I'd definitely LIKE to add more choices. Depending on how many changes there are, it might be really easy to add more, or it might be difficult. I'll see if I can get at least something added in the near term.

Luke Rymarz said...

Hooray! I posted a new version with PHB 2 races and classes!!

the details are available here.