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 .
×

Problematic characters in attribute values

Has there still been no way devised to "mask" attributes from becoming part of macros and mods they are called into?  This post  was all I could find on the subject. I have some attributes stored as json strings and this is causing a problem since I can't (A) get my sheetworker to work with promises or (B) have sheetworker reference another character sheet. This is the only way I am able to have a large amount of adjustable data in my campaign without having it copied across all sheets as it would use a lot of memory and cause lag. I have a player that can't use chat buttons as he does not have a pc, so that suggestion would not help. Most languages use something like quotes or slashes to do this kind of thing. While it is handy to be able to do     [Character Sheet]     prefix = @{selected|     attrName = testAttr     testAttr = value @{selected|prefix}@{selected|attrName}} which outputs "value", it would be really nice to also be able to do something like this [Character Sheet]     option1value = a|b     option2value = a|b ?{?|This,/@{tester}/|That,/@{tester}/} where my query would print "?: This | That" rather than ?{?|This,@{tester}|That,@{tester}} which prints "?: This | | That | " Side Note: Can we please have date filtering for forum searches?
1676664044

Edited 1676664255
Gauss
Forum Champion
You can hide the values in a roll by wrapping them in extra inline brackets.  Example:  [[@{attr1} + @{attr2}]] will show attr1+attr2 But if you wrap them in extra inline brackets it won't.  [[ [[@{attr1} + @{attr2}]] ]] will only show the total. For the rest of your question I suggest reposting this in the Character Sheet forum to get the best responses. 
I have already tried wrapping in double brackets and it does not work because that is not their function. Those are more of an evaluator for math and rolls. I am posting here because I don't think there is a currently working solution to this issue. The problem is that attributes are evaluated first and resolved to their base text, when this happens the can be subbed in as part of the macro if there is a character the macro is expecting that shows up in it like {}|,. The solution is usually to substitute whatever characters in the usually layered macros is causing this issue for it's html character like '& # 125;' The problem here is that this isn't part of one of the macro layers I'm dealing with but the attribute itself and I can't just sub those in as they would alter the components of the attribute and what it does. Therefore, we need a way to 'wrap' it so that it is ignored by the macro and treated as the reference it is.
1676720631

Edited 1676721588
Gauss
Forum Champion
If you are trying to file a bug report the forums are primarily users helping users. For actual bug reports you should head to the Help Center and file a bug report there.  With that said, if your goal is to turn a roll into a non-roll you could use single brackets [ ]. Single brackets tell the roller that it is a text entry.  Combined with an HTML entity replacing "@" it will leave the attribute as an attribute.  Example: [[1d8 [@{charactername|strength}] ]] Will show up as: [[1d8 [@{charactername|strength}] ]] which then resolves the 1d8  (Character's name was max) This is normally an undesirable effect of HTML entities, as using an HTML entity on an Attribute breaks it. But since you want it to be broken, it should do what you need it to do. (If I am understanding correctly) If this doesn't solve your problem I am a bit unclear on what you want the resulting query to look like. If you could state what the attribute contains that might help.  As I said earlier, I would repost this in character sheets, someone there may have a solution for you. 
I have a character sheet I'm using to store attacks as JSON and retrieve it using ChatSetAttr then use sheetworkers to setAttr which allows my players to regularly update their attack pool. I have a hacky fix in place now. I went into my JSON and replaced all {|},(problematic characters) which took a bit, but now that it is in place, while less readable than the original json is working out alright. I will clone my setup and try your fix as well in the case I run into this in the future. Having a custom compendium or equivalent database option would be really nice though. Now I'm just having issues with ChatSetAttr not triggering sheetworkers even though the toggle is on. Been pulling out my hair the last few weeks running into issues. 
1676791617
Gauss
Forum Champion
I really suggest posting in the Character Sheet forum, lots of folks there that try to help.