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
480
Reaction score
1,468
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
480
Reaction score
1,468
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 Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,051
Messages
1,018,551
Members
137,837
Latest member
Dabi
Top