Hi Cheerybelle! I'm trying to achieve what your mod is doing but using Peachy Objects as a base (open permissions) in order to get an unofficial 1.6 fix for Peachy Objects. I'm not sure how you set up the transparency of the asset, it seems to be quite specific. I want the black and white version to apply transparency based on the value of the black (darker black will apply colour, white won't). Any idea how to achieve this? It seems your files are saved as indexed colours but I'm not sure how to do that and preserve the transparency gradient.
If I end up releasing this I'll of course credit you and Peachy.
Hi Cheerybelle! I ended up figuring it out by tinkering. Just wanted you to know I've credited you on this mod I released because I took heavy, heavy inspiration from your mod. (And by that I mean it's pretty much the exact same with different assets). I hope that's ok but if for any reason it's not please let me know and I'll take it down. https://www.nexusmods.com/stardewvalley/mods/22097
...and, even though you figured out how to do the transparency how you wanted, I'll explain how I did what I did anyway: I unpacked the game's assets and then opened up the correct tileset in PaintDotNET, and I pretty much just used the same colours for the overlays as the vanilla game uses (the same RGB/HSV and Alpha values (mostly)) to redraw the modded icons for the overlays.
Going into particular detail on what the overlay does, (if anyone else reads this wanting to know how the overlays work,) for every pixel, opaque white will match the dye colour; grey will have the dye colour darkened by however dark the grey is, and making the colour more transparent will cause the default icon's colours to tint the resultant icon based on how transparent the colour is, with total transparency just showing the default icon underneath. ...and when I say "dye colour", I mean the overlay uses the dye colour of the produce used to make the artisan good (unless overwritten by Producer Framework or the likes).
Thank you so much for the explanation! Adding to this for anyone reading this that you can also add colour values to the overlay and it will add to the resulting colour. I played a little bit with this for my mod, as the vanilla colours can be very bright and harsh, and the icon set I was doing has more of a cutesy vibe. Adding some red to the base jelly overlay, for example, makes a more consistent result and delivers various shades of red.
Could you please provide a link to the source code for the mod? I'd be super appreciative of it! I'm trying to update BAGI and this mod comes close to pulling that off in a similar manner. I need a frame of reference to write the code myself and someone who has already done something somewhat similar would be a huge help. Thank you in advance!
This mod is actually just a Content Patcher content pack mod and only changes some item icons, so it's not compiled to begin with. The vanilla game, as of 1.6, already has support for coloured wine, juice, jelly, and pickles, and it uses dye keywords, so it would be compatible with modded items if people actually used dye keywords on modded items. It is actually a supported feature in Json Assets; people just don't use it, from what I've seen. Of course, the vanilla system is less configurable than BAGI, but, at the very least, Producer Framework can potentially allow for more than the vanilla 33+1 colour options.
Anyway, best of luck to you! Sorry I couldn't be of more help.
so i am a bit confused on how this works or what this mod does. hypothetically, would this mod work as a replacement for the BAGI mod and is there any way it could be used like the BAGI mod. I have mods that rely on the base of it and i wonder if there is a way this can be a replacement?
The vanilla game added support for coloured wine, juice, jelly, and pickles. They take the dye colour of the input produce. This mod only changes the icon graphics for those plus honey. Modded items using, say, Json Assets, can work with the vanilla system just fine, but I personally haven't seen any that actually use the dye keywords added back in Stardew Valley v1.5. It is possible to use Content Patcher to add dye keywords to Json Assets items, though, I think. Edit: ...and Producer Framework can allow for more colour options than just the 34+1 vanilla dyes' colours.
the original SCAGI also worked for modded items; is that the case here, or is it just for the vanilla items? either way I'm downloading and using it, I'd just like to know what to expect!
That... is a good question, actually. The icon replacements in general, yes. As for the colour overlays, I'm leaning towards a "probably", but I haven't actually checked with modded items.
Upon further investigation, it would probably have colour support with modded produce. ...if modded items actually had dye colours... and I don't think Json Assets supports dye colours... and, even if it does, none of the JA mods I checked actually had defined dye colours. So... That's a negative on JA modded item colours in practice... which is a bummer.
After some tinkering with a JA content pack, modded produce is confirmed working with the 1.6 colour system and this mod, and JA does support the vanilla dye colours. It's just that, like, nobody uses the dye system context tags with their mods. (None that I checked, anyway.) So... yeah. We have a definitive answer now. The colors would work if people actually used the tags.
Depending on the input? Automatically? Not really. The vanilla game doesn't natively have differently-coloured honey labels. Using manually-created icons and BAGI? Definitely. The non-lite version of SCAGI uses BAGI to implement its custom icons.
There may be a way to add colourable overlays to items that don't already have them by using some mod and then implement them using Producer Framework, but I don't know of a way to add such overlays, currently.
15 comments
If I end up releasing this I'll of course credit you and Peachy.
...and, even though you figured out how to do the transparency how you wanted, I'll explain how I did what I did anyway:
I unpacked the game's assets and then opened up the correct tileset in PaintDotNET, and I pretty much just used the same colours for the overlays as the vanilla game uses (the same RGB/HSV and Alpha values (mostly)) to redraw the modded icons for the overlays.
Going into particular detail on what the overlay does, (if anyone else reads this wanting to know how the overlays work,) for every pixel, opaque white will match the dye colour; grey will have the dye colour darkened by however dark the grey is, and making the colour more transparent will cause the default icon's colours to tint the resultant icon based on how transparent the colour is, with total transparency just showing the default icon underneath.
...and when I say "dye colour", I mean the overlay uses the dye colour of the produce used to make the artisan good (unless overwritten by Producer Framework or the likes).
The vanilla game, as of 1.6, already has support for coloured wine, juice, jelly, and pickles, and it uses dye keywords, so it would be compatible with modded items if people actually used dye keywords on modded items. It is actually a supported feature in Json Assets; people just don't use it, from what I've seen.
Of course, the vanilla system is less configurable than BAGI, but, at the very least, Producer Framework can potentially allow for more than the vanilla 33+1 colour options.
Anyway, best of luck to you! Sorry I couldn't be of more help.
This mod only changes the icon graphics for those plus honey.
Modded items using, say, Json Assets, can work with the vanilla system just fine, but I personally haven't seen any that actually use the dye keywords added back in Stardew Valley v1.5.
It is possible to use Content Patcher to add dye keywords to Json Assets items, though, I think.
Edit: ...and Producer Framework can allow for more colour options than just the 34+1 vanilla dyes' colours.
The icon replacements in general, yes.
As for the colour overlays, I'm leaning towards a "probably", but I haven't actually checked with modded items.
...if modded items actually had dye colours... and I don't think Json Assets supports dye colours... and, even if it does, none of the JA mods I checked actually had defined dye colours.
So... That's a negative on JA modded item colours in practice... which is a bummer.
It's just that, like, nobody uses the dye system context tags with their mods. (None that I checked, anyway.)
So... yeah. We have a definitive answer now.
The colors would work if people actually used the tags.
Automatically? Not really. The vanilla game doesn't natively have differently-coloured honey labels.
Using manually-created icons and BAGI? Definitely. The non-lite version of SCAGI uses BAGI to implement its custom icons.
There may be a way to add colourable overlays to items that don't already have them by using some mod and then implement them using Producer Framework, but I don't know of a way to add such overlays, currently.