ChatSetAttr will work in a standard message (one directly intended for the chat rather than the Script Moderator)... you just have to close it with three bangs: !setattr ...options here... !!! You can place that within a roll query (this is what I think you're referring to when you say, "nested"), so long as you follow normal escaping rules for the query. That is, queries are made up of a prompt followed by options. The options can each be just a single item (the text you pick from the list is the text you drop into your command line), or they can be a label/value pair (where the query displays all of the labels for you to choose from, but the text that makes it to the command line is the value associated with that option). Options in a query are separated by vertical pipes, while label/value pairs are separated by commas. Then there is the ending brace of the query (the right brace enclosing the last option of the query). If any text in your prompt, label, or value would contain a pipe, comma, or right-brace... AND if that pipe, comma, or right-brace is NOT part of a sheet call (like getting an attribute from a character sheet), then that text will have to be replaced with its HTML equivalent: | => | , => , } => } So you can place your ChatSetAttr call in the value portion of your query, enclose it between ! and !!!, and do any HTML substitutions you need to so that your query doesn't break. Attributes (and sheet calls) will resolve first (that's why they don't break the query), then the query will resolve... leaving the appropriate ChatSetAttr command in the command line. Then ChatSetAttr will be notified that there is a message, and it will see the command buried in the text. One caveat about this... ChatSetAttr sees the message concurrently with the message hitting the chat window, so it doesn't have the ability to modify the message before you see it. That means it can't remove its own verbiage from the command line (removing everything between the ! and the !!!)... so that CSA text, if you leave your line structured as it is, now, will still be in the template when you see the message in chat. To get around this, people typically bury the CSA command between (or just outside of) template parts. Currently, your template part is: {{text= ... query result here }} Those last 2 braces, which close the template part, are *outside* of your query, so the template part doesn't close until after your query syntax is finished. That's why, with your line structured the way it is, now, you can't hide the CSA syntax. But by moving the closing double braces *within* the query, you can continue the value portion of each option to include the CSA syntax. To do that, you'll have to... perform the HTML replacements on the braces, so you'll be placing "}}" (without the quotes) include the HTML-substituted braces in each option of the query, regardless of if they have a CSA command or not -- they all need to close that template part So, just as an example, here is the template part with the first two items from your query. The second item in the query looks like it should have the Chi drain that would require the CSA command, so I'll include that in the second one: {{text=Attack:?{Form of Attack |Unarmed,[[d20+@{selected|UnarmedHit}+@{selected|UnarmedHitBonus}@{PhysMod}+?{Modifier|0} [Unarmed] ]] **Unarmed**}} |@{AltUnarmedName},[[d20+@{selected|AltUnarmedHit}+@{selected|AltUnarmedHitBonus}@{PhysMod}+?{Modifier|0} [@{AltUnarmedName}] ]] **@{AltUnarmedName}** **Chi Drain:** *[[d6]]*}}!setattr ...csa options... !!!
|... Each option closes the template part, but the second then continues on to provide a CSA command. Since that command will now fall OUTSIDE of the template part, you won't see it in the final rendering of the message that makes it to the chat output. If it were me, I would: move the braces into the query for each option determine, on its own, what command parameters will make the appropriate change to the character sheet as is necessary for each option of the query where CSA is needed perform any HTML substitutions on that command, and insert it where it needs to be in the query That should get you sorted.