Open bluecarrot16 opened 1 year ago
I think this may be two related issues:
I'd prefer to add the concept of variants
rather than trying to cram this into layers. This could be handled by either listing all information for each variant in a single asset
as you suggest, or alternatively by only listing the names of equivalent items.
The second option would require duplicating the list of variants
for each asset definition.
"cape-male": {
"solid": {
"tags": [],
"credits": {
"authors": [...],
"licenses": [...],
"links": [...],
},
"palettes": [...],
"layers": {
"solid_behind": {"z_position": 5 }
}
"variants": [
"cape-female",
"cape-muscular",
"cape-child"
]
}
}
A third option with less duplication would be a single "parent" asset that only has the variants
array.
I don't feel strongly about any of these options. There are advantages and disadvantages to each.
I'm seeing three cases here:
I propose that instead of a boolean append
key, that it should be an array. We can then give it the names for any other assets, and append the authors
and links
from all of them.
We would need to settle on a standard format for referring to the assets, since at the moment names are only guaranteed to be unique within a category. Maybe the format category/asset
, or an object with named keys { category: "body", name: "male" }
I'd like to propose changing the structure of data in sheet-definitions.json:
There's a related issue with credits: in Sander's generator, credits are assigned to each image. In Ben's generator, they are assigned to the asset. In a lot of cases, one person draws the "male" version of the asset and someone else adapts it to the "female" (and other) version(s), so the credits for the male and female version of an asset are overlapping but not identical. In Ben's current setup, this situation kinda requires any two objects that have separate attributions to be separate "assets" (i.e. separate entries in
resources/sheet-definitions.json
.I would propose that this generator adopt a model of "one asset, multiple images", similar to Sander's generator. In fact, perhaps we can (ab)use the notion of layers to implement this model, and create a "cascading" series of definitions:
category
>asset
>layer
:category
(e.g. https://github.com/BenCreating/LPC-Spritesheet-Generator/blob/main/resources/category-definitions.json) contains zero or moreasset
s, which are mutually exclusive. The category has some default properties (e.g.z_order
,tags
, perhaps others)? that apply to anyasset
s in that category, but that can be overridden byasset
s orlayer
s.asset
contains one or morelayer
s. The asset can have properties such asexcluded-by
,credits
,tags
,palettes
, etc.; if given, those properties will serve as defaults for all layers within the asset.excluded-by
,credits
,tags
,palettes
, etc. If given, these override properties with the same name from theasset
.asset
is selectable in the generator as long as one or more of itslayer
s is selectable, i.e. it is not excluded by any tags used by any other assets (at least, I think that is how theexcluded-by
key is supposed to work; put another way, an asset is selectable if at least one of its layers is not excluded).credits
block would by default overwrite thecredits
for the asset. However, the layercredits
block can have anappend
key, which, if true, causes anyauthors
andlinks
given to be appended to those for the asset. For example, it is often the case that someone draws an original asset for the male body type, then someone else adapts it to the female body. So the credits for the female version are (credits for the male version) + (additional author and/or URLs). (licenses
probably shouldn't work this way, since the rules about when more licenses can be added to a derivative work are complicated.)Example: