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

Embed a dynamic HTML inside a Sheet

1717725533
Jiboux
Pro
Sheet Author
Compendium Curator
Hello all, In the Game System I am developing the sheet and compendium, they just released a new books with hundreds of new abilities. The system works like a "skill network", rather than a "skill tree" in a sense that depending on a combination of the abilities you already have, if you meet certain conditions you can unlock new abilities. In order to help the users, I have already a small database of this skill network, and I have a sheetworker functions that inspects the characters, and creates a "report" of all the new abilities he could unlock in his progression. This report is currently a plain text, that I display in the sheet in a <textarea>, but I am thinking that with the compendium it could be so much cooler to have the report be in HTML so that each available Ability is an hyperlink that can be clicked to open its compendium page... <textarea> is notable for being plain text only, but is there any other way I didn't think that a sheetworker could actually output a string that would be a valid  HTML , and the HTML string would be displayed somewhere in the sheet ?
1717727327

Edited 1717727370
GiGs
Pro
Sheet Author
API Scripter
There's no way to do what you're asking. Our ability to manipulate HTML in character sheets is very limited: we can't change the HTML on a sheet once the sheet is created and running. I am thinking that with the compendium it could be so much cooler to have the report be in HTML so that each available Ability is an hyperlink that can be clicked to open its compendium page.. This would be neat, tbut note that no existing haracter sheet does this - not even ones created by the roll20 devs. You might be able to use sheet worker and a CSS, and a lot of pre-existing input controls to kind of approximate what your aiming for: e.g type an entry in one option, and every other option in the layout gets changed to fit its relationship. You could look into dataList to simplify the typing and make it more a dropdown-like experience. It's going to take a LOT of work.
1717764527
Finderski
Pro
Sheet Author
Compendium Curator
I wonder if you could leverage the Charactermancer functions to accomplish some of this? I don't know, I've never worked with the charactermancer, so just throwing out ideas to see if anyone else sees a clever way of using it...
1717779926
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Charactermancer could do some of this, but it would probably still just be a repeating section. Charactermancer is also a pain to work with. I'd recommend creating a repeating section that you populate with the abilities that can be acquired and use the compendium button feature to create the link to the compendium entry.
1717784293
FASA
Pro
Marketplace Creator
Compendium Curator
The repeating section was something I was considering, but am reluctant due to loading the Firebase with a lot of junk… in the compendium there are around thousand such abilities, So I could easily imagine a character having access to 50-100 of them… creating a 100 line text and displaying it is relatively harmless, but creating 100 useless data entries one by one may end up with bad side effects
1717789500
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
There's almost no difference in efficiency between storing the data as a single attribute with 1000 characters or 100 attributes with 10 characters. As long as you aren't trying to do something like: Get one attribute value do logic on that value set an attribute value repeat steps 1 - 3 for each of the 100 attributes That would cause severe lag, but just storing the values is no problem at all. I'd also expect that you'd be deleting these once the user had selected one to use.