Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

[need help] Multiline text in character sheet with /w gm

1518069530

Edited 1518076033
Sad
Sheet Author
API Scripter
I have a problem. In below code, @{roll_display}  will show /w gm if player want it. so the template will be whisper. <td><button class='old-roll' type='roll' value='@{roll_display}&{template:coc} {{ima_coc=@{ima_coc}}} {{name=母語Roll}} {{success=[[@{language_own}]]}} {{hard=[[floor(@{language_own}/2)]]}} {{extreme=[[floor(@{language_own}/5)]]}} {{roll1=[[1d100]]}} {{roll2=[[1d100]]}} {{roll3=[[1d100]]}}' name='roll_language_own_check' /></td> If i want add  a line    /me i am whisper to kp     before  whisper template, how can i do it?
1518075442

Edited 1518075545
vÍnce
Pro
Sheet Author
AFAIK, you can only have a single "/<foo>" command per line. ie /w, /em, /me, /r, etc. It would either need to be "/w gm" or "/me", but not both.  You could edit @{roll_display} to allow players to choose either "/w gm" or "/me" using a select input with options. example <select name="attr_roll_display"> <option value="/me" selected>Public roll</option> <option value="/w gm">Whisper roll</option> </select>
1518077143

Edited 1518077405
Jakob
Sheet Author
API Scripter
I'm not 100% sure if I understand what you want to do nor if this works, but have you tried setting the roll_display variable to this? <select name="attr_roll_display"> <option value="" selected>Public roll</option> <option value="/me I am whisper to kp
/w gm ">Whisper roll</option> </select> 
 is the HTML code for a new line, \n, which should trigger a new command when sent to chat. I'm just not entirely sure how that works within Roll20 and if those characters are going to be replaced internally by the sheet editor — I imagine it's going to be a pain in the neck to deal with. It would be less stressful to set roll_display via sheet workers, in which case you can just do setAttrs({ roll_display: "/me I am whisper to kp\n/w gm " }); without any weird encoding issues. EDIT: Screw the forum text editor, I hope it's not messed up now.
1518080494
Sad
Sheet Author
API Scripter
Jakob said: I'm not 100% sure if I understand what you want to do nor if this works, but have you tried setting the roll_display variable to this? <select name="attr_roll_display"> <option value="" selected>Public roll</option> <option value="/me I am whisper to kp
/w gm ">Whisper roll</option> </select> 
 is the HTML code for a new line, \n, which should trigger a new command when sent to chat. I'm just not entirely sure how that works within Roll20 and if those characters are going to be replaced internally by the sheet editor — I imagine it's going to be a pain in the neck to deal with. It would be less stressful to set roll_display via sheet workers, in which case you can just do setAttrs({ roll_display: "/me I am whisper to kp\n/w gm " }); without any weird encoding issues. EDIT: Screw the forum text editor, I hope it's not messed up now. It is work,  thank you very much.
1518080547
Sad
Sheet Author
API Scripter
Vince said: AFAIK, you can only have a single "/<foo>" command per line. ie /w, /em, /me, /r, etc. It would either need to be "/w gm" or "/me", but not both.  You could edit @{roll_display} to allow players to choose either "/w gm" or "/me" using a select input with options. example <select name="attr_roll_display"> <option value="/me" selected>Public roll</option> <option value="/w gm">Whisper roll</option> </select> thank you