Help to show a bit complex variable in the right way

Martin

Veteran
Veteran
Joined
Apr 8, 2015
Messages
191
Reaction score
46
First Language
swe
Primarily Uses
RMMV
Trying to use some variables stitched together to form a sentence here and I cant find a way for the variable to display correctly when displayed in a text message.

Here is the code
Code:
$gameVariables.setValue(81, "" + $gameVariables.value(93) + ": \\c[3]+\\c[0] " + $gameVariables.value(61) + " \\c[10]Ruby");
So it displays as I want when showing this variable via for example OrangeHUDvariablelines as A HUD item.
So it comes out like this, with color codes and looking great:
8161613.png


But when displaying this in a text dialogue using \v[81] it ignores the color codes like this
5161561.png

Any suggestions?
sum:How can I display this variable in a text box without it ignoring the color codes?
 

Kuro DCupu

Trust me, I'm a veteran RMer
Veteran
Joined
Jul 6, 2014
Messages
461
Reaction score
1,438
First Language
Indonesia
Primarily Uses
RMMV
IIRC the message dialog only convert code once. in this case, the color code is inside the variable code. And the message dialog just convert the \V[n].

Mmm, I kind of remember doing experiment about it and found method of directly writing code but forgot...

EDIT : Ah, yeah! I did experiment about it! For the message dialog, put this code \x1b before calling any other message code to make it re-convert those code. (actually I don't know what \x1b does, but it works tho)
In your case :

$gameVariables.setValue(81, "" + $gameVariables.value(93) + ": \x1b\c[3]+\x1b\c[0] " + $gameVariables.value(61) + " \x1b\c[10]Ruby")

Tested, and it works~
1588608529490.png
 
Last edited:

Martin

Veteran
Veteran
Joined
Apr 8, 2015
Messages
191
Reaction score
46
First Language
swe
Primarily Uses
RMMV
Hmm so maybe I can display the variable using another code?
 

Kuro DCupu

Trust me, I'm a veteran RMer
Veteran
Joined
Jul 6, 2014
Messages
461
Reaction score
1,438
First Language
Indonesia
Primarily Uses
RMMV
I edited my last post.
Apparantly you can use \x1b to make it directly convert the code next to it.
 

Martin

Veteran
Veteran
Joined
Apr 8, 2015
Messages
191
Reaction score
46
First Language
swe
Primarily Uses
RMMV
Thank you Kuro! That helped me out allot!! thx!
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

I am having a great day today humans! May your day be great too! Praise the altar.
Recently discovered that an old member called "Kaus" stole some tilesets and claim as yours, and some people associate his nick with mine.
Besides having the same name, he was publishing tilesets too. Bad luck? Guess maybe I'll need to change my nickname... :(

My best practices for a new amazing plugin by this author https://kagedesuworkshop.blogspot.com
Hark, I like trains.

Forum statistics

Threads
104,187
Messages
1,004,523
Members
135,709
Latest member
AquarianMC4450
Top