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

How to print 'success' or 'fail' in a macro

January 10 (4 years ago)
Robin
Plus

Hello there,

First of all i'm all new in this 'macro' thing, and i have already read a lot of wikis, so i know there is no way to do things like "if/else"statement, even if there are some protips to act as it. But, i'm kinda sure my problem will be a formality for most of you : 

I'm using a simple Macro : &{template:default} {{name=Magic}} {{attack=[[2d6+@{selected|magic}+?{Modifier|0}]]}} 

As using pbta mechanics with 2d6, i want the macro to print Fail if it's under 7 and, at least, success if it's above. I know i must use ">7" somewhere, and probably /em to print the text, but i don't know how to extract the results, and how to use them to show the 'fail/success' message.

Sorry for my english by the way, hope i'm going to be understandable :) 

Have a nice day

January 10 (4 years ago)
Ziechael
Forum Champion
Sheet Author
API Scripter

You should be able to use this 'trick' to get the output you want, hopefully enough details are in the linked post, if not, just let us know :)

January 11 (4 years ago)
GiGs
Pro
Sheet Author
API Scripter

As an alternative, you could show the results of the different ranges, something like this:

 &{template:default} {{name=Magic}} {{attack=[[2d6+@{selected|magic}+?{Modifier|0}]]}} {[roll 10+=describe what happens on 10+}} {{7-9=some text to describe what happens on 7+}} {{miss=GM makes a move}} 

You'd need a different macro for each different Move, but as GM you can make them available for any player to roll.

January 11 (4 years ago)
Robin
Plus

First of all, thanks to you for taking your time for these answers !

GiGs : i really like the alternative, because it's essentially based on narrative gameplay, so roll don't have to be as precise as more complex game and yeah, just a reminder for what happens with the results is a good one, i think it will be a good start. And by needing a macro for each move, it's what i already have, but you think there might be another way to do it ?

Ziechael : here is probably my biggest lack of english understanding, i don't get the 'table' thing, thus, i do get due to your 'trick' that will print on the screen a text according to the number of success. But the thing i need is more 'according to the results' in spite of success (am i clear on the request ?)

Anyway, for a first time on this forum, thanks for the help ! 

January 11 (4 years ago)
GiGs
Pro
Sheet Author
API Scripter


Robin said:

And by needing a macro for each move, it's what i already have, but you think there might be another way to do it ?

I think its the best way using standard macros. Most AW games dont have a huge list of moves, so it can be practical to have a different macro for each move.

January 11 (4 years ago)
Robin
Plus

Yes and at my level of competence i think it will be the best way at the moment ! :)

Last question if it doesn't bother you : how games like Monster of the week - as an example on roll20 - can show different picture depending of the results ? (I know it's part of the 'custom sheet' and all the template for MotW, and it's a thing doable with a "Pro" account, but about the part that sorts the dice rolls, is it something i missed in macro or is it due to the API ? Once again if i'm not clear let me know :) ) 

January 11 (4 years ago)
GiGs
Pro
Sheet Author
API Scripter

I'm not familiar with that sheet, what do you mean about sorting the rolls?

With a custom rolltemplate, which you can build into  a sheet if you have a Pro subscription, you can do a lot of things you cant do with normal macros. The Rolltemplate system is different from standard macros, and also different from the API. It's a feature of a sheet and once built into a publicly available sheet it can be used by anyone, even free users. But you need a Pro subscription to set up a sheet this way.

January 11 (4 years ago)
Robin
Plus

According to the results, it says if it's success, mixed or failure, and show the image associated with it. I'm not into the "let's display fancy pictures" thing, plus i know it comes with the MotW template i guess, but that was the beginning of this post, to know how to, according to the result, print it is a success and so on :) 

For the second part of your message, do you think it's possible to be pro for a month, create the thing we need, and become a free one again, or do the creator of the sheets have to be a pro to run it ? (I'm not a freeloader and i owe so much to roll20 for 2020, but due to the same reason i owe so much to this website, i'm low on budget so ... :/ ) Because if it's the case, i'll probably read much more to exploit that month to create all i need so far, but i won't be able to keep it all time 

January 11 (4 years ago)
GiGs
Pro
Sheet Author
API Scripter

The ability to show the mixed success, etc., there is definitely due to the sheet having a built-in rolltemplate.

You can be Pro for a month, make a custom sheet, creeat a campaign using that sheet, and you will be able to keepusing that campaign with your custom sheet once you drop back to free.

I always recommend that people who do this make several copies of the campaign before dropping back to Free, so they have the option of starting up new games using the sheet. 

January 11 (4 years ago)
Robin
Plus

I thought so due to the font essentially, something that cant be done with macros :') 

Ok i take notes, thanks you a lot for taking your time answering me all this time ! A lot of infos :)