I want to know, what is the best way to do this? I am create a plugin that shows weaknesses via an icon from the iconset showing on an enemy. The weakness is coded-in as the elemental rate your enemy has that is over 100%. But the plugin user is supposed to set the icon's graphic/sprite to an elemental name or number. What would be the best way to do so? I have so far made 2 arrays and they must have matching indexes to each other. One array picks the icon set's "number" of the icon and the other picks the name of the elements' list at the system. This is how I have done it. I thought that it would be better to select an icon themselves from the parameters immediately. Help would be appreciated.
MV Setting an icon to a name in the plugin's parameters?
Learning JavascriptI would set this up as a struct in the plugin parameters where each element consists of a Number for the ID and a string for the element name/number. I would have the plugin check whether the latter is a Number or string to determine whether to use the ID or name for the element.
Original thread: https://forums.rpgmakerweb.com/threads/setting-an-icon-to-a-name-in-the-plugins-parameters.143487/