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

Help removing roll descriptions?

Hey yall! I'm pretty new to the modding and api scene and I was wondering if yall would be able to help. I'm trying to remove the roll description from rolls. I found and old post from a few years ago that had a solution to this problem, the main thing is I can't figure out how to implement this solution. I don't really know how to change css from api. I've been trying to figure it out but I've been gaining no headway. I'm new at this and I don't know where to start. If anyone can help out on this front or offer any alternative solutions I would really appreciate it. Thanks
Oh here's a link to the forum I mentioned in the post <a href="https://app.roll20.net/forum/post/9247124/how-to-avoid-the-roll-description-in-chat" rel="nofollow">https://app.roll20.net/forum/post/9247124/how-to-avoid-the-roll-description-in-chat</a>
1762799628
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Hi Jovii! I'm not sure how or where you are generating your rolls, but have you considered using the in-line syntax? Instead of typing: /r 3d6 you type: [[3d6]] This will just display the roll results, and show the breakdown only on hover. If this is not what you mean, then more information might help us give a better answer.
1762800582
timmaugh
Forum Champion
API Scripter
Just for clarification, Jovii, are you looking to write a script (ie, in JavaScript), or are you looking to *use* a script (ie, in a command line in a game)? If you are, then &nbsp;just to help you from wasting any time chasing down something you can't do: you can't access the DOM or CSS from the API. The trick of the post you link to uses Stylus, which is a browser plug-in that supersedes the CSS on *your* machine, but everyone else would still see it normally. The syntax Keith suggested will suppress the output of the information to chat (it will instead just show the result), but the information will be available if a player hovers over the roll. If that still isn't good enough, and... ...if scripts are available (the game owner must be at least a Pro subscriber), and... ...if you are willing to use scripts for a given chat message... then... ...post back and we can help point you at script options that would accomplish this.
I have a pro account and some experience with programming so I'm willing to other script options a shot! Thanks for clarifying lol. I'm planning on running a Deadlands campaign and it mainly uses explosion roll. The main appeal I want from having explosion rolls is watching them escalate. That's one of the main reasons I don't want to use inline rolls, because they don't necessarily show the dice, just the results. The main problem with using the regular roll syntax, especially with multiple explosion rolls, is that they can clutter up the text box. So my main goal is just to clean it up a bit. Also thanks for clarifying that the solution the post i reference was Using Stylus, I was banging my head against a wall trying to figure it out.
1762979123

Edited 1762979155
timmaugh
Forum Champion
API Scripter
If you want to write your own script, I would suggest looking at libInline as a helper library. It does all of the heavy lifting of parsing an inline roll (which... can be strangely constructed), and returns easily accessible data points (like value, table items, the original roll expression, the hover rolltip that inline rolls get, and -- most importantly for you -- the resulting breakout:&nbsp; Although... I already expose the .value and .items syntax as part of ZeroFrame (a metascript). I could probably add a .result syntax that would output the referenced information. Then you could do something like: !{&amp;template:default} {{name=Roll Info}} {{Base Roll=[[4d6 + 2d4]] }} {{Result=$[[0]].result}} {&amp;simple} That would produce something like... If you want that, give me a day or two to get that together. I have a new script to release tonight, then I can probably get this knocked out pretty quickly. Let me know.
Thank you for letting me know about this! A script would very much be appreciated if you have the time, if not I'll make an attempt on my own and revisit the topic when I need help. Thank You!
1763671504

Edited 1763677538
timmaugh
Forum Champion
API Scripter
OK, I'll make a post to the forum about this, but I'll share it here since you were the one who asked for it, Jovii! The Metascript Toolbox now offers an&nbsp; .expanded &nbsp;handle for inline rolls to get the formatted string of component values in that roll. The formatting is helpful, for example, when you have dropped dice. Without the formatting it would be impossible to know which of the dice had been included vs those that had been dropped. Here are some examples, using the command line: !{&amp;template:default} {{name=Roll Info}} {{Base Roll=[[4d6 + 2d4]] }} {{Result=$[[0]].expanded}} {&amp;simple} And here, using an inline roll that included dropped dice. The command is: !{&amp;template:default} {{name=Roll Info}} {{Base Roll=[[4d6 + {6d4}kl2]] }} {{Result=$[[0]].expanded}} {&amp;simple} I know the Metascript Toolbox can be a bit to wrap your head around if you're just starting to use it, so post back if you have any questions.
1763671627
timmaugh
Forum Champion
API Scripter
I should add that this is available in my repository, but to get it from the 1-click interface, you'll have to wait until next week's script mod merge.&nbsp;