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

Plain Text Dice Rolls

Is there a method, for users that don't have access to tables in a game, to force a die roll to be treated as plain text appended to the end of existing text? Example: #test[[d3]] Ultimately, the end goal is to simulate the use of a table by making multiple macros that are called by one macro/variable.
1505246362
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Not quite sure what you're asking, but have you tried doubling the double brackets: #test[[[[d3]]]]
Doubling the double brackets still seems to output the result as a roll versus text. Will try to be clearer. I want to be able to write something like "#emote[[d3]]" and, as a result of the die roll, call one of the following macros: #emote1, #emote2, #emote3. Where emote1,emote2,emote3 are hard coded into the macros menu.
1505246781
Ziechael
Forum Champion
Sheet Author
API Scripter
I think Bryan is asking if there is a way to have different macros called by using a die roll to give #test1 #test2 or #test3 etc. According to the  order of operations it isn't possible.
Buggar, thank you for advising Ziechael! Thank you for your time keith!
1505247211
Ziechael
Forum Champion
Sheet Author
API Scripter
I just tried getting around it by assigning a variable attribute as [[1d3]] to a sheet and calling that using #test@{test|variable} but still just got #test2 without the macro call :( Seems like the ability is expanded before the macro call but not factored into it...
1505247325

Edited 1505247534
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Well, as a pro user you can use Aaron's Recursive tables script to accomplish this (it'll replace any and all rolls with their plain text results). You can also use a hacky method to do it without a script for non-rollable table rolls: If you have an extra leading set of inline roll brackets, everything on the line after that point will be shown as regular text instead of with inline roll formatting. Note that this turns inline rolls of rollable tables into their number equivalent (a number if the entry starts with a number, or 0 if not). A roll using this method looks like this: [[ This roll will show as text: [[1d4]] You can hide these extra leading inline roll brackets via roll templates: &{template:default} {{This field will show inline rolls as normal:[[1d4]]}} [[ {{This field will show inline rolls as text: [[1d4]]}} {{So will the contents of this field even though they are on different lines because the whole roll template is considered one line: [[1d4]]}} Hope that helps. EDIT: And the second part of this is all pretty much useless to you, based on the responses that have come in while I was writing it. I'd look into Aaron's Recursive Tables script though, it'll do what you want (note that I'm not sure how it'll react to macro calls as neither Aaron or I have tested it with those as far as I know). EDIT2: Although you could just put the contents of those various macros in as table values and then it would definitely expand them appropriately.
Appreciate you checking Ziechael. After reading the section on hierarchy, I had given up as I had presumed it would do as you described (easily defeated at times). Looks like it ended up being a brief thought exercise more than anything. (Could you imagine having to then create a slew of macros for all the tiny variations one might want?!) Scott, thanks for chiming in. I absolutely adore Aaron's recursive table macro (spent the time building the entire 3.5 MIC magic item [recursive] tables just so they could collect dust! If it's OGC I'd share it.) Unfortunately, the difficulty is that the one game I'm in, the GM does not seem to have tables enabled for players. Not sure why or if it is even an option. That being said, is there a means for the GM to enable tables, without having to create them for each player? (Suppose that would have been the lower hanging fruit.)
1505249712
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Ah, I see what you're trying to do. Unfortunately, tables are only editable by the gm. You could look at asking your GM to install Aaron's (as usual, he has the solution ;) ) Table Export script, then you could import them via API command.
Ziechael said: I just tried getting around it by assigning a variable attribute as [[1d3]] to a sheet and calling that using #test@{test|variable} but still just got #test2 without the macro call :( Seems like the ability is expanded before the macro call but not factored into it... This might work for what you want if you HTML encode the '#' with #
1505250261
The Aaron
Pro
API Scripter
The only fly in the ointment is that TableExport can only be run by the GM by default. &nbsp; Here's a gist you can pass them that lets players run it:&nbsp; <a href="https://gist.github.com/shdwjk/257763f5f46fa8bf5cb" rel="nofollow">https://gist.github.com/shdwjk/257763f5f46fa8bf5cb</a>... I'll try to roll that into a configuration at some point.
1505251401
Ziechael
Forum Champion
Sheet Author
API Scripter
Kyle G. said: Ziechael said: I just tried getting around it by assigning a variable attribute as [[1d3]] to a sheet and calling that using #test@{test|variable} but still just got #test2 without the macro call :( Seems like the ability is expanded before the macro call but not factored into it... This might work for what you want if you HTML encode the '#' with &#35; A good shout but no dice, ironically... even tried a cheeky chat button with no luck either.
1505251628
Ziechael
Forum Champion
Sheet Author
API Scripter
Bryan P. said: Appreciate you checking Ziechael. After reading the section on hierarchy, I had given up as I had presumed it would do as you described (easily defeated at times). Looks like it ended up being a brief thought exercise more than anything. (Could you imagine having to then create a slew of macros for all the tiny variations one might want?!) Scott, thanks for chiming in. I absolutely adore Aaron's recursive table macro (spent the time building the entire 3.5 MIC magic item [recursive] tables just so they could collect dust! If it's OGC I'd share it.) Unfortunately, the difficulty is that the one game I'm in, the GM does not seem to have tables enabled for players. Not sure why or if it is even an option. That being said, is there a means for the GM to enable tables, without having to create them for each player? (Suppose that would have been the lower hanging fruit.) I run my game with ~4500 (this number changes every time I mention this lol) active powercard macros, around 1000 of them are in the game already and the rest are the entire 3.5e spell database ready to go at a moments notice so I feel your pain. Tables can be enabled for players to roll on but not access for creation etc... thats all down to the GM. What they could &nbsp;do is (assuming they have a pro subscription) create a side game that they can promote you to co-GM in and you could build your tables there. The GM/Creator could then transmogrify your tables into the main game for you to use...
The only fly in the ointment is that TableExport can only be run by the GM by default. Appreciated Aaron! Do I need to use the one you just provided if someone is promoted to GM in a game, or will the primary code recognize promoted players too? I run my game with ~4500 (this number changes every time I mention this lol) active powercard macros, around 1000 of them are in the game already and the rest are the entire 3.5e spell database ready to go at a moments notice so I feel your pain. What the-..... How long has this taken you to create?!
1505302812
Ziechael
Forum Champion
Sheet Author
API Scripter
Weeelllll... the game has been running for nearly 3 years now with the players just hitting level 15/16. In terms of the actual creation of it all, not that long in the scheme of things. Thanks to the work of others (PCGen data files etc) I was able to build a google sheet to put together the basic spell powercards. I then add some simple customisation depending on the spell when I come to add it to the game (again build into the sheet) but this includes fx, sounds, additional API calls if needed, Attack code lines if needed and summoned templates etc. It's a labour of loathe really but one that has saved me hours of macro writing every time the damned divine caster levels up! I also have a sheet that allows me to build attack powercards quickly using only a few values (weapon slot, BaB available etc). Basically I spend hours making something to save me minutes but cumulatively has probably saved me days of effort... i hope, never done the math... too scared to ;)
1505305454
The Aaron
Pro
API Scripter
Bryan P. said: The only fly in the ointment is that TableExport can only be run by the GM by default. Appreciated Aaron! Do I need to use the one you just provided if someone is promoted to GM in a game, or will the primary code recognize promoted players too? The original version works fine for promoted GMs. I was thinking you were only a player in this game though.&nbsp;
1505305505

Edited 1505305616
Hot dog Ziechael! What I wouldn't give to be a fly on the wall for one of your games! The original version works fine for promoted GMs. I was thinking you were only a player in this game though. Ah sorry for the misunderstanding on my end Aaron. I am only a player in this particular game. Unfortunately, the DM of this game does not have API functionality.
1505306362
The Aaron
Pro
API Scripter
Ah, bummer.
1505308587
Ziechael
Forum Champion
Sheet Author
API Scripter
Bryan P. said: Hot dog Ziechael! What I wouldn't give to be a fly on the wall for one of your games! I do try to make the most of the opportunities afforded me by my subscription lol... mainly though it is my OCD (and yes Aaron, I do have to fight the urge to use CDO lol) forcing me to streamline the DM prep process as much as possible to increase output!
1505310180
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Ziechael said: Basically I spend hours making something to save me minutes but cumulatively has probably saved me days of effort... i hope, never done the math... too scared to ;) Randall Munroe has done it for you.
1505311391
Ziechael
Forum Champion
Sheet Author
API Scripter
haha... Amazing, thanks... that genuinely justified the time I've spend developing these things!!