-
Notifications
You must be signed in to change notification settings - Fork 347
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Support for Prerequisite Assets...? (or Toggle Asset Directory if Another Asset Enabled) #129
Comments
Right now, the body matching algorithm unfortunately uses data-required="male,female" attribute. I wish I had made it data-required="body=male,female" or something. Then we could have expanded it to accept data-required="body=male,female&head=male,female" |
Wow so that one dates back to you? Interesting. So this mechanic wasn't updated by Sanderfrenken. |
I'm thinking now I should:
|
I wasn't advocating for changing this. What I meant is that in the sheet definition itself, we add a toggle that says if another asset is enabled, we swap the directory. For example, eyes:
Something like this perhaps:
And that layer won't load if the "head" isn't set. This is just a rough example. Another possibility could be having the ability to add
|
If the asset type doesn't exist it would throw an error on compile. |
It's hard to know what you mean by "head". Right now head type is an abstraction, for example, the actual key value is head=Human_female_light |
It would be The main issue is that facial expressions are only designed for human heads. But there's a large variety of non-human heads, too. Those heads probably shouldn't accept the facial expressions we have. |
I'd recommend against using a I implemented this in my generator with the Admittedly, with my system you would need to update the expression definitions if you added a new incompatible (non-animal) head type, but I'm assuming whoever creates/adds that asset will be more aware that additional changes need to be made to prevent incorrect spritesheets. |
Yeah that's probably a good point. Right now we already are using required in some instances, but its not for much. There's only two things it is actively used for: body type (which are RARELY added) and animations, and even then, its mostly used in generate_source.html. That being said, there may be limited situations where required makes sense. I'm talking about, say, a "trim" overlay for a single specific asset. In that circumstance, required makes the most sense. |
Let me understand. But we currently are able to mix and match some things like a female head to a male body. Or an adult head to a child body. So I guess we have to be careful and use tags like male_head and child_body, not just male or child. Also there will be times like an an asset might be designed for a single hairstyle, and right now we have so many hairstyles. Are we really going to list every hairstyle except one in an excluded by set? Finally, are we sure tags should just be strings? We might run into problems with synonyms. Does 'hose' mean the legwear or the tube socks? We might want to use key:tag pairs. |
Yeah that would be a PITA and wouldn't be worth it. That being said, I don't see any assets we'd need to have an "excluded" set for anyway. I mean, at most, I guess, perhaps you might say certain heads shouldn't have it, but I don't think that's worth it really. If anything, I think its fine to keep hair on everything. The only types of assets we want to restrict are assets that clearly need to be laid over another asset. The faces and eyes obviously. Some hairstyles, perhaps, should have restrictions on certain headpieces. There's some hairstyles that have hairbands or other such things in the hair, and IMO those should have overlays so they can get recolors... and those overlays should be restricted to the hairstyles they're based on. Similarly, some hats may have restricted assets, too. Again, mostly overlays. This is why I think we should have both required AND excludes. Depending on the asset, either-or may be good options.
There are no hose socks to my knowledge. Those are "Long Socks". But I get your point. I agree that it should be a key-value pair of some kind. However, I think the use of tags for "related" assets can be a viable option. We can label certain heads as "animal" or "human" (or perhaps "humanoid", as some non-human heads may still work with most human assets). But that could still be a key-value pair thing, in that case, we say "required-tag" or "excludes-tag". But we could also have a general required/excludes that lets you set any asset type you want. Its up to you how expansive or restrictive you want to go with it. Mostly we just want some ways to restrict certain assets in relation to other assets in a way that is more varied than just the body colors. |
Interesting discussion. Something to add to the equation: I understand that from an asset designer's point of view, certain assets, like a visor, are intended to be used in combination solely with certain helmets. The same goes for certain trims, epaulets, mantal shoulders and now also the eyes and expressions as an example. From a character designer's perspective though, there can be quite interesting combinations possible that you as a creator of the asset might not even had think of when creating the asset in the first place. For instance, a sack hood with a visor creates a resulting character that could suit for a fencing look a like: A minotaur with a cyclops eye works as well from some perspectives: And with some imagination: Combining these three trims (two that are meant for a pirate jacket, and one for the Santa's hat) on a nude body can yield some native tribe like character look with a tattoo on his body wearing a headband. There are so many ways to combine assets, and I think there can be very valuable combinations possible using assets that you wouldn't expect to be compatible at first. You could add a more "restricted mode" to the generator, but I would propose to make it optional if you do. |
@jrconway3 Coming back to this proposal... I'm thinking we should rename match_body_color to match_head_variant since it is more accurate. Is this going to be a special case for expressions or is it more general? So for your expressions, the required/directory swap proposal:
I'm renaming |
Not saying the current name is great, but So it's not only matching on the head variant, it is just matching the variant for all assets that support this boolean when for any of those assets a new variant is selected. |
I thought we wanted to keep the option of mismatched variants for head and body? If we don't, I suppose match_body_variant will do. @sanderfrenken How about a "match body" option on head? @jrconway3 Are we sure we can't use (partially) transparent pixels for the expressions matching the face color? |
This is possible, as you can toggle this feature off. But I see the checkbox to disable/ enable this feature is removed... |
Weird. The JS is still there:
But the checkbox itself is removed from the HTML. Well you can easily add that back in.
What do you mean by that? in replacement for match_body_color? |
Yes, that's how it works. I only add tags to assets that will restrict others. The body, the head, etc. I wouldn't bother adding any tags to hair unless I knew there were sub-assets that don't fit the other hairstyles. For example, in my generator, the human male body is tagged I think this approach avoids the need for more specific key:value tags, though you might need those for color matching purposes. Mine live-recolors the images, so I handle color matching differently. |
A search |
Tried to find it back in history, can't find it either. I think it might have been lost years ago. Thanks for putting it back anyway! |
Hey, I thought it was a new proposal. |
I might have removed it by mistake when I introduced the |
@jrconway3 Is there any branch I can use to start working on this (doesn't matter if the PR is closed) for our required/template proposal?
|
I uploaded just the sheet definitions, only one sheet per face. I also kept the adult/child split for eyes, but only one eyes (eyes_adult). My only real concern with child_eyes is that child eyes has less animations available for its bodies, but I can always re-merge these back anyway. |
If we can support mismatched variants... well, I actually added some variants of the same assets that had both a matched variant AND a mismatched variant. I did this for Lizard Tail and Lizard Wings. If we have the toggle in place, then we don't need to have two sets.
I have absolutely no idea what you're talking about...
I have zero problems with this. I want to be as flexible as possible. I only want to add restrictions where it makes sense to have restrictions. This is for things like trim layers that ONLY match one asset or overlay recolors that ONLY match one asset. These literally cannot work with other assets, don't make any sense, and is bad UI design to not have tighter restrictions on them, such as removing them when the required asset is swapped off. I get having flexibility, but some assets literally do not work with other assets whatsoever. Sorry I wasn't able to participate in the discussion, but I was literally asleep... :P |
So the more I look at this and go more in-depth with these expressions... I might not need that eye overlay after all. So far I haven't seen a single asset that actually moves the eye color around. At least for Male/Female anyway, Elderly looks way different. What appears to be happening is each expression just covers up parts of the eyes. I'm going for the objective of minimizing the overlays as much as possible. If any pixel is in the same spot in the default head and I can hide the expression and the pixel is identical, then I remove that pixel from the overlay. Look L, Look R, and Closing might be the only assets that move the irises from what I'm seeing currently. However, the swap will still be useful, and we might still want it for elderly. Also, if I want an as-accurate-as-possible expression, happy/blush should be 1px down, which will require a full overlay for male and female. Sad between Male/Female has a 2px difference, but the difference is so minimal I'm planning to just keep these the same anyway.
Perhaps the |
…or Faces and Eyes
I'm not exactly sure how to do this, but there's a functionality I've been interested in for a while now that may highly benefit overlay assets.
This is in relation to multiple issues:
Its especially important for #102 because I'm actively working on this right now.
Here's the problem I'm seeing:
Eyes overlays only work for specific heads. Of course its all the standard human heads, so that covers a LOT of things. However, what happens when we add Expressions in?
Obviously, the eyes just won't work anymore. We need a new overlay for the eyes in the new positions.
This is pretty easy to do. Once I map the expressions to all heads, I can create a duplicate asset and remove the skintone so we just have the eyes left. Then we can have an eye color swap overlay.
However, we would need to manually toggle the swap PER asset... or perhaps we can add the ability to change the directory paths if specific assets are enabled? Another option: have a default required asset, and if that asset is turned off, the asset goes away.
This second option will work well for many overlay assets, such as what I described in #42:
When we toggle between different hats, the trims just don't work anymore. What I would want to do in such cases is, if the root asset is changed, we remove the trim recolor.
I'm bringing this up here because I'm not exactly sure how to do this, and it will likely become important pretty soon. Here's an example of a toggle in the code for something similar:
Match body color ensures that whatever asset is added always matches the same variant as the body, so it forcibly changes the body color. This is an example of a prerequisite, but it only does one thing--change the body color.
The text was updated successfully, but these errors were encountered: