Both KeyForge Adventures have been out for a while and as I’ve managed to defeat the Keyraken with all my decks it is
time to have a look at Abyssal Conspiracy. Preparing cards for printing is done using the same to steps as described
in this post. While adding the bleed is exactly the same, extracting
the main cards didn’t work. The reason was that the library pdf2jpg didn’t support the newer image compression,
JPEG2000, used in that PDF. So this issue has to be fixed first!

The files you need to print this adventure can be found here
in the Support section under KeyForge Adventures Print-and-Play Materials. All card files need to be processed,
the Seal Tableau we’ll turn into a 3D printable token.

Only the file with the card pool uses
this new format, other files can be processed exactly as described in my previous post.

Extracting the cards images

As pdf2jpg didn’t work, another package has to be used and pdf2image is up to the task! However, it does require
you to have poppler installed somewhere on your system. So make sure to pip install pdf2image and put a copy of
poppler somewhere on your system.

Paths to the input file and output are hard-coded, since this is a one-off script I think I’ll get away with it. It is
also the easiest way to share working code through a blog, just don’t do this in serious projects. The output_path
is created if needed. Using this library we need to load and export page by page. The loop over range(1, 44)
takes care of this, but again, hard coded range here, so it will only work for this specific PDF.

from pdf2image import convert_from_path
import pathlib

input_path = "./data/kf_adv_conspiracy_card_pool-compressed.pdf"
output_path = "./output/kf_adv_conspiracy_card_pool-compressed.blog/"

p = pathlib.Path(output_path)
p.mkdir(parents=True, exist_ok=True)

print(f"Converting {input_path}....")
for pn in range(1, 44):
    pages = convert_from_path(input_path, single_file=True, first_page=pn, poppler_path="D:\poppler-21.03.0\Library\bin", dpi=1200)
    print(f"converting page {pn}")
    pages[0].save(str(p.joinpath(f"card_{pn:02}.jpg")), quality=95)

print("Done !")

pdf2image is a little under-documented, and I couldn’t find a good way to process the file as a whole. So here we load
a single page, defining which page using first_page=pn, and write it to disk as a .jpg file.

Once all 43 cards have been exported, the bleed area can be added using scripts from the
previous post and done !

Creating a 3D printable Seal Tableau token

With all code in place to get images printable through a service, there is only the Seal Tableau to do. A solid option
would be to print the PDF on sticker paper apply a few layers of clear coat, put
the sticker on a piece of cardboard, and cut the shape out.

However, I wanted to create a 3D printed one. The process used is essentially the same as to create a lithophane with
a 3D printer, but in reverse. While normally dark parts are thicker, creating the image when light
shines through the back, here the lightest parts need to be printed thickest.

Converting the image to STL can be done online e.g. using https://3dp.rocks/lithophane/.
Depending on the service you use you might need to invert the image (on 3dp.rocks this is not required).
However, this will create a rectangular item, which needs to be cut into a pentagram. This can easily be done using
MeshMixer, or (with a steeper learning curve) Blender.

After printing the model, I sanded it, primed it and painted it with Vallejo metallic paints to make it look like an
old copper coin. The result is rather nice, do note I scaled the token down to a size that fits a deck box. You can
adjust the model size settings in https://3dp.rocks/lithophane/ to fit your needs.

As we are 3D printing we might as well print a set of Delver tokens, available here
to keep track of players’ positions. I printed 3 and painted them in the same style as my Seal Tableau token.

Conclusion

I’m all set to try the next KeyForge Adventure! Looking forward to playing this one!

Categories: Programming

0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *