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

Get and Set attributes on all sheets

1539127636

Edited 1539128164
GiGs
Pro
Sheet Author
API Scripter
Takryn said: Overall, I know I've spent far more time working on this than I'll ever save. Nonetheless, I've learned a ton and the play during gaming sessions will be smoother for me (and my cohorts once I roll this out to them). In addition, anyone else who decides to go this route will be positive from the start.  Isnt that always the way, haha. Most of my programming to save time has taken way more time to implement than it would actually save, but its fun, and you do it ahead of time so it still saves time in the moment. I'm having a hard time seeing how this will ever by useful to others. It's useful for you, but it's a very specific use case which I cant see many other people benefiting from.  Especially since I cant see very many people wanting to to make that many macros! If they do, great :) Regarding a simpler and more universal solution: Have you looked into attachers? i have a strong suspicion you could set up attachers for planar soul, radiant soul, and favoured enemies, and just click a couple of checkboxes to activate and deactivate them as needed, and they'd apply to relevant attacks automatically, no scripting needed.  I dont use 5e or the shaped sheet, so I don't know the intracices of how the spells work, or the rolltemplate is constructed, unfortunately. 
I have not delved into attachers yet, proceeding blindly with my "everything is a nail when all you have is a hammer" approach to the problem.  If I understand my problem, which I think I finally do, as you say I think it would take a combination of attachers and some interesting template formatting to get where I want. As for it's usefulness for others...yeah, the excessive macro requirement will probably put people off. I feel like the ability to search for and conditionally qualify against any given token/sheet attribute must be useful in the grand scheme. It seems like people would want to be able to check a target for that kind of thing. I guess they just do it manually as they would for pen & paper. 
1539132449
GiGs
Pro
Sheet Author
API Scripter
I think the ability to search for types, etc., is crossing a bit into GM territory. I can see a lot of GMs wanting to be able to reveal details about their creatures in game play, and feel cheated if the players have access to a script that just reveals such details to them.  I think the shaped sheet should handle the formatting of attachers fine, after all its a 5e shaped sheet feature. If you had them set up, you could have a chatsetattr script to simply toggle on and off the ones you need with a simple macro or token action, which would things very quick.
OK, so please pardon my ignorance. If for the ability version, the script only receives my character name and id, how does it know what target to check against for the matching types? Shouldn't it need a double entry? !chooseaa @{mycharactername|character_id} @{target|character_id} ?{Attack Type|Standard,sb|With PW,sbpw} fiend|undead
1539133960
GiGs
Pro
Sheet Author
API Scripter
It still asks for target, there's just an extra parameter for your character before the target query.
G G said: I think the ability to search for types, etc., is crossing a bit into GM territory. I can see a lot of GMs wanting to be able to reveal details about their creatures in game play, and feel cheated if the players have access to a script that just reveals such details to them.  I agree; that's why I just wanted to get the info and pass it to the macros. In my case, it would notify me if it was one of the favored enemies, or just undead for the sword, without giving out what it actually is. I suppose players could abuse it to just search for whatever they wanted; I'm not that guy so it hadn't crossed my mind. This is why we can't have nice things!
Got it. I was right, yay! The example at the top comments in your updated post has the instruction correct but the example line is missing the @target. :)
1539135683
GiGs
Pro
Sheet Author
API Scripter
Oops, my mistake! I've fixed the previous posts.
No problem in the slightest! I'm just glad I've picked up enough to have recognized the issue and the fix!