Closed DominaeDev closed 3 months ago
If the
type
field isicon
, the asset SHOULD be used as an icon or protrait of the character. if one of the assets is icon type, the application SHOULD use the asset as the icon of the character card. if there is multiple icon type assets, the application SHOULD use the main icon or let the user choose the icon, or change dynamically by the application. how the main icon choosed is below on the specification. ifuri
field isccdefault:
, and the card is PNG/APNG embedded,ccdefault:
SHOULD point the PNG/APNG file itself or modified version of the PNG/APNG file.
The ccdefault:
was initially devised to facilitate the retrieval of the PNG file itself from character cards embedded within the PNG. However, since it is possible that the ccdefault:
will be located outside the PNG file, in which case it is designated as the default asset serving as a fallback in this instance. In this context, the term "default asset" typically denotes a placeholder image. It would probably be a good idea to display something like a simple person icon in the editor you are creating.
So in CharX, in most cases, you can expect ccdefault:
would work like 'No Image here, use placeholder'. In the case of characters with proper assets, the correct format would be embeded://
rather than ccdefault:
.
I see. That helps! Thanks for clarifying.
The spec says that if the uri is
ccdefault:
a default should be used. It then proceeds to say:I'm trying to make sense of this in the context of making an editor, hoping to load and save charx-files and be compatible with many different applications. Since the uri field no longer contains a specific location for the asset, how would an editor know which data to assign that particular asset? If it's up to every application/editor to determine their own default behavior, wouldn't that defeat the purpose of the
uri
field and risk incompatibilities arising between different applications and editors? For instance, how should an editor interpretccdefault:
when reading an arbitrary charx file, without knowing its intended application?Here are some others questions that arose as I tried to follow the spec: Is
ccdefault:
equivalent toembedded://assets/{type}/main.{ext}
, or does it point to any (or first) asset of that type? What should happen if multiple assets of the same type have a uri ofccdefault:
, or is that not allowed? I can't find the answers in the spec.Or, and I'm coming to this realizations as I'm writing this, should an editor ignore the assets array altogether when reading a charx and just look at the contents of the zip instead?