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

Recursive Tables-Delimeter BR problem

February 25 (1 month ago)

Edited February 25 (1 month ago)

I've used the great work of The Aaron to create a system or rollable tables and scripts for when my rogue repeatedly wants to go pickpocketing. The only part I can't get to work is getting the multiple table rolls to display as a list rather than running text. Here is an example script and the result:

!rt[Delimiter:BR] /w gm &{template:default} {{name=[x](https://files.d20.io/images/430547392/f5o7BAQxhVayNw33HGXzdw/original.png)}} {{You scored= [[[[1d2]]t[Mid-Treasure]]] [[1t[Hi-Treasure]]]}}

It's not the end of the world, but is there something simple I'm missing to get it to list the rolls? I thought the Delimiter:BR was going to do that.

February 26 (1 month ago)
timmaugh
Pro
API Scripter

Can you post the relevant data from your tables that would have driven the screenshot you posted? That is, for the rows that were randomly selected to be a part of your final rendering, what was the source text in those entries? That will let us better troubleshoot.

If we can't get it sorted with Recursive Tables, I can show you a way to do it with the Metascript Toolbox.

February 26 (1 month ago)

Here are screenshots of the 2 tables called by my example script:

The Hi-Treasure table is too long to get in a screen cap, but the lines you can't see are all similar to what you do see. The Delimiter:BR doesn't seem to put thing ona different line no matter whether I'm rolling on one table twice or rolling on different tables.  

February 26 (1 month ago)

The first issue is that RecursiveTables will add a delimiter between rolls from the same table, but not between rolls from different tables.  You'll need to add a manual line break between these two table rolls: [[[[1d2]]t[Mid-Treasure]]] [[1t[Hi-Treasure]]. Maybe something like [[[[1d2]]t[Mid-Treasure]]]%NEWLINE%[[1t[Hi-Treasure]].

The other issue is that you're using the Default template in a game using a character sheet with the Beacon architecture.  Line breaks work differently with the default template (in both Beacon and Legacy sheets) because of the CSS that is applied by Roll20.

Honestly I've given up on trying to do anything with the default template and rolls using Beacon sheets until bugs get fixed and features get added that will make it possible to do what you're trying to do.  It might be possible to include some kind of workaround in the meantime, but that workaround will likely break as things get fixed or added.

February 26 (1 month ago)

Would a different template work for what I'm doing? I haven't experimented with the 5e templates, nor do I know if they are the same with beacon and the 2024 sheet since I don't think the wiki has been updated. 

February 26 (1 month ago)

Actually adding the suggested manual line break helps a lot. Since Recursive tables puts a common between rolls on the same table, but not 2 different table, the manual line break makes a big difference. 

I do have a follow up question. Let me know if this should be a seperate post. On the same script, I need it to whisper to the rogue character doing the pickpocketing. However, unlike a normal whisper, I (as the gm) don't see the result. I need it to whisper to me and one player. All the obvious (to me) ways to do this aren't working. 

February 26 (1 month ago)

Carnie DM said:

Would a different template work for what I'm doing? I haven't experimented with the 5e templates, nor do I know if they are the same with beacon and the 2024 sheet since I don't think the wiki has been updated. 

The D&D 5E 2024 by Roll20 character sheet does not currently have any roll templates.  Devs have said that it is one of the next features that will be added.

I don't believe you can use any 2014 roll templates if you want to pull attributes from a 2024 sheet, but if you're not pulling any attributes and you're just rolling on tables then you should be able to use a 2014 roll template such as 'npcaction' (which is my go-to option).

There may be an issue depending on which character sheet is 'primary' in your game. I haven't done enough testing to know, but I think I remember a difference with roll template usage depending on the selected primary character sheet.


Carnie DM said:

Actually adding the suggested manual line break helps a lot. Since Recursive tables puts a common between rolls on the same table, but not 2 different table, the manual line break makes a big difference. 

I do have a follow up question. Let me know if this should be a seperate post. On the same script, I need it to whisper to the rogue character doing the pickpocketing. However, unlike a normal whisper, I (as the gm) don't see the result. I need it to whisper to me and one player. All the obvious (to me) ways to do this aren't working. 

This is because normally (when not using a Mod script) a whisper to the GM comes from a player, so both the player and GM get a copy of the message.  When a Mod Script sends a message to someone, the Mod 'sandbox' is sort of a fake player that the message is coming from, so only the recipient gets a copy, unless the Mod Script is set up to send a copy to both the sender and recipient.

For this case, the easiest approach would probably be to use Metascripts to duplicate the outgoing message and send it to both the GM and player.  I haven't done that before so I'd have to dig into the Metascript documentation to see if it's possible if Timmaugh doesn't respond with an answer.  If Metascripts can't do that, then it might require creating a custom version of RecursiveTables to adjust who the message is sent to.


Actually I take that back (but I already wrote the above so I'll keep it because it's still a viable solution) - the easiest approach to whisper to yourself as GM and the player would be to create a custom character named 'Pickpocket' and give Edit and Control access of it to the player and yourself as GM, then change your macro to whisper to that character instead of 'gm':

!rt[Delimiter:BR] /w "Pickpocket" &{template:default} {{name=[x](https://files.d20.io/images/430547392/f5o7BAQxhVayNw33HGXzdw/original.png)}} {{You scored= [[[[1d2]]t[Mid-Treasure]]] [[1t[Hi-Treasure]]]}}
February 26 (1 month ago)


Jarren said:

The D&D 5E 2024 by Roll20 character sheet does not currently have any roll templates.  Devs have said that it is one of the next features that will be added.

Correction, it does feature the simple roll template, which is more or less analogous to the simple template of the 2014 sheet (accepts the same fields as the 2014 version, but those fields work and display a little different).


February 26 (1 month ago)

Tuo said:

Correction, it does feature the simple roll template, which is more or less analogous to the simple template of the 2014 sheet (accepts the same fields as the 2014 version, but those fields work and display a little different).

Ah, I missed that feature release! Thanks!

February 27 (1 month ago)

The character named Pickpocket workaround was a great easy solution. Fingers crossed I think it will all work now. 

Thanks everyone. My rogue will be very happy that she can randomly pickpocket, and I won't be bogged down trying to determine results on the fly.