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

[ChatSetAttr] Temporary Help with Character Sheet Setups

Reffering to&nbsp; <a href="https://app.roll20.net/forum/post/6708353/welcomepackage-5e-shaped-default-configurations" rel="nofollow">https://app.roll20.net/forum/post/6708353/welcomepackage-5e-shaped-default-configurations</a> &nbsp; I was wondering what the CSA controls (using the 5e Shaped sheet) would be to make a global macro where the user could enter their character's name once and have the following occur (I'm not sure where to find each control command or how to change their status): 4) Under the&nbsp; Actions &nbsp;box, uncheck&nbsp; Weight &nbsp;- I only worry about encumbrance if you're trying to move a house on your back. Put a checkmark in &nbsp;Automatically Use Ammo &nbsp;and&nbsp; Emote &nbsp;which will decrement arrows and such on use, and allow you some fancy wordplay on attacks and spells. 5) Under the&nbsp; Spells &nbsp;box, Check off&nbsp; Automatically Expend Spell Resources &nbsp;to use spell slots automatically 6) In the&nbsp; Houserules &nbsp;box, Check&nbsp; Automatically Revert (dis)advantage &nbsp;to automatically return to normal any die rolls you had at advantage or disadvantage. Also check off&nbsp; Sanity , as this allows you your saving throw vs Madness to appear, and a place to put the specified stat. 7) In&nbsp; Roll Templates , Select&nbsp; yes &nbsp;for&nbsp; Character Name on All Roll Templates , as well as checking both boxes below that ( Target's AC ... and&nbsp; Target's Name ...)
1535816295
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Short answer: yes it should be possible. I sometimes use CSA to toggle settings. Use the inspector to find the check box attributes and toggle them from 1 or 0. Long answer should come from either Kryx, Jakob or Lucien. There might be issues with sheet workers or hidden attributes. For example (and this is off the top of my memory, so it my be wrong in the fine details), I use CSA to check whether or not a sheet is whispered, but need to fill in the unseen attribute that the box adjusts to add "/w gm".
1535819410
GiGs
Pro
Sheet Author
API Scripter
If the character is linked to a taken, you dont need to prompt a player to enter their name. You could set the macro up to grab the name from the token and use that in the macro.
1535825263

Edited 1535900226
Jakob
Sheet Author
API Scripter
Yeah, it can be done. Can someone make a guide for this so I don't have to do it? :D !setattr {{ --name ?{Character name} --ammo_auto_use|1 --show_emote|1 --show_weight|0 --automatically_expend_spell_resources|1 --auto_revert_advantage|1 --sanity_toggle|1 --attacks_vs_target_ac|1 --attacks_vs_target_name|1 --show_character_name|{{show_character_name=1}} }} You can also use --sel instead of&nbsp; --name ?{Character name} to do this by token instead of name.
1535833409
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
--show_character_name|{{show_character_name=1}} Does that toggle the display of character name based on a true/false condition on the existing state of the toggle? If so, that's brilliant. Mind blown.
1535833570
Jakob
Sheet Author
API Scripter
keithcurtis said: --show_character_name|{{show_character_name=1}} Does that toggle the display of character name based on a true/false condition on the existing state of the toggle? If so, that's brilliant. Mind blown. No, it doesn't toggle it, it just activates it. Sorry for not blowing your mind.
1535833823
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Mind intact. Thanks for your help. The hardest part I have found, is finding the correct name of the attribute.
1535834956
Jakob
Sheet Author
API Scripter
keithcurtis said: Mind intact. Thanks for your help. The hardest part I have found, is finding the correct name of the attribute. When you right click and inspect an input/select/textarea, the name attribute will tell you the the attribute name, eg. name="attr_ foo " corresponds to the foo attribute.
keithcurtis said: Mind intact. Thanks for your help. The hardest part I have found, is finding the correct name of the attribute. I think you nailed every layman's issue with just that statement. &nbsp; There is no breakdown, based on the character sheet you're using, to every changeable attribute and what states are available to make that change. &nbsp;For the layman, this is where Tokenmod and CSA &gt;&gt;---&gt; POWERFUL API's &lt;---&lt;&lt; becomes the throw your hands up in the air and give up. &nbsp;Because here you have this powerful tool, but you don't have the plug ins to make it work. I almost wish there were another API developed that could output, into chat, everything your existing API's can effect without causing overall game damage, dumping all attributes and states for each attribute. &nbsp;Most attributes tell you what they are without having to decipher too much, but its the syntax that makes the difference. &nbsp;Mostly referring to the Character Sheet Settings, Toggles, and various Data Entry Fields and macro-able things that don't effect Roll20 or Game Stability at large. Just spitballing something I've thought of since becoming a pro user. &nbsp; I love the API's you've all come up with, some of you (Aaron, Jakob, Kryx, Lucien, Kryx, Keith, Stephen L, etc. - but there is a long list) are into some serious dev level stuff. &nbsp;But with that complexity comes the sacrifice of making it layman friendly, which sometimes decoding the underlying "attr_foo" &nbsp;is very difficult to do, when you have to find it among almost 3000 daunting lines of code and don't know if you're gathering the precisely right information, or chasing the greased pig through a busy marketplace. &nbsp;And then comes having the right information, but not knowing what to do with it to make it change without busting your game, or bogging down the server, or creating infinite loop errors.
1535839500
GiGs
Pro
Sheet Author
API Scripter
Wolf, that's a very understandable reaction. There is a technical way to find out the stat names, using your browser, but general users aren't aware of it. With a character sheet open, right-click an element on the page (like an attributes input box), and in the menu that pops up, there will be an entry Inspect &nbsp;or Inspect Element . Select that and another window frame will open in the browser, with that input selected. You can find out the attribute name there. Look for a string like name="attr_statname" and the bit after attr_ &nbsp;is the stat name. It might look a bit overwhelming at first, but you can't break anything, so feel free to click around and explore that interface. Just ignore everything you dont understand. You don't need to know what it means. Just use the rightclick -&gt; inspect element any time you need to know a stat name. I agree it would be nice to have an easier and more user friendly way to find the attribute names, like say a popup on hovering over them. In my sheets, I take pains to name the attributes exactly the same as they are on the character sheet, but that doesnt work for everything (attributes in repeating sets are a little trickier, for example).&nbsp;
1535840630
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
GG: I believe that the Roll20 OGL sheet gives you tool text on a lot of attributes. But yeah, the overwhelming code can appear daunting. The only one that really gives me problems is repeating attributes as you say. Wolf: Thanks for the vote of confidence, but I only make tiny little changes to existing scripts. I know virtually no javascript. My solution for almost all programming issues is to try to force it through Applescript, which although I do know fairly well, has extremely limited focus.
keithcurtis said: GG: I believe that the Roll20 OGL sheet gives you tool text on a lot of attributes. But yeah, the overwhelming code can appear daunting. The only one that really gives me problems is repeating attributes as you say. Wolf: Thanks for the vote of confidence, but I only make tiny little changes to existing scripts. I know virtually no javascript. My solution for almost all programming issues is to try to force it through Applescript, which although I do know fairly well, has extremely limited focus. Keith, don't sell yourself short. &nbsp;Even though you may not feel like you contribute, in almost all of the posts I've made thusfar, there has been a kernel of wisdom coming from your direction. &nbsp;I think most would agree that you have a far better pulse on this stuff than I do - I consider myself a layman, an idea man at best, with the foggiest idea of what I'm doing with these scripts to make my game enjoyable for my players.
G G said: Wolf, that's a very understandable reaction. There is a technical way to find out the stat names, using your browser, but general users aren't aware of it. With a character sheet open, right-click an element on the page (like an attributes input box), and in the menu that pops up, there will be an entry Inspect &nbsp;or Inspect Element . Select that and another window frame will open in the browser, with that input selected. You can find out the attribute name there. Look for a string like name="attr_statname" and the bit after attr_ &nbsp;is the stat name. It might look a bit overwhelming at first, but you can't break anything, so feel free to click around and explore that interface. Just ignore everything you dont understand. You don't need to know what it means. Just use the rightclick -&gt; inspect element any time you need to know a stat name. I agree it would be nice to have an easier and more user friendly way to find the attribute names, like say a popup on hovering over them. In my sheets, I take pains to name the attributes exactly the same as they are on the character sheet, but that doesnt work for everything (attributes in repeating sets are a little trickier, for example).&nbsp; I have the Vista level approved version of Chrome (probably ancient, since Chrome no longer supports Vista). &nbsp;So the inspector may or may not be a lot clunkier than the current one available. &nbsp;Sadly - can't afford a computer at this time, so its a work with what you got kinda thing. &nbsp;Anywho ... I understand the basics of html from back in the day. &nbsp;But Roll20/ css/ and Character sheets use a lot of &lt;div&gt; tags with multi-encased &lt;div&gt; tags following, each with varied purposes. &nbsp;So fishing through all f them with unique ID attributes and what is just identifier and what is programmable function is a raw headache for me using the source code inspector. Like I said, I wish there was a API, callable by Macro it makes, to the effect of: #DiscoverAttr That would spill this to chat window, to help those using the complex APIs like CSA or Tokenmod: Dumping Character Sheet Attributes v1.0: Discovered Sheet Type As: 5e-shaped Key: ATTR_NAME (Options Available) attr_mod1 (0 or 1) attr_isClassBard (yes or no) attr_inspiration (check or uncheck) attr_CharName (any text) attr_HP (any numeral) attr_HPMax (any numeral) etc...
1535859868
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
A LOT of them are listed in the Shaped Sheet Wiki. For the rest, it gets easier with practice.
Jakob said: Yeah, it can be done. Can someone make a guide for this so I don't have to do it? :D !setattr {{ --name ?{Character name} --ammo_auto_use|1 --show_emote|1 --show_weight|0 --automatically_expend_spell_resources|1 --auto_revert_advantage|1 --sanity_toggle|1 --attacks_vs_target_ac|1 --attacks_vs_target_name|1 }} !setattr --name ?{Character name} --show_character_name|{{show_character_name=1}} You can also use --sel instead of&nbsp; --name ?{Character name} to do this by token instead of name. TY So very much Jakob. &nbsp;I know, its annoying. &nbsp;I'm sorry.
Actually, am I wrong in thinking that - as long as its not default configuration as delivered in the original API script, that the 5e Shaped sheet DOES show you all this on the Attributes and Abilities Tab (Settings, not every minute detail of the sheet. &nbsp;But settings are the hardest to capture since they don't have a process that outputs to the chat window. &nbsp;Therefore you can't hit the up arrow and see what went into making the action actually happen)? &nbsp;a.k.a., there's all my setting attributes right there, ready to input into CSA?
1535870973

Edited 1535871006
Jakob
Sheet Author
API Scripter
Yup, all the settings attributes will be in the attributes &amp; abilities tab, if they have been changed at least once. If you start a fresh sheet, then they will probably be on the bottom of the list, below all the attributes that the sheet creates by default.
cool - thats a much easier way to figure manipulating some of the changes, especially setting changes that don't really show up anywhere else.