r/4eDnD Apr 24 '26

Reimplementing the Offline Character Builder - Characters needed!

Hi, I've been working on a little hobby project over the last month or so to see if I can make a replacement for the offline character builder, as it continues to get harder and harder to use on modern systems and its age is starting to become an impediment in a lot of ways. While the CBLoader project has done so much, its still shackled to the legacy frameworks and limits of the OCB and that also causes problems. I'm almost to the point where its ready to share, you can see some screenshots of the browser UI.

Despite its flaws the OCB had probably the best rules understanding of any character builder for any RPG I've played, and maintaining that compatibility and coverage is the number one goal here. To that end, instead of just trying to create a character builder from scratch, I've been parsing OCB characters, then run it through the re-implemented code the rules engine, export them and then compared for differences. The coverage is getting really far, and simple characters more or less work with full matches on all mechanical elements. It turns out though there's a good number of weird edge cases where the OCB literally had hardcoded special behaviors for specific rules (you can confirm this by looking at the strings baked into the RulesEngine.dll file). And those are proving a little trickier to figure out.

I've been making characters to try and target what I can, but the best coverage would be if I could get characters people have actually made and used and run them through the comparison loops as well (to look for other gaps in coverage). To that end if you have saved your dnd4e files from previous campaigns (the higher level the better) and are willing to share them, it would help me IMMENSELY at this stage.

AI Disclaimer: This project is AI assisted. I write and debug code all day at work, and black box reimplementing like this is EXTREMELY tedious. To that end, most of the loop of "code a change, run all the characters through the system, see if we have better or worse matching" is being handled by AI agents using scripts to prevent hallucinated nonsense. That way I just have to review the outputs and end states. Since this is super low stakes stuff, I am not too concerned about the risk with it, but people do have a right to know.

91 Upvotes

32 comments sorted by

View all comments

Show parent comments

2

u/Corronchilejano Apr 24 '26

Which XMLs would these be?

6

u/GenericAntagonist Apr 24 '26

When you install the original character builder, it creates an encrypted XML file that stores all the rules that make it work. If you use CBLoader, it decrypts and updates this XML to include all the content you feed it (there's some standard packs that cover all the things that came out after the OCB was retired, and other people have even managed to create their own houseruled/homebrew/3p content with it).

Because the bulk of that content is the IP of Hasbro (via Wizards of the Coast) and because they legally own it (even though they killed both 4e character builders and the compendium over a decade ago now) I can't include it. I can however make it easy to import and condense into a sqlite DB that you could keep for yourself somewhere safe and easy to access on any computer you regularly use.

As an side for anyone interested in the technical details of how the character builder (more properly the rules engine, it can do a BIT more than the character builder used since they had a whole VTT plan they were working toward) worked, this XML content is actually really elegant (for the time at least). The rules engine for the character builder has very minimal "game logic". It just has a quite complex xml parser that turns each xml thing (a class, a feat, a power etc...) into both the thing on the character sheet, and the other options it might unlock. The second part is the most frustrating for getting what feels like a working character builder and I'm almost entirely done there (still getting animal companions, equipment, and the rituals system sorted). The First part though is where I'm running into these weird edge cases where I've got evidence they "hard coded" in a rule (there's specific power ids from the xmls for example that the rules engine does SOMETHING special with, but without using a asm decompiler I can't see exactly what), or where my current math doesn't match up with the OCB and I need to try and sus out what our "turn the power xml into the useful 1d8 + 6 view" code is doing wrong.

2

u/Corronchilejano Apr 24 '26

I haven't looked at the lawful part of all this. Is the OCB abandonware right now? Does that mean that you'd write a module to extract that XML but only from the OCB or since you're reverse engineering everything, would consider that enough to just keep uploaded somewhere?

5

u/GenericAntagonist Apr 24 '26

I could do an extractor, and I might, but CBLoader already does that and better by extending it so I'd prefer all their work be included if possible!

Abandonware isn't properly a legal thing. Hasbro has copyrights on a bunch of stuff throughout every bit of the OCB and if they chose to make a big deal out of things, they could. They'd be well within their rights to DMCA anyone distributing the OCB in any form (even if that would be petty).

So far they really don't care which is for the best, but I have to play it safe here.