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

Ask to Input Dice Number on a Template with a Previous Prompt

Hello, there! I'm playing Dragon Age with my friends, and I want to know something specifc about Dice Number Input, I need to know if I can ask the number of dice inside a template after a prompt. I have this example: A mage character has 3 spells and one of them is a Cure spell. This Cure spell asks my player how much mana to cast it (1 to 3) and that mage rolls dices equals to that amount of mana (xd6). I don't know how to make my macro ask what spell to cast, and if "Cure" was selected, ask how much mana (how many dices). This is my macro right now: &{template:default}{{name=?{Qual Feitiço usar? |Lança Arcana, Lança Arcana}&#125 {{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. Dano: [[1d6 + @{magia}]] + Foco: [[@{magia_foco}]] |Cura,Cura}} {{CRIAÇÃO (UTILIDADE). TEMPO: ação principal. O seu toque fecha ferimentos e restaura o vigor. O alvo recupera 1d6 de Saúde por ponto de mana gasto (máximo de 3d6 por 3 PM) NA do Feitiço: 10 Custo: 1 a 3 Mana Pré-Requisito: Não Rolagem de Feitiço: Magia: [[@{magia}]] + Foco:[[@{magia_foco}]] 2D6: [[1d6]] + [[1d6]] Dado do Dragão: [[1d6]] |Explosão Mental, Explosão Mental}&#125 {{ESPÍRITO (ATAQUE). TEMPO: ação principal. Você cria uma explosão de força com 2 metros de raio centrada em qualquer lugar dentro de 50 metros que você possa enxergar. Criaturas na área são derrubadas e não podem realizar uma ação principal em seu próximo turno. Alvos bem-sucedidos em um teste de FORÇA (PODERIO MUSCULAR) contra o seu poder de feitiço são apenas  derrubados. Em qualquer caso quaisquer ações preparadas são perdidas. NA do Feitiço: 12 Custo: 3 Mana Pré-Requisito: Não Rolagem de Feitiço: Magia: [[@{magia}]] + Foco:[[@{magia_foco}]] 2D6: [[1d6]] + [[1d6]] Dado do Dragão: [[1d6]] Poder de Feitiço: [[10+@{magia}]] + Foco: [[@{espírito}]] } }} The cure spell is the second one, and I want something after "spell roll" (rolagem de feitiço): How much mana? (user inputs 1 to 3) Roll and show the results of (MANA USED x d6) I need to learn how to do this without moving the spell order on macros. This is the first prompt for the current macro: And this is the output for the current macro I have: I can use API if needed, just tell me how. Thanks in advance!!
You can nest roll queries as long as you escape certain characters (  ,|}  ) similar to how you've already done so. You can also put them inside rolls to replace the number of dice. Adding the line Recupera: [[ ?{Mana|1|2|3}d6 ]] should do what you want. Feel free to change the text to fit your needs.
1610218095

Edited 1610218137
RainbowEncoder said: You can nest roll queries as long as you escape certain characters (  ,|}  ) similar to how you've already done so. You can also put them inside rolls to replace the number of dice. Adding the line Recupera: [[ ?{Mana|1|2|3}d6 ]] should do what you want. Feel free to change the text to fit your needs. YES! It worked!! Wow, thank you!! Lemme show you the results: It shows me what I want to know, but now I need to know how much mana was used. Something like: "Mana Usada: (equal to the mana value inputed to cast)" Thank you so much, this is really great and pretty handy. And I'm sorry about this second question now.
If you repeat a query it'll ask once but use the same value in both places. As a bonus the second time you use it you only need the prompt So:- Mana Usada: [[ ?{Mana|1|2|3} ]] Recuperação: [[ ?{Mana}d6 ]] or Recuperação: [[ ?{Mana|1|2|3}d6 ]] Mana Usada: [[ ?{Mana} ]]
Once again you made my day! Look how it goes: Now it's perfect! I have some ideas to include Token-Mod commands to change values on hp bars as a spell heals or deals damage. I'm deeply grateful!