Skip to content

ImageKeys: unify PaperCard imageKeys - #7757

Draft
Hanmac wants to merge 2 commits into
masterfrom
paperCardImageKeyRework
Draft

ImageKeys: unify PaperCard imageKeys#7757
Hanmac wants to merge 2 commits into
masterfrom
paperCardImageKeyRework

Conversation

@Hanmac

@Hanmac Hanmac commented Jun 1, 2025

Copy link
Copy Markdown
Contributor

Closes #7532

The Goal is to simplify the ImageKeys into a more readable format c:Name|Set|CN
and when it is finally used as filename, into Set/CN_Name.fullborder.jpg
Or would this be better Set/Name.CN.fullborder.jpg ala XMage?

Also updated the scryfall downloader to support artCrop on Desktop

  • Split Cards right now have problems with artCrop, but for this i want to talk to Scryfall about it.
  • I was experimenting with artCrop for tokens, but it caused more problems
  • Front and Back Side might have different Artist, but we can't handle that right now

I don't know if this really was needed?
CardView.getCardForUi(ImageUtil.getPaperCardFromImageKey(cardView.getCurrentState().getTrackableImageKey()));

The Artist Info on Mobile, for this it seems the good way was to add a new Attribute, but it causes crashs on Player Effects like Speed

  • For these i think i will make an extra PR, that adds PaperOther so i can better access the Artist from there too
    right now, the Artist Info for Tokens falls back to WOTC?
  • I need to refactor it anyway because with Artist Attribute, it would leak info from FaceDown Cards, and we cant have that

Specialize does have different CollectorNumber needed for Scryfall:

  • c:Jaheira, Ruthless Harper|HBG|16b is turned into HBG/16b_Jaheira, Ruthless Harper.fullborder.jpg
  • but that makes finding EditionEntry or PaperCard by CollectorNumber but that's only needed for ArtCrop?

@Agetian

Agetian commented Jun 2, 2025

Copy link
Copy Markdown
Contributor

Will this be also compatible with the file name scheme we're using at the moment? For the users of full card art collections like myself, it'll be a total nightmare trying to rename all the cards to the new format. If the file naming scheme changes completely, I'd say we need some kind of a converter to convert old collections to the new format. I wish it were unnecessary and we had a Scryfall downloader that would grab all the proper art (like in XMage), but we don't have that, unfortunately, so that's a moot point :( What do you think?

@Hanmac

Hanmac commented Jun 2, 2025

Copy link
Copy Markdown
Contributor Author

Will this be also compatible with the file name scheme we're using at the moment? For the users of full card art collections like myself, it'll be a total nightmare trying to rename all the cards to the new format. If the file naming scheme changes completely, I'd say we need some kind of a converter to convert old collections to the new format. I wish it were unnecessary and we had a Scryfall downloader that would grab all the proper art (like in XMage), but we don't have that, unfortunately, so that's a moot point :( What do you think?

i try to add fallbacks, but the new Filename will have CollectorNumber instead of Artindex so SecretLair doesn't mess up our files anymore

@Hanmac

Hanmac commented Jun 2, 2025

Copy link
Copy Markdown
Contributor Author

The different situations of ImageKeys: (With/Without Set, With/Without CN, With/Without Artist, maybe back)
lets me think it might be better to have them as Key-Value:
c:Jaheira, Ruthless Harper|HBG|16b into c:Name$ Jaheira, Ruthless Harper | Set$ HBG | CN$ 16b | Artist$ Mila Pesic

Then I don't need to ask the Edition/EditionEntry when I want to display the Artist

otherwise, displaying the Artist from the Card might show hidden info

@Jetz72

Jetz72 commented Jun 2, 2025

Copy link
Copy Markdown
Contributor

The different situations of ImageKeys: (With/Without Set, With/Without CN, With/Without Artist, maybe back) lets me think it might be better to have them as Key-Value: c:Jaheira, Ruthless Harper|HBG|16b into c:Name$ Jaheira, Ruthless Harper | Set$ HBG | CN$ 16b | Artist$ Mila Pesic

Then I don't need to ask the Edition/EditionEntry when I want to display the Artist

Sounds like the amount of data here is growing beyond what a string is good at storing. Maybe the image key needs to be expanded into a full on class/record for containing image metadata? Then we could pile on whatever extra metadata we want - specialize mode, front or back, artist, flipped flag, whether we even expect it exists on Scryfall or if it's something local like an Adventure card or placeholder. It could just have its own methods for translating itself into a filename, a legacy filename, a Scryfall URL, a hashcode, etc.

SethMilliken added a commit to SethMilliken/forge that referenced this pull request Jun 10, 2025
Images are currently downloaded on-demand on mouseover, which can feel
sluggish. This change adds a new preference that, when enabled, will
prefetch all images from a (non-infinite) card pool when opening it.
Primarily for all Sanction Format modes.

Disabled by default.

Added only to desktop. Although the mobile version also loads
images on-demand, it does so as soon as the cards are visible, which
is less of an issue.

Note: will require adjustment when `imageKey` refactor (Card-Forge#7757) lands.
SethMilliken added a commit to SethMilliken/forge that referenced this pull request Jun 10, 2025
Images are currently downloaded on-demand on mouseover, which can feel
sluggish. This change adds a new preference that, when enabled, will
prefetch all images from a (non-infinite) card pool when opening it.
Primarily for all Sanction Format modes.

Disabled by default.

Added only to desktop. Although the mobile version also loads
images on-demand, it does so as soon as the cards are visible, which
is less of an issue.

Note: will require adjustment when `imageKey` refactor (Card-Forge#7757) lands.
SethMilliken added a commit to SethMilliken/forge that referenced this pull request Jun 11, 2025
Images are currently downloaded on-demand on mouseover, which can feel
sluggish. This change adds a new preference that, when enabled, will
prefetch all images from a (non-infinite) card pool when opening it.
Primarily for all Sanction Format modes.

Disabled by default.

Added only to desktop. Although the mobile version also loads
images on-demand, it does so as soon as the cards are visible, which
is less of an issue.

Note: will require adjustment when `imageKey` refactor (Card-Forge#7757) lands.
SethMilliken added a commit to SethMilliken/forge that referenced this pull request Jun 12, 2025
Images are currently downloaded on-demand on mouseover, which can feel
sluggish. This change adds a new preference that, when enabled, will
prefetch all images from a (non-infinite) card pool when opening it.
Primarily for all Sanction Format modes.

Disabled by default.

Added only to desktop. Although the mobile version also loads
images on-demand, it does so as soon as the cards are visible, which
is less of an issue.

Note: will require adjustment when `imageKey` refactor (Card-Forge#7757) lands.
SethMilliken added a commit to SethMilliken/forge that referenced this pull request Jun 12, 2025
Images are currently downloaded on-demand on mouseover, which can feel
sluggish. This change adds a new preference that, when enabled, will
prefetch all images from a (non-infinite) card pool when opening it.
Primarily for all Sanction Format modes.

Disabled by default.

Added only to desktop. Although the mobile version also loads
images on-demand, it does so as soon as the cards are visible, which
is less of an issue.

Note: will require adjustment when `imageKey` refactor (Card-Forge#7757) lands.
@github-actions

Copy link
Copy Markdown

This PR has not been updated in a while nad has been marked on stale. Stale PRs will be auto closed

@Hanmac Hanmac added keep no stale and removed no-pr-activity labels Jul 18, 2025
@Hanmac

Hanmac commented Jul 18, 2025

Copy link
Copy Markdown
Contributor Author

Blocked by #7846

SethMilliken added a commit to SethMilliken/forge that referenced this pull request Aug 28, 2025
Images are currently downloaded on-demand on mouseover, which can feel
sluggish. This change adds a new preference that, when enabled, will
prefetch all images from a (non-infinite) card pool when opening it.
Primarily for all Sanction Format modes.

Disabled by default.

Added only to desktop. Although the mobile version also loads
images on-demand, it does so as soon as the cards are visible, which
is less of an issue.

Note: will require adjustment when `imageKey` refactor (Card-Forge#7757) lands.
SethMilliken added a commit to SethMilliken/forge that referenced this pull request Aug 28, 2025
Images are currently downloaded on-demand on mouseover, which can feel
sluggish. This change adds a new preference that, when enabled, will
prefetch all images from a (non-infinite) card pool when opening it.
Primarily for all Sanction Format modes.

Disabled by default.

Added only to desktop. Although the mobile version also loads
images on-demand, it does so as soon as the cards are visible, which
is less of an issue.

Note: will require adjustment when `imageKey` refactor (Card-Forge#7757) lands.
SethMilliken added a commit to SethMilliken/forge that referenced this pull request Aug 28, 2025
Images are currently downloaded on-demand on mouseover, which can feel
sluggish. This change adds a new preference that, when enabled, will
prefetch all images from a (non-infinite) card pool when opening it.
Primarily for all Sanction Format modes.

Disabled by default.

Added only to desktop. Although the mobile version also loads
images on-demand, it does so as soon as the cards are visible, which
is less of an issue.

Note: will require adjustment when `imageKey` refactor (Card-Forge#7757) lands.
SethMilliken added a commit to SethMilliken/forge that referenced this pull request Aug 28, 2025
Images are currently downloaded on-demand on mouseover, which can feel
sluggish. This change adds a new preference that, when enabled, will
prefetch all images from a (non-infinite) card pool when opening it.
Primarily for all Sanction Format modes.

Disabled by default.

Added only to desktop. Although the mobile version also loads
images on-demand, it does so as soon as the cards are visible, which
is less of an issue.

Note: will require adjustment when `imageKey` refactor (Card-Forge#7757) lands.
SethMilliken added a commit to SethMilliken/forge that referenced this pull request Aug 28, 2025
Images are currently downloaded on-demand on mouseover, which can feel
sluggish. This change adds a new preference that, when enabled, will
prefetch all images from a (non-infinite) card pool when opening it.
Primarily for all Sanction Format modes.

Disabled by default.

Added only to desktop. Although the mobile version also loads
images on-demand, it does so as soon as the cards are visible, which
is less of an issue.

Note: will require adjustment when `imageKey` refactor (Card-Forge#7757) lands.
SethMilliken added a commit to SethMilliken/forge that referenced this pull request Aug 28, 2025
Images are currently downloaded on-demand on mouseover, which can feel
sluggish. This change adds a new preference that, when enabled, will
prefetch all images from a (non-infinite) card pool when opening it.
Primarily for all Sanction Format modes.

Disabled by default.

Added only to desktop. Although the mobile version also loads
images on-demand, it does so as soon as the cards are visible, which
is less of an issue.

Note: will require adjustment when `imageKey` refactor (Card-Forge#7757) lands.
SethMilliken added a commit to SethMilliken/forge that referenced this pull request Aug 28, 2025
Images are currently downloaded on-demand on mouseover, which can feel
sluggish. This change adds a new preference that, when enabled, will
prefetch all images from a (non-infinite) card pool when opening it.
Primarily for all Sanction Format modes.

Disabled by default.

Added only to desktop. Although the mobile version also loads
images on-demand, it does so as soon as the cards are visible, which
is less of an issue.

Note: will require adjustment when `imageKey` refactor (Card-Forge#7757) lands.
SethMilliken added a commit to SethMilliken/forge that referenced this pull request Jan 28, 2026
Images are currently downloaded on-demand on mouseover, which can feel
sluggish. This change adds a new preference that, when enabled, will
prefetch all images from a (non-infinite) card pool when opening it.
Primarily for all Sanction Format modes.

Disabled by default.

Added only to desktop. Although the mobile version also loads
images on-demand, it does so as soon as the cards are visible, which
is less of an issue.

Note: will require adjustment when `imageKey` refactor (Card-Forge#7757) lands.
SethMilliken added a commit to SethMilliken/forge that referenced this pull request Aug 6, 2026
Images are currently downloaded on-demand on mouseover, which can feel
sluggish. This change adds a new preference that, when enabled, will
prefetch all images from a (non-infinite) card pool when opening it.
Primarily for all Sanction Format modes.

Disabled by default.

Added only to desktop. Although the mobile version also loads
images on-demand, it does so as soon as the cards are visible, which
is less of an issue.

Note: will require adjustment when `imageKey` refactor (Card-Forge#7757) lands.
SethMilliken added a commit to SethMilliken/forge that referenced this pull request Aug 21, 2026
Images are currently downloaded on-demand on mouseover, which can feel
sluggish. This change adds a new preference that, when enabled, will
prefetch all images from a (non-infinite) card pool when opening it.
Primarily for all Sanction Format modes.

Disabled by default.

Added only to desktop. Although the mobile version also loads
images on-demand, it does so as soon as the cards are visible, which
is less of an issue.

Note: will require adjustment when `imageKey` refactor (Card-Forge#7757) lands.
SethMilliken added a commit to SethMilliken/forge that referenced this pull request Aug 25, 2026
Images are currently downloaded on-demand on mouseover, which can feel
sluggish. This change adds a new preference that, when enabled, will
prefetch all images from a (non-infinite) card pool when opening it.
Primarily for all Sanction Format modes.

Disabled by default.

Added only to desktop. Although the mobile version also loads
images on-demand, it does so as soon as the cards are visible, which
is less of an issue.

Note: will require adjustment when `imageKey` refactor (Card-Forge#7757) lands.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Specialize ImageKey refactor

3 participants