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

[API] User Interface Framework

Score + 23
1412661323
Alex L.
Pro
Sheet Author
My suggestion isn’t so much a suggestion of a feature but the suggestion on the priority of a feature that is most likely already somewhere in the pipeline. Recently more and more complex and amazing API scripts have been coming out of the API forums, but they are all greatly hampered by the lack of any sort of UI. A good example of this would be Honey Badger’s Power Card script, at the moment you have to have a single line command that becomes ever longer and more complicated to the point where the best way to edit the power card macros is to use an external program. With amazing scripts like Honey Badger’s power cards and Aaron’s TurnMarker already out there I can only imagine what will come once everyone in the forums gets there hands on a UI.
Not sure how this would work since there are sooo many ways something can be scripted or what they could be used for.
1412683839
Alex L.
Pro
Sheet Author
HoneyBadger said: Not sure how this would work since there are sooo many ways something can be scripted or what they could be used for. Pure HTML with special attributes for identification and simple on update and on button press events. Give us abstracted access to JQuery functions would let us push in bits of HTML letting us change the UI layout without sending the it all again. As for what it could be used for your own power card script would be very easy to use with a little UI, use the UI to build a full command string that you store in state and give it an alias then all the user does is call the alias. Just an example but you can see what i mean.
1412707212
The Aaron
Roll20 Production Team
API Scripter
I just added 2 suggestions in this vane: [API] The ability to send HTML anchor tags that link to api commands [API] /direct for whispers I'd love to get some big leaps an strides on API generated UI.
1413917458
The Aaron
Roll20 Production Team
API Scripter
Here's a related suggestion that might be nice: <a href="https://app.roll20.net/forum/post/1281877/api-func" rel="nofollow">https://app.roll20.net/forum/post/1281877/api-func</a>...
Similarly some UI events from the existing UI would help. on Click or on Select type events for graphics, cards, etc would allow us to use existing object structures to create some interactivity. For example, I want to have a graphic object, when the user clicks on it I want to feed them a list of options of what to do with that item. I'd be happy to send it to the chat window, but right now, I don't seem to have a way to even know that a user clicked or selected a graphic until they change it somehow (such as move it).
This is something we really need for the GURPS combat engine a friend and I have been working on. We want to create a paper doll GUI for targeting body parts, like so: But there's currently no tools that make this really doable. We're currently using handouts as a really rough workaround, but ideally we'd like an API generated window that can pop up on command and tells us when it's closed and can use HTML/CSS or whatever it is we want. It's a big obstacle for usability, if we could get that GUI in place then the time spent per turn can go down dramatically. The user can tell what armor their enemy is wearing, non-humanoid anatomy is easily handled with different paper dolls (optionally supplemented with text lists for nonstandard anatomy like wings), range penalties and defenses and dodges can all be handled automatically. It reduces the many factors that go into a GURPS attack and damage roll into something even a complete novice can understand - click what weapon/attack they want to use, click their target, and click a body part to target. Optionally they can pick combat options, but that could be hidden based on GM or player settings. So yeah, we're anxiously awaiting this feature.
I'm amazed this hasn't gotten more attention. One of the first things I tried to do with the API was add a clock to the screen... which isn't possible because the API can't do anything to the UI. The only solution I found was by making a macro my players could see, and renaming it via the API to display the desired information on the button's text. But this resulted in a tiny little clock, that is easily ignored by players, in an encounter in which time management was supposed to be vital. A solution as simple as being able to place a string of text, or a particular image, in a given location on the screen rather than on the VTT would be incredibly useful. All variety of displays could enhance game play, from party HP trackers, to calendars and clocks, mini maps, status markers, compass indicators, quest reminders, etc. And all that could be done with nothing but images and text placed relative to the view-port rather than the table. But as Alex L pointed out, there could be so much more. Giving us the ability to create panels with HTML content, and buttons linked to API events... This would bring a lot of utility to existing scripts, making settings adjustments easier and giving less tech-savvy users an easier way to control all their abilities. And it would enable community developers to create a wide variety of new features, in some cases taking care of requested features that haven't earned enough support, but would nevertheless be useful. But it doesn't even have to be that complicated, just allow us to spawn an image that's attached to the view-port, and add an event that triggers if the image is clicked on, that passes the offset of the click - we can handle the rest if we have to.
I, for one, would love my API scripts to be able to generate a color picker dialog so GMs don't have to know the hex string of the color they want. Or a dialog with check boxes to select multiple options. Or a slider dialog for choosing a number within min/max values. Or...