kuhrusty / MorbadScorepad

DUNGEON DEGENERATES support app.
GNU General Public License v3.0
7 stars 0 forks source link

Presents: 300 DPI PNG exports of Goblinko-official cards from the morbad site #34

Open sgbeal opened 4 years ago

sgbeal commented 4 years ago

If you're interested in finally replace the scanned cards without the overhead of integrating the JS/HTML renderer...

GODDAMMIT, github does not support attaching tar.xz files, but supports ZIP and XLSX. WHAT HAS THIS WORLD COME TO!?!?!?

Oh, right. Microsoft bought github. (Rise up, github employees, and sneak tar file support into this thing!)

Sigh.

So...

scp...

here you go:

https://morbad.wanderinghorse.net/tmp/goblinko-skill-mastery.tar.xz

That's 11MB, which unpacks to 13MB of PNGs: all of the Goblinko-official skills/masteries exported from the morbad card tools.

We "could" deliver these as SVGs instead, but that would first require modifying the exporter to export the skills/masteries as separate graphics (it currently combines those, and we can't simply crop the resulting SVGs like we can the PNG exports). That wouldn't be a big deal, so if you'd prefer to have SVGs we can do that (in theory they'd be a drop-in replacement for the PNGs).

Each image is <200kb (most around 100kb), and their structure, for lack of a better-sounding idea is:

Alchemy/skill.png
Alchemy/mastery.png
...
Track/skill.png
Track/mastery.png
...

Their export quality (300dpi) is high enough that they should pose you no problems, even on big-screen devices like this television:

image

sgbeal commented 4 years ago

AAAAARRRGGGGGHHHHH - i see now that the last export screwed up the font sizes (yet again) on some cards, so don't use that export. i'll go through them and figure out which ones were affected, re-run the export, then have my people contact your people about a new copy.

sgbeal commented 4 years ago

Okay, though the magic of file replacement, the link in the top post now refers to a different export in which the font sizes of 11-ish of the cards were reduced to avoid Chromium Headless from truncating them during the export. 21st damned century and the same browser can't do consistent font sizing two days in a row. Sigh.

Management summary: those PNGs "should" be suitable as drop-in replacements for your scans. If you want them.

kuhrusty commented 4 years ago

Oh, excellent, I was just going to file a bug about making it easier to include fan-made cards. I was thinking a prerequisite would be issue #9, using your code to render cards instead of using scans (because raster images are bloated & unnecessary, and a lot harder for people to add their own content), but if card images can be generated from the morbad tools, then the reason is reduced to "bloated & unnecessary and only a little harder for people to add their own content."

Ultimately I'd like people to be able to download & enable/disable specific bits of fan content at runtime, but until then, we ought to be able to add (possibly overlapping) sets of homebrew cards as expansions. (CONTRIBUTING.md has notes on adding expansions.)

As far as using the generated PNGs of the official cards instead of my scans, I'll take a look at that, thanks.

kuhrusty commented 4 years ago

Oh, right. Microsoft bought github.

Aww, man, I could've gone all year without knowing that.

sgbeal commented 4 years ago

If you really want fan-made ones (i assumed you didn't), there is a GDrive link here:

https://morbad.wanderinghorse.net/exports/

where you can find all of the exports for all card types. Look under cards/card-singles/skill/homebrew. Each card is available as a PDF in that dir, and the individual image exports, including the split skill/mastery images, are in a subdir named after each skill. (Note that XP costs of homebrew skills are guesses made by their creators. My guesses are not always great in that regard (they're often too cheap).)

SVG exports: because the browser export process converts all of the text to paths, rather than SVG text elements (so that the fonts don't need to be installed on he client), those are significantly larger than the PNGs. If you want those, though, i can modify the exporter to do the skill/mastery cards separate from each other. They're currently exported as 1 image because that simplifies print-and-play assembly (simply fold them in half).

Short term, if you want nicer PNG images, these exports should be just drop-in replacements. Long-term, the easiest way for users to import custom cards would be to simply pull the JSON from the morbad db site and let JS render it in your app, but...

1) That changes needed to your app are of course more work than simply giving users these PNGs and maybe (maybe, as a second step) adding support for a local directory where they can drop their own image files to use as skill cards. Power-users could copy the cards they want from the public GDrive where i dump all of the exports. (Noting that the exports are only run periodically, as they take about an hour to process because of the insane amount of hoop-jumping necessary to go from HTML to PDF to SVG-with-page-sized-background to SVG-without-page-sized-background to PNG (one of the BGG users asked for PNG, but that final step is the simplest of all of them).

2) If we do client-side rendering, we'll also eventually have problems with varying font sizes. Each browser does it slightly differently on different days of the week, and what they show on-screen is not always the same as what they print (where they sometimes use slightly larger fonts, causing truncation (noting that "print" also means "export to PDF")). Chrome/Chromium is especially bad about that but Chromium headless is the only option we have for automated exports, so that font screwiness is an unfortunate fact of life. Firefox still doesn't have a CLI option for exporting a URL to PDF. Chromium has an unreliable CLI option to do so, but running Chromium headless via some nodejs thing called "pupeteer" is, so far, the most reliable way to do the exports, but then those have to be manual double-checked for font size screwups and post-processed to eliminate the PDF page background which Chromium forces on us.

Anyway...

In about 8 or 10 hours i'll be adopting a second puppy and will have 24/7 house-training duty for a couple of months (which means taking her outside every 2 hours, whether she needs to or not, rain or shine and sleep be damned), so my capacity will be limited for a while, but i'm more than willing to help with whichever direction(s) you'd like to go.

2020-10-04b

sgbeal commented 4 years ago

Aww, man, I could've gone all year without knowing that.

It's been very nearly 2 years, man. You apparently need to take a break from playing DD.

i didn't know they'd bought the SwiftKey Android keyboard software for at least 3 years, and now i completely understand its steady decline in usability. (Seriously, i used to go months without swearing at it, and now that's down to hours between curses.) Funny how SwiftKey never made a big announcement of it, as if they were ashamed or something. Sigh.

kuhrusty commented 4 years ago

i didn't know they'd bought the SwiftKey Android keyboard software for at least 3 years

Oh, I remember when I found that out; that was the day I uninstalled it.

sgbeal commented 4 years ago

Oh, I remember when I found that out; that was the day I uninstalled it.

i tried that but found that i couldn't get used to another keyboard. The ones i tried were all missing something which i used in SwiftKey. Recommendations are welcomed.

kuhrusty commented 4 years ago

Recommendations are welcomed.

Instead of functionality, I went with righteous indignation, carefully cultivated over decades.

sgbeal commented 4 years ago

Touché. That's often my approach to resolving offenses against my principles, but keyboards without backticks are literally useless to me, as much of my online computing is on a tablet, and much of it is in markdown-using forums such as this one. i never did find the backticks on the stock Android keyboard.