Jan 8, 2011

Dungeons & Dragons 4E Powerer

I was playing Minecraft last Saturday and around 20:00 I realized we were going to play D&D the next day and I didn't yet have power cards for my new character as my ranger had died previously. Now playing without power cards is totally doable, but damn if it's a pain to browse books constantly to see what that one power did again.

So I got an idea and googled for 'warlock power cards' (warlock being my new character). And yes, lo and behold, behind the third link there was this; "Here's what you're looking for!" Indeed! (There's probably a power card for each and every official power ever published on that site.)

I then downloaded all the warlock/tiefling power card images and launched JCreator and started to code (or rather, mostly to read the Java API). At 6:00 I had to stop for I wasn't feeling very well - I had forgotten to eat anything since midnight. I went to bed and at 11:00 I woke up and at 14:00 (just in time), my little D&D 4E Powerer was ready.

It only supports a character whose powers have been added into the code (and images included), though. I s'pose I could continue developing it to include all powers, make it possible to choose them and then save your character and whatnot. However, I'm not sure I can be arsed. It works just fine for my purposes and adding a new power isn't much of a trouble (nor a frequent occurrence) so I'll probably just leave it as it is, for now at least.


As you see, powers are listed on the table, color-coded per power type. Selecting a power shows its card on the right and clicking the Use button uses the power (after the confirmation dialog). 'Use' is then grayed out and the power's text color changes in the table. There are also Short and Extended rest buttons for refreshing non-daily powers and all powers, respectively.

Obviously, I always take my netbook with me to our gaming sessions to use this handy program.

Also, I felt like using the Proxy design pattern; the images aren't loaded into memory until they have been selected once. Not big of a deal with few small images but it's kinda cool to know stuff like that. In addition, I learned how images are included into .jar files. Neat.

No comments:

Post a Comment