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

Issue with Scriptcards, Text fields, and Paragraphs

Hi all,  I'm having an issue with Scriptcards, where I'll enter multiple paragraphs into a text field (some of those spell descriptions are so long), but when I send it to the chat, it all comes out as one solid lump of text without line breaks. I'm saving the description in a value : @{description} And when I send to sheet, it gives me this description in the output card  --+| @{description} Now, the workaround I'm using is to ask the players to add  --+|[f10] [/f] --+| where there should be a line break for a paragraph, but we all know players are lazy, so this is a temporary solution at best. Does anyone have any advice on what I'm doing wrong/How to fix this? Thank you H
Just so I'm clear about your setup, are you copying a text block into a new Attribute on the Attributes & Abilities tab of the character? Does @{selected|description} show the line breaks properly? Does &{template:default} {{Test=@{selected|description}}} show the line breaks properly? If you can give an example of what your setup, it may be helpful.
HickintheUK got a good idea it share to me, that is to not nest description into Scriptcards, cause Scriptcards automatically format what he found on the targeted input.  Actually displaying look like that :  --&Description|@{action_effects} --+|[&Description] So I try to merge both systems by adding a roll button with that value "&{template:default} {{name=@{action_name}}} {{Description=@{action_effects}}}" Last thing I miss, is : "Can I call for a roll to happen ?" --+|%{action_description} %{action_description} @{action_description} Nothing seem to happen, I certainly miss the synthax.
Any assistance on this? Still no idea how to fix the issue.
I posted previously asking for questions about your setup and what you are doing in order to try and test. 
Cool, sorry for the confusion. So, I'm not the sheet author, Shey up there is. Their english ain't so good, so I started the post, but they've got all the actual technical knowhow. To paraphrase: It looks like we're trying to not nest description into Scriptcards. Scriptcards automatically formats what it finds on the targeted input.  Actually displaying look like that:  --&Description|@{action_effects} --+|[&Description] So I try to merge both systems by adding a roll button with that value "&{template:default} {{name=@{action_name}}} {{Description=@{action_effects}}}" Last thing I miss, is : "Can I call for a roll to happen ?" --+|%{action_description} %{action_description} @{action_description} Again, sorry for the confusion, I'm just a lay person acting as a go between.
Oh I didn't realize both posts were related. Sorry. So in Roll20 all @{} references, all roll queries ?{}, and ability calls %{} are processed by Roll20 chat first before they are handed off to ScriptCards. So any reference to them is processed not by ScriptCards but by Roll20 first. So if you have a line like: --&Description|@{action_effects} Roll20 processes @{action_effects} first and then ScriptCards would see --&Description. ScriptCards can process attributes in a different way however, the easiest ways are with --#sourceToken and --#targetToken attributes and using [*S: or [*T: respectively to get attributes. Attributes can also be gathered with a token or character id. assuming you have a token id in a String variable named &TID you could use [*[&TID]:attributeName] to retrieve the value of the attribute. So if you want to execute abilities in a ScriptCard, assuming that %{} is what you want to do, the most straightforward way is to use a button . So ScriptCards would display a button that would run your macro. !scriptcard {{ --+|[button]Show Description::~@{selected|character_id}|action_description[/button] }} That would present a button in chat that when pressed would run an ability on the selected character's sheet similar to the way %{action_description} would run. If you want ScriptCards to run the macro itself, that's doable but more tricky since I think you'd need to use  ScriptCards echo to chat option  --e. !scriptcard {{ --&CharName|@{selected|character_name} --&AbilityToRun|action_description --&percCode|%25 --&lcurlyCode|%7B --&rcurlyCode|%7D --&pipeCode|%7C --&abilityCall|[&percCode][&lcurlyCode][&CharName][&pipeCode][&AbilityToRun][&rcurlyCode] --~abilityCall|string;replaceencoding;[&abilityCall] --e[$SendingPlayerName]|[&abilityCall] }} That ScriptCard would run an ability named action_description for the selected character by echoing to chat. This isn't part of the ScriptCards run however, ScriptCards hands that off to Roll20 chat so they aren't really related and you can't modify things in ScriptCards there. I would say that if you can make it work, have your ScriptCard include a button for showing the description if you want to run another macro for its display.
Thanks for answer ! I'll try that ! And yes, we were working together on that sheet :)