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

powercard doesn't use rolls with hroll command!

1610713574

Edited 1610713771
Hi everyone, I've written a PC that combined attack and grapple for Pathfinder 1st. It works fine as long as I'm doing the rolls public. If I hide them the PC says > ROLL ID NOT FOUND <  or just ignores the result! I've put the three lines that I'm talking about into bold font style. Is there anyone who can explain the problem to me? And probably solve it! :) The following is the working one: !power {{ --name|2 Klauen --leftsub|Nahkampfangriff --rightsub|1,5m / 5 ft --border|3px solid #000 --bodyfont|patrick hand --bgcolor|#0000ff --orowbg|#4a86e8 --erowbg|#0000ff --erowtx|#ffffff --orowtx|#ffffff --charid|@{selected|character_id} --target_list|@{target|token_id} --emote|@{selected|character_name} schlägt mit seinen Klauen auf @{target|token_name} ein. --emotefont|font-family: "patrick hand"; font-weight: bold; --KMB:|[[ [$KMB] 1d20+17 ]] --Schaden:|[[ [$Dmg] 1d6 + @{strength_mod} ]] --Krit.Schaden:|[[ [$KD] 2d6 + (2 * @{strength_mod}) ]] --$Angriffswurf:| [[ [$Atk] 1d20 + @{strength_mod} + @{bab} ]] --?? $Atk < @{target|ac} ?? !Angriff| Der Angriff schlägt fehl! --?? $Atk.base == 1 ?? skipto*1|KritFehl --?? $Atk < @{target|ac} ?? skipto*2|Ende --?? $Atk.base <> 20 ?? skipto*3|Schaden1 --$Krit. bestätigen:| [[ [$Krit] 1d20 + @{strength_mod} + @{bab} ]] --?? $Krit < @{target|ac} ?? skipto*4|Schaden1 --?? $Krit >= @{target|ac} ?? skipto*5|Kritisch1 --skipto*6|Ende --:Schaden1| --?? $KMB >= @{target|cmd_mod} ?? skipto*7|Schaden2 --!Treffer1|**@{selected|character_name}** trifft **@{target|token_name}** mit seinen Klauen und verursacht [![^Dmg]!] Schaden. --!Effekt1|~~~**@{selected|character_name}** versucht **@{target|token_name}** zu ergreifen. Dies gelingt allerdings nicht! --skipto*8|Ende --:Schaden2| --!Treffer2|**@{selected|character_name}** trifft **@{target|token_name}** mit seinen Klauen und verursacht [![^Dmg]!] Schaden. --!Effekt2|~~~**@{selected|character_name}** ergreift **@{target|token_name}** und nimmt **@{target|token_name} in einen Haltegriff. --skipto*9|Ende --:Kritisch1| --?? $KMB >= @{target|cmd_mod} ?? skipto*10|Kritisch2 --!Treffer3|**@{selected|character_name}** trifft **@{target|token_name}** kritisch mit seinen Klauen und verursacht [![^KD]!] Schaden. --!Effekt3||~~~**@{selected|character_name}** versucht **@{target|token_name}** zu ergreifen. Dies gelingt allerdings nicht! --skipto*11|Ende --:Kritisch2| --!Treffer4|**@{selected|character_name}** trifft **@{target|token_name}** kritisch mit seinen Klauen und verursacht [![^KD]!] Schaden. --!Effekt4|~~~**@{selected|character_name}** ergreift **@{target|token_name}** und nimmt **@{target|token_name} in einen Haltegriff. --skipto*12|Ende --:KritFehl| --**Kritischer Fehlschlag:**|Du kommst nach deiner Attacke aus dem Gleichgewicht! --:Ende| If I change the three lines to: --$KMB:|[[ [$KMB] 1d20+17 ]] --$Schaden:|[[ [$Dmg] 1d6 + @{strength_mod} ]] --$Krit.Schaden:|[[ [$KD] 2d6 + (2 * @{strength_mod}) ]] or --hroll|[[ [$KMB] 1d20+17 ]] --hroll|[[ [$Dmg] 1d6 + @{strength_mod} ]] --hroll|[[ [$KD] 2d6 + (2 * @{strength_mod}) ]] then the PC fails! Thanks for help and advice
1610724280
The Aaron
Roll20 Production Team
API Scripter
If I remember correctly, it rerolls any hidden rolls on the API side. This is because rolls passed to API scripts would still generate 3D dice, so the roll could be observed by players. By rolling on the API side, the roll cannot be observed. The supplied roll is used for the formula, but the result is discarded and replaced with the API generated value.  That said, Kurt can probably fix the referencing part, though I don't know for sure as I've not looked at the code in years. 
1610724875
Kurt J.
Pro
API Scripter
The Aaron said: If I remember correctly, it rerolls any hidden rolls on the API side. This is because rolls passed to API scripts would still generate 3D dice, so the roll could be observed by players. By rolling on the API side, the roll cannot be observed. The supplied roll is used for the formula, but the result is discarded and replaced with the API generated value.  That said, Kurt can probably fix the referencing part, though I don't know for sure as I've not looked at the code in years.  This issue you are running into is that you can only have one HROLL tag in a PowerCard. All tags must have unique names, and the way hroll was implemented by the original author of the script, I don't believe it supports the *1, *2, etc. syntax either. (I could be wrong, but I believe I ran into something like that originally and just never got back to modifying things to make it work with the multi-tag syntax). That said, this is still possible by just putting all of the rolls in a single tag: --hroll|[[ [$KMB] 1d20+17 ]] [[ [$Dmg] 1d6 + @{strength_mod} ]] [[ [$KD] 2d6 + (2 * @{strength_mod}) ]] should create the three different rollIDs.
Thanks for your help. That fixed my problem.