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

Repeat Dice Results when using Drop Down Menu with Power Cards.

1613076241

Edited 1613076313
Hello, guys! I'm facing a problem when I try to repeat dice results. I need to roll 3d6 individually and repeat their results on 2 other macro lines. But when I do it, they won't repeat their values, it rolls again, so I have differrent results on those lines. This is my whole macro for an example: !power {{ --corners|10 ?{Power| Alabarda, --name|@{selected|character_name} --leftsub|Alabarda --rightsub|Armas de Haste --Focos:|@{selected|focos_de_força} --Rolagem de Ataque:|[[ @{selected|ataque_da_arma_display} + [[1d6]] + [[1d6]] + [[1d6]] + @{selected|força}+@{selected|força_foco}]] --2D6:|$[[0]] + $[[1]] --Dado do Dragão|$[[2]] --Defesa de @{target|character_name}:|[[@{target|defesa} + @{target|escudo}]] --?? [[$[[0]]+$[[1]]+$[[2]]+@{selected|força}+@{selected|força_foco}]] > [[@{target|defesa}+@{target|escudo}]] ?? Danos:|[[2d6+3+@{selected|força}+@{selected|força_foco}-@{target|armadura}]] --?? [[$[[0]]+$[[1]]+$[[2]]+@{selected|força}+@{selected|força_foco}]] <= [[@{target|defesa}+@{target|escudo}]] ?? Errou:|Não causa danos | Adaga, --name|@{selected|character_name} --leftsub|Adaga --rightsub|Lâminas Leves --Focos:|@{selected|focos_de_destreza} --Rolagem de Ataque:|[[ @{selected|ataque_da_arma_display} + [[1d6]] + [[1d6]] + [[1d6]] + @{selected|destreza}+@{selected|destreza_foco}]] --2D6:|$[[0]] + $[[1]] --Dado do Dragão|$[[2]] --Defesa de @{target|character_name}:|[[@{target|defesa} + @{target|escudo}]] --?? [[$[[0]]+$[[1]]+$[[2]]+@{selected|força}+@{selected|destreza_foco}]] > [[@{target|defesa}+@{target|escudo}]] ?? Danos:|[[2d6+3+@{selected|destreza}+@{selected|destreza_foco}-@{target|armadura}]] --?? [[$[[0]]+$[[1]]+$[[2]]+@{selected|força}+@{selected|destreza_foco}]] <= [[@{target|defesa}+@{target|escudo}]] ?? Errou:|Não causa danos | } }}
1613077826

Edited 1613080131
timmaugh
Forum Champion
API Scripter
I think part of your problem is that you can't, by default, use roll markers ($[[0]]) inside other inline rolls... so something like this won't parse: [[$[[0]]+$[[1]]+$[[2]]]] You can do this with APILogic , however (it will even work with your existing PowerCards macro). Just use a definition block to initialize the rolls, then use them elsewhere in the macro. Anywhere APILogic detects them being nested in another inline roll declaration, it will expand them to their value. The define block would be something like: {& define ([roll1] [[1d6]]) ([roll2] [[1d6]]) ([roll3] [[1d6]])} (possibly with more unique names if there might be the chance of collision in your macro.) Put that in your macro, and then defer the housing inline roll brackets with slashes: \[\[roll1+roll2+roll3+....\]\] and APILogic will do the rest. Not sure if you wanted the single set of 3 rolls to be available to both parts of your macro, so I will just include the top portion as an example... you should see how it works from here: !power {& define ([roll1] [[1d6]]) ([roll2] [[1d6]]) ([roll3] [[1d6]])} {{ --corners|10 ?{Power| Alabarda, --name|@{selected|character_name} --leftsub|Alabarda --rightsub|Armas de Haste --Focos:|@{selected|focos_de_força} --Rolagem de Ataque:|[[ @{selected|ataque_da_arma_display} + roll1 + roll2 + roll3 + @{selected|força}+@{selected|força_foco}]] --2D6:| roll1 + roll2 --Dado do Dragão| roll3 --Defesa de @{target|character_name}:|[[@{target|defesa} + @{target|escudo}]] --?? \[\[roll1+roll2+roll3 +@{selected|força}+@{selected|força_foco} \]\] > [[@{target|defesa}+@{target|escudo}]] ?? Danos:|[[2d6+3+@{selected|força}+@{selected|força_foco}-@{target|armadura}]] --?? \[\[roll1+roll2+roll3 +@{selected|força}+@{selected|força_foco} \]\] <= [[@{target|defesa}+@{target|escudo}]] ?? Errou:|Não causa danos
1613235178

Edited 1613235217
Hey, thank you for helping! I'm really sorry for delaying my answer. I got what you meant and it's awesome to know more about Roll20 usage. Unfortunately it doesn't work. I installed APILogics and LibInline (as a requirement for API Logics). This is what I got in return (Image): timmaugh said: I think part of your problem is that you can't, by default, use roll markers ($[[0]]) inside other inline rolls... so something like this won't parse: [[$[[0]]+$[[1]]+$[[2]]]] You can do this with APILogic , however (it will even work with your existing PowerCards macro). Just use a definition block to initialize the rolls, then use them elsewhere in the macro. Anywhere APILogic detects them being nested in another inline roll declaration, it will expand them to their value. The define block would be something like: {& define ([roll1] [[1d6]]) ([roll2] [[1d6]]) ([roll3] [[1d6]])} (possibly with more unique names if there might be the chance of collision in your macro.) Put that in your macro, and then defer the housing inline roll brackets with slashes: \[\[roll1+roll2+roll3+....\]\] and APILogic will do the rest. Not sure if you wanted the single set of 3 rolls to be available to both parts of your macro, so I will just include the top portion as an example... you should see how it works from here: !power {& define ([roll1] [[1d6]]) ([roll2] [[1d6]]) ([roll3] [[1d6]])} {{ --corners|10 ?{Power| Alabarda, --name|@{selected|character_name} --leftsub|Alabarda --rightsub|Armas de Haste --Focos:|@{selected|focos_de_força} --Rolagem de Ataque:|[[ @{selected|ataque_da_arma_display} + roll1 + roll2 + roll3 + @{selected|força}+@{selected|força_foco}]] --2D6:| roll1 + roll2 --Dado do Dragão| roll3 --Defesa de @{target|character_name}:|[[@{target|defesa} + @{target|escudo}]] --?? \[\[roll1+roll2+roll3 +@{selected|força}+@{selected|força_foco} \]\] > [[@{target|defesa}+@{target|escudo}]] ?? Danos:|[[2d6+3+@{selected|força}+@{selected|força_foco}-@{target|armadura}]] --?? \[\[roll1+roll2+roll3 +@{selected|força}+@{selected|força_foco} \]\] <= [[@{target|defesa}+@{target|escudo}]] ?? Errou:|Não causa danos
1613258951

Edited 1613259507
I see my problem and it is here on this line: "--Rolagem de Ataque:|[[ @{selected|ataque_da_arma_display} + [[1d6]] + [[1d6]] + [[1d6]] + @{selected|força}+@{selected|força_foco}]]" I need to show the results of those 3d6 one by one, but when I ask for the results on those two lines, they are rolled again: "--2D6:|$[[0]] + $[[1]] --Dado do Dragão|$[[2]]" So, I think the Defense check it's working along that first line I've mention above and giving my Damage or Miss calls correctly. I just need to show the results individually, I don't know what's going on. This is what I get when I use my macro as I shown at my first post, I can get A hit and a Miss, like I said:              Thanks in advance.
1613316212
timmaugh
Forum Champion
API Scripter
OK, we might be talking about different issues, so let's work through so I understand the problem you're having and we can get to the solution. First, roll markers don't re-roll the die. If you enter the following into chat: [[1d6]] [[1d6]] [[1d6]] $[[0]] $[[1]] $[[2]] You will get the same set of three numbers, repeated. Every time you put that in, you'll get three numbers and then the same three numbers... As long as these are within the same command line (as it reaches the chat), the roll markers will represent the same rolls. What is making you think that these are getting re-rolled when you use the roll marker? Separately, on the topic of the problem I was suggesting a solution for... At one point, you have one of these rollmarkers in another inline roll... [[$[[0]]+$[[1]]+$[[2]]+@{selected|força}+@{selected|destreza_foco}]] That will not work (unless powercards is looking for the remnants of an unparsed inline roll and handling the parsing -- which it might be). When you enter a similar construction straight into chat, you can see the remnants of the unparsed inline roll makes it into the command line that reaches the output: [[1d6]] [[$[[0]]]] Like I said, PowerCards might be catching that (if the above were actually part of an API command, it would actually see  [[$[[0]]]]   still in the command line, not the extracted number value of the roll). But that, specifically, is the problem that I was suggesting APILogic could help with. And if you wanted to pursue that, post back your macro syntax that you used. When you posted the image that had the text "roll1" still in the card, it looked like you hadn't formed the definition properly. Here is a similar line using the same definitions, showing that they work: !{& define ([roll1] [[1d6]]) ([roll2] [[1d6]]) ([roll3] [[1d6]]) }roll1 roll2 roll3{&simple}
1613406984

Edited 1613407076
Hello again! Thanks for your help. Ok, I'm gonna start with this one: What is making you think that these are getting re-rolled when you use the roll marker? For this we must look at this part of my macro: --Rolagem de Ataque:|[[ @{selected|ataque_da_arma_display} + [[1d6]] + [[1d6]] + [[1d6]] + @{selected|força}+@{selected|força_foco}]] We can see the roll order that we will get: (Weapon Attack) + (1d6) + (1d6) + (1d6) + (Strenght) + (Strenght Focus). So when I ask for the results on this part: --2D6:|$[[0]] + $[[1]] --Dado do Dragão|$[[2]] They don't come as they rolled above, they come as a different roll and we can see on this image: The result of "Rolagem de Ataque" was 21. (Weapon: 1) + (1d6: 2) + (1d6: 6) + (1d6: 6) + (Strength: 4) + (Focus: 2) = (21) It matches as a Hit bacause it's higher than enemy's defense (Defesa de Anydae Nivile: 12), so I got that last line about damage dealt (Danos: 18). But if we look at the individual results of that 3d6 on those lines "2d6" and "Dado do Dragão", it doesn't match. I got 2 + 5 +3 instead 2 +6 +6. I'm quite confused now, because I can't be sure if the defense check is working or if it's broke too and just seems to be ok. About this question: But that, specifically, is the problem that I was suggesting APILogic could help with. And if you wanted to pursue that, post back your macro syntax that you used. When you posted the image that had the text "roll1" still in the card, it looked like you hadn't formed the definition properly. !power {& define ([roll1] [[1d6]]) ([roll2] [[1d6]]) ([roll3] [[1d6]])} {{ --corners|10 ?{Power| Alabarda, --name|@{selected|character_name} --leftsub|Alabarda --rightsub|Armas de Haste --Focos:|@{selected|focos_de_força} --Rolagem de Ataque:|[[ @{selected|ataque_da_arma_display} + roll1 + roll2 + roll3 + @{selected|força}+@{selected|força_foco}]] --2D6:|roll1 + roll2 --Dado do Dragão|roll3 --Defesa de @{target|character_name}:|[[@{target|defesa} + @{target|escudo}]] --?? \[\[roll1+roll2+roll3+@{selected|força}+@{selected|força_foco}\]\] > [[@{target|defesa}+@{target|escudo}]] ?? Danos:|[[2d6+3+@{selected|força}+@{selected|força_foco}-@{target|armadura}]] --?? \[\[roll1+roll2+roll3+@{selected|força}+@{selected|força_foco}\]\] <= [[@{target|defesa}+@{target|escudo}]] ?? Errou:|Não causa danos. | Marreta, --name|@{selected|character_name} --leftsub|Marreta --rightsub|Armas de Contusão --Focos:|@{selected|focos_de_força} --Rolagem de Ataque:|[[ @{selected|ataque_da_arma_display} + roll1 + roll2 + roll3 + @{selected|força}+@{selected|força_foco}]] --2D6:|roll1 + roll2 --Dado do Dragão|roll3 --Defesa de @{target|character_name}:|[[@{target|defesa} + @{target|escudo}]] --?? \[\[roll1+roll2+roll3+@{selected|força}+@{selected|força_foco}\]\] > [[@{target|defesa}+@{target|escudo}]] ?? Danos:|[[2d6+3+@{selected|força}+@{selected|força_foco}-@{target|armadura}]] --?? \[\[roll1+roll2+roll3+@{selected|força}+@{selected|força_foco}\]\] <= [[@{target|defesa}+@{target|escudo}]] ?? Errou:|Não causa danos. } }} I used as above to get this result: I don't know how to do further because I'm not too good at this. I love Tabletop RPG and I'm trying my best to learn what I need to make my campaing better. This power card macro we're trying to solve it's an update for my current macro. It works ok with roll markers on different lines. But I want this update because of that Power card template and because I want to get my hit or miss (then damage) on an single click and on future I want to modify it to get SFX and SOUND too. Currently I have an Attack Macro and a Damage Macro. This is my current code for an Attack Roll: &{template:default}{{name=?{Qual arma vai usar? |Alabarda,Rolagem de Ataque: Alabarda}&#125 {{Rolagem Total: [[@{ataque_da_arma_display}+@{força}+@{força_foco}+[[1d6]]+[[1d6]]+[[1d6]]]] Alabarda: [[@{ataque_da_arma_display}]] Força: [[@{força}]] + Foco:[[@{força_foco}]] 2D6: $[[0]] + $[[1]] Dado do Dragão: $[[2]] Defesa de @{target|character_name}:[[@{target|defesa}+@{target|escudo}]] |Marreta,Rolagem de Ataque: Marreta}} {{Rolagem Total: [[0+@{força}+@{força_foco}+[[1d6]]+[[1d6]]+[[1d6]]]] Marreta: [[0]] Força: [[@{força}]] + Foco:[[@{força_foco}]] 2D6: $[[0]] + $[[1]] Dado do Dragão: $[[2]] Defesa de @{target|character_name}:[[@{target|defesa}+@{target|escudo}]] } }} With it I get this: I'm confused and not sure about what is my mistake. Thanks for your patience.
1613417361
David M.
Pro
API Scripter
I honestly haven't done much with Powercards, but there is a new version called Scriptcards that I have been using a lot lately. It's not in the one-click yet, so you'd have to manually install it from the link I gave. I think the following will do what you are asking if you decide to try out that script. !scriptcard {{ --:FORMATTING| --#titleCardBackground|#ffff2f --#evenRowBackground|#b6ab91 --#oddRowBackground|#cec7b6 --#subtitleFontColor|#000000 --#title|@{selected|character_name} --:USER INPUT| --&Arma|?{Power|Alabarda,Alabarda|Adaga,Adaga} --#leftsub|[&Arma] --:ASSIGN VARIABLES (ROLLS AND TEXT)| --=Roll1|1d6 --=Roll2|1d6 --=Dado do Dragão|1d6 --=Defesa|@{target|defesa} + @{target|escudo} --&Texto de falha|[#990000]Não causa danos[/#] --:CHECK ATTACK TYPE|Calls the relevant functions with output handled in the function --?[&Arma] -inc Alabarda|>AtaqueDeAlabarda --?[&Arma] -inc Adaga|>AtaqueDeAdaga --:CONDITIONAL OUTPUT|Calls functions that display damage if success or gives message on a miss --+[c]~~~~~Resultado~~~~~|[/c] --?[$Rolagem de Ataque] -ge [$Defesa]|>Sucesso|>Fracasso --X| End Macro --:FUNCTIONS| --:AtaqueDeAlabarda| --#rightsub|Armas de Haste --+Focos|@{selected|focos_de_força} --=Rolagem de Ataque|@{selected|ataque_da_arma_display} + [$Roll1] + [$Roll2] + [$Dado do Dragão] + @{selected|força} + @{selected|força_foco} --+Rolagem de Ataque|[$Rolagem de Ataque] --+2D6|[$Roll1] + [$Roll2] --+Dado do Dragão|[$Dado do Dragão] --+Defesa de @{target|character_name}|[$Defesa] --=Danos|2d6 + 3 + @{selected|força} + @{selected|força_foco} - @{target|armadura} --<| --:AtaqueDeAdaga| --#rightsub|Lâminas Leves --+Focos|@{selected|focos_de_destreza} --=Rolagem de Ataque|@{selected|ataque_da_arma_display} + [$Roll1] + [$Roll2] + [$Dado do Dragão] + @{selected|destreza} + @{selected|destreza_foco} --+Rolagem de Ataque|[$Rolagem de Ataque] --+2D6|[$Roll1] + [$Roll2] --+Dado do Dragão|[$Dado do Dragão] --+Defesa de @{target|character_name}|[$Defesa] --=Danos|2d6 + 3 + @{selected|destreza} + @{selected|destreza_foco} - @{target|armadura} --<| --:Sucesso| --+[#007700]Danos|[$Danos][/#] --<| --:Fracasso| --+Errou|[b][&Texto de falha][/b] --<| }} For testing, I gave values of 4 & 2 to the strength-based attributes, 3 & 1 for the dexterity attributes, and 1 for the  ataque_da_arma_display  attribute. Target defense base was 10 with a shield value of 2. Some sample output:
Thanks David and Timmaugh for your patience. I finally got it! I used ScriptCards as David suggested, and it worked perfectly. So I did some modifications on it and made 2 other versions, 1 for ability tests and 1 for Spells. These are my results: (Attack MACRO) !scriptcard {{ --:FORMATTING| --#titleCardBackground|#f10003 --#evenRowBackground|#b6ab91 --#oddRowBackground|#cec7b6 --#subtitleFontColor|#000000 --#title|@{selected|character_name} --:USER INPUT| --&Arma|?{Power|Alabarda de Chifre de Bronto,Alabarda_do_Bronto|Marreta,Marreta} --#leftsub|[&Arma] --:ASSIGN VARIABLES (ROLLS AND TEXT)| --=Roll1|1d6 --=Roll2|1d6 --=Dado do Dragão|1d6 --=Defesa|@{target|defesa} + @{target|escudo} --&Texto de falha|[#990000]Não causa danos[/#] --:CHECK ATTACK TYPE|Calls the relevant functions with output handled in the function --?[&Arma] -inc Alabarda_do_Bronto|>AtaqueDeAlabarda --?[&Arma] -inc Marreta|>AtaqueDeMarreta --:CONDITIONAL OUTPUT|Calls functions that display damage if success or gives message on a miss --+[c]Resultado|[/c] --?[$Rolagem de Ataque] -ge [$Defesa]|>Sucesso|>Fracasso --X| End Macro --:FUNCTIONS| --:AtaqueDeAlabarda| --#rightsub|Haste --+Focos|@{selected|focos_de_força} --=Rolagem de Ataque|@{selected|ataque_da_arma_display} + [$Roll1] + [$Roll2] + [$Dado do Dragão] + @{selected|força} + @{selected|força_foco} --+Rolagem de Ataque|[$Rolagem de Ataque] --+2D6|[$Roll1] + [$Roll2] --+Dado do Dragão|[$Dado do Dragão] --+Alvo do ataque|@{target|character_name} --=Danos|2d6 + 3 + @{selected|força} + @{selected|força_foco} - @{target|armadura} --<| --:AtaqueDeMarreta| --#rightsub|Contusão --+Focos|@{selected|focos_de_força} --=Rolagem de Ataque|0 + [$Roll1] + [$Roll2] + [$Dado do Dragão] + @{selected|força} + @{selected|força_foco} --+Rolagem de Ataque|[$Rolagem de Ataque] --+2D6|[$Roll1] + [$Roll2] --+Dado do Dragão|[$Dado do Dragão] --+Defesa de @{target|character_name}|[$Defesa] --=Danos|2d6 + 3 + @{selected|força} + @{selected|força_foco} - @{target|armadura} --<| --:Sucesso| --+[#007700]Acertou e causou|[$Danos] de dano.[/#] --<| --:Fracasso| --+Errou|[b][&Texto de falha][/b] --<| }} And it returns me this: ------------------------------------- This is my Ability Check MACRO: !scriptcard {{ --:FORMATTING| --#titleCardBackground|#0cb10a --#evenRowBackground|#b6ab91 --#oddRowBackground|#cec7b6 --#subtitleFontColor|#000000 --#title|@{selected|character_name} --:USER INPUT| --&Teste|?{Power|Astúcia,Astúcia|Comunicação,Comunicação|Constituição,Constituição|Destreza,Destreza|Força,Força|Magia,Magia|Percepeção,Percepção|Vontade,Vontade} --#leftsub|[&Teste] --:ASSIGN VARIABLES (ROLLS AND TEXT)| --=Roll1|1d6 --=Roll2|1d6 --=Dado do Dragão|1d6 --:CHECK ATTACK TYPE|Calls the relevant functions with output handled in the function --?[&Teste] -inc Astúcia|>TesteDeAstúcia --?[&Teste] -inc Comunicação|>TesteDeComunicação --?[&Teste] -inc Constituição|>TesteDeConstituição --?[&Teste] -inc Destreza|>TesteDeDestreza --?[&Teste] -inc Força|>TesteDeForça --?[&Teste] -inc Magia|>TesteDeMagia --?[&Teste] -inc Percepção|>TesteDePercepção --?[&Teste] -inc Vontade|>TesteDeVontade --:CONDITIONAL OUTPUT|Calls functions that display damage if success or gives message on a miss --X| End Macro --:FUNCTIONS| --:TesteDeAstúcia| --#rightsub|Teste de Habilidade --+Focos|@{selected|focos_de_astúcia} --=Rolagem do Teste|[$Roll1] + [$Roll2] + [$Dado do Dragão] + @{selected|astúcia} + @{selected|astúcia_foco} --+Rolagem do Teste|[$Rolagem do Teste] --+2D6|[$Roll1] + [$Roll2] --+Dado do Dragão|[$Dado do Dragão] --=Foco|@{selected|astúcia_foco} --+Foco|[$Foco] --<| --:TesteDeComunicação| --#rightsub|Teste de Habilidade --+Focos|@{selected|focos_de_comunicação} --=Rolagem do Teste|[$Roll1] + [$Roll2] + [$Dado do Dragão] + @{selected|comunicação} + @{selected|comunicação_foco} --+Rolagem do Teste|[$Rolagem do Teste] --+2D6|[$Roll1] + [$Roll2] --+Dado do Dragão|[$Dado do Dragão] --=Foco|@{selected|comunicação_foco} --+Foco|[$Foco] --<| --:TesteDeConstituição| --#rightsub|Teste de Habilidade --+Focos|@{selected|focos_de_constituição} --=Rolagem do Teste|[$Roll1] + [$Roll2] + [$Dado do Dragão] + @{selected|constituição} + @{selected|constituição_foco} --+Rolagem do Teste|[$Rolagem do Teste] --+2D6|[$Roll1] + [$Roll2] --+Dado do Dragão|[$Dado do Dragão] --=Foco|@{selected|constituição_foco} --+Foco|[$Foco] --<| --:TesteDeDestreza| --#rightsub|Teste de Habilidade --+Focos|@{selected|focos_de_destreza} --=Rolagem do Teste|[$Roll1] + [$Roll2] + [$Dado do Dragão] + @{selected|destreza} + @{selected|destreza_foco} --+Rolagem do Teste|[$Rolagem do Teste] --+2D6|[$Roll1] + [$Roll2] --+Dado do Dragão|[$Dado do Dragão] --=Foco|@{selected|destreza_foco} --+Foco|[$Foco] --<| --:TesteDeForça| --#rightsub|Teste de Habilidade --+Focos|@{selected|focos_de_força} --=Rolagem do Teste|[$Roll1] + [$Roll2] + [$Dado do Dragão] + @{selected|força} + @{selected|força_foco} --+Rolagem do Teste|[$Rolagem do Teste] --+2D6|[$Roll1] + [$Roll2] --+Dado do Dragão|[$Dado do Dragão] --=Foco|@{selected|força_foco} --+Foco|[$Foco] --<| --:TesteDeMagia| --#rightsub|Teste de Habilidade --+Focos|@{selected|focos_de_magia} --=Rolagem do Teste|[$Roll1] + [$Roll2] + [$Dado do Dragão] + @{selected|magia} + @{selected|magia_foco} --+Rolagem do Teste|[$Rolagem do Teste] --+2D6|[$Roll1] + [$Roll2] --+Dado do Dragão|[$Dado do Dragão] --=Foco|@{selected|magia_foco} --+Foco|[$Foco] --<| --:TesteDePercepção| --#rightsub|Teste de Habilidade --+Focos|@{selected|focos_de_percepção} --=Rolagem do Teste|[$Roll1] + [$Roll2] + [$Dado do Dragão] + @{selected|percepção} + @{selected|percepção_foco} --+Rolagem do Teste|[$Rolagem do Teste] --+2D6|[$Roll1] + [$Roll2] --+Dado do Dragão|[$Dado do Dragão] --=Foco|@{selected|percepção_foco} --+Foco|[$Foco] --<| --:TesteDeVontade| --#rightsub|Teste de Habilidade --+Focos|@{selected|focos_de_vontade} --=Rolagem do Teste|[$Roll1] + [$Roll2] + [$Dado do Dragão] + @{selected|vontade} + @{selected|vontade_foco} --+Rolagem do Teste|[$Rolagem do Teste] --+2D6|[$Roll1] + [$Roll2] --+Dado do Dragão|[$Dado do Dragão] --=Foco|@{selected|vontade_foco} --+Foco|[$Foco] --<| }} ----------------------------------------------------------------- And this one is for Spells: !scriptcard {{ --:FORMATTING| --#titleCardBackground|#0e4bef --#evenRowBackground|#b6ab91 --#oddRowBackground|#cec7b6 --#subtitleFontColor|#000000 --#title|@{selected|character_name} --:USER INPUT| --&Feitiço|?{Power|0 - Lança Arcana,Lança_Arcana|3 a 8 - Armadura de Pedra,Armadura_de_Pedra|2 - Atordoar,Atordoar|4 - Bomba Ambulante,Bomba_Ambulante|4 - Drenar Vidar,Drenar_Vida|3 - Garra do Inverno,Garra_do_Inverno|22 - Convocar Criatura,Convocar_Criatura} --#leftsub|[&Feitiço] --:ASSIGN VARIABLES (ROLLS AND TEXT)| --=Roll1|1d6 --=Roll2|1d6 --=Dado do Dragão|1d6 --&Texto de falha|[#990000]Feitiço não lançado! Verificar possibilidades de acidente mágico.[/#] --:CHECK ATTACK TYPE|Calls the relevant functions with output handled in the function --?[&Feitiço] -inc Lança_Arcana|>FeitiçoLançaArcana --?[&Feitiço] -inc Armadura_de_Pedra|>FeitiçoArmaduraDePedra --?[&Feitiço] -inc Atordoar|>FeitiçoAtordoar --?[&Feitiço] -inc Bomba_Ambulante|>FeitiçoBombaAmbulante --?[&Feitiço] -inc Drenar_Vida|>FeitiçoDrenarVida --?[&Feitiço] -inc Garra_do_Inverno|>FeitiçoGarraDoInverno --?[&Feitiço] -inc Convocar_Criatura|>FeitiçoConvocarCriatura --:CONDITIONAL OUTPUT|Calls functions that display damage if success or gives message on a miss --+[c]Resultado|[/c] --?[$Poder de Feitiço] -ge [$NA]|>Sucesso|>Fracasso --X| End Macro --:FUNCTIONS| --:FeitiçoLançaArcana| --#rightsub|Feitiço Básico --+Focos|@{selected|focos_de_magia} --=NA|1 --+NA|[$NA] --=Mana|0 --+Mana|[$Mana] --+Requisito|Não --=Poder de Feitiço|0 + [$Roll1] + [$Roll2] + [$Dado do Dragão] + @{selected|magia} + @{selected|lança_arcana} --+Poder de Feitiço|[$Poder de Feitiço] --+2D6|[$Roll1] + [$Roll2] --+Dado do Dragão|[$Dado do Dragão] --+Alvo do feitiço|@{target|character_name} --+[c]Descrição|[/c] --+|Se você estiver segurando um cajado pode fazer um ataque à distância especial. Isto é resolvido como um ataque à distância normal (assim façanhas são possíveis) mas a rolagem de ataque é um teste de MAGIA (LANÇA ARCANA). Uma lança arcana tem alcance de 16 metros e causa 1d6 + Magia pontos de dano. Este ataque não exige pontos de mana. --=Efeito|1d6 + @{selected|magia} + @{selected|lança_arcana} --<| --:FeitiçoAtordoar| --#rightsub|ENTROPIA (Ataque) --+Focos|@{selected|focos_de_magia} --=NA|11 --+NA|[$NA] --=Mana|2 --+Mana|[$Mana] --+Requisito|Não --=Poder de Feitiço|3 + [$Roll1] + [$Roll2] + [$Dado do Dragão] + @{selected|magia} + @{selected|entropia} --+Poder de Feitiço|[$Poder de Feitiço] --+2D6|[$Roll1] + [$Roll2] --+Dado do Dragão|[$Dado do Dragão] --+Alvo do feitiço|@{target|character_name} --+[c]Descrição|[/c] --+|Você enfeitiça um alvo visível a até 10 metros. Se ele for bem-sucedido em um teste de VONTADE (DISCIPLINA) contra o seu poder de feitiço fica um pouco confuso e sofre uma penalidade de –1 em todos os testes de habilidades até o começo do seu próximo turno. Se falhar sofre a mesma penalidade e não pode realizar nenhuma ação no próximo turno dele. --=Efeito|atordoa --<| --:FeitiçoArmaduraDePedra| --#rightsub|PRIMAL (Defesa) --+Focos|@{selected|focos_de_magia} --=NA|10 --+NA|[$NA] --=Mana|?{Mana} --+Mana|[$Mana] --+Requisito|Não --=Poder de Feitiço|0 + [$Roll1] + [$Roll2] + [$Dado do Dragão] + @{selected|magia} + @{selected|primal} --+Poder de Feitiço|[$Poder de Feitiço] --+2D6|[$Roll1] + [$Roll2] --+Dado do Dragão|[$Dado do Dragão] --+Alvo do feitiço|@{target|character_name} --+[c]Descrição|[/c] --+|Sua pele torna-se dura como pedra. A armadura de pedra tem um valor de armadura igual à sua Magia. O feitiço dura por 1 hora mas sua duração pode ser estendida — para cada PM adicional que seja gasto além dos 3 primeiros a armadura de pedra permanece ativa por mais uma hora até um máximo de 6 horas no total. Um mago que esteja vestindo armadura não recebe qualquer benefício por este feitiço. --=Efeito|[$Mana] + 1 - 3 --<| --:FeitiçoBombaAmbulante| --#rightsub|ESPÍRITO (Ataque) --+Focos|@{selected|focos_de_magia} --=NA|13 --+NA|[$NA] --=Mana|4 --+Mana|[$Mana] --+Requisito|Não --=Poder de Feitiço|0 + [$Roll1] + [$Roll2] + [$Dado do Dragão] + @{selected|magia} + @{selected|espírito} --+Poder de Feitiço|[$Poder de Feitiço] --+2D6|[$Roll1] + [$Roll2] --+Dado do Dragão|[$Dado do Dragão] --+Alvo do feitiço|@{target|character_name} --+[c]Descrição|[/c] --+|Você satura o sangue de um oponente a até 10 metros com um veneno corrosivo. Quando você lança este feitiço ele causa 1d6+1 pontos de dano penetrante. No início de cada um de seus turnos a vítima deve fazer um teste de CONSTITUIÇÃO (VIGOR) contra o seu poder de feitiço. Se for bem-sucedido o feitiço termina. Se falhar sofre mais 1d6+1 pontos de dano penetrante. Caso o dano do feitiço reduza a Saúde do alvo a 0 ele explode em uma chuva de sangue carne e ossos. Qualquer um até 4 metros da vítima sofre 2d6 pontos de dano. --=Efeito|1d6 + 1 --<| --:FeitiçoDrenarVida| --#rightsub|ENTROPIA (Utilidade) --+Focos|@{selected|focos_de_magia} --=NA|12 --+NA|[$NA] --=Mana|4 --+Mana|[$Mana] --+Requisito|Não --=Poder de Feitiço|3 + [$Roll1] + [$Roll2] + [$Dado do Dragão] + @{selected|magia} + @{selected|entropia} --+Poder de Feitiço|[$Poder de Feitiço] --+2D6|[$Roll1] + [$Roll2] --+Dado do Dragão|[$Dado do Dragão] --+Alvo do feitiço|@{target|character_name} --+[c]Descrição|[/c] --+|Você suga a energia vital de um alvo visível dentro de 10 metros. O alvo sofre 1d6 + Magia pontos de dano penetrante e você recupera a mesma quantidade de Saúde. Isto apenas cura dano que você sofreu e não aumenta a sua Saúde acima do normal. Se o alvo for bem-sucedido em um teste de CONSTITUIÇÃO (VIGOR) contra o seu poder de feitiço o dano é apenas 1d6. --=Efeito|1d6 + @{selected|magia} + @{selected|entropia} --<| --:FeitiçoGarraDoInverno| --#rightsub|PRIMAL (Ataque) --+Focos|@{selected|focos_de_magia} --=NA|12 --+NA|[$NA] --=Mana|3 --+Mana|[$Mana] --+Requisito|Não --=Poder de Feitiço|0 + [$Roll1] + [$Roll2] + [$Dado do Dragão] + @{selected|magia} + @{selected|primal} --+Poder de Feitiço|[$Poder de Feitiço] --+2D6|[$Roll1] + [$Roll2] --+Dado do Dragão|[$Dado do Dragão] --+Alvo do feitiço|@{target|character_name} --+[c]Descrição|[/c] --+|Você envolve um alvo visível e a até 20 metros em uma nuvem de frio causando 1d6 pontos de dano penetrante. No início de cada turno do alvo ele deve fazer um teste de CONSTITUIÇÃO (VIGOR) contra o seu poder de feitiço. Se falhar sofre mais 1d6 pontos de dano penetrante e uma penalidade cumulativa de –2 em Velocidade. Se for bem-sucedido o feitiço termina. O feitiço dura um número máximo de rodadas igual à sua Magia. Aqueles que morrem vítimas da garra do inverno ficam congelados. --=Efeito|1d6 --<| --:FeitiçoConvocarCriatura| --#rightsub|CRIAÇÃO (Utilidade) --+Focos|@{selected|focos_de_magia} --=NA|13 --+NA|[$NA] --=Mana|22 --+Mana|[$Mana] --+Requisito|Sim - Magia de Criação EXPERIENTE --=Poder de Feitiço|0 + [$Roll1] + [$Roll2] + [$Dado do Dragão] + @{selected|magia} + @{selected|criação} --+Poder de Feitiço|[$Poder de Feitiço] --+2D6|[$Roll1] + [$Roll2] --+Dado do Dragão|[$Dado do Dragão] --+Alvo do feitiço|@{target|character_name} --+[c]Descrição|[/c] --+|Você convoca um animal selvagem da área local que o segue até o nascer ou o pôr do sol o que vier primeiro. O animal entende suas ordens e as obedece ao máximo de sua habilidade. Embora você possa especificar um tipo de animal o mestre decide que tipos estão disponíveis para responder. Um animal convocado não luta até a morte e provavelmente fugirá se perder mais da metade de sua Saúde (de acordo com o mestre) a menos que tenha sucesso em um teste de VONTADE (MORAL) ou que você tenha sucesso em um teste de COMUNICAÇÃO (LIDERANÇA). O NA desses testes depende da situação mas raramente é menor do que NA 13. --=Efeito|Convocação --<| --:Sucesso| --+[#007700]O feitiço se concretiza com|[$Efeito] de efeito.[/#] --<| --:Fracasso| --+Errou|[b][&Texto de falha][/b] --<| }} I just don't know why that last line is out from the frame. But I'm quite satisfied with all this. Thank you guys, deeply! David M. said: I honestly haven't done much with Powercards, but there is a new version called Scriptcards that I have been using a lot lately. It's not in the one-click yet, so you'd have to manually install it from the link I gave. I think the following will do what you are asking if you decide to try out that script. !scriptcard {{ --:FORMATTING| --#titleCardBackground|#ffff2f --#evenRowBackground|#b6ab91 --#oddRowBackground|#cec7b6 --#subtitleFontColor|#000000 --#title|@{selected|character_name} --:USER INPUT| --&Arma|?{Power|Alabarda,Alabarda|Adaga,Adaga} --#leftsub|[&Arma] --:ASSIGN VARIABLES (ROLLS AND TEXT)| --=Roll1|1d6 --=Roll2|1d6 --=Dado do Dragão|1d6 --=Defesa|@{target|defesa} + @{target|escudo} --&Texto de falha|[#990000]Não causa danos[/#] --:CHECK ATTACK TYPE|Calls the relevant functions with output handled in the function --?[&Arma] -inc Alabarda|>AtaqueDeAlabarda --?[&Arma] -inc Adaga|>AtaqueDeAdaga --:CONDITIONAL OUTPUT|Calls functions that display damage if success or gives message on a miss --+[c]~~~~~Resultado~~~~~|[/c] --?[$Rolagem de Ataque] -ge [$Defesa]|>Sucesso|>Fracasso --X| End Macro --:FUNCTIONS| --:AtaqueDeAlabarda| --#rightsub|Armas de Haste --+Focos|@{selected|focos_de_força} --=Rolagem de Ataque|@{selected|ataque_da_arma_display} + [$Roll1] + [$Roll2] + [$Dado do Dragão] + @{selected|força} + @{selected|força_foco} --+Rolagem de Ataque|[$Rolagem de Ataque] --+2D6|[$Roll1] + [$Roll2] --+Dado do Dragão|[$Dado do Dragão] --+Defesa de @{target|character_name}|[$Defesa] --=Danos|2d6 + 3 + @{selected|força} + @{selected|força_foco} - @{target|armadura} --<| --:AtaqueDeAdaga| --#rightsub|Lâminas Leves --+Focos|@{selected|focos_de_destreza} --=Rolagem de Ataque|@{selected|ataque_da_arma_display} + [$Roll1] + [$Roll2] + [$Dado do Dragão] + @{selected|destreza} + @{selected|destreza_foco} --+Rolagem de Ataque|[$Rolagem de Ataque] --+2D6|[$Roll1] + [$Roll2] --+Dado do Dragão|[$Dado do Dragão] --+Defesa de @{target|character_name}|[$Defesa] --=Danos|2d6 + 3 + @{selected|destreza} + @{selected|destreza_foco} - @{target|armadura} --<| --:Sucesso| --+[#007700]Danos|[$Danos][/#] --<| --:Fracasso| --+Errou|[b][&Texto de falha][/b] --<| }} For testing, I gave values of 4 & 2 to the strength-based attributes, 3 & 1 for the dexterity attributes, and 1 for the  ataque_da_arma_display  attribute. Target defense base was 10 with a shield value of 2. Some sample output:
1613577174
David M.
Pro
API Scripter
Fantastic! Not sure why that line in your spell result is outside of the card. I've never seen that before. Unrelated, but one thing I noticed is that in your "FeitiçoConvocarCriatura" function: you have this line: --=Efeito|Convocação Looks like you are assigning a text string to a roll value. This will probably result in a "0" displayed in your output (though haven't tested). You will probably have to use a string variable using --&VariableName (and referenced with [&VariableName] )to get the output you want. Of course, this will probably require some extra conditionals in your "Successo" function to handle the potential different variable types. Just something to be aware of. Nice work!