So, I don't see anyone asking for this.
I don't remember who did this in VX Ace, I think it was Victor and someone else had it too, a script that allowed to use the escape codes used in messages (specifically looking for Color and Icons) in the rest of the scenes, like the menu.
So if I wanted to show, in the menu status, the character class with the class "Icon" 65 before the name of the class, I would write something like:
/i[65]NameOfTheClass. Instead of going to the base code and modify lines that can break the whole game if used wrong.
Is anyone doing this? Or is it already done and I couldn't find it?
The problem is this: escape codes are processed when you use the drawTextEx command, most of the game uses drawText except for a few certain things.
You just have to sift through and make those changes.
I could be wrong though.
If it's only a replace, like \v[...], it's easy.
For more complex things (changing color, drawing icons), you would need to:
- Draw all text up to this point.
- Get the length of the text printed so far.
- Change color / draw icon
- Draw text from the offset, until the next match happens.
Yep, that's why I was looking for something like this.
Rearranging things in the Scenes is really easy but when you want to draw icons or, more specifically, change color of some texts, I just can't understand how it works. Guess I'll have to become really good at that.
I wanted the actor class in the menu and status to have a specific color and icon depending on the class, maybe I can manage to draw an icon, but colors seem to be a bit harder. Tho, probably nothing a few hours of work can't solve ;D
It's just a matter of making the drawText function call the drawTextEx function rather than writing to the bitmap itself. The difficult comes in the fact that drawTextEx requires more parameters (I think) so you have to work out where it's going to start and end, and allow for the possibility that it will be centered or right justified.
If you can link to an Ace script that does it, that'll make it easier for someone to do it in MV.
@Shaz: This won't really work, since drawTextEx can't deal with the "align" parameter.
I managed to show actor class with icon and colors using this:
this.drawIcon(ICON, 500, y);this.changeTextColor(this.textColor(COLOR));this.drawText(actor.currentClass().name, 540, y, width);this.resetTextColor();Just saying.
Escape codes in scenes would still be awesome.
The problem is that methods like "changeTextColor" aren't available in all the windows right? Because if it is, maybe something like this would work: <e_code> The Text </e_code>
Whether my plugin is faster than your way or not would depend on which function you changed. Neither is likely to generate any lag though.