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

Saving A Recursive Table Output to Character Sheet Attribute

1659253997

Edited 1659254671
Hello Everyone, hoping I can get a hand understanding where things are going wrong. I am trying to build a more robust name generator using recursive tables.  My structure is as follows: table 1: Dwarf-Firstnames-Male Contains 1 item: [[1t[Dwarf-Firstnames-Prefix]]][[1t[Dwarf-Firstnames-Fill]]][[1t[Dwarf-Firstnames-Male]]] table 2: Dwarf-Firstnames-Prefix Contains 73 prefix combinations (A, Ara,Baz, Bof, etc) table 3: Dwarf-Firstnames-Fill Contains 12 filler characters that add variation to the name (n,b,k,v,z, etc) table 4: Dwarf-Firstnames-MaleSuffix Contains 70 Male first name suffixes that masculinize the name (aim, auk, bin, kas, ral, etc) table 5: Dwarf-Surnames-Prefix Contains 250 words (Battle, Drunken, Orc, Mountain, Stone, etc) Table 6: Dwarf-Surnames-Suffix Contains 200 words (ale, armor, axe, beard, bane, etc) Table 7: Dwarf Surnames Contains [[1t[Dwarf-Surnames-Prefix]]][[1t[Dwarf-Surnames-Suffix]]] I can verify the tables are set up properly because of the following command: !rt [[1t[Dwarf-Firstname-Male]]] of the [[1t[Dwarf-Surnames-Prefix]]][[1t[Dwarf-Surnames-Suffix]]] clan which returns things like: Delgim of the Foamytalker clan But, If I use something to take this randomly rolled name and place it into a character sheet, say with the !setattr command of ChatSetAttr, it doesn't work: !setattr --silent --name Character Generator --Firstname|[[1t[Dwarf-Firstname-Male]]] This results in the Firstname field populating with the plaintext recursive table instructions of Dwarf-Firstname-Male ( [[1t[Dwarf-Firstnames-Prefix]]][[1t[Dwarf-Firstnames-Fill]]][[1t[Dwarf-Firstnames-Male]]]) and not the resulting output. I am aware the !rt command is required when generating from recursive tables, but I cannot seem to figure out how I can generate and then store as storing requires !setattr while generating requires !rt. I have tried putting the !rt within the recursive table itself, hoping it is parsed when !setattr first rolls the table but this does nothing beyond including !rt in plaintext within the attribute. Expected: Firstname field contains something like :Thordlon Reality: Firstname field contains:  [[1t[Dwarf-Firstnames-Prefix]]][[1t[Dwarf-Firstnames-Fill]]][[1t[Dwarf-Firstnames-Male]]]
1659271151
The Aaron
Roll20 Production Team
API Scripter
Try putting !rt in front of !estate in that command. That might work, depending on how setattr is written.  !rt !setattr --silent --name Character Generator --Firstname|[[1t[Dwarf-Firstname-Male]]]
The Aaron said: Try putting !rt in front of !estate in that command. That might work, depending on how setattr is written.  !rt !setattr --silent --name Character Generator --Firstname|[[1t[Dwarf-Firstname-Male]]] That's the ticket. You are a legend!
1659295180
The Aaron
Roll20 Production Team
API Scripter
Sweet!  Glad that worked. =D