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

Question about Attributes

1547655608

Edited 1547666453
Hello! I got an idea to give character appraisal skill and wanted to do it automatic for example they use it on goblin and I show them info using @{target|Target1|INFO} but that way it will show same info on every non unique monster so i wonted to fill like 5 attributes for goblin and show every time they use this skill random one with something like @{target|Target1|INFO[[1d5]]}   for Attributes (INFO1, INFO2, INFO3, INFO4, INFO5) But that way it doesn't work (it shows No attribute was found for @{Copy of Spirit|INFO[[1d2]]}), maybe someone has done it before or know a way, to do a macro that will choose random Attribute every time you use it, because that way you can add some small sentences list and make something like a random story generator and that way every monster will have his small history without making 20 same monsters with only 1 Attribute different Thank you!
1547667662
GiGs
Pro
Sheet Author
API Scripter
You cant do this @{target|Target1|INFO[[1d5]]} . IIRC it's because of the order of operations in roll20. It tries to read the attribute before rolling the dice, and at that point the attribute name is not valid.
Ok and is there an option to do it otherwise or maybe you know another way around?
1547672830

Edited 1547672861
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
You would make a rollable table of the info you wanted displayed and then do [[1t[goblinInfo] ]]. This will roll on the table and display an entry at random.
1547678877
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Hmm, would it work to have an attribute with the name of the table to be rolled? Example: Have a character attribute on the goblin sheet named Info, with a value of "GoblinInfo"  [[1t[@{Target|Info}] ]] Or would that require something like Reflexive tables? Even if it did work, though, it would return an error for any creature without that Attribute, or without a corresponding table. If there is a bubble on your tokens you are not using, you could hide the info in there on a token. But in this case, it wouldn't be random, you'd have to assign it per goblin.
1547679750
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Yep, that works as well Keith; actually, I'm reasonably sure that that is part of one of the tricks in your Stupid Trick's thread :).
Thank you! i will try it when i will be back from work )