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

[Script] PowerCards 3 (Thread 6)

Kurt J. said: Are "blessure", "blessure_grave", and "inconscient" the actual names of attributes on the character sheet you are using? Even if the display of a sheet is localized into French, the internal names of the attributes might not be. If you type "@{selected|blessure}" (and the same for the other two) and don't get back an error about a missing attribute, that wouldn't seem to be the problem, but it is my initial guess. They are. Typing a @{selected|blessure} or @{selected|blessure_grave} return me a number (0 or 1).
1596827152

Edited 1596827408
Hi! can anyone help me with this macro pls. !power {{  --name|Peaje de los muertos  --tokenid|@{selected|token_id}  --target_list|@{target|token_id}  --emote|@{selected|character_name} ataca a  --leftsub|V,S - 1 Acción  --rightsub|60 ft  --Tirada de Salvación:|@{target|token_name} saca [[ [$WisST] 1d20 + @{target|wisdom_mod} ]] contra DC @{selected|spell_save_dc} de @{selected|character_name}  --?? $WisST >= @{selected|spell_save_dc} ?? Pasa la tirada de Salvación|  --?? $WisST < @{selected|spell_save_dc} ?? Falla la Tirada:|Recibe [[ [[ {floor((@{selected|level}+1)/6)+1.4}kl1 ]]d[[4*(?{Objetivo dañado?|Si,3|No,2})]] ]] Daño necrótico }} I need to add a Tag [$Dmg] for the damage and use it later  in a line with alterbars I have other macros readys with the line but i cant make it work with this  --?? $WisST < @{selected|spell_save_dc} ?? alterbar1|_target|@{target|token_id} _bar|1 _amount|-[^Dmg] _show|all
1596828773

Edited 1596828869
Kurt J.
Pro
API Scripter
Video Series Update PowerCards 101 - Part 3 - Rolls, RollIDs, and Conditionals is now available. Next up for Part 4 is "Chat Server Syntax and Roll Queries", followed by "Audio and Video Effects" in Part 5
1596828923
Kurt J.
Pro
API Scripter
Jonnattan G. said: Hi! can anyone help me with this macro pls. !power {{  --name|Peaje de los muertos  --tokenid|@{selected|token_id}  --target_list|@{target|token_id}  --emote|@{selected|character_name} ataca a  --leftsub|V,S - 1 Acción  --rightsub|60 ft  --Tirada de Salvación:|@{target|token_name} saca [[ [$WisST] 1d20 + @{target|wisdom_mod} ]] contra DC @{selected|spell_save_dc} de @{selected|character_name}  --?? $WisST >= @{selected|spell_save_dc} ?? Pasa la tirada de Salvación|  --?? $WisST < @{selected|spell_save_dc} ?? Falla la Tirada:|Recibe [[ [[ {floor((@{selected|level}+1)/6)+1.4}kl1 ]]d[[4*(?{Objetivo dañado?|Si,3|No,2})]] ]] Daño necrótico }} I need to add a Tag [$Dmg] for the damage and use it later  in a line with alterbars I have other macros readys with the line but i cant make it work with this  --?? $WisST < @{selected|spell_save_dc} ?? alterbar1|_target|@{target|token_id} _bar|1 _amount|-[^Dmg] _show|all I don't see anywhere in your card where you are setting the value of the [$Dmg] rollid... You'll need to do that before you can use it in an alterbar line.
Kurt J. said: Jonnattan G. said: Hi! can anyone help me with this macro pls. !power {{  --name|Peaje de los muertos  --tokenid|@{selected|token_id}  --target_list|@{target|token_id}  --emote|@{selected|character_name} ataca a  --leftsub|V,S - 1 Acción  --rightsub|60 ft  --Tirada de Salvación:|@{target|token_name} saca [[ [$WisST] 1d20 + @{target|wisdom_mod} ]] contra DC @{selected|spell_save_dc} de @{selected|character_name}  --?? $WisST >= @{selected|spell_save_dc} ?? Pasa la tirada de Salvación|  --?? $WisST < @{selected|spell_save_dc} ?? Falla la Tirada:|Recibe [[ [[ {floor((@{selected|level}+1)/6)+1.4}kl1 ]]d[[4*(?{Objetivo dañado?|Si,3|No,2})]] ]] Daño necrótico }} I need to add a Tag [$Dmg] for the damage and use it later  in a line with alterbars I have other macros readys with the line but i cant make it work with this  --?? $WisST < @{selected|spell_save_dc} ?? alterbar1|_target|@{target|token_id} _bar|1 _amount|-[^Dmg] _show|all I don't see anywhere in your card where you are setting the value of the [$Dmg] rollid... You'll need to do that before you can use it in an alterbar line. I already try with  --?? $WisST < @{selected|spell_save_dc} ?? Falla la Tirada:|Recibe [[ [$Dmg] [[ {floor((@{selected|level}+1)/6)+1.4}kl1 ]]d[[4*(?{Objetivo dañado?|Si,3|No,2})]] ]] Daño necrótico but the macro show nothing in the chat. Dunno if i have to put another [] or what
Another quick question. Can you use the --whisper tag to specify multiple targets? I am whispering roll results to the GM if the whisper toggle is active, but the player himself doesn't see the whisper. In fact atm he doesn't get any notification at all. I would like to send it to both the player and the gm at the same time, or at least send a short notification to the player that he made the roll. I didn't notice it before, as I was logged in as gm myself when testing...
1597505300

Edited 1597505699
Sven K. said: Another quick question. Can you use the --whisper tag to specify multiple targets? I am whispering roll results to the GM if the whisper toggle is active, but the player himself doesn't see the whisper. In fact atm he doesn't get any notification at all. I would like to send it to both the player and the gm at the same time, or at least send a short notification to the player that he made the roll. I didn't notice it before, as I was logged in as gm myself when testing... Just add the tags with a coma as different --whisper|GM, Playername you can also use the self if you are the gm another option is to make two powercards in the same macro !power {{ --whisper|GM }} !power {{ --whisper|Playername --message|You have rolled }}
Hi guys Back from hollidays but still not able to have my token bar decreasing properly by the amount stated (the cost of the power activated) I tried with alterbar & TokenMod but both get to the same result ; showing the code line instead of it's result My line to be executed : --?? $Ppr > 0 AND $Atk.ss >= 1 ??  api_token-mod|_ids @{target|token_id} _ignore-selected _set  bar1_value| -~9! The power cost being in the ~9! variable I keep getting this : Any hint ?
I spent 3 years last night figuring this out. Works for me. Note: requires Tokenmod as well as PowerCards. !power {{  --name| @{selected|token_name}'s Greataxe  --leftsub|Melee Two-handed Attack (slashing)  --rightsub|Range 5'  --Attack|[[ [$Atk] 1d20 + @{strength_mod} + @{pb}  ]] vs Target AC  --?? $Atk < @{target|AC} ?? Oh no!:|You missed  @{target|token_name}  --?? $Atk >= @{target|AC} ?? Damage: | [[ [$Dmg] 1d12 + @{strength_mod} +@{pb}  ]] to @{target|token_name}  --?? $Atk.base == 20 ?? Nat 20 Critical Hit|[[ [$CritDmg]  12 + 1d12 + @{pb} + @{strength_mod} ]]  --?? $Atk >= @{target|AC} AND $Atk <> 20 ?? api_token-mod|_ids @{target|token_id} _ignore-selected _set bar1_value|-[^Dmg]  --?? $Atk.base == 20 ?? api_token-mod|_ids @{target|token_id} _ignore-selected _set bar1_value|-[^CritDmg] }}
By the way, for my NPCs: when fights over and I want to set the NPC token to full up HP, I've an ability macro called ** Reset HP ** in order to reset bar1_value to bar1_max !token-mod {{   --set bar1_value|89 }}  Notice the hard code 89.  I fell asleep working on move bar1_max to bar1_value. I'll get to it later.
Rosco James said: I spent 3 years last night figuring this out. Works for me. Note: requires Tokenmod as well as PowerCards. !power {{  --name| @{selected|token_name}'s Greataxe  --leftsub|Melee Two-handed Attack (slashing)  --rightsub|Range 5'  --Attack|[[ [$Atk] 1d20 + @{strength_mod} + @{pb}  ]] vs Target AC  --?? $Atk < @{target|AC} ?? Oh no!:|You missed  @{target|token_name}  --?? $Atk >= @{target|AC} ?? Damage: | [[ [$Dmg] 1d12 + @{strength_mod} +@{pb}  ]] to @{target|token_name}  --?? $Atk.base == 20 ?? Nat 20 Critical Hit|[[ [$CritDmg]  12 + 1d12 + @{pb} + @{strength_mod} ]]  --?? $Atk >= @{target|AC} AND $Atk <> 20 ?? api_token-mod|_ids @{target|token_id} _ignore-selected _set bar1_value|-[^Dmg]  --?? $Atk.base == 20 ?? api_token-mod|_ids @{target|token_id} _ignore-selected _set bar1_value|-[^CritDmg] }} Glad if it works for you but even if I copy paste "api_token-mod|_ids @{target|token_id} _ignore-selected _set bar1_value|-[^CritDmg]" in my template, it still doesn't work ! By the way I had already tried that possibility.....but thanks for the try anyway !
Rosco James said: By the way, for my NPCs: when fights over and I want to set the NPC token to full up HP, I've an ability macro called ** Reset HP ** in order to reset bar1_value to bar1_max !token-mod {{   --set bar1_value|89 }}  Notice the hard code 89.  I fell asleep working on move bar1_max to bar1_value. I'll get to it later. here's mine that works fine without hard code ^^ !power {{ --tokenid|@{selected|token_id} --emote|**$$#007fff|@{selected|token_name}$$** récupère ses points PSI  --name|Récupération --leftsub|Etat --rightsub|Portée Soi  }} !token-mod --set bar1|[[@{selected|psipoints_max}]]
When I've had trouble with this kind of (proven to work before, but why not now), I've had much luck restarting the API. If the API is in trouble, one or more of your other API codes may also be on ice.
Rosco James said: When I've had trouble with this kind of (proven to work before, but why not now), I've had much luck restarting the API. If the API is in trouble, one or more of your other API codes may also be on ice. I know...SOmetimes it helps but in my case doesn't change a thing ! It seems to do the job as the bar1_value seems to get the proper value but it doesn't update the token bar itself....
Also, and parden me for bringing this up in case you already know, is your tokenmod " Players can IDs is currently"  toggled   on ? !token-mod --help brings up:  players-can-ids  -- Determines if players can use  --ids . Specifying a value which is true allows players to use --ids. Omitting a value flips the current setting. Just a thought. I've been using tokenmod for awhile with it off. Then when I started mucking around with powercards, I learned I needed to turn it on.
Rosco James said: Also, and parden me for bringing this up in case you already know, is your tokenmod " Players can IDs is currently"  toggled   on ? !token-mod --help brings up:  players-can-ids  -- Determines if players can use  --ids . Specifying a value which is true allows players to use --ids. Omitting a value flips the current setting. Just a thought. I've been using tokenmod for awhile with it off. Then when I started mucking around with powercards, I learned I needed to turn it on. Yeah unfortunately it's on ...but good go^^ ! It's really a weirdy but we'll get around it anyhow!
1597707940

Edited 1597708004
Kurt J.
Pro
API Scripter
Mangouste said: Hi guys Back from hollidays but still not able to have my token bar decreasing properly by the amount stated (the cost of the power activated) I tried with alterbar & TokenMod but both get to the same result ; showing the code line instead of it's result My line to be executed : --?? $Ppr > 0 AND $Atk.ss >= 1 ??  api_token-mod|_ids @{target|token_id} _ignore-selected _set  bar1_value| -~9! The power cost being in the ~9! variable I keep getting this : Any hint ? Chat server substitution notation isn't allowed in a template (@{target|token_id} won't work) because that substitution needs to occur on the chat server, and the chat server doesn't see templates. You would need to pass the ID in as a parameter.
1597746646

Edited 1597748293
Kurt J. said: Mangouste said: Hi guys Back from hollidays but still not able to have my token bar decreasing properly by the amount stated (the cost of the power activated) I tried with alterbar & TokenMod but both get to the same result ; showing the code line instead of it's result My line to be executed : --?? $Ppr > 0 AND $Atk.ss >= 1 ??  api_token-mod|_ids @{target|token_id} _ignore-selected _set  bar1_value| -~9! The power cost being in the ~9! variable I keep getting this : Any hint ? Chat server substitution notation isn't allowed in a template (@{target|token_id} won't work) because that substitution needs to occur on the chat server, and the chat server doesn't see templates. You would need to pass the ID in as a parameter. Tried that but it doesn't change anything ! (~15! set to @{selected|tokenid}).... my macro : !power {{ --template|NewPsi|@{selected|character_name};@{selected|psi};@{selected|mode1};@{selected|repeating_m1_$4_m1-pouvoir};@{selected|repeating_m1_$4_m1-effect};@{selected|repeating_m1_$4_m1-system};@{selected|repeating_m1_$4_m1-Duree};@{selected|repeating_m1_$4_m1-Portee};@{selected|repeating_m1_$4_m1-Rayon};@{selected|repeating_m1_$4_m1-PP};@{selected|repeating_m1_$4_m1-TAI};@{selected|repeating_m1_$4_m1-mait};@{selected|repeating_m1_$4_m1-bonus};@{selected|targetnumber};@{selected|psipoints};@selected|tokenid}}} my template : NewPsi:--name|~3! --leftsub|**Durée:** ~6! --rightsub|**Portée:** ~7! --ppsi Restant|[[ [$Ppr] {(~14! - ~9!)} ]] --jet initial|[[ [$Atk] {(~1! + ~2!)d10!}>~13! ]] --?? $Ppr < 0 ?? Impossible|**$$#fff|Pas assez de points Psi pour utiliser ce pouvoir! $$** --?? $Ppr > 0 AND $Atk.ss == 0 AND $Atk.ones == 0 ?? !echec|**$$#fff|C'est un échec! $$** --?? $Ppr > 0 AND $Atk.ss == 0 AND $Atk.ones == 1 ?? !fumble|**$$#900|C'est un Fumble! $$** --?? $Ppr > 0 AND $Atk.ss >= 1 ?? !Attack|~0! obtient {[^Atk.ss] +[[~11!]] +~12!} succès au final  --?? $Ppr > 0 AND $Atk.ss >= 1 ??  api_token-mod|_ids ~15! _ignore-selected _set bar1_value| [^Ppr]  --?? $Ppr > 0 AND $Atk.ss >= 1 ?? !Hello|[TTB 'width=100%'][TRB][TDB align=left width='100%']**$$#000|Description :$$**[TDE][TRE] [TRB][TDB align=justify width='100%']//$$#000|~4!$$//[TDE][TRE] [TRB][TDB align=left width='100%']**$$#000|Système:$$**[TDE][TRE] [TRB][TDB align=justify width='100%']$$#000|~5!$$[TDE][TRE] [TRB][TDB align=Left width='100%']**$$#000|Rayon : $$**~8![TDE][TRE] [TRB][TDB align=Left width='100%']**$$#000|Coût en P. Psi: $$**~9![TDE][TRE][TRB][TDB align=Left width='100%']**$$#000|Taille de la cible: $$**~10![TDE][TRE][TTE] 
1597755761
Kurt J.
Pro
API Scripter
Mangouste said: Kurt J. said: Mangouste said: Hi guys Back from hollidays but still not able to have my token bar decreasing properly by the amount stated (the cost of the power activated) I tried with alterbar & TokenMod but both get to the same result ; showing the code line instead of it's result My line to be executed : --?? $Ppr > 0 AND $Atk.ss >= 1 ??  api_token-mod|_ids @{target|token_id} _ignore-selected _set  bar1_value| -~9! The power cost being in the ~9! variable I keep getting this : Any hint ? Chat server substitution notation isn't allowed in a template (@{target|token_id} won't work) because that substitution needs to occur on the chat server, and the chat server doesn't see templates. You would need to pass the ID in as a parameter. Tried that but it doesn't change anything ! (~15! set to @{selected|tokenid}).... my macro : !power {{ --template|NewPsi|@{selected|character_name};@{selected|psi};@{selected|mode1};@{selected|repeating_m1_$4_m1-pouvoir};@{selected|repeating_m1_$4_m1-effect};@{selected|repeating_m1_$4_m1-system};@{selected|repeating_m1_$4_m1-Duree};@{selected|repeating_m1_$4_m1-Portee};@{selected|repeating_m1_$4_m1-Rayon};@{selected|repeating_m1_$4_m1-PP};@{selected|repeating_m1_$4_m1-TAI};@{selected|repeating_m1_$4_m1-mait};@{selected|repeating_m1_$4_m1-bonus};@{selected|targetnumber};@{selected|psipoints};@selected|tokenid}}} my template : NewPsi:--name|~3! --leftsub|**Durée:** ~6! --rightsub|**Portée:** ~7! --ppsi Restant|[[ [$Ppr] {(~14! - ~9!)} ]] --jet initial|[[ [$Atk] {(~1! + ~2!)d10!}>~13! ]] --?? $Ppr < 0 ?? Impossible|**$$#fff|Pas assez de points Psi pour utiliser ce pouvoir! $$** --?? $Ppr > 0 AND $Atk.ss == 0 AND $Atk.ones == 0 ?? !echec|**$$#fff|C'est un échec! $$** --?? $Ppr > 0 AND $Atk.ss == 0 AND $Atk.ones == 1 ?? !fumble|**$$#900|C'est un Fumble! $$** --?? $Ppr > 0 AND $Atk.ss >= 1 ?? !Attack|~0! obtient {[^Atk.ss] +[[~11!]] +~12!} succès au final  --?? $Ppr > 0 AND $Atk.ss >= 1 ??  api_token-mod|_ids ~15! _ignore-selected _set bar1_value| [^Ppr]  --?? $Ppr > 0 AND $Atk.ss >= 1 ?? !Hello|[TTB 'width=100%'][TRB][TDB align=left width='100%']**$$#000|Description :$$**[TDE][TRE] [TRB][TDB align=justify width='100%']//$$#000|~4!$$//[TDE][TRE] [TRB][TDB align=left width='100%']**$$#000|Système:$$**[TDE][TRE] [TRB][TDB align=justify width='100%']$$#000|~5!$$[TDE][TRE] [TRB][TDB align=Left width='100%']**$$#000|Rayon : $$**~8![TDE][TRE] [TRB][TDB align=Left width='100%']**$$#000|Coût en P. Psi: $$**~9![TDE][TRE][TRB][TDB align=Left width='100%']**$$#000|Taille de la cible: $$**~10![TDE][TRE][TTE]  Your macro is missing the opening { ... you have: @selected|tokenid} instead of @ { selected|tokenid}
Kurt J. said: Mangouste said: Kurt J. said: Mangouste said: Hi guys Back from hollidays but still not able to have my token bar decreasing properly by the amount stated (the cost of the power activated) I tried with alterbar & TokenMod but both get to the same result ; showing the code line instead of it's result My line to be executed : --?? $Ppr > 0 AND $Atk.ss >= 1 ??  api_token-mod|_ids @{target|token_id} _ignore-selected _set  bar1_value| -~9! The power cost being in the ~9! variable I keep getting this : Any hint ? Chat server substitution notation isn't allowed in a template (@{target|token_id} won't work) because that substitution needs to occur on the chat server, and the chat server doesn't see templates. You would need to pass the ID in as a parameter. Tried that but it doesn't change anything ! (~15! set to @{selected|tokenid}).... my macro : !power {{ --template|NewPsi|@{selected|character_name};@{selected|psi};@{selected|mode1};@{selected|repeating_m1_$4_m1-pouvoir};@{selected|repeating_m1_$4_m1-effect};@{selected|repeating_m1_$4_m1-system};@{selected|repeating_m1_$4_m1-Duree};@{selected|repeating_m1_$4_m1-Portee};@{selected|repeating_m1_$4_m1-Rayon};@{selected|repeating_m1_$4_m1-PP};@{selected|repeating_m1_$4_m1-TAI};@{selected|repeating_m1_$4_m1-mait};@{selected|repeating_m1_$4_m1-bonus};@{selected|targetnumber};@{selected|psipoints};@selected|tokenid}}} my template : NewPsi:--name|~3! --leftsub|**Durée:** ~6! --rightsub|**Portée:** ~7! --ppsi Restant|[[ [$Ppr] {(~14! - ~9!)} ]] --jet initial|[[ [$Atk] {(~1! + ~2!)d10!}>~13! ]] --?? $Ppr < 0 ?? Impossible|**$$#fff|Pas assez de points Psi pour utiliser ce pouvoir! $$** --?? $Ppr > 0 AND $Atk.ss == 0 AND $Atk.ones == 0 ?? !echec|**$$#fff|C'est un échec! $$** --?? $Ppr > 0 AND $Atk.ss == 0 AND $Atk.ones == 1 ?? !fumble|**$$#900|C'est un Fumble! $$** --?? $Ppr > 0 AND $Atk.ss >= 1 ?? !Attack|~0! obtient {[^Atk.ss] +[[~11!]] +~12!} succès au final  --?? $Ppr > 0 AND $Atk.ss >= 1 ??  api_token-mod|_ids ~15! _ignore-selected _set bar1_value| [^Ppr]  --?? $Ppr > 0 AND $Atk.ss >= 1 ?? !Hello|[TTB 'width=100%'][TRB][TDB align=left width='100%']**$$#000|Description :$$**[TDE][TRE] [TRB][TDB align=justify width='100%']//$$#000|~4!$$//[TDE][TRE] [TRB][TDB align=left width='100%']**$$#000|Système:$$**[TDE][TRE] [TRB][TDB align=justify width='100%']$$#000|~5!$$[TDE][TRE] [TRB][TDB align=Left width='100%']**$$#000|Rayon : $$**~8![TDE][TRE] [TRB][TDB align=Left width='100%']**$$#000|Coût en P. Psi: $$**~9![TDE][TRE][TRB][TDB align=Left width='100%']**$$#000|Taille de la cible: $$**~10![TDE][TRE][TTE]  Your macro is missing the opening { ... you have: @selected|tokenid} instead of @ { selected|tokenid} Nice spot but even then, doesn't change a thing !
1597761211

Edited 1597761337
cannot seem to answer anymore ....new thread !? Thread is buggy... Cannot add capture as I did previously
Hi people,  I'm having a problem with adding multiple buttons in one row. This works fine but is kinda bloated: !power {{ --tokenid|@{selected|token_id} --format|atwill --name|Light Source --!Torch|[Torch](~LightBringer|Torch) --!Lantern|[Lantern](~LightBringer|Lantern) --!LightSpell|[Spell:Light](~LightBringer|Magic-Light) --!Lamp|[Lamp](~LightBringer|Lamp) --!Candle|[Candle](~LightBringer|Candle) }} This doesn't work at all but I can't for the life of me figure out why. I know that I've used neat rows of buttons before. Any ideas? !power {{ --tokenid|@{selected|token_id} --format|atwill --name|Light Source --!Buttons|[Torch](~LightBringer|Torch) [Lantern](~LightBringer|Lantern) [Spell:Light](~LightBringer|Magic-Light) [Lamp](~LightBringer|Lamp) [Candle](~LightBringer|Candle) }}
1597967180
Kurt J.
Pro
API Scripter
Part 4 of the PowerCards 101 video series is available :&nbsp; <a href="https://www.youtube.com/watch?v=zNdqnqBYpLs" rel="nofollow">https://www.youtube.com/watch?v=zNdqnqBYpLs</a> This talks about the chat server, primarily - using @{} syntax and ?{} roll queries to improved the flexibility of PowerCards macros.
1597967474
Kurt J.
Pro
API Scripter
Ravenknight said: Hi people,&nbsp; I'm having a problem with adding multiple buttons in one row. This works fine but is kinda bloated: !power {{ --tokenid|@{selected|token_id} --format|atwill --name|Light Source --!Torch|[Torch](~LightBringer|Torch) --!Lantern|[Lantern](~LightBringer|Lantern) --!LightSpell|[Spell:Light](~LightBringer|Magic-Light) --!Lamp|[Lamp](~LightBringer|Lamp) --!Candle|[Candle](~LightBringer|Candle) }} This doesn't work at all but I can't for the life of me figure out why. I know that I've used neat rows of buttons before. Any ideas? !power {{ --tokenid|@{selected|token_id} --format|atwill --name|Light Source --!Buttons|[Torch](~LightBringer|Torch) [Lantern](~LightBringer|Lantern) [Spell:Light](~LightBringer|Magic-Light) [Lamp](~LightBringer|Lamp) [Candle](~LightBringer|Candle) }} So... this is an interesting one. The reason you are running into this is that your character's name starts with a upper-case L :) . . . Oh, so you want an explanation! :) This will happen with character names starting with ~C, ~L, and ~R because pairs of these sequences are used for Center, Left, and Right justification in PowerCards formatting. If there is only one on the line, it doesn't hurt anything because the script is looking for pairs. But when you have multiples you get very weird results as it replaces two at a time with HTML formatting. You should be able to get around this by using a lowercase L to start the characters name (just here in the card... not in the game!) as I believe the references that way are not case sensitive.
That did it! Thanks a lot Kurt! Now I feel ashamed for not seeing it. :D
1597967791
Kurt J.
Pro
API Scripter
Ravenknight said: That did it! Thanks a lot Kurt! Now I feel ashamed for not seeing it. :D Don't be too ashamed! It took me forever to figure out what was wrong the first time I ran into it... now I know to look for it.
this is wwot I got now...stil no updtae on my bar1...
1598034292
Kurt J.
Pro
API Scripter
Mangouste said: this is wwot I got now...stil no updtae on my bar1... The image you posted contains the error message telling you what is wrong: "no attribute was found for @{selected|tokenid}." The Token ID attribute is token_id, not tokenid.
Kurt J. said: Mangouste said: this is wwot I got now...stil no updtae on my bar1... The image you posted contains the error message telling you what is wrong: "no attribute was found for @{selected|tokenid}." The Token ID attribute is token_id, not tokenid. Thanks a lot mate !&nbsp;
I assume this is intentional behavior, but I thought I'd ask. Is there a reason the template tag can't be used in a conditional? I don't see anything explicit in the docs about this. !power ?! 1 -eq 0 !? template|name|arg1;arg2 If I try this I get no output, regardless of whether the conditional evaluations to true or false. I don't get any errors either.
1598222468
Kurt J.
Pro
API Scripter
kgsodie said: I assume this is intentional behavior, but I thought I'd ask. Is there a reason the template tag can't be used in a conditional? I don't see anything explicit in the docs about this. !power ?! 1 -eq 0 !? template|name|arg1;arg2 If I try this I get no output, regardless of whether the conditional evaluations to true or false. I don't get any errors either. The template system was inserted as the first thing that happens in the processing of the card text, so the template tag itself doesn't follow any of the conditional rules since nothing else about the card has been evaluated. Templates themselves support optional line inclusion based on passed parameters, but using the --template tag is really just a text substitution.
Thanks Kurt, I was assuming it was something like that.
Working on a DnD 5e OGL Powercard, trying to assign an inline roll to an attribute.&nbsp; I know I have this completely wrong but don't know what to do to fix it. !power {{ &nbsp; --charid|@{selected|character_id} &nbsp; --target_list|@{target|token_id} &nbsp; --emote|@{selected|character_name} Casts a Spell! &nbsp; --emotefont|font-family: "Algerian"; font-weight: bold; &nbsp; --txcolor|#7fff00 &nbsp; --bgcolor|#440000 &nbsp; --corners|10 &nbsp; --border|5px solid #000 &nbsp; --erowtx|#000000 &nbsp; --erowbg|#00ffff &nbsp; --orowtx|#ffff00 &nbsp; --orowbg|#006400&nbsp; &nbsp; --name|@{selected|character_name} Casts Cure Wounds on @{target|character_name}&nbsp;&nbsp; &nbsp; --!Cure| [$Lvl1] ?{Level|1st Level, [[ 1d8 + @{selected|wisdom_mod}]]|2nd Level, [[ 2d8 + @{selected|wisdom_mod}]]|3rd Level, [[ 3d8 + @{selected|wisdom_mod}]]|4th Level, [[ 4d8 + @{selected|wisdom_mod}]] } }} !modbattr&nbsp; &nbsp;--charid @{target|character_id} --hp|+[[$Lvl]!!! {{description= HP recovered }} Would appreciate some help...
Hey Michael! The key here is that the whole entire roll plus the Roll ID needs to be inside the [[ ]]. So for you, for a Roll ID of Lvl you would need: --!Cure| [[ [$Lvl] ?{Level|1st Level,1d8|2nd Level,2d8|3rd Level,3d8|4th Level,4d8} + @{selected|wisdom_mod} ]] And then to call it back as [^Lvl], I believe that you would need to put that into the Powercard itself, because ChatSetAttr doesn't have access to that roll outside of the card. But Powercards, luckily, can call other APIs with an api_ tag. Then use underscores in place of -- where needed.&nbsp; --api_modattr _charid @{target|character_id} _hp|+[^Lvl] This should work how you want it to.&nbsp;
1598315029

Edited 1598315058
Kurt J.
Pro
API Scripter
I've added a new PowerCard to my&nbsp; PowerCards Library &nbsp;of useful macros. This is a Sneak Attack macro that will determine the character's rogue level (even for multi-classed characters) and roll the appropriate number of sneak attack dice. If a non-rogue tries to use it, they will get some flavor text about trying to be sneaky. Thanks to Don K. for the suggestion over on Patreon.
1598624447

Edited 1598625008
Hi all,&nbsp; I´m currently working in a macro to roll dice for The One Ring but I´m noticing that is nearly impossible (with my current knowledge of the script) to show the images from the rollable table instead the dice result. For example, this macro is a feat dice for a player in normal state: !power {{ --name|Roll for ?{Skill name|attack} --Feat Dice|[[ 1t[feat] ]] --Skill Dice|[[ [XPND] ?{Number of D6 to roll|0}t[normal] ]] }} Using the powercards macro, the result is: And, if I use the normal macro, the result is: My question is if it is possible to show the image instead the result of the dice in the roll. Thanks in advance. Regards
Kurt, just saw the sneak attack PCard.&nbsp; We have our game tomorrow, the Rogue will love it. Thank you!!
Hey Kurt, Just a curiosity Would you be able to later on implement if else and else statements into powercard, or that outside the scope possible?
I think you all ready can....? --?? X == Y ?? You are awesome | Explanation --?? X &lt;&gt; Y ?? You did no good | something bad ^^other bad things ^^even more bad things This should relate to an If else and else... based on formula needed ... Unless I am misunderstanding the question...??
1598826765

Edited 1598826805
&lt;&gt; is not really if else or else is more close to != not equal.&nbsp; I mean you can definitely simulate else and if else but you need way more code than if you had an ?? X == Y ?? Result 1| ?? if else Result 2 else ?? Result 3 As I said I am just more curious if is possible to achieve something similar
ahhh... You were looking for more for an inline thing... Then it was I, that misunderstood... But I think you would have to formulate your calculations to handle the If Else and Else formulas. Yep it is more coding, but well worth it in the end... PC is powerful, yet limited... an API would be needed for what you are asking... Not sure if PC could be augmented to accommodate that way....hhhmmmm Or even attempted to be changed to handle that...good grief....
1598997335

Edited 1599001029
Kurt J.
Pro
API Scripter
Danny C. said: Hey Kurt, Just a curiosity Would you be able to later on implement if else and else statements into powercard, or that outside the scope possible? At first I was going to say there wasn't really a way to make this happen, but I think I've come up with something that might &nbsp;fit the bill. I've updated the development GIST with 3.8.13 which add a new behavior to conditional tags. It works like this : If you use normal conditional tags, nothing changes at all. After a ?? ... ?? you can start using ?+ ... +? tags which will behave as "else" for any previous ?? ... ?? or ?+ .. +? tag until you start over with a ?? .. ?? tag. Essentially, with a sequence of ?? .. ?? and ?+ .. +? tags, once one has evaluated to true, the others will all be set to false. Here is an example: !power {{ &nbsp; --name|test &nbsp; --DiceRoll|[[ [$res] 1d20 ]] &nbsp; --?? $res &gt; 15 ?? Hit|You hit ac 15! &nbsp; --?+ $res &gt; 10 +? Miss|You missed by 5 or less &nbsp; --?+ $res &gt; 5 +? Almost|You almost fumbled! &nbsp; --?+ 1 == 1 +? Fumble|You really messed up! }} This will display something like this: In this card, the first condition that is true is displayed, and everything else is not. The final "else conditional" (?+ 1 == 1 +?) should act as a "finally" if nothing above it is true. This should be considered *experimental* at this point :) let me know if you find it useful. Here is a more "real life" example: !power {{ --name|5E Attack --hroll|[[ [$ac] 1d6+10 ]] [[ [$dmgBase] 1d8 + 5 ]] [[ [$dmgCrit] 2d8 + 5 ]] --Attack|You attack, rolling [[ [$atk] 1d20 + 5 [STR] + 3 [PROF] ]] vs AC [! [^ac] !] --?? $atk.base == 20 ?? Critical Hit!|You strike a vital spot for [! [^dmgCrit] !] damage! --?+ $atk.base == 1 +? Miss *1|Your attack missed, and if you play with fumbles, you fumbled! --?+ $atk.total &gt;= $ac +? Hit|Your blow lands for [! [^dmgBase] !] damage! --?+ 1 == 1 +? Miss *2|Your attack missed }} This is a 5E attack macro that handles hits, crits, fumbles, and misses without the need for AND this, OR that, etc. Note the placement of the natural 1 which will prevent a hit that is just based on bonuses from registering as a hit without needing a bunch of extra conditions in the lines. NOTE: Right now this doesn't work with Extended Conditionals (?! .. !?) if this proves useful, I'll add it to them as well.
wow kurt, thats awesome!
1599153140

Edited 1599168776
Kurt J.
Pro
API Scripter
Version 3.8.13 Released on Development GIST (NOTE: The GIST has been updated since the previous post to include Else conditions for Expanded conditionals, but the version number was left at 3.8.13). New in this version : "Else" conditionals. Thanks to a suggestion by Danny C. Here is how they work: After using a normal or extended conditional tag (?? .. ?? or ?! .. !?) you can use new versions of the conditional tags to imply "else" conditions. If the result of the previous conditional operation was "True", none of the subsequent "else" conditionals will be considered true. For normal conditionals, the else conditional tag is ?+ .. +?, and for extended conditionals it is ?- .. -?. Normal and Extended conditional groups are processed separately, so the true/false state will not be carried over from a normal to an extended or from an extended to a normal. See the message two posts above for examples.
Hello people, anyone know how to call for the KABOOM api with powercards? I already try things like &nbsp;--api_KABOOM|10 15 &nbsp;--api_KABOOM.NOW|10 15 and other variables with () [] etc
1599249464
Kurt J.
Pro
API Scripter
Jonnattan G. said: Hello people, anyone know how to call for the KABOOM api with powercards? I already try things like &nbsp;--api_KABOOM|10 15 &nbsp;--api_KABOOM.NOW|10 15 and other variables with () [] etc It looks like this is not possible the way Kaboom is currently implemented. According to the Kaboom GITHUB page, when Kaboom is called via chat (which is what PowerCards --api_ command does) it requires a token to be selected. One of the limitations of the API is that when a API code uses the SendChat function it does not pass selected information. In order to be callable from PowerCards, Kaboom would need to allow passing of a token id on the chat line to act upon.
1599333231

Edited 1599333277
Kurt J.
Pro
API Scripter
PowerCards 3.8.13 and PCMHelper 1.0.8 pushed to OneClick Installer I have submitted a pull request to update the OneClick Install versions of PowerCards and PCMHelper as indicated above. This brings forward the following changes to the OneClick version of PowerCards: Ability to use the .odds, .evens, and .aces modifiers when checking the value of RollIDs (See the&nbsp; Wiki Page &nbsp;for details). Else Conditionals as suggested by Danny C. (I've added a new&nbsp; Wiki Section &nbsp;for those as well. Minor bug fixes and tweaks Changes to PCMHelper: Updated macros based on Sven K.'s work. Version checking system - when PCMHelper loads it will check to see what version of the PCMHelper macros you have installed in your game and suggest that you run !pcmsetup if they are not the latest. NOTE: If you have customized your macros, you probably won't want to do this as they will &nbsp;be overwritten. New processing queue system. I finally sat down and figured out how to implemented a processing queue that will allow "!pcmeverybody" to actually work on large modules. For example, I was able to create a fresh game with Tomb of Annihilation and run "!pcmsetup" followed by "!pcmeverybody" and have PCM make the necessary attribute settings to every NPC in the module. The API console will keep you updated on the progress of processing the queue. One-click updates normally happen on Tuesdays, so if I didn't mess anything up, this should be live on 9/8/2020. :)
Hi, Im having a problem and im really not good at this. But i have been trying all summer to come up with a way to write an overall macro for the NPC multiattack. I have the templates and everything and npc-action works fine. But i want to&nbsp; be able to get 2 hits in 1 powercard from 2 different sources ( say bite and claw) is this possible? withut writing a macro for every single monster?
1599433537
Kurt J.
Pro
API Scripter
Nibrus said: Hi, Im having a problem and im really not good at this. But i have been trying all summer to come up with a way to write an overall macro for the NPC multiattack. I have the templates and everything and npc-action works fine. But i want to&nbsp; be able to get 2 hits in 1 powercard from 2 different sources ( say bite and claw) is this possible? withut writing a macro for every single monster? This would be a very difficult thing to accomplish, because of the variability of Multiattack. For example: Goblins : The goblin makes two attacks with its scimitar. The second attack has disadvantage. Brown Bear :&nbsp;The bear makes two attacks: one with its bite and one with its claws. Adult Red Dragon :&nbsp;The dragon can use its Frightful Presence. It then makes three attacks: one with its bite and two with its claws. And those are just the first three I looked up in the compendium. There wouldn't be any way for a single macro to determine what attacks it should be making and the variables associated with them (like disadvantage on the second attack for the goblin). It might be possible to set up some attributes on the NPC sheets to assist, but the cards would get mind-bogglingly complicated, and you would still need to set them up for every creature with multiattack.