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

[Powercards] Help needed please

1703186132

Edited 1703199839
Hi everybody ! I need some help for a game I'm about to launch. I'll try to explain you the basics. Characters have two series of stats  : Corps, Coeur, Esprit Action, Perception, Résistance And they can add a "métier" or a "hobby" or a bonus/malus. This gives a "test value" Then, the  player should roll 2d6 If the roll is under or equal the test value, this is a succes If the roll is over the test value, this is fail If the roll is 2, this is a critical success If the roll is 3, this is a critical succes,  only if the charracter has a hobby If the roll is 12, this is a critical fail. Here  is the script I tried to write, but it doesn't match... Ca n   somebody help me ? !power {{ --bgcolor|#6C5003 --txcolor|#F7DC65 -- erowbg|#FFF6A0 -- orowbg|#FFF6A0 --erowtx|#000000 --orowtx|#000000 --name|Test -- [[ [$TEST] ?{Composante |Corps,@{selected|Corps}|Coeur,@{selected|Coeur}|Esprit,@{selected|Esprit}} + ?{Moyen |Action,@{selected|Action}|Perception,@{selected|Perception}|Résistance,@{selected|Résistance}} + ?{bonus/malus} ]] -- [[ [$JET] 2d6 ]] -- ?? $JET <= $TEST AND $JET == 2 ?? ! RES1 :|^^~C **Réussite critique !**  ~C  -- ?? $JET <= $TEST AND $JET == 3 ?? ! RES2 :|^^~C **Réussite critique ! (si métier ou talent)**  ~C  -- ?? $JET <= $TEST AND $JET >= 4 ?? ! RES3 :|^^~C **Réussite !**  ~C  -- ?? $JET > $TEST AND $JET < 12 ?? ! RES4 :|^^~C **Echec !**  ~C  -- ?? $JET > $TEST AND $JET == 12 ?? ! RES4 :|^^~C **Echec critique !**  ~C  }}
1703312653
Andrew R.
Pro
Sheet Author
If you’re just getting started with PowerCards, I recommend switching to ScriptCards, which is actively developed by the same person maintaining PowerCards. It’s capable of much more.  However, I’ll have a look at your script and try to help. I’ll post again later. 
Andrew R. said: If you’re just getting started with PowerCards, I recommend switching to ScriptCards, which is actively developed by the same person maintaining PowerCards. It’s capable of much more.  However, I’ll have a look at your script and try to help. I’ll post again later.  I'll see how does ScriptCards works, but I'm waiting for your help later on this script :) Thank you Andrew !
I tried another way to get the good result and it seems ok but I have a new problem ! :) ==> For this part of the script :  + ?{modificateur}  , if I input no value, the result is wrong. How can Ido that no value = 0 ? !power {{ --name|@{selected|character_name} fait un test -- [[ [$JET] [NH] 2d6]] -- ?? $JET == 2 ?? ! RES1 :|~C **Réussite critique !**  ~C  -- ?? $JET == 3 AND $JET <= [[ ?{Composante |Corps,@{selected|Corps}|Coeur,@{selected|Coeur}|Esprit,@{selected|Esprit}} + ?{Moyen |Action,@{selected|Action}|Perception,@{selected|Perception}|Résistance,@{selected|Résistance}}  + ?{modificateur} ]] ?? ! RES2 :|~C **Réussite !**  ^^ (Critique si un talent ou un métier est utilisé) ~C -- ?? $JET > 3 AND $JET <= [[ ?{Composante |Corps,@{selected|Corps}|Coeur,@{selected|Coeur}|Esprit,@{selected|Esprit}} + ?{Moyen |Action,@{selected|Action}|Perception,@{selected|Perception}|Résistance,@{selected|Résistance}}  + ?{modificateur} ]] ?? ! RES3 :|~C **Réussite !**  ~C  -- ?? $JET > [[ ?{Composante |Corps,@{selected|Corps}|Coeur,@{selected|Coeur}|Esprit,@{selected|Esprit}} + ?{Moyen |Action,@{selected|Action}|Perception,@{selected|Perception}|Résistance,@{selected|Résistance}}  + ?{modificateur} ]] AND $JET < 12 ?? ! RES4 :|~C **Échec !**  ~C  -- ?? $JET == 12 ?? ! RES5 :|~C **Échec critique !**  ~C  }}
I cannot help you out with Powercards but if you do want to move to ScriptCards like Andrew suggested I threw the following example together based on what I think you are doing there: !scriptcard {{ --/|ScriptCard example for whatever game system Yanick plays --/|Set the following to true to print debug lines to the GM --&debug|false --#sourceToken|@{selected|token_id} --&composante|?{Composante |Corps,@{selected|Corps}|Coeur,@{selected|Coeur}|Esprit,@{selected|Esprit}} --&moyen|?{Moyen |Action,@{selected|Action}|Perception,@{selected|Perception}|Résistance,@{selected|Résistance}} --&bonus|?{modificateur} --=total|[&composante] [COMP] + [&moyen] [MOYEN] + [&bonus] [BONUS] --=JET|2d6 --?"[&debug]" -eq "true"|[ --*DEBUG|C: [&composante] M:[&moyen] B:[&bonus] Total:[$total] --*DEBUG|[$JET] --]| --?[$JET] -eq 12|>DisplayResults;Échec critique; --?[$JET] -eq 2|>DisplayResults;Réussite critique; --?[$JET] -eq 3 -and [$JET] -le [$total]|>DisplayResults;Réussite;Critique si un talent ou un métier est utilisé --?[$JET] -le [$total]|>DisplayResults;Réussite;|>DisplayResults;Échec --:DisplayResults|Result;AdditionalMessages --#title|[*S:character_name] fait un test --+[%1%]|[%2%] --:Done| --X| }} It produces a very basic success or fail message like it seems that you want like so: If you want to see the rolls and the modifiers printed to the GM you can set the &debug line to true: --&debug|true And it will whisper to the GM the dice roll and all the modifiers like so: The wiki has a lot more info about ScriptCards including formatting options and the like. Kurt J also has a Discord server. The wiki also has links to the original ScriptCards post and another post with working examples but here is the link to the currently open thread for ScriptCards questions . Maybe that can get you started on moving to ScriptCards.
1703584138
Andrew R.
Pro
Sheet Author
Running Yanick's script exactly as-is in a test game prompts me for the Roll Queries but I see nothing in the API Console or in the Chat. I found that the problem was the Roll Query line. I corrected that, which needed an actual dice roll, and some descriptions, added the missing tags, and I have a simplified but working version: !power {{ --name|Test --Roll *1|[[ [$TEST] 0d0 [Nul] + ?{Composante|Corps,@{selected|Corps}|Coeur,@{selected|Coeur}|Esprit,@{selected|Esprit}} [Composante] + ?{Moyen|Action,@{selected|Action}|Perception,@{selected|Perception}|Résistance,@{selected|Résistance}} [Moyen] + ?{bonus/malus} [BonMal] ]] --Roll *2|[[ [$JET] 2d6 ]] --?? $JET <= $TEST AND $JET == 2 ?? ! RES1 :|^^~C **Réussite critique !**  ~C --?? $JET <= $TEST AND $JET == 3 ?? ! RES2 :|^^~C **Réussite critique ! (si métier ou talent)**  ~C --?? $JET <= $TEST AND $JET >= 4 ?? ! RES3 :|^^~C **Réussite !**  ~C --?? $JET > $TEST AND $JET < 12 ?? ! RES4 :|^^~C **Echec !**  ~C --?? $JET > $TEST AND $JET == 12 ?? ! RES4 :|^^~C **Echec critique !**  ~C }}
Thank you ! :)