[Additional Feature] IconSet Editor (Exporter/Importer)

Well, it would be nice to have something similar to Yanfly's Icon Generator built in, here's what I think would be more important (i think...)

Description of the Feature:


So, one thing about Rpg Maker MV that's kind of annoying is that it still uses just one IconSet, as opposed to a certain other rpg creation tool that allows you to use multiple icon sets, and pick which set you want to use.
And if you want to combine icons from different files, you need to actually combine the images in Photoshop, or something like that. And not everybody would want / be able to do that.

So, I have a suggestion. Give us a tool that will allow us to create our own iconset from existing iconset files.
Specifically, being able to open an existing icon set, pick the tiles you want, and then copy them into your iconset.
Something like the Tileset Tool, I guess.

Why is this feature good?

This will allow users to combine their favorite iconsets, or import single icons without the need to use art program, and without the need to switch to external tools at all. Plus, it will guarantee that the icons will allow get arranged correctly. Just makes the process quick and easy.

Possible issues with this feature?

Don't see any issues, it doesn't overwrite any existing code. It simply adds a tool that allows you to manage your icons, and then you'd just export the resulting IconSet, and paste it into your project.
Please elaborate before I vote. When you say "Iconset" are you talking about the icon on the desktop or are you talking about something in the editor? I'm having a hard time following what needs to be changed.
@BubbleMatrix82
"Iconset" is the name of a picture in the resources that determines the available icons to be choosen for database objects. So it's neither of your ideas.

As for the original suggestion:
I can see it as an external tool connected to the editor (perhaps similiar to the SAKAN tool for tilesets), but integrating it into the editor itself would be a lot of work for limited effect. As one of the extra tools it would be perfect however, especially since then the users could decide wether they want it or not (similiar to the SAKAN-addon)
I still don't get it but I voted yes for support of someone's dream.
@wariolandgoldpiramid So just so I'm clear, are you looking for an editor to the iconset file to add/remove/edit/move icons around? Or are you suggesting that MV should be able to reference multiple files (one file for state icons, one file for item icons, etc)? Cuz I'm totally on board for the second option.
Agreeing with @ashikai . The ability to reference multiple Iconset images would be a dream. Currently if I want to add in new icons (which I feel like I always am bc I think they liven up everything) I have to either delete some in the middle to re-group things together or suck it up and have a new, for example, state icon at the very end with all my other miscellany.

But I would also support a Iconset Tool because I adore icons and I understand that not everyone wants to fight with photoshop / GIMP.
I would also prefer the option of being able to select any icon from any iconset imported into the game. It's way faster and easier than having a tool that basically does what you can already do via other external programs (namely image editing programs). This way we just import every iconset that we need/want. They do it with character sheets already anyway.

On the coding side on the runtime engine, since they will now add a new "key" when showing icons (namely the filename of the iconset selected) then it would cause incompatibilities with any plugin calling the show icon function. But if JS also accepts optional parameters like RGSSx, then the devs could just add the filename as an optional parameter with a default value of "IconSet" so that any old plugins will still work.

Now if JS doesn't allow optional parameters, then this change would be destructive.
A tool for combining iconsets is one thing - allowing multiple iconsets unfortunately is another.
The problem is that all icons are referenced by their index on one sheet and nothing in the engine is prepared to get that data from different sheets, so it would require several changes in the engine (and not harmless changes) to support multiple iconsheets.
That makes sense, Andar. Sorry to have rambled off topic! I'm still in support of a SAKAN-like tool for Iconset manipulation.
If JS allows optional parameters, it will be easy to implement the multiple sheets on the engine level without causing harm. If JS doesn't, then it will most probably render any plugin that shows icons using the default functions as useless, in which case it will most probably not be implemented.

Or wait, they could make the Any-sheet show icon as a different method altogether, that way it will be harmless to any other plugins that use the old show icon functions. But ideally after sometime (or a long time) anyone who has plugins that uses the old show icon function should change to the new any-sheet function.

The editor coding is also another thing though, but they will be doing coding stuff for the external editor too anyway.

Anyway, if it really cant be done in a non-destructive way, having a tool that allows us to mix icons into a new set that has auto align is cool.
A tool for combining iconsets is one thing - allowing multiple iconsets unfortunately is another.
The problem is that all icons are referenced by their index on one sheet and nothing in the engine is prepared to get that data from different sheets, so it would require several changes in the engine (and not harmless changes) to support multiple iconsheets.
Not trying to argue here, but I'm curious about why this is the case. It seems to me that the editor already explicitly targets an iconset file in a specific location and that could easily be turned into a conditional that can call a different sheet per icon type. Then again, most of my dev experience is in PHP where this would be exceptionally easy and I'm not too familiar with the inner workings of MV so I could be way off base. I'd like to understand this a little better, so if you can clarify that would be awesome.
@ashikai

actually, the draw icon function goes like this (this isn't the exact code)

Window_Base.prototype.drawIcon = function(iconIndex,x,y) {
image = Images("Iconset")
blah blah blah
}

To change that, you will need to make the function take the filename as a parameter. So now if JS doesn't allow setting of optional parameter the way RGSSx does, then every plugin/functions that calls the drawIcon function needs to be updated to supply that new parameter, else they would result to an error
Example:
The first icon of the iconsheet has to be fully transparent because in the battlescreen, at the place where the icons of states are displayed, there will always be an icon and if there is no state set, the icon with the index zero will be used.
If the first icon is not transparent, you get the black or white box on the battlescreen (that error pops up in support once every several months).

That is because it is easier and faster to just always display and have the icon for the default value (all variables default to zero) an invisible one.

Adding the option to have multiple tilesheets will require the engine to check which sheet an icon is on instead of simply always displaying the icon on the number.
It can be handled that way, but it would require more processing power on the displays to handle those conditional checks. And while MV has improved a lot, the reserves for handling lag are still low (especially on mobiles), so it's better (in my opinion) not to add that coding.
If that were a critical function it would be something different, but just to spare people the work of combining iconsheets?
If someone really has problems with that he can ask here for someone to do it for him (and several people have done that in the past).
It's been years since I touched the world of performance so I'm quite curious right now XD

Would this

Window_Base.prototype.drawIcon = function(iconIndex, x, y,filename) {
filename = filename || 'Iconset';
var bitmap = ImageManager.loadSystem(filename);
var pw = Window_Base._iconWidth;
var ph = Window_Base._iconHeight;
var sx = iconIndex % 16 * pw;
var sy = Math.floor(iconIndex / 16) * ph;
this.contents.blt(bitmap, sx, sy, pw, ph, x, y);
};
really cause that much difference in performance versus the default?

Window_Base.prototype.drawIcon = function(iconIndex, x, y) {
var bitmap = ImageManager.loadSystem('IconSet');
var pw = Window_Base._iconWidth;
var ph = Window_Base._iconHeight;
var sx = iconIndex % 16 * pw;
var sy = Math.floor(iconIndex / 16) * ph;
this.contents.blt(bitmap, sx, sy, pw, ph, x, y);
};
I do understand about the reservations about some of the auto-icons (though there are simple ways to handle that, like having a default IconSet filename which should always have the blank tile).

and yeah I do agree it's not that critical really. Especially if we can do the original suggestion of having the external tool.
Gotcha. Thanks @Andar and @Engr. Adiktuzmiko for clarifying. I think I understand the fundamental problem with that a better now.
Would this
really cause that much difference in performance versus the default?
That line alone probably not - but it can't work alone.
Where does the engine decide if an icon is loaded from the default or an added spritesheet?
Where does it store the name for the added spritesheet?
and so on

At the moment, every database entry needs one number for the icon. Allowing several iconsheets will require you to store that information ("which tilesheet") somewhere and check if it is used or not, And that will add up more than a single line for loading
As i like the idea its kinda impossible for mv to have multiples iconset due how the nature of the library is. Contrary tp rgssx where it was easy to load picture, in js its a another story where they have limits of how many file you can load per call.
Not that mv cant load picture its pretty fast...the problem is more when you enter with complex drawing such sibdivide the iconset into a grid and the size of the iconset loaded each time...so imagine if you load 10 large iconset? Its would begin to get heavy on the rendering lol
Yeah, I kind of have both ideas. Being able to use multiple icon sets would be nice, but the whole engine, with items, states, etc. is already built around one icon set, so I think it would be way to hard.

But an external editor for icon sets, similar to the tileset tool, is something that would be really useful for those who have a hard time combining icon sets via art programs.

Original thread: https://forums.rpgmakerweb.com/threads/additional-feature-iconset-editor-exporter-importer.77466/