Torqus

Veteran
Veteran
Joined
Aug 2, 2015
Messages
169
Reaction score
27
First Language
English
Primarily Uses
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?
 
Last edited by a moderator:

Jeremy Cannady

Coldfire
Veteran
Joined
Oct 25, 2015
Messages
449
Reaction score
268
First Language
English
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.
 

Iavra

Veteran
Veteran
Joined
Apr 9, 2015
Messages
1,797
Reaction score
867
First Language
German
Primarily Uses
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.
 

Torqus

Veteran
Veteran
Joined
Aug 2, 2015
Messages
169
Reaction score
27
First Language
English
Primarily Uses
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
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
42,140
Reaction score
14,647
First Language
English
Primarily Uses
RMMV
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.
 

Torqus

Veteran
Veteran
Joined
Aug 2, 2015
Messages
169
Reaction score
27
First Language
English
Primarily Uses
If you can link to an Ace script that does it, that'll make it easier for someone to do it in MV.
I only know Victor's script, I don't remember if there was another one. And the page to download the script from Victor is gone.

For me, I'll look at plugins that change colors and add icons in scenes and learn from that.

I guess I'll leave this thread here so maybe someone takes the request.
 
Last edited by a moderator:

Iavra

Veteran
Veteran
Joined
Apr 9, 2015
Messages
1,797
Reaction score
867
First Language
German
Primarily Uses
@Shaz: This won't really work, since drawTextEx can't deal with the "align" parameter.
 

Torqus

Veteran
Veteran
Joined
Aug 2, 2015
Messages
169
Reaction score
27
First Language
English
Primarily Uses
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>
 
Last edited by a moderator:

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
42,140
Reaction score
14,647
First Language
English
Primarily Uses
RMMV
@Shaz: This won't really work, since drawTextEx can't deal with the "align" parameter.
 
Yes, I know, which is why I said this:

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
 

Torqus

Veteran
Veteran
Joined
Aug 2, 2015
Messages
169
Reaction score
27
First Language
English
Primarily Uses
I wrote a version of that for MV too, though it is pretty clumsy since I am still learning javascript. It is here: http://rmrk.net/index.php?topic=50445.0
Oh this is nice! Thanks for linking to it.

Tho, I already made what I wanted with some conditions and variables in the Window_Base to detect class name and actor level, so it colors and shows the icon I want.

You think using your plugin with escape codes will lag more than my method for now?
 

modern algebra

Veteran
Veteran
Joined
Sep 28, 2012
Messages
59
Reaction score
50
First Language
English
Primarily Uses
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.
 
Last edited by a moderator:

Latest Threads

Latest Posts

Latest Profile Posts

unknown.png
Trying to make some horror "Corpse Party" style tileset.
100 degrees here (38 degrees C) god I need ac
I wish I can work faster on my game. But I don't want to get burned out. :(
I've been working on something on and off for a few years now, and I've been reluctant to share any details on the project before I had anything playable because I did not want to generate hype only for the project to go back on hiatus. That being said I believe what I'm working on is very unique and pushes the boundaries of what RPG Maker projects can be. Bold claims, I know but just wait.
Happy Mother's Day to all the moms :)

Forum statistics

Threads
111,211
Messages
1,059,286
Members
144,464
Latest member
Shinoodle
Top