Icon Hue

Vis_Mage

Novice Magician
Veteran
Joined
Jul 28, 2013
Messages
551
Reaction score
185
First Language
English
Primarily Uses
RMMV
Hello,

I was wondering if it would be possible to, through the use of notetags, be able to adjust the hue of an icon? The idea being that instead of needing a dozen different recolored potion icons, that you could have one or two, and use a notetag to set the hue of the others.

I'm mostly looking to use this with items/weapons/armors, although I'd imagine that if you got those three working, getting it to work with skills and states as well would be fairly simple.
 
Last edited:

Crusha

Veteran
Veteran
Joined
Jul 28, 2020
Messages
56
Reaction score
25
First Language
English
Primarily Uses
RMMV
Hey Vis_Mage, it's not your exact 'answer', but I'm not sure if you're familiar with Avy's Icon set here: https://forums.rpgmakerweb.com/index.php?threads/avys-icon-workshop-new-wind-icons.21623/

It has potions and recolors on them, which might fulfill your need. I might be incorrect on this, but if I recall correctly, tinting puts basically a filter over the image, where-as adjusting hue might have different functionality. This is noticeable when visualizing the Hue on an enemy and adjusting it, vs tinting a map. They seem to function differently. If the icon-set doesn't fulfill your need, and you need a more 'Coder' answer, maybe one of the other people here knows the scripting of it. If you are interested in a Tint, or a Hue, it might be best to let them know specifically which one (in case both options are available since I believe they function differently). It could [obviously] be done with gimp/photoshop, but I imagine that might take more time and you were hoping for something like a quick-fix.

Hopefully something I presented was somehow useful -- take care.
 

Vis_Mage

Novice Magician
Veteran
Joined
Jul 28, 2013
Messages
551
Reaction score
185
First Language
English
Primarily Uses
RMMV
Thanks for the reply! :kaohi:

As a matter of fact, I'm actually using Avery's wonderful icons already. The main reason I'm looking for a plugin solution as opposed to just recoloring them manually is due to iconset size restrictions. For those who aren't aware, using an iconset with more than 64 rows of icons causes certain instances that are supposed to show icons (such as for enemies in battle) to display an empty black box instead. To be fair, that's still a ton of icons, but I'm unfortunately running into that limit.

You brought up a good point though, about tint vs hue. I hadn't considered the difference, and changing the hue is actually what I'm hoping to do. I've gone ahead and changed the title and first post to reflect this.
 

Ossra

Formerly Exhydra
Veteran
Joined
Aug 21, 2013
Messages
1,076
Reaction score
847
First Language
English
Primarily Uses
RMMV
Should be do-able to rotate the hue of an icon. I will tinker around with something in a bit.

EDIT: @Vis_Mage Huzzah!

[ Without Hue ]


[ With Hue ]

I just need to tidy code up and it should work fine.



EDIT: Ok! In theory this should work with a high compatibility with other plugins that tinker around with the menu system.

Code:
/** Note Tags (weapons, armor, items)  */

/**
* @notetag iconHue
* @description Rotates the current hue of an icon from between 0 to 360.
* @param {number} hue
*/
<iconHue:hue>

/** Example  */
<iconHue:150>



EDIT: See below for updated plugin.
 
Last edited:

Solar_Flare

Veteran
Veteran
Joined
Jun 6, 2020
Messages
531
Reaction score
232
First Language
English
Primarily Uses
RMMV
For those who aren't aware, using an iconset with more than 64 rows of icons causes certain instances that are supposed to show icons (such as for enemies in battle) to display an empty black box instead.
A little off-topic, but I wonder if this is an issue in the base engine (ie, it will happen without any plugins installed)? If so, it's almost certain that I'll run into it too since I'm using icons for a lot more things than the base game uses them for, and I have quite a variety of items and skills... so I'd be interested if anyone knows more about it.
 

Vis_Mage

Novice Magician
Veteran
Joined
Jul 28, 2013
Messages
551
Reaction score
185
First Language
English
Primarily Uses
RMMV
@Ossra
Woah, I'm really sorry about the late response! I didn't get notified that you had edited your post, and only just now saw it after Solar_Flare posted. :kaocry:

I'm happy to say that it's exactly what I was hoping for! Nice and straightforward. Testing it in my project of more plugins than I care to admit, I've only found 1 (possibly 2) slight incompatibilities. Namely being Yanfly's Item Core, in which the icon tints perfectly fine in the item list, just not in the preview window that plugin adds (the same happens with Yanfly's Shop Core too, but since the item preview window seems to be the same with both, I'd imagine the same change would likely fix them both). Changing the plugin order doesn't seem to affect this. Would this be something you could possibly look into?

@Solar_Flare
The large iconset issue is indeed something that affects the base engine, even without plugins. It's possible that there's more to it than just the iconset size, though. From what I've been able to find, there hasn't really been anyone who's looked too into this, at least not publicly.
 
Last edited:

Ossra

Formerly Exhydra
Veteran
Joined
Aug 21, 2013
Messages
1,076
Reaction score
847
First Language
English
Primarily Uses
RMMV
@Vis_Mage Aah, seems as though Item Core uses a separate function to show the larger icon and bypassed checking on the hue information. That should be fixed now.



EDIT: See below for an updated plugin.
 
Last edited:

Vis_Mage

Novice Magician
Veteran
Joined
Jul 28, 2013
Messages
551
Reaction score
185
First Language
English
Primarily Uses
RMMV
Thank you! Works like a charm in the item menu now.
Although it seems like the same issue is still happening with the shop core, I guess my thinking that fixing the item core conflict would also fix the shop core was incorrect.
 

Vis_Mage

Novice Magician
Veteran
Joined
Jul 28, 2013
Messages
551
Reaction score
185
First Language
English
Primarily Uses
RMMV
Thank you for putting up with all my revisions, haha. Everything seems to be working great now!
 

Ossra

Formerly Exhydra
Veteran
Joined
Aug 21, 2013
Messages
1,076
Reaction score
847
First Language
English
Primarily Uses
RMMV
Not a problem! Glad that everything is working fine!
 

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
1,938
Reaction score
1,386
First Language
EN
Primarily Uses
RMMZ
A little off-topic, but I wonder if this is an issue in the base engine (ie, it will happen without any plugins installed)? If so, it's almost certain that I'll run into it too since I'm using icons for a lot more things than the base game uses them for, and I have quite a variety of items and skills... so I'd be interested if anyone knows more about it.
Maybe the "max icons" thing is related to a maximum texture size? 64 rows of 32 px icons means the iconset is 2048 px high. Someone recently asked me about a similar problem and allegedly solved it by cutting their image down to "only" 7999 (not sure if that was px or rows, I guess px?). I assume it's dependent on the player's GPU, at least for WebGL (no idea how the canvas renderer handles that). :kaoslp:
 

Lady_JJ

Veteran
Veteran
Joined
May 6, 2019
Messages
63
Reaction score
36
First Language
English
Primarily Uses
RMMV
This is awesome! I just tried it out with a custom iconset and the fluid, rather than the background as in the default iconset, change wonderfully. Will you be adding this to your plugin page and making it available for anyone to use?
 

Solar_Flare

Veteran
Veteran
Joined
Jun 6, 2020
Messages
531
Reaction score
232
First Language
English
Primarily Uses
RMMV
Maybe the "max icons" thing is related to a maximum texture size? 64 rows of 32 px icons means the iconset is 2048 px high. Someone recently asked me about a similar problem and allegedly solved it by cutting their image down to "only" 7999 (not sure if that was px or rows, I guess px?). I assume it's dependent on the player's GPU, at least for WebGL (no idea how the canvas renderer handles that). :kaoslp:
This actually sounds quite plausible... in that case I might look into some kind of plugin that chops the icon set into bite-sized chunks. The tricky part would be to do it in a way that doesn't break the icon set picker or force you to maintain two separate versions of the icon set...
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

I always told my DA fans how much I hate slot machines. They're fine in games as a risk-and-reward system. But when you're spending REAL MONEY in a Vegas casino to try and hit the jackpot (which very, very few people will), it can really hurt your budget. Gambling is a bad habit, and I don't like wasting my money on a slim chance. Go to Vegas for the experience, not the jackpot.
Took the kids to a corn maze. They gave us a map and had lights at certain points in the maze. Not overwhelming... or underwhelming... just... whelming.
Okay, vacuuming fruit flies out of the air is surprisingly effective.
Finally finished my menu redesign after like a month of coding! I hate designing menus... Good news though - I thought of a complete redesign for it now, so yay...
Still no scam calls all day... also I got a quick gig designing a mascot drawing for a small business, so I might actually make some green of my own after all. That would be a perfect job for me, since I love art and digital design.

Forum statistics

Threads
104,390
Messages
1,006,035
Members
135,919
Latest member
SuitonKoton
Top