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

doubt for template construction

1575660946
Pktome
Pro
Sheet Author
Ei galera, não consegui encontrar algo parecido, então criei este post. Como eu consigo fazer um template (no chat) chamar outro template ou macro? Igual acontece no 5E onde você pode apertar no nome da Arma para lançar o Dano quantas vezes achar necessário. Na imagem eu circulei em vermelho onde gostaria que ao clicar, chamasse outra macro. Já tinha tentando antes fazer algo como "botão", mas não deu certo... precisa fazer algo específico para funcionar no Template? == GOOGLE TRANSLATE Hey guys, I couldn't find anything like that, so I created this post. How can I make a template (in chat) call another template or macro? Same as in 5E where you can press on the name of the weapon to cast damage as many times as necessary. In the image I circled in red where I would like to click to call another macro. I had tried to do something like "button" before, but it didn't work ... do you need to do something specific to work in the Template?
1575662791
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
That functionality is not actually because of the 5e template. The sheet just constructs its macros so that there is a call to another sheet roll button enacapsulated in an ability command button  that is output to the sheet. The macro construction would look something like this: &{template:template_name} {{header=Halkey Grungar [DANO](~@{character_id}|dano)}} Note that constructing these for use with repeating sections requires a sheetworker as the ability command button must point to the specific repeating section row: &{template:template_name} {{header=Halkey Grungar [DANO](~@{character_id}|repeating_dano_-ljksad8-89_roll)}} Hope that helps. ==Google Translate== Essa funcionalidade não é realmente por causa do modelo 5e. A planilha apenas constrói suas macros para que haja uma chamada para outro botão de rolagem de folha encapsulado em um botão de comando de habilidade que é enviado para a planilha. A construção da macro ficaria assim: & {template: template_name} {{header = Halkey Grungar [DANO] (~ @ {character_id} | dano)}} Observe que construí-los para uso com seções repetidas requer um sheetworker, pois o botão de comando de capacidade deve apontar para a linha de seção repetida específica: & {template: template_name} {{header = Halkey Grungar [DANO] (~ @ {character_id} | repeating_dano_-ljksad8-89_roll)}} Espero que ajude.
1575664037
Pktome
Pro
Sheet Author
Scott C. said: That functionality is not actually because of the 5e template. The sheet just constructs its macros so that there is a call to another sheet roll button enacapsulated in an ability command button  that is output to the sheet. The macro construction would look something like this: &{template:template_name} {{header=Halkey Grungar [DANO](~@{character_id}|dano)}} Note that constructing these for use with repeating sections requires a sheetworker as the ability command button must point to the specific repeating section row: &{template:template_name} {{header=Halkey Grungar [DANO](~@{character_id}|repeating_dano_-ljksad8-89_roll)}} Hope that helps. ==Google Translate== Essa funcionalidade não é realmente por causa do modelo 5e. A planilha apenas constrói suas macros para que haja uma chamada para outro botão de rolagem de folha encapsulado em um botão de comando de habilidade que é enviado para a planilha. A construção da macro ficaria assim: & {template: template_name} {{header = Halkey Grungar [DANO] (~ @ {character_id} | dano)}} Observe que construí-los para uso com seções repetidas requer um sheetworker, pois o botão de comando de capacidade deve apontar para a linha de seção repetida específica: & {template: template_name} {{header = Halkey Grungar [DANO] (~ @ {character_id} | repeating_dano_-ljksad8-89_roll)}} Espero que ajude. Neste caso, na linha abaixo: eu substituo "dano" pelo atributo que estaria outro Templete? (~@{character_id}|dano) Ex: [DANO] (~@{character_id}|teste_here) <input type="text" name="attr_teste_here" value="&{other-template} {{ abc = 123 }} {{ 1bd = 234 }} {{ ... }}" Nunca precisei usar '~@'. Então uma dúvida se puder me responder, Qual a diferença de '~@' para '@' e porque é necessário "character_id" e não simplesmente '@{teste_here}'. ==Google Translate== In this case, in the line below: do I replace "damage" with the attribute that would be another Templete? (~@{character_id}|dano) Ex: [DANO] (~@{character_id}|teste_here) <input type="text" name="attr_teste_here" value="&{other-template} {{ abc = 123 }} {{ 1bd = 234 }} {{ ... }}" I never had to use '~ @'. So a question if you can answer me, What is the difference from '~ @' to '@' and why 'character_id' is needed and not simply '@ {teste_here}'. Assim que terminar de montar o layout, vou testar As soon as I finish the layout, I will test.
1575664394
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Yes, the code: (~@{character_id}|dano) should be changed to refer to the appropriate ability (where you would change dano). As for the ~@, it's not actually a unique command, it just looks that way because we're combining two different syntaxes. The ~ is from the ability command button syntax: [Label]( ~ keyword|ability_name) In the code that I posted, we're using the character's id as the keyword to specify that the system should pull the ability from that character instead of another character. And, we're referencing the character's id dynamically so that it always refers to the character to whom the ability belongs. ==Google Translate== Sim, o código: (~ @ {character_id} | dano) deve ser alterado para se referir à habilidade apropriada (onde você alteraria o dano). Quanto ao ~ @, na verdade não é um comando único, apenas parece assim porque estamos combinando duas sintaxes diferentes. O ~ é da sintaxe do botão de comando da capacidade: [Label] (~ palavra-chave | nome_da_qualidade) No código que publiquei, estamos usando o ID do personagem como palavra-chave para especificar que o sistema deve extrair a capacidade desse personagem em vez de outro caractere. E, estamos referenciando o ID do personagem dinamicamente, para que ele sempre se refira ao personagem a quem a habilidade pertence.
1575665554
Pktome
Pro
Sheet Author
thanks for your time, now it's with me
1575665745
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Good luck! and post back if you have any other questions.