I'm attempting to create an alias to the message window that will remove \L(or R)[ (Some alphanumeric code representing a Character and facial expression) ] from the text of the message, and add/replace/remove the corresponding portrait to the message window on the corresponding side (Left or Right)
I also intend to use a similar method to display the characters' names to the message window (just below the portrait, or on one side if no portrait exists)
But first, I need to understand what I can and cannot do with text.gsub!.
(I'm using this process because I don't want to have to use a custom script call for all my message windows; so I can just add a tag like \n[1]. (Only it would be \L[1,1] for ["First Character","Angry"] or something.))
EDIT: this is what I have thusfar...
text.gsub!(/\\[Ll]\[([0-9]+)\]/) do
<insert/change picture[#] on the left side of the message window>
text.gsub!(/\\[Rr]\[([0-9]+)\]/) do
<insert/change picture[#] on the right side of the message window>
One thing that confuses me is whether or not \[([0-9]+)\] means any number from 0 to 9 or any number composed of digits 0 through 9...
Another thing I'm not sure about is whether I can even do a multi-dimensional array lookup using this... (Remember I want it to work like \L[1,12] )
Also the slashes are a bit confusing...