Where it says "$Wm" that determines what portrait should be used. "$t1" doesn't really matter, but if you want a portrait to show up you need to write the line like this: "$Wm(Japanese character name goes here for the portrait)|3$w0(left side for the portrait) or 7$w0(right side for the portrait)|$Ws(Japanese character name goes here for the displayed name)|$Wa$E(Japanese text for emotion then sweat and/or blush goes here)|Dialogue goes here".
"\n" goes before text to send text to the bottom of the dialogue bar, and "$k$p" goes before anything else to make it show up in the next dialogue bar. It also lets you switch from one character to the next. I know that there's a tutorial that explains it better, but I'll upload it for anyone still confused.
https://drive.google.com/file/d/0Bzy2XphR3qf9MFJxRXlrZ3J2M1k/view?usp=sharing
Sorry about that. It's a force of habit.
Elaborate.