Is it possible for a string variable to store an icon just like messages does? I tried writing \i[n]"string" but that just crashes the game, and "\i[n]string" but obviously that meant the game would literally just print \i[n]string. Is this possible somehow? Is there a puglin for this?
How to store an icon to a string variable?
RPG Maker MV SupportThanks a lot, mate!
@Pipilson No problem! Basically '\x1b' is a special character that will replace the '\' during the message conversion process. By the time the contents of the variable is inserted into the message, the stored tag is beyond the point where it could be prepared to be displayed as anything other than simple text. But if we do the conversion manually with '\x1b', the tag will have a chance to be displayed properly.
Note, that will only work if whatever you're doing with that variable is set up to parse escape codes. If you have a plugin for a quest journal, and it just displays text, it might not even convert variables at all, much less parse what's in them and display icons instead of text.
Basically what Shaz said. The reason why the message window displays an icon when writing what you wrote is because it's using a method to interpret the content of the string. It's not like strings automatically convert that code to an icon.
Original thread: https://forums.rpgmakerweb.com/threads/how-to-store-an-icon-to-a-string-variable.117665/