How to Edit the Character Builder XPS Character Sheet

So, you love the D&D Character Builder, but wish you could change just a couple things on the character sheet before printing? Here are some instructions on how to do that.

First, some definitions:

D&D Character Builder: The program that allows you to build your D&D 4E character. It loads and saves files with the “.dnd4e” extension.

D&D Character Sheet Viewer: This program is bundled with the Builder program, and is launched from the Builder when you click the “View Character Sheet” button. Using File > Print, it saves files with the “.xps” extension.

XPS Files: Produced by the D&D Character Sheet Viewer program (among others) when “printing” to Microsoft XPS Document Writer. Stands for “XML Paper Specification”. You can think of it as Microsoft’s answer to PDF. Viewable in Internet Explorer and XPS Viewer, among others.

These instructions describe how to edit that XPS file. I’m assuming that you already know your way around the Character Builder.

Step 1: Build a character in the Character Builder, and use View Character Sheet to load it into the Character Sheet Viewer program.

Step 2: Save the character sheet as an XPS file by selecting the menu options File, then Print, and select “Microsoft XPS Document Writer” as the “printer” to print to. You’ll be prompted for a filename and location; save it somewhere you can find it.

Microsoft XPS Document Writer

Step 3: Now for the tricky part.

An XPS file is actually a ZIP archive. So make a copy of the file and name that copy so it ends with the “.zip” extension. Windows will probably give you a threatening message when you do this, but just ignore that.

Renamed from XPS to ZIP

From here, you could either work inside the compressed folder, or decompress the archive to a folder in work in that. Either is fine, but I prefer to decompress it. When it comes to working with ZIP files, I like to use a third-party tool called WinRAR, but you can suffer with the native Windows support if you like.

So I decompress that ZIP archive to a folder, which builds the following folder structure:

XPS folder structure

The folder of interest in there is Pages, which contains the files that we’re actually going to be editing.

Page files

Step 4: Open up the page file you want to edit in Notepad or the text file editor of your choice. Yep, those files are just plain text XML files.

Step 5: Make your changes. This is the other tricky part. It’s generally just searching-and-replacing, and is easiest to explain by example:

Example 5A: Let’s say you’re playing a bugbear, which has the racial ability Oversized. You decide that’s sort of a lame name for a bugbear racial ability, so you want to rename it to FRICKIN HUGE.

Oversized

Searching the file for the string “Oversized”, we find it down at about line 2068:

<Canvas RenderTransform="1,0,0,1,0,17">
<Path Fill="{StaticResource b3}" Data="M0,0L246.333333333333,0 246.333333333333,151 0,151Z" />
<Glyphs OriginX="2" OriginY="11.5033333333333" FontRenderingEmSize="9" FontUri="/Resources/e970f3ec-35e7-4ae5-9d4a-020a03e110c6.ODTTF" UnicodeString="Oversized" Fill="#FF000000" />
<Glyphs OriginX="46.4733333333333" OriginY="11.5033333333333" FontRenderingEmSize="9" FontUri="/Resources/04ca92b7-c3b9-41fb-9b9f-88562f3ca37b.ODTTF" UnicodeString=" - Use weapons one size larger." Indices=";;;;;;;;;,53;;;;;;;;;;;;;;;;,53" Fill="#FF000000" />
<Glyphs OriginX="2" OriginY="28.5033333333333" FontRenderingEmSize="9" FontUri="/Resources/e970f3ec-35e7-4ae5-9d4a-020a03e110c6.ODTTF" UnicodeString="Predatory Eye" Fill="#FF000000" />
<Glyphs OriginX="65.2866666666667" OriginY="28.5033333333333" FontRenderingEmSize="9" FontUri="/Resources/04ca92b7-c3b9-41fb-9b9f-88562f3ca37b.ODTTF" UnicodeString=" - Use predatory eye as an encounter power" Indices=";;;;;;;;;;;,53;;;;;;;;;;,53;;;,53" Fill="#FF000000" />
</Canvas>

More specifically, this part: UnicodeString=”Oversized”

So we simply replace that with: UnicodeString=”FRICKIN HUGE”

And let’s see how that looks…

Step 6: Turn the decompressed files and folders back into a ZIP file, and then rename that file so it once more has an XPS extension.

so back to our Example 5A: Let’s take a look at how that turned out:

Frickin Huge -- overwrite

What the heck? That doesn’t look right. So what happened?

Let’s look at that part of the file we edited again:

<Glyphs OriginX="2" OriginY="11.5033333333333" FontRenderingEmSize="9" FontUri="/Resources/e970f3ec-35e7-4ae5-9d4a-020a03e110c6.ODTTF" UnicodeString="Oversized" Fill="#FF000000" />
<Glyphs OriginX="46.4733333333333" OriginY="11.5033333333333" FontRenderingEmSize="9" FontUri="/Resources/04ca92b7-c3b9-41fb-9b9f-88562f3ca37b.ODTTF" UnicodeString=" - Use weapons one size larger." Indices=";;;;;;;;;,53;;;;;;;;;;;;;;;;,53" Fill="#FF000000" />
<Glyphs OriginX="2" OriginY="28.5033333333333" FontRenderingEmSize="9" FontUri="/Resources/e970f3ec-35e7-4ae5-9d4a-020a03e110c6.ODTTF" UnicodeString="Predatory Eye" Fill="#FF000000" />
<Glyphs OriginX="65.2866666666667" OriginY="28.5033333333333" FontRenderingEmSize="9" FontUri="/Resources/04ca92b7-c3b9-41fb-9b9f-88562f3ca37b.ODTTF" UnicodeString=" - Use predatory eye as an encounter power" Indices=";;;;;;;;;;;,53;;;;;;;;;;,53;;;,53" Fill="#FF000000" />

The problem is that the string ” – Use weapons one size larger.” is still placed at the same horizontal location as before, defined by the part: OriginX=”46.4733333333333″

There’s a few things we could do here. We could change the value of OriginX to move it over — we can see that the “Use predatory eye” text is close to the right horizontal location, and it has: OriginX=”65.2866666666667″. So we might try setting a value of about 70 and seeing how that looks.

Or we might change the string by adding some leading spaces to it, and move it over to the right that way, with something like UnicodeString=”          – Use weapons one size larger.”

Or we might decide this is all way too fiddly and irritating for such a small payoff, and we’ll just learn to live with “Oversized”. Or to do it all with screenshots and Paint.

I added about 8 spaces to the string, which took a little bit of trial and error but not as much as I feared, to arrive at:

Frickin Huge -- perfect

Be sure to keep notes about what changes you’re making. At some point you’ll be leveling your character up or doing something that will make you change your character in the Character Builder, which means you’ll need to make these changes all over again.

This example was a bit involved; let’s see if we can find anything a bit easier.

Example 5B: Changing a power name. You may have decided that your bugbear rogue isn’t about to use some wimpy power name like “Disheartening Strike”, but would rather use something more like “Punch to the Junk”. So let’s try making that change.

First of all, we should take note of all the places on the character sheet where this name occurs. It’s listed on page 2, under At-Will Powers in the Power Index:

Power index

It’s also listed on page 3, on its Power Card:

Power card

So we’ll be editing both those page files.

On page 2, we search for Disheartening Strike and find:

<Glyphs OriginX="2" OriginY="12.0716666666667" FontRenderingEmSize="9" FontUri="/Resources/04ca92b7-c3b9-41fb-9b9f-88562f3ca37b.ODTTF" UnicodeString="Disheartening Strike" Indices=";;;;;,53" Fill="#FF000000" />

which of course we update to

<Glyphs OriginX="2" OriginY="12.0716666666667" FontRenderingEmSize="9" FontUri="/Resources/04ca92b7-c3b9-41fb-9b9f-88562f3ca37b.ODTTF" UnicodeString="Punch to the Junk" Indices=";;;;;,53" Fill="#FF000000" />

And on page 3:

<Glyphs OriginX="3" OriginY="13.0066666666667" FontRenderingEmSize="12" FontUri="/Resources/04ca92b7-c3b9-41fb-9b9f-88562f3ca37b.ODTTF" UnicodeString="Disheartening Strike" Indices=";;;;;,53" Fill="#FF000000" />

which is also easily updated to

<Glyphs OriginX="3" OriginY="13.0066666666667" FontRenderingEmSize="12" FontUri="/Resources/04ca92b7-c3b9-41fb-9b9f-88562f3ca37b.ODTTF" UnicodeString="Punch to the Junk" Indices=";;;;;,53" Fill="#FF000000" />

Note also this section: FontRenderingEmSize=”12″

Clearly this is the font size. We could increase it or decrease it if we were so inclined.

With those changes made, we save, recompress, rename, and take a look at the results:

Punch to the ?unk

Now what’s wrong? Well, let’s take a closer look at that chunk of XML we edited:

<Glyphs OriginX="3" OriginY="13.0066666666667" FontRenderingEmSize="12" FontUri="/Resources/04ca92b7-c3b9-41fb-9b9f-88562f3ca37b.ODTTF" UnicodeString="Punch to the Junk" Indices=";;;;;,53" Fill="#FF000000" />

The font is in that mysteriously-named ODTTF file, which turns out to be only a subset of the actual font. It only contains the characters it needs, and in our case, it decided that it didn’t need the letter ‘J’.

Fixing this is a matter of convincing it that it really does need that letter. We can do that by opening Character Builder and naming our hero something like ‘Gutboy J. Barrelhouse’ for example. Once the letter makes it into the font, we can manually edit his name back to whatever we want, using the process we’ve now grown familiar with.

Of course, rebuilding the XPS file from the Character Builder means we’ll need to apply all those changes we’ve already made again. Good thing we kept notes about everything, right? Right??

Or we might again decide this is all way too fiddly and give up. But where’s the fun in that?

Further reading: If you want to learn more about the XPS format, you can read the specification — all 453 pages of it. Chapter 5, about text, is probably the most immediately useful.

If you’ve made a fun change to your character sheet, feel free to send me a link in the comments. I’m always interested in seeing what other people have managed.

Advertisements

Tags: , , , , ,

7 Responses to “How to Edit the Character Builder XPS Character Sheet”

  1. A Paladin In Citadel Says:

    That’s some pretty heavy lifting you’re doing there!

    Hope your convention experience was fantastic.

  2. wraith808 Says:

    Does this still work, or am I doing something wrong? I print it with the XPS printer, but when I try to open it- even before editing- with the character sheet viewer, I get an error.

  3. rogercarbol Says:

    I believe the character sheet viewer only accepts .dnd4e files, not .xps files. To view and/or print .xps files, try Microsoft XPS Viewer or Internet Explorer.

  4. wraith808 Says:

    Ah… I get it now. Thanks!

  5. Steve Says:

    Hi,

    Hope you can help.

    I can see the fields I want to change – now problem – I change them with Notepad – Replace the file into the zipped XPS file.

    The changed are there all right – I see them when I check back.

    But when I open the file as an XPS again – no changes appear – all as before.

    I have checked every single file in the zipped XPS – nowhere else are the fields held – so how come they are appearing as unchanged with the original content?

    Be real grateful for a comment.

    Best Rgds.
    Steve

  6. rogercarbol Says:

    I know Character Builder has changed quite a bit since I wrote this; I’m not sure it still applies.

    Which field in particular were you updating?

  7. loganmac Says:

    Not sure how applicable these instructions are anymore. When I open the page file (\Documents\1\1.page) in an editor, it references \Documents\1\Resources\1.png in the same .zip file. Opening the .png file gives me the individual page as it would appear online with the current character builder. Thought I’d post to let anyone stumbling onto this page know – maybe save them some time and frustration.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: