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
This post has been closed. You can still view previous posts, but you can't post any new replies.

[Script] PowerCards 3 (Thread 4)

1522718131

Edited 1522718160
Kurt, what command do you use to get out the token of the target avatars? --targettokenid?
I also dont know if its possible but it would be cool to do simple mathematic equations with the macros for example [$Atk] - [$Def] [$Crit] * [$ST] that would be amazing i think. but i have zero idea if its even possible
1522803144
Kurt J.
Pro
API Scripter
Anthony V. said: Kurt J. said: So, I exchanged messages with Sky about formally taking over supporting/updating PowerCards, and he was agreeable. I have another update in the works, but I want to test it out in my Thursday night game before pushing it up to the GIST. I'm also open to ideas for additional features, as long as they make sense within the general realm of what PowerCards is. Awesome, looking forward to seeing what new stuff you come up with!! My only suggestion at this time is maybe creating a legendary actions list and a reactions list similar to what we have for Actions and Spells already and maybe a traits section but from my understanding that section works differently then the rest.  npc_legendaryaction_list, npc_trait_list, and npc_reaction_list are all completed. Both reactions and traits behave differently than actions and legendary actions, so while legendary actions work the same way that actions do, both traits and reactions display a list of the effects with their descriptions. It is surprisingly difficult to find monsters that actually have reactions, but Legendary Actions... pretty easy :) I'll have this version up on the GIST along with the new additions I'm testing after my Thursday night game. Here is a quick sample card:
Kurt J. said: Anthony V. said: Kurt J. said: So, I exchanged messages with Sky about formally taking over supporting/updating PowerCards, and he was agreeable. I have another update in the works, but I want to test it out in my Thursday night game before pushing it up to the GIST. I'm also open to ideas for additional features, as long as they make sense within the general realm of what PowerCards is. Awesome, looking forward to seeing what new stuff you come up with!! My only suggestion at this time is maybe creating a legendary actions list and a reactions list similar to what we have for Actions and Spells already and maybe a traits section but from my understanding that section works differently then the rest.  npc_legendaryaction_list, npc_trait_list, and npc_reaction_list are all completed. Both reactions and traits behave differently than actions and legendary actions, so while legendary actions work the same way that actions do, both traits and reactions display a list of the effects with their descriptions. It is surprisingly difficult to find monsters that actually have reactions, but Legendary Actions... pretty easy :) I'll have this version up on the GIST along with the new additions I'm testing after my Thursday night game. Here is a quick sample card: SO COOL! Thanks for getting that done for me!
1522803908

Edited 1522806018
Kurt J.
Pro
API Scripter
Danny C. said: Kurt, what command do you use to get out the token of the target avatars? --targettokenid? Right now, I'm checking for a --target_list tag, and using the first target in the target list. The simplest being --target_list|@{target|token_id} Danny C. said: I also dont know if its possible but it would be cool to do simple mathematic equations with the macros for example [$Atk] - [$Def] [$Crit] * [$ST] that would be amazing i think. but i have zero idea if its even possible I'll have to do some examination of the code to see how feasible this would be to implement. Conditionals are complicated enough already, so if anything it might be a new type of tag to create a result as a new RollID. I'll give it some thought, as I can see instances where this would be useful.
Hey Guys I am running into trouble with one of my macros, when i try to use centered text, i get a whole space and dont really know why it does that. when i use right is ok do Here is the code !power {{ --titlefontshadow|none --titlefontsize| 12px --subtitlefontsize | 18px --corners|10 --orowbg|#9395CA --erowbg|#9395CA --format|Attributes --name|@{Selected|character_name} --leftsub|Agility --Target| ~C [[ [$Attr] [[@{Selected|Agility}-@{Selected|armortestpenalty}+?{Modifier|0}]] + 0d0 ]] ~C --?? $Attr > 0 ?? Outcome|~R **//Success//** ~R --?? $Attr < 0 ?? Outcome|~R **//Failure//** ~R }} If i change to  ~R works fine. any tips
1522981344

Edited 1522981734
Hey Kurt,  thx for clarifying about the target. I also try to make the vfx option to work. dont know if i am missing something but it just dont show any effect !power {{ --titlefontshadow|none --titlefont|Georgia --titlefontsize| 20px --orowbg|#D87E7E --erowbg|#DA3C3C --corners|10 --format|Attack --name|Astartes Force Sword --rightsub|Balanced, Special --leftsub|Melee --tokenid|@{selected|Token_Id} --target_list|@{target|token_id} --emote| **@{selected|character_name}** Attacks **@{target|character_name}** --vfx_opt|@{selected|token_id} @{target|token_id} breath-fire }} Works only with variables?
1523008475
Kurt J.
Pro
API Scripter
Danny C. said: Hey Kurt,  thx for clarifying about the target. I also try to make the vfx option to work. dont know if i am missing something but it just dont show any effect !power {{ --titlefontshadow|none --titlefont|Georgia --titlefontsize| 20px --orowbg|#D87E7E --erowbg|#DA3C3C --corners|10 --format|Attack --name|Astartes Force Sword --rightsub|Balanced, Special --leftsub|Melee --tokenid|@{selected|Token_Id} --target_list|@{target|token_id} --emote| **@{selected|character_name}** Attacks **@{target|character_name}** --vfx_opt|@{selected|token_id} @{target|token_id} breath-fire }} Works only with variables? The effect will show on the page the player ribbon is set to. I usually forget to move the ribbon to the page I'm testing with :)
Kurt WOW! this is really nice, thx again. Your upgrades to powercards are really nice. Hope to see more stuff, but just that vfx is super awsome, oing to make my games even cooler :)
1523025347

Edited 1523025606
is there a link to the newest version of powercards? With the new list legendary actions and traits, etc?
1523025477
The Aaron
Pro
API Scripter
I believe it's here:&nbsp;<a href="https://gist.github.com/Sky-Captain-13/452330a3d926b32da49c" rel="nofollow">https://gist.github.com/Sky-Captain-13/452330a3d926b32da49c</a>
The Aaron said: I believe it's here:&nbsp; <a href="https://gist.github.com/Sky-Captain-13/452330a3d926b32da49c" rel="nofollow">https://gist.github.com/Sky-Captain-13/452330a3d926b32da49c</a> sorry should have been more specific the new legendary action list and traits list, I beileve i have 3.6.1 already.
1523026253
The Aaron
Pro
API Scripter
Ah.&nbsp; I missed the message about Kurt taking over maintaining PowerCards.&nbsp; That's cool!
1523033154

Edited 1523038940
Kurt J.
Pro
API Scripter
Release Date : 2018-04-06 Version: 3.7.0 Source: <a href="http://gist.github.com/kjaegers/7fd81c55517014704b9fe3986660341c" rel="nofollow">http://gist.github.com/kjaegers/7fd81c55517014704b9fe3986660341c</a> Here is my first major update for PowerCards. The items below were all active in my 5E game last night, and everything worked as intended there (Of course, that is a pretty limited test setting, so please let me know if you run into any trouble/bugs so I can fix them). On with the additions: Additional Action/Trait Tags Three new tags have been added similar to the existing "npc_action_list" tag. These are "npc_legendaryaction_list", "npc_trait_list", and "npc_reaction_list". In the case of npc_legendaryaction_list, the actions will be displayed with API command buttons that can be clicked to perform the action. Traits and Reactions are essentially just names and descriptions in the OGL character sheet, so these are displayed as lists with the name in bold followed by the description. Individual traits/reactions are separated by a horizontal line. NPC Attributes, Skills and Qualities Tags Similar to the tags above, these tags will produce a formatted list of attributes (npc_attribute_summary), qualities, such as damage immunties and the like (npc_qualities_summary) and any skills that the NPC has ranks in (npc_skills_summary). It is possible that I will be refining the output from these tags over the next couple of versions, so they might display things a little differently in the furture, but in general they will maintain the same functionality. Currently, I have a macro on my Token Action bar called #Card:Summary that looks like this: !power {{ --name|@{selected|character_name} --whisper|GM --format|badguys --emote| --tokenid|@{selected|token_id} --npc_attribute_summary|@{selected|character_id} --npc_qualities_summary|@{selected|character_id} --npc_skills_summary|@{selected|character_id} --!Actions|**Available Actions** --npc_action_list|@{selected|character_id} --!Reactions|**Available Reactions** --npc_reaction_list|@{selected|character_id} --!LA|**Legendary Actions** --npc_legendaryaction_list|@{selected|character_id} --!TR|**@{selected|character_name} Traits** --npc_trait_list|@{selected|character_id} }} Which produces a mini-stats sheet for an NPC as a whisper to me. It looks something like this: New Attribute-Based Audio Tag This is really just an alternative option to the existing --soundfx tag, and still requires the use of the Roll20 Audio Master script. This tag (--audioattr) requires two parameters. The first is a token id, and the second is an attribute name. If the given attribute exists on the character that the token represents, it will be passed (without editing) to the !roll20AM command. For example: --audioattr|@{selected|token_id} Audio_OnAttack When the PowerCard is displayed, it will check the charactersheet represented by the selected token. If Audio_OnAttack exists as an attribute, it will retrieve the value of the attribute and pass it to Roll20 Audio Master. If, for example, the Audio_OnAttack attribute for a dragon was "--play|FireBreath", the corresponding "FireBreath" sound effect track will be played (assuming you HAVE a FireBreath sound effect in your jukebox). New Attribute-Based Effects Tag Just like the --audioattr tag, this new tag (--vfxattr) takes two parameters: a token id and an attribute name. It will check the character represented by the token for the specified attribute. If it is found, the script will interpret the contents of the tag and set up a visual effect: --vfxattr|@{target|token_id} Effect_OnHit When this tag fires, it will check the targeted token for an attribute called Effect_OnHit. If it exists, it will be parsed to create a visual effect. Because @{} token references are parse by the chat system and not the API, we can't directly specify things like @{selected|token_id} in the attribute, so instead we interpret "s" as the selected token and "t" as the target. This means the value of Effect_OnHit could be something like: s t beam-magic Which will cause a point-to-point magic beam effect starting at the selected token (s) and pointing at the target token (t). This attribute value: t glow-blood Will cause a burst of blood on the target token. PLEASE NOTE: Video effects are played on the active player page (where the Player ribbon is positioned). It is easy to forget this when testing effects on a page the players can't see. What are these new attribute-based tags for? I use a detailed, but highly generic, set of macros for my PowerCards. I have one macro for a standard NPC action in the first NPC Action slot, one for the second action, etc. There are a couple of variations on these (attacks that do two kinds of damage, and a generic multi-attack for use when both attacks are at the same target). I put these macros into the Abilities section of my monster character sheets and show them as token actions so I can use them quickly in game. However, I also want to be able to have some customization options as well. I don't want to create new macros to play different sound effects, for example. If I have an animal, I can set an "Audio_OnAttack" attribute to "--play|Growl" and my standard #card-atk0 macro will play the growl when the animal attacks. On an archer, I can change it to "--play|BowShot", or to "--play|SwordSwing" for someone with a blade. And if the attributes aren't present on a character? Then nothing happens and the tag is ignored. Because these tags work with the conditional system, I can have audio and video effects triggered by die roll results. Here is an example from my #card-atk0 macro: --?? $Atk.total &gt;= @{target|BAR2} AND $Atk.base &lt;&gt; 1 AND $Atk.base &lt;&gt; 20 ?? vfxattr *1|@{target|token_id} Effect_OnHurt --?? $Atk.total &gt;= @{target|BAR2} AND $Atk.base &lt;&gt; 1 AND $Atk.base &lt;&gt; 20 ?? audioattr *1|@{target|token_id} Audio_OnHurt --?? $Atk.total &gt;= @{target|BAR2} AND $Atk.base &lt;&gt; 1 AND $Atk.base &lt;&gt; 20 ?? audioattr *2|@{selected|token_id} Audio_OnHit_0 If the attack hits (and there is a line before these for the damage roll) we will play the target's Effect_OnHurt effect, the target's Audio_OnHurt sound, and the attacker's Audio_OnHit_0 sound - if any of these exist on the characters.
1523033605

Edited 1523033639
The Aaron
Pro
API Scripter
So Kurt, what do you think about getting Powercards in the 1-click install? (he said hypocritically without 50+ scripts he needs to get there as well... =/&nbsp; )
The Aaron said: So Kurt, what do you think about getting Powercards in the 1-click install? (he said hypocritically without 50+ scripts he needs to get there as well... =/&nbsp; ) That would be sweet! Such an awesome update thank you Kurt!!!
1523058729
Kurt J.
Pro
API Scripter
The Aaron said: So Kurt, what do you think about getting Powercards in the 1-click install? (he said hypocritically without 50+ scripts he needs to get there as well... =/&nbsp; ) Not opposed to doing so. Just got to figure out how it works :) Reading up on that now.
Hi guys Sorry for the delay in replying, but just wanted to say thanks to everyone who helped me with my previous query about the blurry text. It is working perfectly now and I am looking forward to showing it off in the next session.
Those additions are amazing Kurt. Thanks a lot for sharing this with us!
1523236600
Kurt J.
Pro
API Scripter
I've create a new thread, since this one is almost at 1000 posts. <a href="https://app.roll20.net/forum/post/6264588/script-powercards-3-thread-5/?pageforid=6264588#post-6264588" rel="nofollow">https://app.roll20.net/forum/post/6264588/script-powercards-3-thread-5/?pageforid=6264588#post-6264588</a>